PV System Monitoring.

Following the installation of a 2.94 KWp PV system we needed to take advantage of the free power it supplies, currently the only way of knowing what the PV Inveter (SMA HF3000) is doing is to boot up the PC and Bluetooth into the inverter which is not very practical if we only need to see if we can switch the dishwasher on.

12 x Sharp 245w panels

SMA Sunnyboy HF3000 inveter installed in the roofspace, Inverter has some great features including data logging and bluetooth access for download of data via the Sunny Explorer application.

House consumption currently being monitored by a EnergySmart from British gas but it does not sense the PV generation.

Back to the Build

Most things have followed my origonal plan, EMONTX board from Glyn, JeeLabs Nanode V6, Graphics board and a second Atmel CPU & RFM12 module for the EMONTX along with a jiffy bag of passives from Farnell have slowly being arriving over Christmas.

Dusted down the trusty soldering Iron and got both the EMONTX and JeeNode assembled, then began the baptism of fire with Ardunio ! First attempts a compiling anything failed. So I loaded a basic blink sketch which complied OK but would not download to the target. After a lot of messing about I found I had the USB programming (CP1202 module) plugged in upside down, not easy to notice when you don't have a green or black wire - Doh. Anyway with the programming header hooked up I managed to get the EMONTX board LED to blink at me.

Back to the EMONTX sketch problem which in the end where caused by trying to compile older sketches with Arduino 1.0, after downloading 0023 and quite a bit of net rummaging for the various libraries ( I notice that you have now added links into the new style INO files !!).

To start with I loaded the 2_CT_voltage sketch to the EMON TX and used the JeeNode RF12 demo to pick up the transmitted signal, it picked something up next I assembled the Graphic display.

This was where the learning curve got a bit steep as it's years since I did C programming !

I moved the Dallas code from the GLCD to the EMONTX as I want external temp rather than internal, this all seemed to work well as the serial port was now transmitting the correct temp, however I could not persuade the GLCD to display the correct values.

After a lot of head scratching I found the the Payload being transmitted had differing feild sizes that being recived so a few more adjustments solved that, I've not got the CT or AC parts in yet so I have put some fixed values into the EMNONTX code for testing.

Display & EMONTX boards working with test values, no connectors fitted to EMONTX as they will be fitted to the case it's going in along with the AC transformer (dual secondary !) and a small 9v to 5v switching PSU.

13 January 2012

Started work on the PSU and case for the EMONTX, I'm using a dual secondary 9v PCB style transformer rated at 1VA per secondary which is possibly a bit OTT but the transformer and 5v voltage regulator are both rated at 100mA.

All of the unwanted strips have been removed from the strip board around the AC part (Before I get numerous panic posts)

Both boards fit well in the Multicomp box (Farnell Part No 152-6736), Left hand side panel will hold two connectors for the two CT's and I'm going to move the Green "TX" LED to the end panel as well. Pic of the box with one of the CT's for scale.

 I've also been doing a bit on the GLCD and included the code from the later version that switches off the LCD backlight at night to conserve power. I'm going at add a JeeLabs RTC plug so that the unit does not loose the time when powered off. EMONBASE not be implemented until later in the year hence fitting the RTC at the Display end.

21st January

Pretty much completed the EMONTX build, Both PSU board and EMONTX boards mounted in the above box, I did have an issue with the 9v transformer. As the secondary has very little load on it the output is around 15v rather than the expected 9v, the 5v supply regulator is happy with the higher input due to the power consumption being so low there is very little dissipation in the regulator. And after changing the calibration parameters in the TC sketch I have everything working.

Calibrated using Fluke 179 series DVM as my rapid special gives a very erratic AV voltage reading while the fluke is a true RMS device. I also used the fluke to check the current sensor calibration values by connecting it in series with a 4 way extension lead (after an in line RCD just to be on safe side)

I did suffer an odd problem with the serial output of the EMONTX, as soon as I connected the AC input I started getting about 16 bytes of garbage and the rest was OK. unplugging the AC input cleared the issue but that stopped me getting an accurate calibration. My first thought was that it was RF being picked up by the FTDi cable, so I commented out the TX function but this made no difference. Odd thing is that the data being transmitted to the GLCD was always OK

In the end I first increased the baud rate which reduced the number of scrambled bytes and then I added a delay into this part of the sketch :

    

  digitalWrite(LEDpin, HIGH);    //flash LED - very quickly 
  delay(2);
  if (SERIAL) { serial_output();}
  delay(10);    // added delay as something screwing up local RS232 ?
  digitalWrite(LEDpin, LOW); 
  rfwrite() ;

 So the order of sending the RS232 data and starting the RF transmit function have been altered and it has resolved the problem, I don't fully understand why this happened all I know is that the above mod fixed it !

My calibration values are :

  emon1.calibration(184.85,125.0,1.7);		//voltage calibration , current calibration, power factor calibration

 04 February

Fitted a 13A outlet fitted into the meter box using a an RCBO installed in the spare way left in the PV distrbution box to power the EMONTX which has been stuck to the housing using sticky back velco. At some point I need to shorten the CT sensor cables to tidy everything up but it's around freezing and their is snow on the way so today was not the day to be messing around outside for long.

