Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: byuri on January 11, 2009, 12:11:20 PM

Title: 50$ robot battery sensor help
Post 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.
Title: Re: 50$ robot battery sensor help
Post by: want2learn on January 11, 2009, 12:38:37 PM
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
Title: Re: 50$ robot battery sensor help
Post by: byuri on January 11, 2009, 02:37:43 PM
thanks..

so i need to connect Vin directly from battery, and no from 5V voltage regulator?
Title: Re: 50$ robot battery sensor help
Post by: want2learn on January 11, 2009, 03:44:23 PM
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.
Title: Re: 50$ robot battery sensor help
Post by: pomprocker on January 11, 2009, 05:01:48 PM
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
Title: Re: 50$ robot battery sensor help
Post by: byuri on January 12, 2009, 01:26:52 AM
Thank you very much, helped me a lot.