RPi and MCP3008 to measure 12v battery

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
beeman
 
Posts: 8
Joined: Fri Dec 28, 2012 11:26 am

RPi and MCP3008 to measure 12v battery

Post by beeman »

We are using a RPi with a MCP3008 to measure various environmental sensors around a bee hive (temp, humidity, sun, weight). The whole packege is powered (with adapters) by solar panels and a 12 volt battery. Is there a safe way to measure the voltage of the 12v battery? Maybe stepdown resistors in series (a 1m and 10m resistor) to have the voltage in the 1 volt range? I'm sorta mumbling to get more clear ideas. Thanks in advance. BeeMan

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: RPi and MCP3008 to measure 12v battery

Post by adafruit_support_bill »

Yes, a voltage divider to drop the voltage into the right range will work.

User avatar
beeman
 
Posts: 8
Joined: Fri Dec 28, 2012 11:26 am

Re: RPi and MCP3008 to measure 12v battery

Post by beeman »

So to confirm a few details. We assume that the grounds are equivalent and tie the battery negative (-) to the GND on the GPIO buss, right?
And then with the voltage divider using E=IR and resisters in the meg-ohm range, the current would be very small. Would resisters of 1K and 10K be "better"? Or smaller current better?
Should we get the smallest fuse available to connect to the positive (+) terminal of the battery or would it matter? No weird current ground loops or anything?
Theory is great, but theory plus experience is the best? That's why the questions. :- )

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: RPi and MCP3008 to measure 12v battery

Post by adafruit_support_bill »

1K & 10K should be fine. Tie the grounds together. A fuse is a good idea - especially if it is a high-capacity battery. These can produce arc-welder scale currents and do a lot of damage in the event of a short.

User avatar
amdrake
 
Posts: 7
Joined: Thu Sep 20, 2012 5:42 pm

Re: RPi and MCP3008 to measure 12v battery

Post by amdrake »

Beeman,

I too am instrumenting a hive to monitor the location of the winter cluster, using custom frames with embedded temperature sensors, and an Arduino Mega to do the scanning, and an Xbee network to get the data back to the house. The frames also have a resistor network embedded in case adding a little targeted heat might help a near-frozen cluster move to nearby honey stores. Like you, I am planning on power from a solar panel and storage battery. I'm concerned about outdoor heat and cold on a LiPo battery; what kind are you trying? The latest Make Magazine issue had an article about how a guy in Virginia handled temperature extremes for his outdoor solar/battery/electronics boxes; it is kinda wild. (I'm also setting up a RPi system, but not planning on using it for the hive monitor.) I'd like to share approaches and experiment results, including your battery voltage monitoring. My email address is public in this forum, [email protected]. Hope to hear from you, and anyone else interested in using Adafruit products and training for beekeeping.

--Tony

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”