Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: byuri on January 11, 2009, 12:11:20 PM
-
Hello, I am have the robot 50$ and now I want to build battery monitor circuit .
I tried to understand this guide
http://www.societyofrobots.com/schematics_batterymonitor.shtml
But do not really understand, and I have some questions
What this actually Vlog?
in my case i have 9V battery Connected to 5V voltage regulator it means Vin=5V
How exactly am I supposed to calculate the value of Resistor R?
And if I just short between Vin and Vout, that means Vin connected directly to analog input, it will be okay? What role the two resistors?
Thank you.
-
VLog is the logic level your chip works at normally = 5V (yours=5V)
VIn is the supply voltage of your fully charged battery, probably in the region of 11V - CHECK THIS WITH A MULTIMETER
You calculate the value of the resistor required using the equation provided R= 50000 / (VIn / VLog - 1)
Eg: battery voltage(VIn) =11.6V fully charged
my chip works at (VLog) =5V
Solving the equation gives 37878.78787878788. So I pick the resistor nearest this value
-
thanks..
so i need to connect Vin directly from battery, and no from 5V voltage regulator?
-
That's correct.
VIn (from your battery) goes to your voltage regulator which in turn supplies the power to your circuitry.
A tap is taken from VIn to supply the voltage divider schematic your link refers to.
VOut from the voltage divider is fed to a spare Analogue to Digital Converter pin on your microcontroller.
Remember to check the voltage of your battery pack when fully charged so you can work out the size of the resistor you will need.
As for code for this I'm sorry I can't be much help there.
-
Make sure you read up on voltage divider circuits...I'd rather teach you how to fish, than to give you the fish if you know what i'm saying.
http://en.wikipedia.org/wiki/Voltage_divider
Set Vs to whatever you battery is fully charged, my 6v is about 7.08 so I just put 7. You want the voltmeter on there to read 5v
http://people.clarkson.edu/~svoboda/eta/designLab/VoltageDividerDesign.html
-
Thank you very much, helped me a lot.