LED sequencer question...

DC_Kid

Joined Feb 25, 2008
1,072
the silkscreen on that pic gives away what the parts are. the small smt between pic and led's looks like a smt resistor array.

simple to modify that board using some fets on the outputs, then you can drive "anything" you want...
 

Thread Starter

critiera119

Joined Nov 21, 2008
66
the silkscreen on that pic gives away what the parts are. the small smt between pic and led's looks like a smt resistor array.

simple to modify that board using some fets on the outputs, then you can drive "anything" you want...
Which fet(s) would be appropriate to get for it?
 

Thread Starter

critiera119

Joined Nov 21, 2008
66
the silkscreen on that pic gives away what the parts are. the small smt between pic and led's looks like a smt resistor array.

simple to modify that board using some fets on the outputs, then you can drive "anything" you want...
I think it is an 8 channel LED driver between the PIC and LEDs.
 

SgtWookie

Joined Jul 17, 2007
22,230
I'd assume that the 16-pin SOIC critter in the middle is simply a resistor array, consisting of eight independent resistors of suitable rating to limit the current to <20mA for the particular LEDs selected, at whatever the output voltage of the regulator is.

You could probably use the eight + outputs to drive something like a ULN2801 array, to power quite a few LEDs if you wanted to.

You won't be able to add on more LEDs to the board by itself, as the PIC is limited in it's I/O source/sink capability to around 20mA. If you tried to just add LEDs in parallel with the existing LEDs, it wouldn't work well even if they were perfectly matched. If you tried to add them in series, there wouldn't be enough voltage.
 

Thread Starter

critiera119

Joined Nov 21, 2008
66
I'd assume that the 16-pin SOIC critter in the middle is simply a resistor array, consisting of eight independent resistors of suitable rating to limit the current to <20mA for the particular LEDs selected, at whatever the output voltage of the regulator is.

You could probably use the eight + outputs to drive something like a ULN2801 array, to power quite a few LEDs if you wanted to.

You won't be able to add on more LEDs to the board by itself, as the PIC is limited in it's I/O source/sink capability to around 20mA. If you tried to just add LEDs in parallel with the existing LEDs, it wouldn't work well even if they were perfectly matched. If you tried to add them in series, there wouldn't be enough voltage.
Wouldn't I have to get rid of that assumed resistor array if I were going use something like a ULN2801?
 

SgtWookie

Joined Jul 17, 2007
22,230
Wouldn't I have to get rid of that assumed resistor array if I were going use something like a ULN2801?
Actually, I meant to type ULN2803.

The resistor array on the board will have small values of resistance. ULN2803's have a 2.3k base resistor for each channel already. The small added resistance of the array (probably around 100 Ohms) won't make a difference that you could tell. 2.4k is within 5% of 2.3k.
 

Thread Starter

critiera119

Joined Nov 21, 2008
66
Actually, I meant to type ULN2803.

The resistor array on the board will have small values of resistance. ULN2803's have a 2.3k base resistor for each channel already. The small added resistance of the array (probably around 100 Ohms) won't make a difference that you could tell. 2.4k is within 5% of 2.3k.
So connecting the Positives of the 8 channels on the board to pins 1 through 8 on the ULN2803 and then connecting two LEDs in series to each of it's outputs (11-18) should achieve what I want (to power 16 LEDs) in your opinion SgtWookie?

Here is an image I created, sorry I understand a lot better with imagery.

 

SgtWookie

Joined Jul 17, 2007
22,230
That's fine.

You will also need to attach pin 9 to one of the '-' vias on the board, like the one next to where pin 8 of the ULN2803 connects to the board.

The ground pin will also need to be common to whatever supply you choose to use for the LEDs.

Oops - the ULN2803's output will sink current from the LEDs, not source it.

The ULN2803's output sinks current when the input is high, and is electrically open when the input is low.

