STP16CP05 with Arduino wiring help.

Hi, i' new to arduino and wanted to drive multiple LED's from minimal pins. Someone recourmended the STP16CP05 so i got 2 as i want to drive quite a few LED's.

This is the one I have to play with (well 2 of them)

http://uk.farnell.com/stmicroelectronics/stp16cp05mtr/ic-sm-driver-led-sink-16-bit/dp/1542235

But as i said i'm a n00b at this so want to get it right and not damage the chips..

and I want to use these to regulate the input voltage to the chip. I'll be coming from about 12V down to 5V for the chips.

so starting with the inputs.

Im going to use the TS1117B with 2 x 10uF capacitors with them from pin 1 and 3 to groud.

Pin 3 will be the input 12V (with a capacitor to ground) Pin 2 will be the output 5V (with a capacitor to ground) Pin 1 will be grounded

So now on to the STP16CP05 this is where i get a little unsure. I also believe it to be sinking (which i think means i connect the negative of the LED to the IC output & also that I dont need a resistor?)

the example im trying to follow is from here:

http://arduino.cc/en/Tutorial/ShiftOut

Pin: 1=GND 2=Serial data input (from Arduino) in example Arduino pin 14 3=Clock input terminal (from Arduino) in example Arduino pin 12 4=Latch terminal ((from Arduino) in example Arduino pin 8 5-20 = negative side of LED without any resistors? with +5 on the otherside 22=To the 2nd IC pin 14 (IC 2 is identical to 1 without the output) 23=A resistor to limit current flow for all the LED's (how do a select the correct vaule?) 24=The +5V from the voltage regulator

I really would like to understand this and get it right. Any help would be great.

Thanks Rob

23=A resistor to limit current flow for all the LED's (how do a select the correct vaule?)

From a datasheet:

Table 10. Output current-R-EXT resistor

R-EXT ([ch937]) = Output current (mA) 7370 3 4270 5 2056 10 1006 20 382 50 251 80 200 100

You could even use an adjustable pot to set the final value to your liking after you have it running.

Lefty

oh sorry. I’m not sure about all this and thanks for clearing it up. so about 1000Ohms will give me 20mA. Does sinking mean i connect the negative to the chip and positive to my own voltage source?

oh sorry. I'm not sure about all this and thanks for clearing it up. so about 1000Ohms will give me 20mA. Does sinking mean i connect the negative to the chip and positive to my own voltage source?

Output pins wire to the cathode lead of LED and the anode lead would wire to the voltage source. Calling the leads negitive and positive for LEDs is a little 'simplistic'. ;)

Lefty

sure :-) i just can never remember which is neg and pos in terms of ano and catho. :-)

So is my idea correct?

So is my idea correct?

Which idea is that?

That i can use the 5V reg on LED's? and just limit the amps?

Maybe i should just a voltage dividrer for the voltage?

and just limit the amps?

You can use any voltage you want so long as the current is limited to less than or equal to the LED's current limit.

thanks :-) really? why do they say forward voltage ie 3.5V? Thats just confusing. Thanks again Rob

why do they say forward voltage ie 3.5V? Thats just confusing.
Thanks again Rob

Because a diode will not start to conduct until the applied voltage is the correct polarity and exceeds it’s forward voltage drop rating. Then, even if you raise the applied voltage, the volt drop stays constant across the diode. Different diodes, especial LEDs, have different forward voltage drop ratings.

Lefty