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!

PCB

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.

fitted in box
 

With a bit of sawing and hacking, managed to fit the PCB into a Maplins project box.

power readings

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).

kwh
 

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

yorkshirepudn

Please post any comments and questions about the Solar PV Manager system to the forums

 

dmty's picture

Re: Solar Power Manager

Hi,

I've just come across this project and I am puzzled by the apparent power reduction by use of a series diode.

It's my under standing that a series diode produces pulses of half sine wave every 20ms (50Hz).

Analysing the wave it has a DC element, fundimental, 2nd Harmonic, etc.

A lot meters assume the wave is sinusoidal and do not register the DC element.

My main claim to infamy is to blow up a AVO 8 meter trying to measure the ripple on a 100v DC supply.

Much to my bosses displeasure.

If you can please explain how the power is disipated.

Regards DMTY

 

 

 

.

 

 

 

 

 

Paul Reed's picture

Re: Solar Power Manager

 When applied to a linear resistive load, such as an immersion heater, 'real power' is a product of the voltage and current throughout every part of the cycle, positive or negative, it matters not.
P = V x I

But if we remove part of that cycle by using a Triac, diode or other similar device, we in effect reduce the 'duty cycle', and in the case of a series diode, reduce the 'duty cycle' to 50%, and accordingly the power flow by 50%.
This is a form of  Pulse Width Modulation (PWM) and is used  in light dimmers and other similar power controllers.

The power loss is extremely low, because when the half cycle is blocked, then practically no current flows, and when the half cycle is conducting there is just a small voltage drop (typically 0.6V) across the diode, which leads to high efficiency.

You may get a better understanding if you google PWM and look at the theory in more detail.
 

dmty's picture

Re: Solar Power Manager

Hi p,

Thanks for coming back so quick.

Read up a bit on PWM, didn't understand it all.

So I dusted off my old college books & found the coeffs. for a half wave.

Calculated that there is drop in RMS power of 0.57.

To back this up I put a ltr of water in the kettle, switched on the power for two minutes  & measured the rise in temp.

Repeated the above with a diode in series. 

Results gave a reduction in RMS power of 0.56.

I should have done this in the first place, saving your time,

Thanks  DMTY

 

Jon's picture

Re: Solar Power Manager

Have just stumbled across this site as I've been hoping to do exactly the same thing. Have just had a solar PV system installed and want to use the surplus electricity (when available) to heat my water cylinder via the immersion heater.
Unfortunately, Lots of the detail above is lost on me, - I could follow instructions but wouldn't really understand enough to have confidence. I'm happy with installing CE home automation products, and software / networking etc. but not doing my own electronics work.

Do ready made products exist which will do what your system does? I've been looking at something called lightwaveRF which might allow me to buy a power monitor, a web interface, and a remote controlled socket which I thought I might be able to combine to sort this out, the only problem being my concern about the inability to know which way the power flow is going.

If ready made systems aren't available is it likely that you would be able to start producing kits for sale that end users (or their friendly electrician neighbours) would be able to install?

Thanks for your time,

Jon.

Paul Reed's picture

Re: Solar Power Manager

 Coolpower manufacture a unit which does this, but I beleive that it's quite expensive and probably more suited to large premises/solar arrays to become more cost effective. However, I am aware of a number of companies who are developing cheaper alternatives, but so far have not hit the marketplace.

I don't sell ready made units, I just made this one purely as a interesting project just for myself. However, believe me, it wasn't that hard, as there are many people (including myself) who will help if you got stuck, and  I would gladly share any code I have too.

Arduino's cost about  £22 ready built and just plug into your computer to programme, I'm sure that if you tried one, your confidence would be inspired.

Jon's picture

Re: Solar Power Manager

Thanks.

The EMMA product looks like it's designed to do what you've done & what I want to do. With no pricing on the UK suppliers website, it might be expensive! I'm sure there will be larger demand for this sort of product with Solar PV really starting to take off and people realising that they're giving back free energy that could be used.

I might have a play around with an Arduino just for the fun of it and see where I get to. My soldering / electronics skills aren't up to much though, and there's some terms I don't understand which makes it tricky (What's C/T or CT that's referred to below? - I'm sure it's obvious once you know!).

eof's picture

Re: Solar Power Manager

About £1500 I believe!

C/T = CT = current transformer = the thing you clamp around the meter tail etc.

Jon's picture

Re: Solar Power Manager

Ah!
Had just found out what it was by looking at some other projects and seeing some pictures, but still didn't know that it was "Current Transformer".
Thanks.

eof's picture

Re: Solar Power Manager

I've wasted most of today thinking about immersion heater control.  Differences in my situation are as follows:

- I don't have access to a wire carrying house current only (as I explained in a "guest" posting to this thread)

- I'm not all that interested in logging how much the house consumes, just harvesting excess energy

- I would like proportional (rather than two step) control of the immersion heater to maximise the energy harvested.

So, I'm thinking of creating something based on all this excellent work, but with the following differences:

- A single current transformer on a meter tail

- Determining the direction of power flow by comparing the phase of voltage and current waveforms, in order to prevent feeding the immersion heater from the grid

- A control loop to power the immersion heater, which will obviously have to be stable

- Generating pulses at 100Hz to trigger a triac to drive the immersion heater, at a phase offset from zero crossing as determined from the voltage waveform.  Doing it this way costs a lot less in components than using a Crydom-type proportional control solid state relay: an-opto isolated triac can be obtained for about £5 (although its tab is not isolated).

Any thoughts on that?

Paul Reed's picture

Re: Solar Power Manager

The openenergymonitor sketch, when combined with voltage measurement will measure the phase and determine which way the power is flowing (put the CT the wrong way around and you get negative values), so the measurement side should not be too much of a problem. You will need to compensate for the power used by the immersion heater of course, otherwise the system will become unstable.

As for the power side, I needed the confidence that my home wouldn't burst into flames, and stayed with what I knew!!
....but, having established the phase (above), it must be reasonably easy to introduce a 'proportionate' delay to trigger a opto-isolated triac, I would suggest maybe via a second Atmega chip.
I wanted to use a Power Mosfet via PWM, but again safety logistics got in the way.

Please update us with your progress.

Paul