Introduction: Discretionary Load Control on an Off the Grid Power System Using PfodApp™
One of the pfodApp users lives off the electricity grid on a small rural property. This instructable describes how he used pfodApp and Frequency Shift Power Control to automatically turn discretionary loads on (and off) to use the available excess power from his solar panels.This description is also available here.
Step 1: System Description
The off grid system is an AC coupled Photovoltaic (PV) system that uses a combination of Sunny Boy inverters (PV to 240V 50 Hz) and SMA Sunny Island inverter chargers (48Vdc battery to 240V 50Hz bidirectional). The Sunny Boy inverters are set up with a droop function on their power output that reduces its power output as the mains frequency rises (100% output at 51Hz dropping to 0% output at 52Hz). The Sunny Island inverter chargers charge and discharge the batteries as required to maintain the mains voltage. When there is more power from the PV panels than is needed, the Sunny Islands charge the batteries. If the batteries are close to full and there is excess PV power, the Sunny Islands can't dump all the excess power into the batteries and act to limit the output of the Sunny Boys by raising the mains frequency. SMA calls this Frequency Shift Power Control (seehttp://files.sma.de/dl/7910/SB-OffGrid-TI-en-42.pdf)
Using the grid frequency as an indicator of excess power being available from our PV panels, discretionary loads such as water pumps and pool filters around the house can be automatically controlled.. The power system is remote from the house, so the control panel is not convenient to access and monitor. There are expensive proprietary products that could be usee to control the discretionary loads, but they would also require additional cables to be run from the power system to the house however for less than $150 of parts an Arduino was used to measure the mains frequency and some radio controlled switches to switch the loads. The Arduino counts the mains frequency pulses from a 240V/9V transformer and calculates a rolling average over 25sec to measure frequency to an accuracy of 0.02Hz. A 433MHz transmitter is used to control off the shelf radio controlled switches (Watts Clever Easy Off Sockets) that are used to switch the discretionary loads. The user interface is provided on an Android phone using pfodApp via a Bluetooth connection.
Step 2: Description of the System Components
There are four (4) independent solar arrays of 2kW each. The mounts do not track although they can have the angle changed from horizontal to 60 deg. They are currently at 40 deg and there is excess generation. They could be raised to 60 deg during winter to improve output if necessary. Behind the array second from the left is the equipment room where the batteries and inverters are housed. At the rear of the equipment room there is a small lean-to which covers a 5.5kVA backup petrol generator.
Inside the equipment room, the red devices are the Sunny Boy inverters rated at 4kW each (each served by two of the solar arrays) and the yellow devices are the Sunny Island inverters rated at 4600W continuous. On the right you can see the batteries. These are 2V 1200Ahr lead acid cells in a 48V pack. Everything is automatically controlled by the Sunny Island inverters including paralleling and loading the backup generator in the event of low batteries or excessive load.
Above is the block diagram of the Frequency Controlled Switch system.
Step 3: Arduino Hardware and PfodApp Control
The first photo shows the controller in its enclosure and the power supply. Conveniently the power supply supplies both the 6.5Vdc used to power the Arduino and the 9Vac which the Arduino counts.
The second photo is a closer view of the controller hardware The major components visible are the protoshield (left) that was used to assemble all the additional components to the Arduino, the 433MHz transmitter (top right) and Bluetooth module (bottom right).
The Arduino is under the protoshield. The discrete components on the protoshield (two diodes and a resistor) are used to clip the 9Vac waveform so it approximates a square wave which is used to trigger an interrupt on the Arduino to increment the appropriate counters.
Next are the screen shots of the pfodApp control app, main menu and one of the sub-menus that controls the individual switches. pfodApp can also plot the frequency over the last 10min period and log the data to a file on the mobile.
pfodApp is a general purpose app whose menus are completely controlled from the Arduino. Here the pfodApp is connecting via Bluetooth, but is can also connect via Bluetooth Low Energy (BLE), Wifi or SMS.
The complete code for this installation has not been provided as it is custom coded for this setup. However you can use pfodDesignerV2 to generate your own custom the Arduino code for the menus/sub-menus and on/off buttons and the chart.
On part to code that is of general use is the interrupt routine the is used to measure the line frequency. That code is here.