### Author Topic: battery monitor circuit  (Read 4589 times)

0 Members and 1 Guest are viewing this topic.

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### battery monitor circuit
« on: April 22, 2008, 11:14:09 PM »
For this tutorial:

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?

« Last Edit: April 22, 2008, 11:20:35 PM by pomprocker »

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### Re: battery monitor circuit
« Reply #1 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...

• Supreme Robot
• Posts: 11,665
##### Re: battery monitor circuit
« Reply #2 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

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

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### Re: battery monitor circuit
« Reply #3 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

• Supreme Robot
• Posts: 11,665
##### Re: battery monitor circuit
« Reply #4 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.

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### Re: battery monitor circuit
« Reply #5 on: May 09, 2008, 10:12:18 AM »

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?

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### Re: battery monitor circuit
« Reply #6 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?

#### Webbot

• Expert Roboticist
• Supreme Robot
• Posts: 2,154
##### Re: battery monitor circuit
« Reply #7 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.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### Re: battery monitor circuit
« Reply #8 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.

#### Webbot

• Expert Roboticist
• Supreme Robot
• Posts: 2,154
##### Re: battery monitor circuit
« Reply #9 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
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### Re: battery monitor circuit
« Reply #10 on: May 12, 2008, 10:08:29 AM »
ahhhh, good one.... i didnt pick up on that.

#### TrickyNekro

• Contest Winner
• Supreme Robot
• Posts: 1,207
• 1.6L Peugeot 307 tuner
##### Re: battery monitor circuit
« Reply #11 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
For whom the interrupts toll...

P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

• Supreme Robot
• Posts: 11,665
##### Re: battery monitor circuit
« Reply #12 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

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### Re: battery monitor circuit
« Reply #13 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

Sooo that would be Vout and GND, since I want the output of the sensor to be stable?

• Supreme Robot
• Posts: 11,665
##### Re: battery monitor circuit
« Reply #14 on: December 01, 2008, 02:06:15 AM »
yeap

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### Re: battery monitor circuit
« Reply #15 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!!

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### Re: battery monitor circuit
« Reply #16 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.

#### pomprocker

• Supreme Robot
• Posts: 1,430
• Sorry miss, I was giving myself an oil-job.
##### Re: battery monitor circuit
« Reply #17 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

#### TrickyNekro

• Contest Winner
• Supreme Robot
• Posts: 1,207
• 1.6L Peugeot 307 tuner
##### Re: battery monitor circuit
« Reply #18 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....
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
For whom the interrupts toll...

P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!