Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: pomprocker on April 22, 2008, 11:14:09 PM

Title: battery monitor circuit
Post by: pomprocker on April 22, 2008, 11:14:09 PM
For this tutorial:

http://www.societyofrobots.com/schematics_batterymonitor.shtml (http://www.societyofrobots.com/schematics_batterymonitor.shtml)

My 6v battery fully charged is 7.08v

This equation gave me an answer of ~120192

Is this a 120k ohm resistor?

does this sound correct?

i'm not sure what a typical resistor for this circuit would be.


Also the 10mF capacitor mentioned does that go between ground and Vin? or ground and "to your circuit"? or ground and Vout?

Title: Re: battery monitor circuit
Post by: pomprocker on April 24, 2008, 01:09:34 PM
I been looking around on the internet for how to choose a resistor because I don't know how. I have not been able to find the answers so ill just ask.

How can I figure out what wattage my resistor needs to have? (applying to this application)

I am very slow with this electronics stuff... ???
Title: Re: battery monitor circuit
Post by: Admin on April 27, 2008, 01:18:19 PM
Quote
This equation gave me an answer of ~120192

Is this a 120k ohm resistor?
The way to know for sure is include units in your equation.

Yeap, 120k will work. Basically its just a voltage divider circuit.

Quote
Also the 10mF capacitor mentioned does that go between ground and Vin? or ground and "to your circuit"? or ground and Vout?
It goes between ground and the voltage you want to stabilize :P

Quote
How can I figure out what wattage my resistor needs to have?
power (watts) = voltage * current
P=IV
V=IR
so P=V^2/R

So for a 5V voltage drop across a 120kohm resistor is:
P=5^2/120k = 0.0002 watts
Title: Re: battery monitor circuit
Post by: pomprocker on May 03, 2008, 04:26:56 PM
ugh, i'm horrible at shopping for components.

what about tolerance (1%, 5%) and resistance material (metal film, carbon film, etc)?

Also I couldnt find a 50K resistor on digikey  ???






Title: Re: battery monitor circuit
Post by: Admin on May 03, 2008, 05:49:56 PM
In this circuit it doesn't really matter.

But 1% is so cheap anyways just get that and use carbon film.

It doesn't need to be exactly 50k, or whatever value you calculated. Anything near that value will work. Try mouser.com, I like their search engine more.
Title: Re: battery monitor circuit
Post by: pomprocker on May 09, 2008, 10:12:18 AM
Thanks Admin.

I got all the parts from Mouser. I will be building the circuit today after work.

btw, how does one come up with a circuit like this?

where do you get the value for the 50k resistor and the 10uF cap?

Title: Re: battery monitor circuit
Post by: pomprocker on May 11, 2008, 06:08:47 PM
hmmm no success getting it to work this weekend.


i plugged it into a2dConvert8Bit(2); and it just returned 255 the whole time.

how can i test this circuit out with a multimeter?

what are some typical values that will be returned from this sensor?


Title: Re: battery monitor circuit
Post by: Webbot on May 11, 2008, 07:59:44 PM
It may be giving 255 as the battery you are using is fully charged ie 255 = 5v check the IN pin to your ADC. You could either wait until your battery runs down or temporarily short out your 120k resistor which should give 0v on your multi-meter and an ADC reading of 0.
Title: Re: battery monitor circuit
Post by: pomprocker on May 12, 2008, 12:22:21 AM
id think that since 'batt' was declared as an integer and initialized to 0, that the max of an integer is like ~65,000 so I dunno why it would pick 255. I bet its wrong. I have to have some fun with my DMM.
Title: Re: battery monitor circuit
Post by: Webbot on May 12, 2008, 04:37:05 AM
Quote
since 'batt' was declared as an integer and initialized to 0, that the max of an integer is like ~65,000

