

#Arduino lipo battery monitor code
This key will be used in the code to send the data on ThingSpeak. Step 3:- Click on API Keys menu and copy the Write API key. Click on Save channel at bottom of the page. Then fill ‘ Charging Voltage’, and ‘ Discharging Voltage’ in Field 1 and Field 2 labels, tick the checkboxes for the Fields. You will see a form for creating the channel, fill in the Name and Description as per your choice. Step 2:- Now go to the ‘Channels’ menu and click on New Channel option on the same page for further process. Step 1:- First of all, the user needs to Create an Account on, then Sign In and click on Get Started.
#Arduino lipo battery monitor full
We will also use IFTTT platform to connect with ThingSpeak to send email/message alerts for a full or empty battery. We will use ThingSpeak to monitor battery charging and discharging voltage. Here we are briefly explaining to use ThingSpeak for this IoT Battery Monitoring Project. You can check various ThingSpeak based Iot projects here to learn more about it. ThingSpeak ‘Collects’ the data from the sensors, ‘Analyze and Visualize’ the data and ‘Acts’ by triggering a reaction. By using the ThingSpeak site, we can monitor our data and control our system over the Internet, using the Channels and webpages provided by ThingSpeak. ThingSpeak provides a very good tool for IoT based projects. A TP4056 charging module is used for charging the LiPo battery and a DC motor is used for discharging purpose which is connected to the output terminal of TP4056.Ĭonfiguring ThingSpeak to plot Charging and Discharging Voltage Output of the voltage divider circuit is given to the A0 pin of NodeMCU. But in practice, it is better to provide a voltage which is less than the max value so you can use 15v battery voltage safely.Ĭircuit diagram for Battery Monitoring System is shown below. So by using the Voltage divider formula, the input voltage can be calculated as:Īfter putting the resistor and Vout values Max Vin will be calculated 19v approx. In my case, actual values are R1=47k and R2=9.5k So, I choose R1=44k and R2=10k (These are the printed value but actual value may be different so first measure the actual value using multimeter then use these values for further calculations). The maximum input voltage will depend on the values of the resistors.

We have to find the values of the required resistors for the circuit. The voltage divider decreases the voltage being measured within the range of the NodeMCU analog input which is 3.3v. Now, the arrangement that will convert the voltage is Voltage divider circuit.

NodeMCU analog pin can withstand only 3.3v so we have to make an arrangement to convert high input voltage within the range of NodeMCU analog pin and then write code to compute the actual voltage being measured. Here we will use NodeMCU 12E to send the battery status data to ThingSpeak cloud and will use IFTTT to send the Email alerts on battery status. So, in this project, we will also build an IoT based Battery Monitoring System where you can not only monitor the charging and discharging status of the battery but can also get an alert email when the battery is full or empty. They can check the battery status of the car’s battery on their smartphones from anywhere in the world and this is considered as one of the maintenance support provided by the manufacturer. Due to the advancement in technology, now Internet of Things (IoT) can be used to notify the manufacturer and users remotely regarding the battery status. Previously Battery Monitoring System only monitors the condition of the battery and alarms the user via battery indicator inside the vehicle.
