View previous topic :: View next topic |
Author |
Message |
CMatic
Joined: 11 Jan 2012 Posts: 69
|
Measuring current draw from the battery |
Posted: Fri Jun 13, 2014 4:23 pm |
|
|
I have a pic16F877A board running with 9V battery. How do I measure the current draw from the battery. When I use a multimeter to measure the current drawn from the battery, the board stops running the program. I am trying to figure out how I can measure the battery health when the circuit is operating.
Thanks in advance. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9269 Location: Greensville,Ontario
|
|
Posted: Fri Jun 13, 2014 4:35 pm |
|
|
One method is to insert a very low ohm resistor and measure the voltage before and after it. Obviously you need some kind of resistive dividers and feed the signals into two analog channels.
Then there's a bunch of math, as YOU have to decide based on type of battery what is an acceptable 'low battery' flag since we have no idea what battery you're using, current draw, etc.
There are commerically available 'current meter' modules, fairly cheap that work as above.
Another method is to take a 'reasonable' load resistor and place it in parallel with the battery every so often and read the battery voltage. Again, you need to decide on voltage dividers and what is a 'low battery' condition.
I've used this method for the past 20+ years.
hth
jay |
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Fri Jun 13, 2014 5:07 pm |
|
|
As Temtronic says, you typically measure the voltage across a load resistor (which is what most multimeters do also - it is just internal to the meter). Depending on what your software is doing you may get odd readings - it may be jumping around depending on what the chip is driving (or if it is in low power mode part of the time). If it is doing the same thing, you may find the reading steady, but if it is doing different things, then you may have to add some filtering to your measurement to get the average (or look at the voltage across the load resistor with an oscilloscope). Ohms law will give you the current if you know the voltage and resistance. It also depends if you are trying to measure the current after your regulator or before it how it will act.
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Jun 13, 2014 5:11 pm |
|
|
Quote: | When I use a multimeter to measure the current drawn from the battery,
the board stops running the program. |
This could happen if:
1. The fuse inside the multi-meter is blown. The fuse is used to
protect the current measuring circuit in the meter. It is very common
for these fuses to already be blown. All you have to do to blow it
is to connect the current measuring leads across a battery or power
supply. Result: instant blowing of a small (replaceable) fuse inside the meter.
2. You may not be connecting the meter to the board in the correct way.
You have to plug the red lead into the "ma" (milliamps) jack and the black
lead into the "COM" jack on the meter. Then you have to put the meter in
series with the power supply and the board:
http://www.cdn.sciencebuddies.org/Files/4808/6/fig7_multimeter-series-measure-current.jpg
and
http://www.talkingelectronics.com/projects/Testing%20Electronic%20Components/images/12v_batt_meter_lamp.gif
In each of these images, replace the lamp with your PIC board.
The images show the red lead connected to the "A" jack, but because
your PIC board will only be using a few milliamperes, you should connect
the red lead to the "ma" jack if your meter has one. |
|
|
CMatic
Joined: 11 Jan 2012 Posts: 69
|
|
Posted: Fri Jun 13, 2014 9:18 pm |
|
|
Great discussion, thank you for your replies. Temtronic your two methods to measure the battery voltage were awesome. I will try these over the next few days. PCMProgrammer, as always your answers are so insightful and filled with details....I am so thankful. Gpsmikey thanks for your answers I will be using them also in the next day or so. |
|
|
|