Introduction: How to Make Battery Monitoring System With Over Discharge Protection & Battery Level Indicator

About: For more content please subscribe to my YouTube channel @

In this project i will show how to build a Battery Monitoring System with Over Discharge Protection & Battery level Indicator. If you prefer watching video then i have embedded the same or if you like reading please continue with the post.

Step 1: Things You Need

  • Atmega328P
  • BC547
  • 5V Relay
  • 16MHz Crystal
  • Bar Graph
  • 10 * 220 Ohm
  • 10K Ohm
  • 10K Trimmer
  • 22pF Ceramic Capacitor
  • IC Sockets & Terminal Blocks

Affiliate Links

Bangood -

AliExpress -

Amazon USA -

Amazon UK -

Amazon India -

Step 2: Circuit Diagram & PCB Layout Design

Circuit Diagram

I created the circuit on the KiCAD Software.

The Circuit has three main blocks & one optional block:

  1. Control Block
  2. Input Block
  3. Output Block
  4. Coding Block

1.Control Block : This is the Standalone Arduino Uno Section which is programmed to control the Relay & the Bar Graph.

2.Input Block: This is based on Voltage divider design (R2 & RV1).

3.Output Block: This the Relay & the Bar Graph section which is controlled by the Control Block

4.Coding Section: This is the optional section. This section you can use to re program the Arduino Uno on the board without removing it.

PCB Layout Design

After creating the circuit diagram i designed the PCB Layout for fabrication.

After creating the PCB layout i generated the Gerber & the drill file and created a zip folder.

If you want to learn KiCAD please click here for the beginners tutorial.


I use JLCPCB for fabrication of my PCB board as they provide very good & well finished PCB's at very low cost. Usually 10 pcs will cost you 2$ & will be shipped within 48 hrs and if you order 5 pcs the PCB will be shipped within 24 hrs. If you want to place the order for the same board you can download my Gerber File by Clicking Here.

Step 3: Sketch

The program has three section:

  1. Initialization : where all the required variables are declared.(1 to 14 lines)
  2. Output Declaration : Declaring your output pins (15 to 22 lines)
  3. Main Program :

  • 24th line : Reads the Voltage divider output. The values will be in the range (0 to 1023)
  • 25th line: converts the (0 to 1023) values to a range between (0 to 5)
  • If Statement : Controls how the output acts

The program was uploaded to the Atmega328p Chip using bread board method. If you want to learn about it you can watch the video on YouTube by clicking here

Step 4: Assembly

After receiving the PCB board from JLCPCB i mounted all the components on the board as per their annotations.

Next i started assembling the enclosure. For the enclosure i am using a plastic container.

Connections :

DC Jack : +ve of the Jack goes to 5V pin on the board. -ve of the Jack goes to GND pin on the board. For powering the board i am using a 5v DC adapter.

Battery which to be monitored: +ve of the Battery goes to B+ pin on the board & gnd of the battery goes to the GND pin on the board

Output: Positive of the output goes to the Bout pin on the board & Negative of the output goes to the GND pin on the board.

Step 5: Calibration & Testing

Calibration :

For calibration first set the bench power supply to 12V since we are monitoring 12V battery. Next connect the +ve of the bench power supply to the B+ pin on the board & -ve of the bench power supply to the GND pin on the board. Now adjust the trimmer until all the LED's of the bard graph are lit. Now this completes your calibration.

Testing :

Next remove the bench power supply & connect the battery & also connect the output. For display purpose i am using Voltmeter but you can use any thing like fan or bulb.

For complete testing you can watch the video shared in the first step.

Downloadable Files (Circuit Diagram, Gerber & .ino File) - Click Here

Thank you for reading guys
You can subscribe to me on YouTube for more contents like this. To Subscribe Please CLICK HERE

PCB Contest

Participated in the
PCB Contest