Showing posts with label LCD. Show all posts
Showing posts with label LCD. Show all posts

Saturday, November 6, 2010

Arduino Solar Battery Monitor

Overview
The primary battery in my Solar Powered Home is a series of 4, 6 volt 395 Amp-hrs deep-cycle lead acid batteries. The capacity of this 24 volt battery system is about 9.5 kwHr. This Arduino project measures the power into and out of the battery and the battery voltage and displays on a 2x16 LCD display the current charge state of the battery along with other useful information.

Setup of the sensors
The cables connected to this battery are large and the currents high (~60 amps max). As a current sensor I used a hall effect CSLA2CD made by Honeywell Control. I had to splice in a smaller Battery cable to go thru the sensor. The sensor output saturates at about +/- 70 amps and the output is about +/- 33mv/amp with zero amps being the mid point of the sensor power supply, in my setup 8 volts.

A small protoboard has all the sensor electronics and is located near the batteries and draws power from them.  The 24 volts is regulated down to 8 volts for the hall effect current sensor and the 24 volt input is divided by ~ 1/6 to be suited for an Arduino A/D input. The two sensor outputs and a ground are wired back the the Arduino board which is located in a more convenient place several metres distant.

----------Schematic-coming soon----------

Breadboard version
Arduino and LCD display
Without the Breadboard
The Arduino and LCD display are wired up the same as the Adafruit project here with the two sensor inputs on A/D 0 and 1. A0 for the current to and from the battery and A1 the battery voltage.  I have used two of the Arduino's PWM outputs for the LCD back light and contrast.


The LCD displays two pages of information alternating 3 seconds each.
Page 1: battery voltage, battery current, state of charge %, fully charged = 100%, battery mode: charging, discharging, absorb and equalize.
Page 2: Today's stats in minutes reset at dawn
 charge time, discharge time, absorb time, equalize time.

The current weather including solar irradiation on the solar panels and the panel temperature (Extra sensors) are here.

Arduino Software
All my code is messy. May contain commented out debug stuff. You can rewrite it much better!
View code 
download code