Homemade Battery Monitor Using AVR
by arick in Circuits > Microcontrollers
8265 Views, 18 Favorites, 0 Comments
Homemade Battery Monitor Using AVR
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.
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
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
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
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));
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
Let's enjoy my home made battery monitor