Homemade Battery Monitor Using AVR

by arick in Circuits > Microcontrollers

8265 Views, 18 Favorites, 0 Comments

Homemade Battery Monitor Using AVR

IMG_20130917_192610.jpg
Guys,

I want to share my experiment with voltage divider, ADC and AVR
Homemade battery monitor using AVR
It's pretty simple the sensor are only two resistors and zener diode with capasitor, I don't buy them, I've found it in my box.
We can use it for monitoring our car battery voltage.

The Part I Used

IMG_20130917_125247.jpg
adc calculation.jpg
IMG_20130917_192626.jpg
IMG_20130917_192615.jpg
IMG_20130917_192610.jpg
1.ATMEGA128
2.10K and 56K resistors as a voltage divider
3. 5V1 Zener diode
4.  1uF Caps,
5. 16x2 LCD
6.    3 wires to connect the sensor into ADC

Let's continue to the code

The Code and Atmel Studio

the code.jpg
Guys, the main key for this experiment is ADC and calculation,
you can calibrate first with 5V from 7805

This is the equation I used
adcA = ((int)((5000/1024)*adc_result));

Let's Enjoy My Home Made Battery Monitor

IMG_20130917_192610.jpg
Let's enjoy my home made battery monitor