Hey,
i'm wating to drive about 20 Leds from a output on the arduino using 2 LM3914.
Problem is I don't really understand the wiring or which equation relate to what. Which resistors i change and what that effects. I would rather understand than just be told if possible.
I have a 12V supply and can obveously make that to 5V if thats more practical.
Question is how do the resisots effect things? How do i know what change in voltage lights up how many LED's? Would 50% PWM from the arduino board = 2.5V?
Upper line is 5v, lower is zero. You can't get 2.5 out of a digital pin. But the PWM kind of "tricks" you into seeing the LED lit up half way by turning it on and off really fast.
The LM3914 might not be the ideal way to drive LEDs from an arduino. It is a complete A-to-LED driver unit designed to take an analogue input (say 0 to X volts) and drive a range of 10 LEDS with LED1 lighting at 0.1X, LED2 at 0.2X etc with LED10 lighting at X
The output of the arduino is a PWM 5 volt signal. If you want to create a 0-5 analogue voltage from that to control the 3914 you'll have to create an R-C smoothing system and then use that smoothed output to drive the LM3914. Generally the 3914 switching of LEDs is not hard-off to hard-on, there is a sort of deadband where the LEDs go through a transition range from off to on. As the input moves from one transition point to the next, the next LED starts to glow dimly and isn't full on until the cross-over deadband has been exceeded.
You might be better to use a couple of binary LED drivers to drive 16 LEDs. That way you switch the LEDs under software control and each will be either full off or full on. If you really need 20 then use 3 driver units.
how would i go about smoothing it? ( I may want to remove the arduino at some point and just hard wire it )
can you suggest a suitable IC for the binary controller version? how many pins would that use on the Arduino? trying to save as many pins as possible as I wont have many spare at the end of this project.
Hi and sorry for my poor english, I'm italian.
It is possible to wire LM3914 to drive leds with arduino, I've used them for my little project (sorry for bad image quality, I'll post some video when I'll finish my work): http://img267.imageshack.us/img267/249/kittscale.png
LM3914 does not like pwm as input so I have put a low pass filter on the arduino pwm output and it works great (a 100K resistor and a 1uF capacitor between arduino pwm pin and LM3914. I'm a beginner in elecroinc and scripting so these values may be wrong... forgive me if I'm in fault
However shift registers are better to drive leds even if they require 3 pin to work against one of LM3914, they are less expensive
Greetings from Italy,
Pelletta
I think with this one I would have to use resitors to drive the LED's. Can anyone find one i can get in the UK easily? adn less than £12 for one IC + P&P
sorry did a quick search and could find any of the 3 above so i was looking for a alt. And the one I added was used in a Arduino with a 8 segment display.
thanks for the help rob
The 595 will work to a point, the LEDs will not be that bright depending on the actual type used.
So to be fair if you just want to play around and can get the 595s in the local High St then by all means get a couple and try them out. But if you have to order out you might as well get a better chip.
I haven't used the TLC5916 but it looks like the best candidate.