Using Arduino Uno to check battery voltage (7 cells, but you can do more), battery temperature, display it to 16x2 LCD, show alarms and beep to speaker on errors (like undervoltage, overvoltage, high temp, etc)
- Arduino UNO or compatible
- 16x2 LCD with I2C board
- 74HC4067 multiplexer board (or you can buy the IC and solder it all by hand)
- 18B20 digital temperature sensor
- 5 to 10 kOhm resistor (for the sensor)
- A lot of 1% or better precision resistors to use as voltage dividers
- Breadboard for easy prototyping
- Soldering iron, flux, solder, skills
- Digital or analog multimeter
If you dont plan to read temperature, just comment all code regarding 18B20 sensor. If you plan to measure more than 7 battery cells, you will need more wires, more precision resistors. 74HC4067 has 16 inputs, so obviously you cant have more than 16 batteries measured by one IC. But you can connect more ICs and add code :)
- Different LCDs have different working drivers and addresses
- Google your LCD, addreses and drivers they use.
- Import your driver to the project. In my case it was hd44780.h, if yours is the same, leave it the way it is.
- Connect all the stuff together
Digital 0: empty Digital 1: empty Digital 2: temperature sensor middle leg Digital 3: 100 Ohm resistor (other resistor legs goes to speaker +, other speaker leg goes to ground) Digital 4: Mupliplexer S3 pin Digital 5: Multiplexer S2 pin Digital 6: Multiplexer S1 pin Digital 7: Multiplexer S0 pin Digital 8: empty Digital 9: empty Digital 10: empty Digital 11: empty Digital 12: empty Digital 13: empty SCL: display SCL SDA: display SDA Analog 0: Multiplexer SIG Analog 1: empty Analog 2: empty Analog 3: empty Analog 4: empty Analog 5: empty
Temp sensor: connect a 5-10K resistor from middle leg to right leg. Connect right leg to +5V, left leg to GND
Everything is powered from 5v: Arduino, Display, Multiplexer, Temp sensor.
No image on screen - use the potentiometer on back of the screen to adjust contrast No temp data - check sensor connection, use a 5K resistor Phantom readings on analog pins - its ok if you have them hanging free in air or nothing connected.
If you have any questions and feedback, feel free to contact me [email protected] or telegram at @nikozzzzzz
// A lot of code on 74HC5067 multiplxer was taken from https://www.instructables.com/id/Tutorial-74HC4067-16-Channel-Analog-Multiplexer-De/
// Including comments. Why write your own comments if someone has already done a prettey good explanatory job
// Written by https://www.instructables.com/member/pmdwayhk/
// A lot of temperature sensor code was taken from https://arduinomaster.ru/datchiki-arduino/arduino-ds18b20/ some varibles renamed, comments translated RU -> EN
// connect 74HC4067 S0S3 to Arduino D7D4 respectively
// connect 74HC4067 pin 1 to Arduino A0