Solar PV Monitoring System

December 2011

This page documents the build of a domestic solar PV monitoring system. The system monitors solar PV generation and grid import/export. This allows the calculation of how much of the power generated is used by the home owner and how much is exported to the grid. The data is logged to a remote server and also shown in real-time on a living room display.

 

          

The PV system in this example is a 2.9kWp system with 12 x 245W panels that are grid connected (240V, 50Hz) with a Fronious IG 30+ inverter. The system is located in North Wales, UK.

The Feed in Tariff scheme (FIT)currently running in the UK pays the home owner a fixed amount per kWh generated, the home owner also gets paid a much smaller amount per kWh exported. At the moment (Dec 11) most homes in the UK don't have export or smart meters fitted, utility companies assume, for calculation purposes that the home owner exports half of the power they generate. The cost of importing power from the grid is higher than the amount paid per unit of exported electricity. Therefore it makes financial sense for the home owner to use as much of their generated power as is possible.

A monitoring system with a real-time living room display indicating the amount of power being imported/exported allows the home owner to attempt to match their power consumption to the power being generated. I.e. make hay tea when the sun is shining! Financial benefits aside it can be very interesting and satisfying to monitor the yield of your solar PV system.
Monitoring is the basis for control, Paul Dreed has documented a build of a Solar Power Management system that automatically diverts excess power being generated into a immersion water heater. See builds section of website.

The solar PV monitoring system consists of three hardware units which communicate wirelessly: emonTx – transmitter unit, emonBase web-connected base station unit and emonGLCD -living room display unit. These three units are the standard building blocks of the OpenEnergyMonitor end-to-end open-source monitoring system. All these units are open-hardware and Arduino software compatible.

EmoncmsV3 web-application software was used on a remote web-server for web-based logging, graphs and a real-time dashboard.

Hardware

Main emonTx documentation page

 

The transmitter is a standard emonTx V2.0 with two 100A max CT sensors, 9V AC-AC voltage adapter and two DS18B20 temperature sensors connected to it. See diagram above.

CT sensor connections

General note regarding the installation of CT sensors: the clip-on CT current sensors must be clipped round either the live (brown in the UK), or neutral (blue in the UK) wire. Not both. It is sometimes necessary to carefully remove plastic ducting to access the live an neutral wires. Live terminals should not be exposed but if in doubt switch off the power before investigating. A shock from AC mains electricity can be fatal, if in doubt consult the advice of an experienced electrician.

The CT sensors should be connected to the emonTx before being clipped round a live cable.

     

Above: CT installation on the live wire AC output from the solar PV inverter. Generation meter can be seen on the top right

There are two ways to fully monitor a domestic solar PV set-up (I.e both power generation and consumption), these are explained in this document as type 1 and 2:  

Type 1

A solar PV system can be monitored as a type 1 when the generation and consumption can be monitored separately. Whether or not this is possible will depend on how the AC output from the solar PV inverter is fed into the household wiring. The amount exported/imported to or from the grid is simply the excess or deficit of the total of generation minus consumption. Knowledge of the direction of the current is not required therefore a plug-in AC-AC voltage sensor adapter is not required unless power factor, RMS voltage and real-power readings are desirable. For a type 1 solar PV monitoring system the grid import/export can be calculated as follows:

grid (import/export) = consumption – generation

Grid reading will be positive when importing and negative when exporting.

Type 2

A solar PV system must be monitored as per type 2 when the generation and consumption cannot be monitored separately. This is the case in the build example being documented here; the AC output from the solar PV inverter was fed into a spare MCB in the fuse box. Other household loads such as lights, shower, electric cooker etc. were also connected to other outlets in the same fuse box. Therefore monitoring household power consumption separately is not possible. If this is the case the output from the PV inverter and the grid import/export connection will need to be monitored instead. Knowledge of the direction of the current is required to determine the difference between power import and power export. Therefore an AC-AC voltage sensor adapter is required.

When the AC-AC voltage sensor is used (see below) the grid import/export CT reading goes negative when exporting or vice-versa depending on the orientation of the CT clamp round the wire. To be compatible with the software examples included with this documentation it is desirable to clip the CT round the grid import/export cable orientated so that the reading is positive when importing and negative when exporting.

Household power consumption can be calculated in software:

Power consumption = Solar PV generation + Grid import/export (negative when export)

Note: This documentation is mainly concentrating on a type 2 solar PV monitoring system (see diagram at top of page), this is the more complex of the two.

AC-AC voltage sensor adapter (only needed for type 2 system)

In order to determine the direction of the current flow (important for being able to tell the difference between grid import or export) an AC voltage reading is needed to provide a point of reference; this result is a positive or negative current current reading depending on the direction of the current and the orientation of the CT clamp.

