I have used the 2 channel non invasive sketch, to build a device which monitors how much power is being used in the home, and how much power is being generated by the solar panels. If I am generating more than I am currently using, then the excess power is diverted to an immersion heater - to heat domestic hot water. This is a better option than it flowing back to the grid for which I don't get paid (solar renta roof).
This was a steep learning curve as I have never worked with a microprocessor before, but great fun and a great sense of acheivement when it actually works!
The first version was built on a Arduino Uno board, with the input components mounted on veroboard, but then I decided to build it as a standalone, with everything on one board.
The LCD is reclaimed from an old alarm keypad, and I had a USB panel socket laying about so I used that for the 4 CT input connections. (did I mention that I am a Yorkshireman...)
As the peak solar power generation is 3.5kw, I used a shunt resistor to range up to 5kw, but fitted clamping diodes (Glyn's idea - see forum) to ensure that the mains usage did not exceed 5kw and damage the Atmega chip.
With a bit of sawing and hacking, managed to fit the PCB into a Maplins project box.
Here you can see the power results, which if less than 1kw displays in watts, otherwise kw's.
The tiny LED is multi function and indicates;
1) flashing every 4 seconds - indicates that the unit is functioning, but not enough solar power to activate either relay.
2) steady but lit 25% - indicates that 500w is being unused, and activates relay 1, with a diode in series to limit the load to 500w (yes it does work, I've done the sums on the leccy meter!)
3) steady but lit brightly - indicates that in excess of 1kw is being unused, switches off relay 1 and activates relay 2 which delivers a full kw (which is the rating of the immersion heater).
The button is a menu navigator, and switches between displays (copied from another project).
This display shows how much power is generated within a 24hr period, before resetting back to zero at midnight. There is no external timing here, just a simple millis() counter which resets every 24hrs. On startup, the counter resets after 12hrs for one occassion ( so if it's powered up at midday, it will reset at midnight and every midnight thereafter.
This display shows voltage and power factor, which of course is needed for calibration purposes.
To calibrate it, I took the readings from the LCD, removed the chip and wrote the new sketch via a Arduino Uno board, before replacing it in the standalone.
The sketch is posted here , please feel free to make any suggestions or create a new version of the paste in pastebin., and although a new guy to Arduino's/programming, if I can help, please email me at (the last word in bold in this post) @gmail.com
Sketch has also been uploaded to OpenEnergyMonitor. Download it here
...UPDATE 7th Sept
Following Glyn's advice (in comments below) I have built a Nanode, and have connected both units via their Rx/Tx serial bus, and use a simple Serial.print statement in the above device, to be decoded in the Nanode by the CmdMessenger library.
Data is then uploaded to Pachube every 20seconds by the Nanode, provided that the data values have changed.
Many thanks to Trystan & Glyn
Please post any comments and questions about the Solar PV Manager system to the forums