Yes - but you're reading via the analogue to  digital convertor which is doing an  8 bit conversion ie gives values from 0 to 255
Title: Re: battery monitor circuit
Post by: pomprocker on May 12, 2008, 10:08:29 AM
ahhhh, good one.... i didnt pick up on that.
Title: Re: battery monitor circuit
Post by: TrickyNekro on May 13, 2008, 01:21:16 AM
I do not really intend to advertise my own work but have a look here and see if it helps...
http://www.societyofrobots.com/member_tutorials/node/101 (http://www.societyofrobots.com/member_tutorials/node/101)
Title: Re: battery monitor circuit
Post by: Admin on May 17, 2008, 05:55:00 PM
Quote
where do you get the value for the 50k resistor and the 10uF cap?
Well, I do the math. Sometimes it doesn't really matter to be exact, just ball-park values often work for resistors and capacitors. Depends on your required precision.


Can you show us your exact schematic? Got grounds common? You really should get a multi-meter if you are serious about making robots :P
Title: Re: battery monitor circuit
Post by: pomprocker on December 01, 2008, 01:13:02 AM

Quote
Also the 10mF capacitor mentioned does that go between ground and Vin? or ground and "to your circuit"? or ground and Vout?
It goes between ground and the voltage you want to stabilize :P


Sooo that would be Vout and GND, since I want the output of the sensor to be stable?
Title: Re: battery monitor circuit
Post by: Admin on December 01, 2008, 02:06:15 AM
yeap
Title: Re: battery monitor circuit
Post by: pomprocker on January 12, 2009, 01:10:31 AM
Hey, I decided I'm going to come back to this since its an easy circuit and not too much extra headache on top of my college studies.

Now that I am a little better at the electronics aspect of things, The circuit provided raises more questions.

I tried to reproduce it using other websites:
http://ourworld.compuserve.com/homepages/Bill_Bowden/r2.htm
http://people.clarkson.edu/~svoboda/eta/designLab/VoltageDividerDesign.html

Vin = 7.08vdc
Vout = 5vdc

On the other two sites, It seems to give me better values if I put the 50k resistor between Vout and Gnd. Actually in reality, I bought a 500 pack of assorted resistors from radio shack, and in the equations on those other two websites it seems like 22k and 56k, but then that other website brings current into the equation, which is not used in Admin's tutorial. I don't really know what to put in there so I put 1mA (.001A) and it gave me resistor values of 2k and 5k!!

My original pass at this circuit using Admin's tutorial had me using a 51k and 120k resistors.

So, I'm kinda lost here, maybe I need to study this circuit more!!




Title: Re: battery monitor circuit
Post by: pomprocker on January 12, 2009, 10:55:49 AM
I did just a little more reading last night before I went to bed, and read that there is a ratio going on here, and as long as you keep that ratio it doesn't matter what resistors I use. I could use 51k & 120k or 22k & 56k. it will give me the same thing.
Title: Re: battery monitor circuit
Post by: pomprocker on January 12, 2009, 10:27:04 PM
OK, I got it!

The best way to learn it is try to teach it!
http://pomprock.netdojo.com/blog/2009/01/battery-monitor-voltage-divider-circuit.html (http://pomprock.netdojo.com/blog/2009/01/battery-monitor-voltage-divider-circuit.html)

Title: Re: battery monitor circuit
Post by: TrickyNekro on January 12, 2009, 11:49:04 PM
You gotta calc the voltage input and the voltage output...
The voltage input is your battery whereas output is the output of the voltage divider...
Wikipedia has an awesome article on this....
Google "voltage divider wiki" and you should find it...
I wonder why I heard little times from you guys mentioning it ( the wiki ), It has everything!!!

And one more...
I got a voltage divider working with total resistance of 1MOhm.... I tell you this just for power concerns...

And one final trick....
You generally shouldn't worry about this but it really does "help" sometimes....
The resistor you are using will not allow much current to your controller BUT!!!!
It's best if you place a Zener between the output of the voltage divider and the ground....
It will protecy you from overvoltage and everything will be cool...

Just for instance you need a 5V1 Zener!!!


Best Regards, Lefteris
Greece 8)