I was asked by my superior to create a battery meter using the LM3914 by National Semiconductor to drive a set of 10 green LEDs that will light up from 12V to 13V.
I started out by checking out the
datasheet. The example used on page 2 was fine and dandy for measuring a voltage from 0 to 5V, but for a battery meter I needed to measure the voltage starting at 12V and ending at 13V. I initially thought this would be a quick and easy assignment, and if it wasn't for a couple of naive mistakes, it would have been.
The trick with using the LM3914 is remember a couple of key points about its operation:
- The voltage between Ref Out and Ref Adj is kept constant at 1.25V. This means that the resistance between the two terminals(R1) will decide what current flows through that branch(R1 and R2).
- The voltage powering the chip must be 1.5V more than the upper limit of the signal voltage.
- The LEDs must be tied to V+ and the chip.
If I had known the forementioned facts, I would have saved myself a lot of headaches. After figuring out those tricks, its a simple matter of figuring out how to get 13V at RHi(Pin 6) and 12V at RLo(Pin 4).
The following schematic is the end product.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgohPiWAUdovRG7veHLyoikeo1BgFsE-Jl5svyRJ1q969wZny27CFTprJDBmzIF1eUIXkdii49DYkPDSKR5sadH5ED1Va3lqkS31HMh68XL3_z14YeHkSZpgFgv8p3EHrkW6VZiGsGqm5K5/s400/Corrected+LED.jpg)
Note: Pin 9 is the "mode" pin. Either by tying it high or floating it, you can choose to display in bar mode or dot mode. The mode determines whether the LED array displays your voltage as a solid bar or a single dot. If you have a non-zero lower limit, you may split up R2, in my case R4, and treat it as a voltage divider to use as your lower limit
if you are using dot mode. Otherwise, you must use an external reference because the current pulled into pin 4 in bar mode is far to large and will swing your lower limit around.
**Update**
A couple of photos of the schematic on a bread board.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizA8bmrNWh8dRcPpQydkYH295hrKoZAsT5AuONArHR-cs4m4__TQIeHVSIP0G3XuQ5-B_U1xXqGmEUhYoi4lqsuBabt-_ozwYX7XWpERRV5HVz1t8PPYbpM11Zhdm5kc11I_KuoA4GZr4i/s400/DSCN0248.JPG)