1

shift register with leds

Hi

I am programmer that just started learning electronics and Arduino. I built this simple circuit on Autodesk Circuits earlier. Originally I used 220 ohm resistors. Then when I ran the simulation and turned on more than 4 of the leds the simulator warned that I exceeded the max current for the shift register.

I then upgraded to 560 ohm resistors which solved the problem.

What I would like to know is how can I calculate the current through the shift register for each n-number of leds I turn on? That way I can calculate the right resistor that I need before I burn out my electronics.

Thanks for the help on this.

0

It's just N×IL+IQ where N is the number of LEDs, IL is the current through each LED and IQ is the current the shift register needs to operate (quiescent current).

The current through each LED is just (VIN - VLED) ÷ R, where VIN is 5V, VLED is the forward voltage drop of the LED, and R is the value of your resistor.

So you can combine it to be a single formula, if all your LEDs are the same and your resistors are the same, to:

IT = N × ((VIN - VLED) ÷ R) + IQ

  • There's a voltage drop across the shift register, too, but that may not be worth worrying about. VLED may be most simply measured in operation - or else, calculating based on VLED=0 would somewhat overestimate the current, which isn't really a bad thing to do when comparing against a limit, since it just builds in some margin. But if the LED were blue with a high forward voltage, then VLED would be very large - if the supply were only 3.3v it would actually be the majority of the voltage drop. – Chris Stratton Oct 16 '16 at 17:36
  • 2
    Of course, the correct thing to do is throw away the poxy shift register and use a proper LED driver with constant current sink... Many are identical in operation from a programming and interfacing perspective, and remove the need for all the resistors completely. – Majenko Oct 16 '16 at 17:37
  • Thanks. I looked through the data sheet. Can find Iq only Icc and Io for each pin. I also have no idea what the specs are for the leds the simulator does not provide specs. I will just make sure I know the specs before I put together a real circuit. – Heinrich Kruger Oct 16 '16 at 18:04
  • Sorry meant I can't find Iq. – Heinrich Kruger Oct 16 '16 at 18:04
  • @HeinrichKruger 80µA – Majenko Oct 16 '16 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.