Build it step by step
0 of 6 doneCheck the reference
Wire pins 7 and 8 as in the table and measure 1.25 V at pin 7.
Set the signal divider
With 14.5 V on the supply, adjust potentiometer B until pin 5 reads about 1.25 V.
Set the low end
Adjust potentiometer A until pin 4 reads about 0.90 V.
Wire the LEDs
Green at the bottom, yellow in the middle and red at the top.
Check the scale
Use the 12 V adapter and a variable supply or MT3608 to check LEDs light in order.
Choose a mode
Move pin 9 to V+ for a bar or leave it open for a single dot.
How do you build a battery level bar graph?
Ten LEDs show the level of a 12 V battery using an LM3914, with dot or bar mode. You need LM3914 bar graph driver, LED 5 mm green × 5, LED 5 mm yellow × 3, LED 5 mm red × 2, Resistor 100 kΩ, Resistor 1 kΩ × 2, Potentiometer 10 kΩ × 2, Tactile push button 6 mm, Digital multimeter and Breadboard 830 Tie Points. It takes 6 steps and about 60 minutes.
- Level
- Beginner
- Time
- About 60 min
- Parts
- 10
Parts list
- Integrated CircuitsBuy
- SemiconductorsBuyLED 5 mm green × 5
- SemiconductorsBuyLED 5 mm yellow × 3
- SemiconductorsBuyLED 5 mm red × 2
- PassivesBuyResistor 100 kΩ × 1
- PassivesBuyResistor 1 kΩ × 2
- PassivesBuy
- SwitchesBuy
- Tools & InstrumentsBuy
- PrototypingBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| Battery + via push button | LM3914 pin 3 (V+) | Supply, only while pressed |
| Battery - | LM3914 pin 2 (V-) and pin 8 (REF ADJ) | Ground |
| Two 1 kΩ resistors in series | Pin 7 (REF OUT) and ground | Sets LED current to about 8 mA |
| Pin 7 (REF OUT) | Pin 6 (RHI) | Top of the scale at 1.25 V |
| Potentiometer A ends | Pin 7 and ground | Sets the bottom of the scale |
| Potentiometer A wiper | Pin 4 (RLO) | Low reference, about 0.9 V |
| 100 kΩ resistor | Battery + and pin 5 (SIG) | Top of the signal divider |
| Potentiometer B ends | Pin 5 and ground, wiper to pin 5 | Bottom of the signal divider, trims the scale |
| Pin 9 (MODE) | Pin 3 (V+) for bar mode, or leave open for dot mode | Choose a display style |
| LED anodes | Pin 3 (V+) | Common supply |
| LED cathodes | Pins 1, 18, 17, 16, 15, 14, 13, 12, 11, 10 | Lowest level to highest: green, green, green, green, green, yellow, yellow, yellow, red, red |
No code needed
No code. The LM3914 sinks the LED current itself, so no separate LED resistors are needed. The scale maps 10.5 V to 14.5 V into the chip's 0.9 V to 1.25 V reference window. In bar mode all ten LEDs on draw about 80 mA, so use the push button and keep the chip off most of the time. Never use it permanently attached to a 12 V automotive supply without a protection resistor in series with V+, as vehicle voltage spikes can exceed the chip's limit of 25 V.
Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| 10.5 V | No LED or just the first |
| 12 V | About half the LEDs |
| 14.5 V | All ten LEDs |
| Button released | All LEDs off (no battery drain) |
If it does not work
No LEDs at all
Check the chip's V+ and ground and orientation.
All LEDs always on
Pin 5 is above the top reference. Lower the signal divider.
Steps wrong
Re-adjust both potentiometers while watching pin 4 and pin 5 with the meter.
Chip hot
Bar mode for a long time. Use dot mode or only press the button briefly.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the battery level bar graph?
LM3914 bar graph driver, LED 5 mm green × 5, LED 5 mm yellow × 3, LED 5 mm red × 2, Resistor 100 kΩ, Resistor 1 kΩ × 2, Potentiometer 10 kΩ × 2, Tactile push button 6 mm, Digital multimeter and Breadboard 830 Tie Points.
How long does the battery level bar graph take to build?
About 60 minutes for a beginner maker, in 6 steps.
How do I know the battery level bar graph works?
10.5 V: No LED or just the first. 12 V: About half the LEDs. 14.5 V: All ten LEDs.
No LEDs at all: what should I check?
Check the chip's V+ and ground and orientation.
All LEDs always on: what should I check?
Pin 5 is above the top reference. Lower the signal divider.
Steps wrong: what should I check?
Re-adjust both potentiometers while watching pin 4 and pin 5 with the meter.
Chip hot: what should I check?
Bar mode for a long time. Use dot mode or only press the button briefly.
