View Full Version : battery monitor hardware question
bowen303
10-06-2008, 12:17 PM
Hello again. I have a question in reference to the batterymonitory script hardware.
I am trying to determine the battery power of a completely external system. I am wondering if i can use the same type of setup that was used for the internal power check. I am trying something like this.
http://bowen303.home.mindspring.com/mycir.bmp
I have hooked it up and if i am checking the proto board power everything seems to work fine, however checking the other battery system only seems to return a fixed number, usually 3.3. Am i missing some reference that is happening internally that is making this work for the local board power, but not external power?
Thank You
msellers
10-06-2008, 03:56 PM
The ADR510 gives you 1.000 volts at pin 1 when connected the way you have shown. This allows you to assign a value or weight to each step of the adc such that 1024 of those steps will give you the vcc voltage of the engine. Your Batt1 ground has to be connected to ground of the engine to make this reference work correctly. Since the reference voltage is 1.000 volts, Vcc is 1024/readAdc. This will only show Vcc (~3.3). For an accurate battery voltage monitor, you will need additional voltage dividers, a battery monitor IC, etc. What battery voltage are you using?
David Ewing
10-07-2008, 12:42 AM
You can use the circuit shown (same as BatteryMonitor.py example) to obtain a precise voltage reference value for your RFE. This incidentally allows you to know the RFE's own Vcc (~3.3v), since that's what's used internally as the full-scale ADC value. Moreover, now that you have the refAdc value (representing 1.0v), you can make precise voltage measurements with other ADC channels.
Vext = readAdc(n) / refAdc
* You may want to scale-up dividend (see BatteryMonitor.py example)
In your case, you'd use a second ADC pin to monitor the external battery's voltage. Grounds will have to be common and as Marty mentions, if the external battery exceeds the RFE Vcc voltage you'll need to use a resistive divider (or zener diode, etc.) to bring the voltage into the RFE's measurement range (0 - Vcc).
bowen303
10-07-2008, 04:02 PM
Ok, thanks for the info. The test battery was around 3 volts, but the plan is to use it on something that is 9v.
David Ewing
10-07-2008, 08:06 PM
So a circuit like:
Vin(~9v) ---- R1 -----[ADC Input]---- R2 ---- GND
with R1 = 10k and R2 = 5k would get you a divide-by-three, and do the trick.
(http://www.raltron.com/cust/tools/voltage_divider.asp)
This would be the simplest approach, with the only real drawback being a .6ma current draw.
bowen303
10-09-2008, 03:24 PM
Ok, thanks. I will give it a shot and let you know how it goes.
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.