After the near mishap with the last GPS bush walk I have pondered how I was going to monitor the battery power usage. This blog is my first go at it.
I found this neat
[Sadece Üyelere Linkler Açıktır.Üye Olun !!!
Tıklayarak Üye Olun !!!]. The ACS712 runs off of 5V and can monitor up to +- 5A with an internal resistance of only 1.2m Ohms. Unfortunately it comes in a SOIC-8 package which is something I haven't used before. Maybe it's time to build a
[Sadece Üyelere Linkler Açıktır.Üye Olun !!!
Tıklayarak Üye Olun !!!]? I don't have a milling machine so the next quickest thing was to solder up my own. It is build by hand soldering some wire rap wire to pins 5-8 and cat5 wire to pins 1-2 and 3-4. I used some male header pins soldered onto a small piece of vero board. All very messy (no pics) but it works.
Really I should be using the
[Sadece Üyelere Linkler Açıktır.Üye Olun !!!
Tıklayarak Üye Olun !!!] as that monitors from 0 to 10 Amps. unfortunately I don't have one of those at the moment.
I am using a PICAXE-8M chip to handle the AD conversion. There is also a resistance divider so I can monitor the 12V battery voltage. At the moment I am thinking it will just average out the measurements and output a current/voltage string on the serial port roughly once a second or maybe just output the string upon request.
Here is an EAGLE schematic of it all:
Here is the test board layout for it all:
The board layout is not quite correct as I need to create a better ACS712 SOIC device layout. Anyway you get the idea.
Testing the circuit on my bread board I found out that I can measure the voltage in steps of around 196 mV and current to 100 mA steps.
Here is the test PICAXE-8m program I used to monitor the battery voltage and current usage:
Kod:
' this will monitor and report the 12V Battery and Current being used
'
' Paul Hamilton - Sept. 2007
'
' Local Variables
SYMBOL LOOPDELAY=500
MAIN:
' Blink a debug LED - one reading per blink/loop
high 1 ' set the LED on port 1 ON
pause LOOPDELAY
low 1 ' set LED off
pause LOOPDELAY
' lets read what the voltage is on the resistance ladder junction
READADC 2b1
' lets read what the current is being reported by the ACS712
READADC 4b2
b3=b2-126
' because I am using a ACS712 Need to watch out for readings below 0 (ie 255)
' I really should be using a ACS713 then I wouldn't have this problem.
if b3<253 then SKIP
b3=0
SKIP:
sertxd ("V: " #b1" A: " #b31310)
goto MAIN
Now I have to build the circuit board. A circuit and board to monitor the propulsion motors will need to be designed and built. Luckily I have an Allegro ACS754 which can handle up to 50 Amps!
Also check out
[Sadece Üyelere Linkler Açıktır.Üye Olun !!!
Tıklayarak Üye Olun !!!] in this series on the design and building of the PC Battery Monitor.
I have attached a set of Eagle schematics for those that are interested:
[Sadece Üyelere Linkler Açıktır.Üye Olun !!!
Tıklayarak Üye Olun !!!]
[Sadece Üyelere Linkler Açıktır.Üye Olun !!!
Tıklayarak Üye Olun !!!]