Arduino Battery Health Monitor With LED Indicator
by ROBO HUB in Circuits > Arduino
744 Views, 2 Favorites, 0 Comments
Arduino Battery Health Monitor With LED Indicator
Hello people in this instructables i will show you how i made this battery health monitor with LED indicator using Arduino that shows real time battery health when connected to load.
If you are a hobbyist builder then definitely you might have used the popular 18650 batteries if not you might have seen them in consumer electronics.
Lithium ion batteries come in standard sizes and they are also called as 18650 batteries known for their good backup time compared to their size.
I have been using these type of batteries since a long time and the downside of this batteries are its difficult to figure out how much life is still in them.
Lets say you are using 3 batteries to power a 12v project and out of 3 you don't know how many of them are in good state or how many of them are in end of its span.
In such cases you can test them, But how?
To answer this i made this battery health checking device, You can monitor its current health in real time and its very beneficial if you are a regular user of batteries.
Keeping this in mind i built this battery health indicator that shows the health of your battery.
This is very easy to use device, powered by usb and cool colors this can be used by anyone.
If you are a technical person then you can see the values of batteries and if you are a total newbie you can estimate the health by checking the color.
If the color is green it means that the battery is ok and if it shows red the battery should be replaced with new.
Parts for this device were 3d printed and powered by Arduino uno board and ill be using the current sensor to calculate these factors and finally display on oled along with 8bit ring light that shows the status.
If you are building this project i have given complete resources so that anybody can build this and use them, Consider watching the video given at end of this instructables.
Supplies
These are the materials that you will need to build this project.
Arduino Uno from amazon
OLED Module(ssd1306)
Battery
Battery Holder
BO Motor(for testing)
Arduino IDE
Tinkercad (If you want to modify my design)
Ultimaker Cura Slicer
Programming Cable
Hot Glue
Super Glue
3D Printer
PLA Filament
Note that these are affiliate links from Amazon and with qualifying sales i will get a small percent of commission at no extra cost to you
Tinkercad Design and 3D Printing
I will be using Tinkercad to design the frame, Since we are using the standard size components you can simply use my design files that are given below.
If you want to explore more on my design you can do that too, I will be happy to help if you need any help on the design part.
Like any other project the first step after you plan the electronics circuit is the casing or the frame that you will be using.
Simply download these STL and open them on any slicer, I will be using cura slicer to slice these models.
There are 2 parts for this design, One is the base where you will place the arduino and the current sensor.
Second will be the lid part where you will be placing the OLED and the pixel ring.
Design took me quite a while to fix all the minor issues and i was able to get a good design that holds all the electronics.
After the design is finalized i exported it to the slicer and there is no need to use any rafts or supports at the time of printing.
You can see the slicer settings which i used here in the above images on this step.
No rafts or supports indicates that no need of post processing after you print, I will be using pla filament to print the parts and the choice of color is as per your preferences.
After the printing is complete or during the print process you can build the circuit and we will see more on it in the next step.
Circuit and Program
Well the circuit for this project is as shown in this circuit diagram.
Ahhh! if you are a newbie this might seem too complex but believe me this is very easy to make if you read this detailed step by step connections.
The circuit has 3 main parts, OLED, Current sensor and then the Pixel Ring
OLED Connections
It has 4 pins and in my case the OLED didn't come with unsoldered pin and i soldered it first.
SCL and SDA is connected to A5 and A4 pins on the Arduino board.
Vcc and Gnd is connected to 5v and the ground pins on the Uno.
Current Sensor Circuit Making
Here like the OLED you have Scl and Sda and even here the pins are connected to A5 and A4 pins on the Uno board.
Whereas the power pins are connect to Vcc and Ground on the Uno board.
Note: In the 1na219 sensor there are pins called v+ and V- these are for testing the batteries.
Most of them connect the batteries directly and it is wrong, Instead you need to connect this via some lod.
In my case i will be using dc motor as a load, connect the positive of battery to positive of this current sensor.
Now negative of battery to positive of load(dc motor) and negative of battery to V- on the sensor
Pixel Ring Connections
Like the WS2812B these are fully programmable and has 3 pins or 4 pins
Din pin is connected to D6 on the uno whereas the Vcc and Gnd are connected to 5v and the ground pins respectively.
You can even more simplify this circuit using services from JLCPCB also they provide 3d printing services!
Ordering PCBs from them is very affordable and they provide fast delivery too.
If you want to track all your orders in one place, you can check out their JLCONE application for both desktop and mobile devices, avail free shipping and great discount if you sign up from my link
After you make this circuit connections, Connect uno to computer and open arduino ide and upload this program.
Before clicking on upload make sure you select the right port and the board type, if you don't have the pixel ring library installed you might have to do that.
After the code is done uploading you can see the messages on OLED and lights on the ring light and you are good to go.
Downloads
Casing the Electronics
These are the parts that we are using to case all the electronics which we have made earlier.
Test the circuit first by connecting the battery and testing if the codes and circuit are giving you expected results.
I will connect the uno board to the base of this 3d printed part, I didn't find any need to use any adhesives here since the print seemed to be perfect with the size of board and fitting was pretty much decent.
After you place the Uno make sure to organize the wires, Here chances are high that you may pull some jumper cables during the process!
If you are done organizing then on the top groove you can place the current sensor and here i used a tiny drop of super glue on the side of board where we will be connecting the external load.
Once you are done with this part we can proceed to install the electronics on the lid.
I will use hot glue to stick the OLED and then insert wires from pixel ring to the hole provided and then glue it to the small groove on the lid.
Here in some cases if you are using other type of arduino and if size is less you might need to use any adhesives, Either go with hot glue or double sided adhesive.
At this point we have 2 halves of the frame and we can fuse them together, But before we need to check for its working.
Finishing and Using
To test if the circuit is still connected simply connect the usb cable and if you are able to see message on oled and light on the pixel ring you can confirm that the circuit is fine.
Now connect these 2 parts and use superglue to join them, this completes the build part and now finally its the testing time.
The best way to power this project is by simply connecting the USB cable between the Uno board and the power bank.
You will see the OLED display showing welcome messages, The ring light pops up great colors and then it starts glowing with blue light and in the oled you can see connect load message.
Now the device is ready and you can connect the battery, Like i mentioned earlier you cant simply connect the battery directly, Instead use some load(dc motor connected in series).
Allow few seconds and you will be able to see the health of your battery, I charged one battery to full and i was able to see its health in good condition as per readings from this device.
I cross checked by connecting a battery whose charge was going down rapidly and even here i was able to get the expected results, Device read this as a bad battery and it was right.
This was all about building this project if you have any questions ask me in the comments and i will be replying to it shortly.
Working Video
Here is a video version of this project build, Like i mentioned above the battery which you want to test should not be connected directly.
Refer this video to see how that is done exactly if you have some confusions in the circuit.
Hope you will try to make this project and if you have any inputs for upgrading this project with unique features that seems to be super useful lets discuss on the comments.
Thank you for showing interest and hoping to see your build! Have a great day :)