To give an example of how easy it is to use the DataDuino, I have recently set one up on my off-grid solar power system. This measures the battery voltage and solar PV panel voltage, along with the outdoor and indoor temperatures.

The voltage data will help me understand how much energy is going into and being drawn from the battery. My off-grid PV system is outdoors so the temperature data is interesting with regards to battery voltage changes with temperature.

This blog post gives details on installing the DataDuino to measure any battery-based system.

Hardware

The DataDuino code needs no changes, but the inputs do need voltage level conversion so they are in the correct range. We also need a 5V power supply from the 12V battery. An overview of the wiring is given here:

Voltages are measured with potential dividers, which are protected by 5v1 zener diodes. The resistors used are 10k and 47k, which allows up to 30V to be measured. They are not precision resistors, which will mean a slight error. If higher precision is required then 0.1% precision resistors could be used for the potential divider (but at higher cost).

The temperatures are measured using two DS18B20 1-wire temperature sensors. Here is one mounted in parallel on a two core cable:

I used a high efficiency voltage regulator – the LM2574. As this data logger was installed on a renewable energy system I did not want to waste energy on powering the device. This is much more efficient switching step-down converter than the typical 7805 linear regulator. I will also look into putting the DataDuino into sleep mode when it is not logging data. Check out this previous blog post for more information on the switch mode voltage regulator.

The voltage regulator and conversion components were mounted on an Arduino prototype board from CISECO. These are a quick and low cost way of connecting to the DataDuino (or any Arduino).

I designed and laser cut a simple enclosure using the laser cutter at Nottingham Hackspace. This is designed to hold the DataDuino along with an Arduino shield. There are power terminals cut out and two jack plug sockets for plugging in the temperature sensors.

There is a cut out for interfacing the FTDI USB to serial cable so that the unit can be reprogrammed without opening the enclosure. The 6 way header must be mounted differently than shown in the instructions to poke out of the bottom of the circuit board. Care must be taken to ensure these pins are never short-circuited or damaged.

After ensuring the date and time were correct, I set the DataDuino to measure values every 10 seconds, using the command “S00010E” (10 seconds).

An in-line fuse was to protect the voltage monitoring and power supply cables, as this is attached to a lead-acid battery which could supply very high currents if anything malfunctioned.

This has been left on my solar PV system for a while and the voltages and temperatures monitored.

Data

Here is a graph of the output data showing when the solar PV module is pushing up the voltage. You can see the 3 and a half peaks, which indicates the voltage rising due to the solar panel. The sun hits the solar panel around 9am and starts to drop off around 2pm, due to shading from the house next door. The battery voltage at rest over night is 13.4V which means the battery is pretty much full and in good condition. I did not run any loads during this test.

This graph shows in more detail what happens over 1 hour when the sun rises and the battery voltage starts to rise. You can see some quantisation (the steps between the levels) due to the ADC within the ATmega 328, which is only 10bit (1024 levels within 5 volts):

The indoor and outdoor temperatures for this week in early November 2012 are shown here:

Enclosure Design

I designed a laser cut enclosure which had enough height to take a prototype shield. This is available here:

Download the PDF file .

The .dxf file for the enclosure is available here.

Leave a Reply

Your e-mail address will not be published. Required fields are marked *