emba
Posts: 19
Joined: Sun Jul 29, 2012 8:54 pm

Monnitoring a solar powered pi

Tue Aug 21, 2012 12:42 pm

im currently looking into a project for the pi, i have a case with 4 AA ni-mh batteries in and a solar panel mounted on the back to charge the batteries, that all works perfectly, the next step is to find a way to monitor the charge thats left in the batteries and the amount of power being provided by the solar panel.

ive looked into it but havent yet come up with a concrete solution, it seems difficult as the pi only has digital i/o no analog, i have the slice of pi/o board on the way which may help as i believe it has an ADC onboard but im not sure if it actually provides any analog inputs.

ive been looking at the controllable voltage divider shown here http://www.microbuilder.eu/Tutorials/Fu ... ltage.aspx but im not entirely sure how to setup the ADC, i have a pic16f676 which supposedly has an ADC onboard but im not sure exatly what to do with it, the diagram on the site simply shows a wire going "to ADC" no mention of where the result comes out and i cant seem to find info on how to connect the chip up, it also says at the other end connect to GPIO battsens_en which doesnt seem to appear on the pi pinouts either or do i just have to set one of the gpio pins as GPIO.IN? (yes im a bit of a noob when it comes to making things, ive been repairing things for years but thats usually just a case of replacing a part or whatever, ive never done any real prototyping type stuff before)

any help on this would be greatly appreciated

Hugh Jarse
Posts: 46
Joined: Mon Mar 05, 2012 5:03 pm

Re: Monnitoring a solar powered pi

Tue Aug 21, 2012 3:28 pm

If you cant add ADC, isnt there some trick you can do with a set of zener diodes. The granularity you get is dictated by the range of zeners you can get or wish to use so this may be a non starter.

Other options include using an ADC chip (e.g. via Gertboard), or using a microcontroller to do this (I see you have a PIC). Based on my own familiarity I would use an ATMega/Arduino for such a job. This option does mean that you would have to interface to the MCU - serial access is a good way.

I would be interested to see what kit you are using so far, as solar powered pi seems a good way to go for a number of projects.

emba
Posts: 19
Joined: Sun Jul 29, 2012 8:54 pm

Re: Monnitoring a solar powered pi

Tue Aug 21, 2012 6:07 pm

i do have a pic but i have no clue how to wire it up or even if i have to program the chip to begin with as i say the diagram just says "to ADC" it doesnt even mention an out from the ADC and the pi doesnt seem to have a "battsens_en" pin or at least not one that i can find labelled on any diagrams. (im not sure i fully understand what im doing here to be honest but ill work it out)

thankfully my slice of pi/o kit arrived today which should have one onboard, however my soldering iron has gone missing (or rather its been "cleaned up" by someone else in the house, of course they all claim they have never seen such a thing in their lives) so im not going to be able to assemble it until i can afford a new soldering station which wont be till the weekend at least :(

Return to “Automation, sensing and robotics”