Dot/Bar Display Driver Hookup Guide
The LM3914 and LM3916 are a two ICs in a series of monolithic, analog-controlled LED drivers. With these chips, all it takes is a single, analog signal to drive a string of 10+ LEDs, which can be configured into either bar mode (where all LEDs below a certain point turn on) or dot mode (with only a single LED on at a time). Hook them up properly, and you can create all sorts of nifty multi-LED displays, like an audio-visualizing VU meter.
These two ICs are similar in pin-out and interface. They differ in how they map an analog signal to output LED. The LM3914 uses a linear output scale while the LM3916 uses a more logarithmic VU (volume unit) scale, which makes it well-suited to audio applications.
In this tutorial we’ll dig into the datasheet of these LED drivers to find out what makes them tick, and take a close look at the pinout of the 18-pin DIP chips. Finally, we’ll show a pair of example circuits that show a simple hookup and a more advanced, cascaded hookup.
If you want to follow along with this tutorial, here are the components we used to make our driver circuits:
- IC: 1x LM3914 for the simple circuit, 2-4x LM3916 for the cascaded circuit.
- Display: 5mm LEDs and/or 2-4 Bar Graph LEDs
- A variety of resistors from the Resistor Kit
- Full-Size Breadboard
- Potentiometer (or any sensor that can produce an analog signal)
- Breadboard Jumper Wires
- Power Supply:
Working with these ICs is fairly simple – no crazy microcontrollers or programming required! Here are a few basic electronics concepts you should be familiar with, before moving forward:
On this page we’ll take a look at the pinout of the 18-pin LM3914/6. We’ll also dig a little deeper to see what makes the ICs do what they do.
The DIP (through-hole, dual-inline package) version of this chip has 18 pins, and both a dot and notch to indicate polarity.
Over half of the pins are in charge of driving the LEDs. The remaining pins are used for power, reference voltages, and control of the IC. Here is an overview of the chip’s pinout:
|Pin #||Pin Name||Pin Function||Pin #||Pin Name||Pin Function|
|1||LED 1||First (lowest value) LED||18||LED 2||2nd LED|
|2||V−||Ground||17||LED 3||3rd LED|
|3||V+||Supply voltage (3-25V)||16||LED 4||4th LED|
|4||RLO||Divider low voltage||15||LED 5||5th LED|
|5||Signal In||Analog signal in||14||LED 6||6th LED|
|6||RHI||Divider high voltage||13||LED 7||7th LED|
|7||Ref Out||Reference output voltage||12||LED 8||8th LED|
|8||Ref Adj||Voltage reference adjust||11||LED 9||9th LED|
|9||Mode||Dot/Bar mode select||10||LED 10||Last (higest analog input) LED|
That may seem a daunting list of pins and reference voltages to supply, but in reality it can be very simple. Many of those pins can either be tied to ground, VCC, or even left floating. Other pins may require a resistor or two to set constant current or voltage values.
The LED outputs are all open-collectors, so they sink current. Connect the cathode of an LED to these pins and tie the other pin of the LED – the anode – to your voltage supply. There is no need for current limiting resistors, as the chip takes care of current regulation.
The Mode pin allows you to select between “bar” mode and “dot” mode. In bar mode, all LEDs sequentially turn on. So, if the signal voltage is near max, all LEDs should be on. In “dot” mode just a single LED is on at any time. Connect mode directly to the power source for bar mode, and leave it floating for dot mode.
|Mode||Mode Pin Setting|
|Bar Graph||Tied directly to V+|
|Dot Display||Left floating (no connection)|
|Dot Display (cascaded drivers)||Mode pin of first driver connected to pin 1 of next.|
Setting the Analog Range with RHI and RLO
The RHI (pin 6) and RLO (pin 4) pins are used to map the sensing range of the LM3914/6. RHI sets the maximum voltage, and RLO sets the minimum voltage.
These two pins can be connected to any voltage as long as it’s 1.5V below the supply voltage (V+), and greater than 0V.
Setting LED Current with Ref Out
The current drawn out of the Ref Out pin (pin 7) sets the current that flows through each LED, so this pin can be used to adjust the LED brightness.
If a resistor (RL) is connected from that pin to ground, the current flowing through each LED will be about equal to this equation:
So, for example, if you have a 1kΩ resistor connected from pin 7 to ground, the LED current should be around 12.5 mA.
If you have a more complex circuit connected to this pin, remember that the voltage between Ref Out and Ref Adj pin (pin 8) should be 1.25V. And the LED current is equal to 10 times the current coming out of Ref Out.
The Internals – A Chain of Comparators
Note: It’s not critical to understand how these chips work, but it is a neat study into the internals of an integrated circuit. Feel free to skip to the next page, if this looks a little too much like a Circuits I class.
The image below, from the LM3914/6 datasheet, provides an excellent overview of what’s going on inside these chips:
Each LED is controlled by the output of a comparator, which is a very simple op amp circuit. If the voltage going into the + (non-inverting) pin is greater than that going into − (inverting), the comparator outputs a 1 (high, or, in this case the pin “floats”). If the − pin voltage is greater than +, the output of the comparator is a 0 (pulled towards ground).
The input/output combinations of a comparator.
Inside the chip, the analog control signal from pin 5 is connected to each of the inverting (−) inputs on the comparators. The non-inverting (+) inputs of the comparators are connected to a string of 1kΩ resistors, which create larger-and-larger voltage dividers. The + voltage on the first comparator will be the divider input voltage (RHI − RLO), while the + voltage on the last comparator is 1/10th of that voltage.
To turn an LED on – meaning the comparator’s output is 0 – the analog signal voltage must be greater than the divided input on a comparator. So a smaller signal voltage is required to turn on the first LED in comparison to any of the following.
Voltage and Current Ratings
The LM3914/6 ICs have a very wide supply voltage range: anywhere from 1.8V to 18V.
The voltage between the RHI and RLO pins can be anything between 0V (thought, that wouldn’t be too useful) and 1.5V below the supply voltage. So, if you’re powering the chip at 5V, it’ll only be able to map voltages between 0V and 3.5V.
Also, keep in mind the current that might be flowing through the chip. Each LED can take anywhere between 7 and 13 mA, and to supply the chip you’ll need an additional 2 to 9 mA.
Example Hookup - Simple Dot/Bar Display
On this page, we’ll go over a very simple, single IC, 10 LED hookup. This will show you how to set the LED current, the divider voltage, and how to select between dot or bar display mode.
This circuit will work for both an LM3914 and LM3916. The only difference will be the of analog voltages required to turn on each of the LEDs.
Breadboard and Schematic View
Here are a pair of diagrams that detail this simple layout. We’ll assume the circuit is powered by 5V. If your supply voltage is different, some resistor values may need to change (see further below).
Schematic view of simple LM3914 circuit.
Breadboard view of LM3914 circuit.
The analog input in this example is a potentiometer, which is good for testing, but boring otherwise. Feel free to substitute that for any analog sensor, or even an audio signal from a microphone or stereo.
The switch can be used to swap between dot or bar mode. If the mode pin is pulled high, the IC will be in bar mode. If that pin is left floating, the display works in dot mode.
Finally, the LEDs. Pick any combination of color or size that you like. These 10-output LED drivers are perfect for the 10-Segment Bar Graph LEDs. Or you can choose a combination of any other LEDs you might have handy. 5mm LEDs are a bit too big to fit perfectly into this breadboard hookup, so you may have to creatively bend them to make them fit:
There is no need for current-limiting resistors, but make sure you have each LED connected in the correct direction (anode is connected to your power supply, cathode to IC pin).
There are a variety of options available for powering the display. In the example above we used a 5V Wall Wart plugged into a Barrel Jack Adapter, with a pair of wires flowing from there to the breadboard. If you are using a breadboard, the 5V/3.3V Breadboard Power Supply might make your life easier.
Setting the Reference Voltage and LED Current
The two resistors in this circuit are used to set both the current flowing through the LEDs, and the high voltage end of the voltage divider.
In this circuit, the RHI pin is tied to our reference voltage output. To calculate that voltage, knowing your two resistor values, use this equation:
Then, knowing VREF, you can calculate the current through an LED with this equation:
In the circuit above, where R1 is 2.2kΩ and R2 is 3.3kΩ, VREF will be about 3.4V (safely 1.5V under the supply voltage). ILED will be about 7.2mA – a happy, medium current for most LEDs.
If you need to pick a wider or smaller range, you’ll have to play with those resistor values, but the equations should hold true.
Example Hookup - Cascading
By cascading these IC’s you can create incredibly (almost overly) sensitive VU meters, driving 40 or even more LEDs.
4 LM3916’s chained together to produce a 40 LED VU meter.
Here’s how you could chain two of these drivers together:
Schematic of a dual LM3914/6 cascade.
The mode pins are permanently tied to the 5V supply, which forces the displays into bar mode. A bit of extra wiring is required to get cascaded LM3914/6’s into a proper dot mode. Check out the datasheet (page 11) for help with that.
Breadboard view of two cascaded LM3914/6’s.
In this example, we use the bar graph LEDs, which seem to be made for the LM3914/6. Make sure you connect the anodes of the LEDs to your supply voltage, and the cathode pins can be connected directly to the output pins on the driver.
The key to cascading is linking the RLO and RHI pins properly. RLO (pin 4) of the lowest IC in the chain should be connected to ground, and RHI (pin 6) of the highest IC in the chain should be connected to the maximum voltage in your sensing range. Between those two points, RHI of one IC should be connected to RLO of the next. This will chain each of those resistor strings inside the ICs together, to create a large set of highly sensitive voltage dividers inside the chips.
Following that process, you can chain even more of these ICs together to create some magnificient VU meters or other displays.
Resources & Going Further
Along with this tutorial, these resources might be helpful if you plan to build your own LM3914/6 circuit:
What are you going to build with the LM3914 or ‘16? Need some inspiration? Check out these tutorials to continue your journey:
- RGB Panel Hookup Guide – If you thought driving 40 LEDs was cool, wait till you’re driving over 3000. These 32x32 RGB LED panels can create some amazing visuals, but they do require more than a single analog signal to drive…
- Using the OpenSegment – Continuing with the display theme, these simple-to-control LEDs allow you to display numbers (and even a few letters).
- Light – Go back to the basics, and learn all about they physics behind light.