Projects / Battery level bar graph

Battery level bar graph

Beginner1 hGuided buildReviewed

Build it step by step

0 of 6 done
  1. Check the reference

    Wire pins 7 and 8 as in the table and measure 1.25 V at pin 7.

  2. Set the signal divider

    With 14.5 V on the supply, adjust potentiometer B until pin 5 reads about 1.25 V.

  3. Set the low end

    Adjust potentiometer A until pin 4 reads about 0.90 V.

  4. 17.0 mA

    Wire the LEDs

    Green at the bottom, yellow in the middle and red at the top.

  5. 17.0 mA

    Check the scale

    Use the 12 V adapter and a variable supply or MT3608 to check LEDs light in order.

  6. LM3914

    Choose a mode

    Move pin 9 to V+ for a bar or leave it open for a single dot.

In short

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

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Battery + via push buttonLM3914 pin 3 (V+)Supply, only while pressed
Battery -LM3914 pin 2 (V-) and pin 8 (REF ADJ)Ground
Two 1 kΩ resistors in seriesPin 7 (REF OUT) and groundSets LED current to about 8 mA
Pin 7 (REF OUT)Pin 6 (RHI)Top of the scale at 1.25 V
Potentiometer A endsPin 7 and groundSets the bottom of the scale
Potentiometer A wiperPin 4 (RLO)Low reference, about 0.9 V
100 kΩ resistorBattery + and pin 5 (SIG)Top of the signal divider
Potentiometer B endsPin 5 and ground, wiper to pin 5Bottom of the signal divider, trims the scale
Pin 9 (MODE)Pin 3 (V+) for bar mode, or leave open for dot modeChoose a display style
LED anodesPin 3 (V+)Common supply
LED cathodesPins 1, 18, 17, 16, 15, 14, 13, 12, 11, 10Lowest 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.

CheckExpected
10.5 VNo LED or just the first
12 VAbout half the LEDs
14.5 VAll ten LEDs
Button releasedAll 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 →

Ask Lark AI

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.