I've also made some progress on the Display. I've now got everything to complie on Ardunio 1.0 and added some code to drive a set of traffic lights based on the Grid power, the HE LED's I'm testing it with a bit too bright at the moment, so I'll probably change to 3mm types intead . I've also ordered a box for the LCD from RS. Once I've got the LCD fitted I'll post more pictures.

Traffic lights on red as I'm using the tumble drier as it's now snowing....

07 February

After a considerable ammount of carefull dremmeling and a lot of filing I've now got the JeeNode / Graphics board into the RS box. I had a slight problem when the the rear of the JeeNode fouled on the base of case  and I only noticed after I'd cut the hole and glued the LCD in place (too late in other words. By bending the ports connecting the JeeNode to the display and by filing a bit off the JeeNode and the box it all fits - Just. I have used a 500mA swithmode 5v supply from RS and glued a Mini USB connector into the base of the box.

Just needs another OpenEnergyMonitor logo and it's done.

HE 5mm LED's replaced with some standard 3mm ones I recycled from an old control board I found at work, much better at least you can now see the LCD without getting blinded.

Had some discussion over the function of the Traffic Lights with the lady of the house. Currently LED's working off the Grid consumption, if the grid is under 1Kw it's green, 1Ww to 3 Kw it's Yellow and over 3Kw it's RED. Makes sense to me as this takes Solar PV production into account so during the day (when sunny) you can apply more load before you get the yellow / Red stage. Apparently thats too confusing !

To Do - Nanode RF and EMONCMS however that will have to wait until later in the year my initial goal of being able to make sensible choices about how we consume energy during the day has been met.

I could not get anything onto GitHub despite following the idiots guide, I'm not that great with bash and the GUI is a nightmare so rather than waste time code is uploaded as a zip here :

openenergymonitor.org/emon/sites/default/files/SB_Solar_PV_EMONTX&GLCD.zip

Changes are reasonably well comented if a bit crude in places !! 

Simon Bateman

East Yorkshire

glyn.hudson's picture

Re: Solar PV Monitoring (II)

Great job! Looks like a tidy setup. I notice the screen shows some horizontal lines. The display can be improved by adjusting the contrast of the display edit GLCD_ST7565.cpp. Change line 134 to be st7565_Set_Brightness(0x18); instead of 0x15.

 

If you use the lasest GLCD lib from JCW's git hub and Arduno 1.0 this can be done in code with the line glcd.begin(0x18)

S Bateman's picture

Re: Solar PV Monitoring (II)

Thanks,

Display looks worse on the picture that it is but  I'll add that line to the sketch when the other half decides how she wants the traffic lights to work 

Overall I'm pleased with the result though Display box came out better than expected and does not look too out of place stuck to the kitchen wall. The Energysmart has now gone to a new home in exchange for a 4 pack of Stella !

stuart's picture

Re: Solar PV Monitoring (II)

You've done a really good job there, if you'd be interested in trying out my SMA inverter bluetooth code (I also have a 3000HF model) that would be great!

 

glyn.hudson's picture

Re: Solar PV Monitoring (II)

Couple of things:

We usually use a simple plug in 5v USB power supply to supply power for the emonTx such as: http://uk.rs-online.com/web/p/products/736-1658/. If making your own power supply make sure the 5V input is put through the 3.3v reg by connecting it to pwr. Battery input does not go through regulator. 

No need to use a hardware RTC. The latest version of emonGLCD and emonBase code gets the current time back from the interent and posts up the temperature reading from the emonGLCD's internal temperature sensor to emoncms.

See: https://github.com/openenergymonitor/EmonGLCD/tree/master/emonGLCD_solarPV_AutoTime_TempLog

and https://github.com/openenergymonitor/NanodeRF/tree/master/NanodeRF_singleCT_RTCrelay_GLCDtemp

We haven't really documented it well yet, expect a blog post soon. It works really well, been using it for several installations.

Keep up the good work.

S Bateman's picture

Re: Solar PV Monitoring (II)

Hi Glynn,

Thanks for the feedback, My meter box on the outside of the house in now very busy (just added Picture above) and I didn't have space for a double socket so I decided to make the PSU part of the TX unit.   I actually found the PWR / VCC out by mistake, luckily the batteries I was powering the EMONTX from are pound shop specials and only gave about 4v so I did'nt damage the RF module.

Looks like a took up the project build at an interesting time, I started with Arduino 1.0 and could not get anything to compile, switched over to the older 0023 bulid, found all of the libraries and made the changes I wanted and at the same time you have made a good job of sorting out the same sketches for 1.0 !  For now I have something that works so I can get the hardware side sorted out and then I'll switch over the the 1.0 sketches.

Thanks for the heads up on the RTC feature, I don't think I'll get the Nanode RF until later in the year but we should be able to cope with the Soft RTC in the mean time.

I'll keep the updates coming - Keep up the good work !

S Bateman's picture

Re: Solar PV Monitoring (II)

 Well that's my build updated, I'll be working on the Internet side of things later in the year.

I hope it's OK that I zipped my sketches, I gave up with GITHUB, after 2 hours I still could not even get my readme to upload 

S Bateman's picture

Re: Solar PV Monitoring (II)

 Today was reasonably bright and sunny, and the GLCD showed 10.3 KWH generated which to be honest  I didn't belive...

However on checking with the SMA "Sunny Explorer" software it's only out by 270wh which is around 2% which I think I can live with !!