I have purchased a set of ultra-bright white 5mm 20mA LEDs that I am running in conjunction with 3 74HC595s.
Most tutorials including the Arduino tutorial on the IC are using 220ohm resistors with LEDs.
So, I have used 220ohm resistors to test 24 of them on a breadboard, but I feel as though they could be brighter.
I've looked at the spec of my LEDs and they have a forward voltage of 3.2 - 3.8v. After doing the maths (1.5/0.020) I'm getting a value of 75ohms.
I would try this value, but I am concerned about this having an adverse affect on the IC. I've looked at the data sheet, but I'm a little inexperienced when decoding the information as yet i.e. I couldn't see anything on there about resistance with LEDs.
Well now, the datasheet tells you (section 8 ) that the maximum current for the IC is 70 mA, so if you round that down a little you conclude that you need to limit the LED current to 8 mA each, and 1.5/0.008 gives you 180 ohms. Allowing a reasonable safety margin, your 220 ohm resistors are correct and you could not see the difference anyway if they were 180 ohm.
You could swap your 74hc595 for tpic6c595 shift registers. These operate almost exactly the same but can sink (not source) far more current and could easily handle 8 x 20 mA.
If you have uln2803 you could attach one to each 74hc595 and that would have a similar effect. But if you are going to buy chips you might as well get the tpics.
I may try swapping a few of the resistors to 180ohms to see if there is an difference.
Is the 'tpic6c595' the same as the 74HC595 in terms of its pin layout? Its just that I have made and soldered a Adafruit pcb perma board that holds three 74HC595s that share the same latch pin, clock pin, master reset, and OE pin that is connected to a PWM pin on the Arduino. If they are, they could literally be put in replacement for the others.
As far as I know, if they are the same, I would just have to just swap the polarity of my LEDs (sinking)?
daz1761:
I have used 220ohm resistors to test 24 of them on a breadboard
daz1761:
Is the 'tpic6c595' the same as the 74HC595 in terms of its pin layout? Its just that I have made and soldered a Adafruit pcb perma board that holds three 74HC595s that share the same latch pin, clock pin, master reset, and OE pin that is connected to a PWM pin on the Arduino. If they are, they could literally be put in replacement for the others.
It appears they are not pin compatible. I believe the idea behind the Adafruit permaboards is that it is easy to transfer a circuit layout from a breadboard. Perhaps if you had found this issue and fixed it before anything got soldered...
daz1761:
I would just have to just swap the polarity of my LEDs (sinking)?
Also, would my code need changing to 'shiftin'?
Yes, the tpic outputs can only sink, they can't source current. But no code changes should be needed.
I've attached a picture of my perma board as I can remove and replace the IC's and change the connections as I'm using header pins rather that 'hard' wiring everything.
Could you please point me in the right direction in terms of which IC to purchase as eBay is bringing up DIP20's and DIP16's. Do the 20s just have more outputs?
E-bay = crap a lot of times. Digikey, or Mouser (often no sales tax), have parts in a few days vs weeks, parts traceable to manufacturer vs who knows where.
You wire the tpic up just the same as the 74hc595. Both chips have all the same functions, its just that those functions have slightly different names and are on different physical pins. But clock is still clock, data is still data and so on.
The reason there are so many examples of 74hc595 driving leds on youtube is that those people didn't ask for advice on the best chip to use. Often they are overloading their 74hc595s, reducing the life of the chip and making the leds dimmer than expected.
daz1761:
I take it that SRCK is the clock and RCK is the latch pin?
Yes
daz1761:
I've also noticed that there doesn't seem to be a OE (output enable) pin, which is what I am currently using to fade my LEDs in and out.
Its the /G pin.
daz1761:
Just checked my IC and its an Adafruit TPICB595. The diagram seems to refer to a TPIC6C596, or are they the same?
No such chip as TPICB595, did you mean TPIC6B595?
The difference between the '595 and '596 is quite subtle and is to do with data timing. Either will be fine for your circuit. The "B" variant has higher current output than "C" but, again, either will be fine for your circuit.
If you want to be sure that you are getting max brightness with the full max 20mA current, use a multimeter to measure the actual current with 90R. Test several leds to make sure they are the same. Also check the supply is actually 5V. If the current is less than 20mA then you can experiment with slightly lower resistors. However, if your supply is below 5V and in the future you might use a different supply which might be closer to or slightly over 5V, that will increase the current, so you might want to leave a safety margin.