You will need to connect the cathodes of the LEDs to the ULN2803's outputs. The resistors really should be between your + supply and the LEDs rather than on the ULN2803 outputs.
 

Thread Starter

critiera119

Joined Nov 21, 2008
66
That's fine.

You will also need to attach pin 9 to one of the '-' vias on the board, like the one next to where pin 8 of the ULN2803 connects to the board.

The ground pin will also need to be common to whatever supply you choose to use for the LEDs.

Oops - the ULN2803's output will sink current from the LEDs, not source it.

The ULN2803's output sinks current when the input is high, and is electrically open when the input is low.

You will need to connect the cathodes of the LEDs to the ULN2803's outputs. The resistors really should be between your + supply and the LEDs rather than on the ULN2803 outputs.
How does this look? Please edit, if you would, if not correct.

 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
That looks good.

Since your load is not inductive, you don't have to connect to the Vcc pin (10) on the ULN2803; that's mainly for inductive loads. If you wish, you can connect it to GND via a normally open pushbutton switch, and it will act as a test switch to see if the LEDs are all working.

With the light load your LEDs will present to the ULN2803, it will have a Vce (Voltage collector to emitter) of around 0.6v to 0.7v.

So, to calculate your resistors, you will also need to subtract that Vce from your Vcc supply.

Rlimit >= (Vcc - (Vf_LED1 + Vf_LED2 + Vce)) / DesiredCurrent

For example, if your LEDs are rated for a typical Vf of 2.5v @ 20mA, and you're using a 9v battery for Vcc, you might calculate:
Rlimit >= (9v - (2.5v + 2.5v+ 0.6v))/20mA
Rlimit >= (9 - 5.6)/0.02
Rlimit >= 3.4/0.02
Rlimit >= 170 Ohms.
 

Thread Starter

critiera119

Joined Nov 21, 2008
66
The seller says "You may put two leds in parallel on each output. This would be 16 leds but only 8 outputs controlled." I guess he thinks it will work ok, but like you, I am skeptical. Guess I will have to try it when it gets here and see if the ULN2803 is necessary. Thanks for your help with this SgtWookie, I will report back with my results!
 
Last edited:

Thread Starter

critiera119

Joined Nov 21, 2008
66
You're right. On another forum, someone suggested using 2n3904 or 2n2222a transistors and that it would raise each port to about 500ma.
 

SgtWookie

Joined Jul 17, 2007
22,230
2N3904 transistors are rated for 200mA Ic max, but have a practical limit of about 1/2 that; 100mA.

2N2222 transistors are rated for 800mA Ic max, but have a practical limit of about 500mA.

In either case, you would have to source Ic/10 to the base in order to saturate the transistor. Since the maximum current you can safely source/sink from a PIC pin is 20mA, the maximum collector current you can expect from a typical bjt (bipolar junction transistor) is 200mA or less.

Darlington's don't apply for this rule o' thumb. Neither do MOSFETs; they're a whole 'nuther critter.
 

Thread Starter

critiera119

Joined Nov 21, 2008
66
SgtWookie,

Just wanted to let you know I got the board and decided to try running 2 LEDs in parallel off of each port. Seems to work fine. I also found out that each resistor in the smd network array of 8 is 50ohms. The seller/source assured me it was ok to do so:

"A lot of people ask abut the current limit for PIC. First, there are resistors on the board that limit the current already so you cannot pull excess current. Second the PICs are current limited, that means it prevents more than 25mA per output. The more load you put on it the lower the output voltage drops. You are good to go. The LEDs will just be dimmer if you add then in parallel."

Also, do you know if it is possible for me to download/decompile the code that is on the PIC of this board? I'd like to be able to edit the current LEDs flash sequences and be able to use it for future PICs..
 
Last edited:

Thread Starter

critiera119

Joined Nov 21, 2008
66
Also, do you know if it is possible for me to download/decompile the code that is on the PIC of this board? I'd like to be able to edit the current LEDs flash sequences and be able to use it for future PICs.
 
Top