# Wireless battery voltage monitor using Arduino and Bluetooth

(Last Updated On: June 26, 2020) ## Wireless Battery Monitoring Project Description:

In this tutorial, you will learn how to make your own wireless battery voltage monitoring system using Arduino, Bluetooth module, and an Android cell phone. This wireless battery voltage monitoring system can also be used for monitoring the Solar Panels, in fact, you can monitor anything so far the voltage that is to be monitored is less than or equal to 25volts.

### The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno:
Mega 2560:
Voltage sensor 0-25v: best offer:
HC-05 Bluetooth Module:

### 0-25v Voltage Sensor: This is the Voltage sensor Module that we will be using for monitoring the battery voltage, This Module is capable of measuring the voltages ranging from 0.02445v to 25volts dc. But if you want to measure voltages higher than 25volts then you can watch my tutorial on how to modify this voltage sensor for monitoring higher voltages, in this tutorial I performed all the calculations. You can find that video on my YouTube channel.

As you can see on one side we have a block terminal, this is where we connect the voltage and ground wires coming from the battery, solar panel or any other source. The Voltage wire is connected with the VCC terminal and the ground is connected with the GND terminal.

On the other side, we have three male headers labeled as +, s and -.

the S Pin of the sensor module will be connected with the analog Pin of the Arduino Uno or Mega and the – Pin will be connected with the ground of the Arduino. while the + Pin is not connected.

as in the beginning, I said that we can measure dc voltages ranging from .02445volt to 25volts. Now the question is how we know that the input voltage should be greater than .02445volts.

As you know my friends,

and we know that

Arduino AVR chip has 10 bit AD “Analog to digital converter” So

5 / 1023 = .00489 resolution

So

.00489 x 5 = .02445 volts. So

the input voltage of this module should be more than .02445 Volts.

Let’s have a look at the circuit diagram of the voltage sensor, It simply consists of two resistors connected in series, which makes a voltage divider circuit. A few days back I uploaded a tutorial on Electronics Voltage Divider Circuit Basics, Practical use of Voltage divider, Datasheet & calculation. I recommend you should watch this tutorial for the best understanding.

As you can see the values of the resistors used in this module are 30k and 7.5k. Let’s perform calculations for this circuit.

the maximum Input voltage of this module is = 25 volts dc.  so

Vin = 25v

R1 = 30k ohm

r2 = 7.5k ohm

we can find out the Output voltage, by using the voltage divider formula which is

Vout = ( r2  x  vin ) / ( r1 + r2)

vout = (7.5 x 1000 x 25)  /  (30k + 7.5k)

vout  = 187500 / 37500

vout = 5 Volt if we increase the voltage above 25v the output voltage will increase and so will damage the analog Pin of the controller. So with these resistor values, we can monitor voltages up to 25v maximum.

Let’s find out the Current.

using the ohm’s law

v = IR we can find the current

I =  V / R

I = 25 / ( 30k + 7.5K)

I = 25 / 37.5K

I = .000666 amps

which is equal to

I = 666 micro amps.

So as the resistors are connected in series so the same current will flow through both the resistors. as the current is in microamps it won’t heat up the resistor. Enough with the voltage sensor, now let’s talk about the Bluetooth module.

### Bluetooth Module used in the wireless battery monitoring system: This is the Hc-05 Bluetooth module, it doesn’t matter if you use Hc-05 or Hc-06. I have a very detailed tutorial on how to change Pin code or password and how to change the name of a Bluetooth module using At commands. So if you want to change its default name and password then you should definitely watch this tutorial.

As you can see I have already soldered some jumper wires for the easy interfacing with Arduino or mega. This module has a total of 6 Pins labeled as state…..RXD…..TXD…..GND….VCC …… and wakeup. The wakeup Pin is used for entering the Bluetooth module into the AT command mode. the use of wakeup Pin is already explained in that tutorial. So out of these 6 Pins, we will be using only 4 Pins. RXD….TXD….GND… ANd VCC.

### Circuit Diagram of the wireless battery monitoring system: This is the complete connection diagram of the wireless battery voltage monitoring system using the Arduino and Bluetooth module. As you can see on the left side, the voltage sensor VCC is connected with the Battery 12v input and the ground of the voltage sensor is connected with the ground of battery. The s Pin of the voltage sensor is connected with the analog Pin A1 of the Arduino and the “ – “ Pin is connected with the Arduino’s ground. While the + Pin is not connected.

The HC-05 or HC-06 Bluetooth module VCC Pin is connected with Arduino’s  5 volts, the Ground Pin of the Bluetooth module is connected with the ground of the Arduino. The Txd Pin of the module is connected with Pin2 of the Arduino and rxd Pin of the Bluetooth module is connected with Pin3 of the Arduino.  The Bluetooth module communicates with the Arduino through serial communication, as you know in Arduino we have only one serial port available on Pin0 and Pin1. We will use the Arduino’s default serial port for the debugging purpose and make another serial port using Pin2 and Pin3. I will explain this in programming how to make a serial port.

## Wireless Battery Monitoring Arduino Programming:

The Programming of the wireless battery voltage monitoring system is very easy. This program will also Run on Arduino Mega. For the detailed step by step explanation, you can watch video Tutorial given at the end of this Program.

as you know my friends that the Bluetooth module communicates with the Arduino through serial communication, and you know that in Arduino we have only one serial port which is on pin number0 and pin number1. as I always say that use the Arduino default serial port for debugging purposes. So if we are using Arduino’s default serial port for debugging purposes then it means we will be needing one more serial port for the Bluetooth module. So for this purpose, we are using the SoftwareSerial library. if you want to learn in detail how to use SoftwareSerial library for making multiple ports then watch my tutorial on SoftwareSerial.

## Another related Project:

Esp8266 Iot battery monitor, battery voltage monitoring using nodemcu esp8266 wifi module