The max pin out on Arduino it 40ma, then there are max values for combination of pins, etc... I read the entire Arduino is maxed at 200ma.
I need to do multiplexing to get 22 outs. Since multiplexing takes 3 pins from Arduino, won't this go over the amperage limits? Like if I use a 1k resistor at each pinout, then I get 10ma per pin. with 22, that's 220ma.
I am controlling a TIP121 on each pin. essentially want to control 22 TIP121.
I'll try to make a drawing of the schematics, but I'm not sure it's needed.
My question is pretty simple. One out of the Arduino is maximum 40ma. I'm wondering what happens when you use multiplexing to multiply those outs. Those 8 multiplexed outs, can then each have 40ma, or do I have to calculate based on the fact that they are coming from 3 pins each with 40ma max. so 40ma times 3 = 120ma for 8 pins. So now 15ma per pin?
djangojames:
I'll try to make a drawing of the schematics, but I'm not sure it's needed.
I'm pretty sure it is! Your reply has made the picture even more confusing. You are now implying the design may include shift registers driving solenoids via transistors. How does multiplexing fit into the design? These large currents sourced or sunk by the Arduino that you are so concerned about: what are they doing?
If I was designing a circuit to drive 22 solenoids, I would probably use 3 x tpic6*595 shift registers, daisy-chained. The choice of which exact version of the shift register (a, b, c etc) would be determined by the current required to drive the solenoids. If the solenoids require more than around 350mA, then transistors may be needed, in which case I would use 3 ordinary 74hc595 shift registers driving power-MOSFETs. This design involves no multiplexing, and the current demand on the Arduino would be negligible.
The Arduino is not powering the solenoids, only powering the TIP121, which is why I talked about the TIP121 in the first post.
Forget the Mosfets, the solenoids, for a moment and think only of the Arduino pins.
My question is hyper simple. The Arduino has a limit of 40ma per pin (Is this not correct?). The entire Arduino itself is limited at 200ma (from the spec sheets I read). When I use a 1k resistor at the output of a pin it brings down to 5ma. But, 22 pin outs like this is 22 * 5ma, so over the 200ma limit. This is what worries me.
In other words, when you start adding outs to the Arduino, do you have to start worrying about the total current being augmented and perhaps too much to bear for the Arduino.
I offer a board with 32 discrete N-channel MOSFETs, good for sinking high current. Traces sized out to support 1A/channel with all 8 channels in a group on at once. Separate blue connecter bring power in to each group of 8. Daisychainable if you need more than 32 channels.
I have a P-channel board also for sourcing current, I need to get a picture posted.
Shift data into 4 shift registers to turn channels on or off. http://www.crossroadsfencing.com/BobuinoRev17/
I thought this was called multiplexing. Is it not?
Hmmm... does using shift registers as output expanders in itself count as multiplexing? Well... might have to leave that one to the philosophers! I can imagine some definitions where it would. But it's not usually what we mean around here. We usually mean "time-division multiplexing" where leds, for example, are lit for short periods, one at a time (or one group at a time) so fast that it appears as though they are all lit together. That's not what you are doing with your solenoids.
But to your question. The Arduino pins are not powering the transistors at all. The shift register outputs are doing that. The Arduino pins are only sending digital data to the shift register inputs, and that requires almost zero current. The shift register outputs also have current limits. Around 25mA per pin and 70mA per chip. Tip120 are darlingons if i remember, so have very high gain and will need only a small current to switch them on, so you can use quite high value resistors on their bases.
PaulRB:
Hmmm... does using shift registers as output expanders in itself count as multiplexing? Well... might have to leave that one to the philosophers! I can imagine some definitions where it would. But it's not usually what we mean around here. We usually mean "time-division multiplexing" where leds, for example, are lit for short periods, one at a time (or one group at a time) so fast that it appears as though they are all lit together. That's not what you are doing with your solenoids.
But to your question. The Arduino pins are not powering the transistors at all. The shift register outputs are doing that. The Arduino pins are only sending digital data to the shift register inputs, and that requires almost zero current. The shift register outputs also have current limits. Around 25mA per pin and 70mA per chip. Tip120 are darlingons if i remember, so have very high gain and will need only a small current to switch them on, so you can use quite high value resistors on their bases.
Thanks for your clarifications, especially the one on multiplexing. I read so many tutorials called 'multiplexing' which was about using shift registers for expansion. I guess they were using the term in a very loose way.
A word of advice: in general, take anything you read on Instructables with a large pinch of salt. However, in this case, they were indeed using the shift register as part of a multiplexing circuit. 16 leds driven by only 8 shift register outputs = multiplexing. But just because a circuit involves a shift register does not mean it is a multiplexing circuit. In your case, 22 transistors driven by 22 shift register outputs = not multiplexing.
Be careful not to power these transistors/solenoids with voltage/current that passes through the Arduino board. An external power supply will be needed for that (although this could be used the power the Arduino also). Its ok to power the shift registers off the Arduino's 5V supply, they won't use much.