Sinking and Sourcing Basics

thansen090

New Member
I'm wanting to control some LEDs by sinking and sourcing current. I know any PICAXE can do this but... The catch is I want to be able to turn all ON at the same time which would exceed power limits. Some part recommendations would be nice.

More info: I want to build a strip with 30 LEDs: 6 groups of 5 LEDS wired so I can control any single LED.

*This is probably one of those things that's been covered ad nauseum so please forgive me.
 

cypherf0x

New Member
2N7000 Mosfets, or 2N2222 transistors. There are larger mosfets if you're using higher power LEDs. Look for N-Channel enhancement mode mosfets. They're easier than transistors as they're voltage driven. More information would help narrow down what you need.
 
Last edited:

premelec

Senior Member
@thansen090 - the basic issue which you have not explicitly stated is - what is the maximum amount of current you wish to control? There are tiny LEDs and huge LEDs with very different current requirements - further you want to turn them all on or control any of them individually... from what you say maybe 6 on/offs for the groups of 5 - is that so? Or 30 individual - please define your needs...
 

erco

Senior Member
First, figure out how you will multiplex them, likely in 5 rows of 6 columns. So you will need 11 output pins to control them, thus a 20M2 or X2 or better. Is that where you're heading?

If you're careful, don't leave EVERYTHING on forever, and use low current LEDs (2-3 mA) you could do it directly without any switching transistors. FYI, most chips (PICAXEs included) can sink more current than they can source, and at lower resistance.
 

thansen090

New Member
More info is always necessary, isn't it? Here goes:

erco: That's exactly where I'm heading. In strip form but same wiring as a grid. Yes, 11 outputs to individually control 30 LEDs. I also need 5 inputs. I was considering an 18M2 to save a little space but I do have a couple 20X2 chips. This project probably would be easier with the 20's. Space was originally a concern but now I can go as big as I want/need.

The transistor issue is where I'm stuck. Would be nice to have something in IC form but individual transistors are an option too. I plan to use bright 5mm LEDs - diffused white. Not sure how much current these would draw but I'm pretty sure it would be more than a PICAXE could handle with all on at the same time indefinitely. This will be a light strip for my car. Any other info needed? Thanks!
 

westaust55

Moderator
If your 30 LEDs are multiplexed in a 6 x 5 array using 11 outputs then the max number on at once is 6 LEDs.
High brightness LED can be seen at just a few mA.
Even at say 10 mA each that results in 60 mA max.

But if you are looking for very bright illumination then say 20 mA (or more) in which cas transistors are needed.

An option is a ULN2803 for low side and a UDN2981 for the high side.
These are both 8-channel Darlington arrays. Selection of series resistors for LEDs needs to consider Darlington volt drop.
 
Last edited:
Top