Can about 6 pins on one Prop somehow control more than 60 mosfets?
ElectricAye
Posts: 4,561
Hi,
I need to control about 60 mosfets (maybe more) on a system that creates a gentle thermal gradient over a span of about 24 inches, and I was wondering whether or not a single Prop could use some sort of addressable device to drive that many mosfets. The mosfets would have to take turns, of course, being switched totally on and off. I don't even know what such an addressable device might be called so I don't know what to search for. Any suggestions would be wonderful.
thanks,
Mark
I need to control about 60 mosfets (maybe more) on a system that creates a gentle thermal gradient over a span of about 24 inches, and I was wondering whether or not a single Prop could use some sort of addressable device to drive that many mosfets. The mosfets would have to take turns, of course, being switched totally on and off. I don't even know what such an addressable device might be called so I don't know what to search for. Any suggestions would be wonderful.
thanks,
Mark
Comments
there is already a PWM-object for the 74HC595 in the obex.
It works with one long. So without changing the PASM-driver you would start two cogs each driving 4x 74HC595-chips
to get 64 channels
If you adapt the PASM-driver you can shiftout two longs to 8x 74HC595-chips
best regards
Stefan
thanks,
Mark
at first glance the object for this obex.parallax.com/objects/437/ looks deliciously easy to use, employing only 3 pins to drive up to 32 outputs using PWM. Cool!
But would it be possible to utilize 2 separate instances of this object in the same program (on a single Propeller) and get another set of 3 pins to drive yet another 32 outputs? Maybe?
I hate to be greedy but....
Make a second objectname same objectfile choose a second set of IO-Pins start both objects and use both objects
modified code from the demo-program:
How did you ever utilise 2 different objects in one project ?
With which intelligence should a cog recognize "oh exact same code as in my neighbour-cog ! Hey that's boring I don't execute this code !"
best regards
Stefan
Post Edited (StefanL38) : 10/21/2009 7:50:50 AM GMT
Although not as easy for PWM you could also use the PCF8575 with a basic I2C to control the mosfets. With Mike Green's I2C object from some of his items, you can get the bus to move very fast. I can flash LED's so fast they look in solid state on. But the human eye is not a good judge.
The nice thing about the PCF is the easy control to use it. And any pins you didn't use, could be used for extra I/O.
Just an idea........I would probably go with the shift register......just easier to code.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Please note: Due to economic conditions the light at the end of the tunnel will be turned off until further notice. Thanks for your understanding.
You may also want to look at the MCP23S517 also. It is a 16 port addressable latch using SPI and you can run 8 devices on one SPI port for 128 outputs. The main difference is that each group of 8 bits are addressable so you don't have to send data to all bits as you would for a shift register.
Donald
couldn't find anything with googling for "MCP23S517" is there a typo in it ?
can you post again a url and the manufacturer ?
best regards
Stefan
Perhaps a different approach from those already mentioned would be to use a matrix LED driver IC. Something like the Maxim MAX7219 comes to mind . Each 7219 has a three wire SPI interface and can control up to 64 individual LEDs (or MOSFETs perhaps) in an 8x8 matrix. You can daisy-chain the 7219's as well.
The MAX7219 isn't cheap though. You can get them for $6.50 USD each in unit quantity at www.seeedstudio.com. In contrast the 74HC595 8-bit shift register is $0.50 USD each in unit quantity from the same source; 8 of them is $4.00 vs. $6.50 for the MAX7219 of which you need only one. Tough call at first glance, but the Devil is in the details...
I'm not sure how the MAX7219 would drive MOSFETs. The MAX7219 has constant current source/sink to drive LEDs with no current limiting resistor required. Off the top of my head, perhaps all you need is one resistor in-place of an LED per driven MOSFET. That's a fun design experiment I leave to you. It might be neat to use an LED and take the forward drop across it to drive a MOSFET, but I think the voltage would be a tad too low to work with unless you buffer it. If it did work you not only drive the MOSFET but you get a little LED indicator to tell you when it is on (or off) too.
The MAX7219 Data sheet is here:
www.maxim-ic.com/quick_view2.cfm/qv_pk/1339
Enjoy, David
Donald
Oops! Yes, indeed you did. I'm not sure why it didn't register in my brain! Thanks, Stefan, for clarifying this for me and for providing the sample code, too.
To James Long, Drone, and Shanghai Fool : now I am suffering an embarrassment of riches. I think I'll try the shift register approach first and see how it goes. But it's great to know there are some i2c techniques and other possibilities to pick from if I run out of pins or need to modify the general approach.
I had been dreading taking on this part of the project but thanks to you guys I'm now looking forward to working on it.
many thanks to all for saving my day,
Mark
Why not drive the mosfets with two SX48's connected serially to to Prop?
Cheers,
Peter (pjv)
Good question. The short answer is: I have no idea what I'm doing!
To JonnyMac and pjv, thanks for the suggestions. I have so many options, it seems, and I'm simply overwhelmed at this point on what to do. I would like to feed the PWM signals through whatever system I go with, and since there's already an object for PWM working with the 74HC595, I'll probably try that first. It looks fairly easy to use. I am definitely bookmarking all these replies, though, so I know in the future what else I can use.
you guys are great!
thanks so much!
Unless you have some unusual requirements, it would be very simple to have each of 2 SX48's run 30 fets in PWM mode, with a master -prop or SX- sending serially which unit is to be at what duty cycle, or all together.
The beauty of using an SX is that you can make it behave in any manner you like.... no 'rules'.
Piece of cake, really.
Cheers,
Peter (pjv)
Peter, I believe you but I've never worked with the SX. You're talking about the SX from Parallax, is that right?
If you are interested, I can help you learn or give some pointers.... even write your code, but then you would not be learning.
You will need to explain in some detail what you are trying to accomplish and what restrictions or challenges there might be.
Cheers,
Peter (pjv)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
The issue with the shift register is that the data shifts and gets output on the outputs while it shifts. Unless that shift register has some output enable input... (The '164 has none).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
One XMOS XS1-L1 chip (64 I/Os) at $8.70 is another way to do it.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 10/23/2009 8:35:44 PM GMT
The thing with the XMOS chip is that it needs 1V, and while it is not the only way the suggested switching regulator plus extra components rise the cost quite a bit. But some LDO that can do 1V may be available.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 10/23/2009 8:55:33 PM GMT
Only if the latch-input is toggled the bits of the shiftregister were transferred to the outputregister.
best regards
Stefan
thanks again for all your help,
Mark
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Watching the world pass me by, one photon at a time.
kwinn,
this looks very interesting! Wow, it's like my dream chip! However, do you happen to know if it would work with the object that is already available for the 74HC595? obex.parallax.com/objects/437/ Each of these heaters runs at 15 volts DC and stands at about 100 ohms, so it looks like it would be an excellent match. But I'm worried that I would have to write up tons of new software, and since lots of the things in the OBEX are assembly (which I still don't know), I get nervous. Any idea if this could really be the chip of my dreams?
thanks so much!
Mark
That's excellent news! I was away from my windows PC and couldn't see if the Spin code would work the same. I'm glad you enticed me to take another look at these kinds of chips (JonnyMac suggested something similar last week but I got worried about the non-through-hole nature of the thing.) Your suggestion appears to have a through-hole version but now it's a matter of finding somebody who has them in stock.
a thousand thanks!
Mark
Todd,
thanks for the suggestion. Unfortunately for me these all appear in a non-through-hole version. And I'm too much of a wimp at this point to graduate to dealing with those teensy-weenie pins. One of these days I'll get there, though.
much obliged,
Mark