The emonTx obtains a voltage reading using an AC-AC 9V plug-in transformer. Using this adapter also allows us to monitor the RMS AC voltage, real power and power factor. For information about how this works see the documentation for Mains AC non-invasive V3 on which the emonTx design is based. A nearby power socket is required for the AC-AC adapter, if necessary consult an experienced electrician.

Note: The emonTx cannot currently be powered from this AC-AC adapter. Rectifying and loading the AC-AC adapter effects the sampling of the AC waveform. A separate 5V USB power supply or batteries must be used to power the emonTx. There is a thread on the forums discussing how this problem may be overcome: http://openenergymonitor.org/emon/node/309

Temperature sensors (optional)

Main temperature sensing documentation page

Two DS18B20 digital one-wire temperature sensors are connected to the temperature port on the emonTx. In this build example they are used to monitor the outside ambient temperate and indoor living temperature. Since the cable runs for these sensors are quite long (10m) the emonTx was modified to give 5V instead of 3.3V to the sensors. 5V was available on the PWR pins on the emonTx since in this build example the emonTx is powered from a 5V USB supply, see below. For more information on this modification and DS18B20 temperature sensors see 'temperature sensing with the emonTx at the bottom of this page. This modification will not be required on future versions of emonTx.

DC 5V (USB) Power

Since this is quite an extensive system including multiple temperature sensors and multi-channel monitoring and since there is a power socket outlet nearby (needed for voltage monitoring – see above) is was decided to power the unit from a 5V USB adapter (commonly available as mobile phone chargers, see this blog post before choosing an adapter). An emonTx will run on two AA batteries for over 4 months when used for single channel CT monitoring.

 - web connected base station 

Main NanodeRF documentation page

The emonBase receives the monitoring data via wireless from the emonTx and posts online to a remote sever on which an installation of EmoncmsV3 is installed (see emoncms below). A standard NanodeRF was used as the emonBase web-connected base station. In this build example the NanodeRF was located about 10m away through one block internal wall. RFM12B wireless range was not a problem. For best performance ensure the emonTx and NanodeRF have the same frequency RFM12B transceiver module and that the correct length antenna is used. The correct frequency for the module also needs to be set in the software prior to upload.

The emonBase was powered by 5V USB which was handily obtained from a BT HomeHub, the NanodeRF was also plugged into the BT HomeHub router with a standard CAT5 Ethernet cable.

The IP address for the NanodeRF is automatically obtained from the router via DHCP.

Main emonGLCD documentation page

The emonGLCD was wall mounted in the living room. The purpose of the emonGLCD is to give the home owner an instant reading of house energy usage compared to the solar PV generation.

It has been suggested that a home owner might attempt to reduce their consumption at times when a low amount of power is being generated and perform non-essential tasks that consume more power such as washing machine, dishwasher etc. when excess power is being generated. To give the home owner a clear indication of excess power being generated the tri-colour LED's on the top of the emonGLCD are programmed to turn green when power is being exported (excess power being generated) and red when power is being imported (power deficit).

 

We have also experimented with the tri-color LED's turning orange when the amount being generated almost meets the amount being consumed, the idea being when the home owner sees orange he or she knows only a small reduction (50W in this example) in consumption will enable demand to be met by generation.

Financial benefits aside, it was found that the home owner felt personal satisfaction by keeping the lights green when at all possible. Behavioural change due to domestic solar PV monitoring is an interesting topic and one which is outside the scope of this document. There have been several research papers written on the topic, the papers highlight the importance of monitoring and clear indication of both generation and consumption to prompt changes in behaviour. The monitoring system described here gives far superior user indication to those used in the research below:

Behavioural responses to photovoltaic systems in the UK domestic sector, James Keirstead, Lower Carbon Futures, Environmental Change Institute, University of Oxford, UK, 2007.

Photovoltaics in the UK domestic sector: a double-dividend? , James Keirstead, Lower Carbon Futures, Environmental Change Institute, University of Oxford, UK, 2005.

The emonGLCD receives monitoring data from the emonTx. The emonTx, emonBase and emonGLCD are all equipped with transceiver wireless chips. For best wireless performance ensure the emonTx, emonGLCD and emonBase have the same frequency RFM12B transceiver module and that the correct length antenna is used. The correct frequency for the module also needs to be set in the software sketch prior to upload.

The values for kWh/d displayed on the emonGLCD are calculated on the unit, in order to reset the counters at midnight each day the emonGLCD must know the current time. The current time is obtained from the interent via the Nanode RF. See this blog post for explination on how this works.

Power Consumption

The goal of this monitoring system and that of the OpenEnergyMonitor project is to reduce energy consumption through increased understanding of how power is consumed. The monitoring system itself has been designed to consume the lowest amount of power possible.

The combined power consumption of the three hardware units in the system is 6.5W (57Kwh/year), this is less than most ADSL internet routers. For the monitroring system to be worthwhile it should save atr least this amount of energy. The emoncms installation on a remote web-server is implemented as a cloud instance. Cloud computing enables severs to be better utilised, therefore less power is consumed per application than with a traditional VPS.
In order to save power the tri-color LED's on the emonGLCD turn off when the solar PV stops generating (when it's dark!) and the back light turns off between the hours of midnight and 7am.

Software

The emonTx, emonBase and emonGLCD are all based on the Atmega328 microcontroller (same as Arduino) and are Arduino software compatible. A 5V FTDI cable and the Arduino IDE is used to upload firmware sketches to the units. The Atmega328 included with the emonTx and emonGLCD comes preloaded with the Arduino Uno (optiboot) bootloader. Before uploading, ensure that 'uno' is selected under the tools>boards menu in the Arduino IDE. Currently (December 2011) the Atmega328 included with the NanodeRF comes with the older Arduino Duemilanove bootloader pre-loaded. This is probably due to change soon. Trying to upload with the wrong board type selected will not damage the chip, it just won't work! The Arduino IDE will return a 'not in sync' error.

Arduino sketches

The OpenEnergyMonitor example sketches were compiled with Arduinio 21 and use the older JeeLabs libraries . We are working on porting all sketches over to Arduino 1.0 and the newer Jeelib (ports + RFM12), glcdlib and rtclib librarys. If you can help with this then please hit us with a Git pull request. 

DS18B20 temperature monitoring uses Dallas Temperature Controll library and OneWire library

EmonTx 

Github: emonTx Standard 2CT (type 1 solar PV monitoring) 

GitHub: emonTx 2CT with AC- AC adapter (type 2 solar PV monitoring) 

EmonBase

Github: emonBase - ported to Arduino 1.0 and JeeLabs EtherCard library 

emonGLCD

Github: emonGLCD PV monitor example - ported to Arduino 1.0 and newer JeeLab libraries 

 

  web-based logging, graphs and dashboards

Main emoncms v3 documentation page

emoncms v3 github

emoncms web based dashboard screen shoots:

 

 

To download a more printer friendly version of the page as a pdf click here

Acknowledgements 

Like most open-soure projects we rely heavily on the work of others. Thank you for sharing:

JCW - JeeLabs.org:  RFM12, EtherCard, RTC software libs, JeeNode and GraphicsBoard Hardware designs and much electronics insights. 

Ken Boak - Nanode and NanodeRF design and general advice and guidance

Andrew Lindsey: Ethernet library development - notably adding DHCP support

Ian Chilton: NanodeRF build guide and excellent information 

Miles Burton: DS18B20 temperature sensor library 

Buy

We are on schedule to open an online shop in early 2012 to sell OpenEnergyMonitor hardware modules in kit form. If you are interested please fill in this interest form and we will get back to you. 

Andygodber's picture

Distant cables

Ive got a type two setup, but the output from my inverter and main electricity meter are in completely different rooms. (output from inverter feeds into a second consumer unit)
Is there any way of moving the calculation logic to the emonBase, and using a second Tx in the remote location?

glyn.hudson's picture

re: multiple emonTx's

You could use two emonTx's. Just set them to have different wireless node numbers but to be on the same wireless network. The emonBase and emonGLCD can receive data from more than one emonTx. Just look at the node number to work out which emonTx the data has come from. 

See this example for how the node number is extracted from the wireless packets: https://github.com/openenergymonitor/EmonGLCD/tree/master/emonGLCD_solarPV_AutoTime_TempLog . This example is actually wirtten for the emonGLCD to receive (power) data from the emonTx and (current time) data from the emonBase. The emonGLCD also transmitts the temperature read from it's on-board temperature sensor back to the emonBase for also posting to emoncms. 

We will putting up a blog post about this soon.

Andygodber's picture

Code in EmonCMS

As another option, is it possible to add plus and minus calculation into EmonCms?

Another enhancement in CMS would be to allow data download (especially useful for customers wanting to use the commercial hosted package?)

Andygodber's picture

Code in EmonCMS

As another option, is it possible to add plus and minus calculation into EmonCms?

Another enhancement in CMS would be to allow data download (especially useful for customers wanting to use the commercial hosted package?)

glyn.hudson's picture

Re: emoncms features

 Good ideas, please add to the emoncms features and discussion thread here: openenergymonitor.org/emon/node/296