EmonTX V3.4 which continuous sketch for Grid, PV & HW diversion?

i need a continuous sketch to monitor Grid power, Solar Generation, 2 divert loads and keep track of 3 temperatures. It also needs different phasecal values per CT. The power diversion is already covered by a different system.

So far I've tried the continuous monitoring with totals sketch from GIT but it seems to stop working when the programmer is unplugged, and it doesn't include voltage reporting which makes calibration with a single meter difficult.

I've also tried the MK2PV diverter sketch which is under reporting the standby house power by about 1/2 and I think lacks the code for 3 temperature sensors.

can anyone suggest a sketch to use as a basis for this system?

Robert Wall's picture

Re: EmonTX V3.4 which continuous sketch for Grid, PV & HW diversion?

I don't believe there is a ready-made sketch that suits your needs. As Robin suggested in another thread, you will probably have to develop it yourself, following the method he outlined.

sheppy's picture

Re: EmonTX V3.4 which continuous sketch for Grid, PV & HW diversion?

That is very true, I just would like suggestions with which one to start.

Right now I'm playing with phasecal, and a resistance heater trying to work out the optimum value to use with not much convincing success so far. My next step is to switch off all the house breakers and just leave the test rig on in case it gives me better results. With the default value of 1.0 my power overnight was about half of what I expect to be metered despite calibrating power and voltage with the heater previously so something isn't working right

As power diversion rather than power measurement was the focus of this sketch I'm wondering whether it is the best starting block. 

Robert Wall's picture

Re: EmonTX V3.4 which continuous sketch for Grid, PV & HW diversion?

If you need a voltage measurement, and temperatures, you just might be better looking at MartinR's PLL sketch and its derivatives. Like Robin's 'continuous' sketch, this too was originally intended for energy diversion, and the original caters for only two CTs and one temperature. It will be easy enough to remove the power diversion, but rather harder to add 2 more CTs and a two temperatures, and (presumably) kWh totals.

Do bear in mind that at small currents, the phase error of the YHDC CT varies markedly, and if you find you need to have accurate current measurement over a very wide range, you might find you must upgrade to a better CT.

sumnerboy's picture

Re: EmonTX V3.4 which continuous sketch for Grid, PV & HW diversion?

Not sure if these are any good, you might find them helpful in modifying your own sketch, but I have a couple of sketches based on Robins continuous/PV diverter sketches which I have modified to read 4 CTs and a single V sensor;

https://github.com/sumnerboy12/hardwicke

​These also report sensor readings by MQTT which may be of interest?

No temperature sensors sorry, I would be wary of trying to do too much with a single Arduino tho. Can you chuck another Arduino next to your HWC for measuring temps? That is what I have done (see the mqtt_heating3 sketch).

Cheers (from a fellow kiwi ;))

Ben

sheppy's picture

Re: EmonTX V3.4 which continuous sketch for Grid, PV & HW diversion?

Hi Ben,

good to see I'm not the only one down here that is playing with these things. I've finished my sketch work for today so I'll take a look tomorrow. Thanks for posting!

Cheers

sheppy's picture

Re: EmonTX V3.4 which continuous sketch for Grid, PV & HW diversion?

Robert,

it may well be phase errors at low readings that will screw me up here. Whilst I have a 60Amp main feed the background consumption according to my bill is in the 200-300 watt range and this is proving very different to measure accurately. I may try making a load in this range from conventional light bulbs and then seeing if after calibration of power factor if I can play with the other values to make the readings sensible. I was advised by Glyn to stick with the standard sensor however this may prove difficult to get the results I need. I did look what else was available down here thats sensibly priced and drew a blank

 

Bramco's picture

Re: EmonTX V3.4 which continuous sketch for Grid, PV & HW diversion?

Robert, sheppy,

Adding more temperature sensors to Martin's PLL sketch is really quite easy - even a rusty programmer like me managed it.

Sheppy, if you are interested I can dig out the sketch I made although not until next week, we are away at the moment. One thing I did do was to ignore the id's of the sensors in the arduino and work out which one was which in emoncms. This is easy to do by dipping them one by one into cold water and identifying their input number in emoncms. I can't remember now who suggested this on the forum but from a coding and setup perspective it's very easy. Anyway, let me know if you need my version of Martin's sketch which has 5 temperatures and could take more just by increasing an array size.

sheppy's picture

Re: EmonTX V3.4 which continuous sketch for Grid, PV & HW diversion?

Yes please, if only for information. A week ago I'd never touched this stuff so the learning curve has been vertical.

sheppy's picture

Re: EmonTX V3.4 which continuous sketch for Grid, PV & HW diversion?

Robin,

sadly I think its the phase errors at low current that are screwing me up. My house power overnight according to the utility company is 0.3KWh yet the sketch reports around 180W. I've tried calibrating at 750W which is the lowest setting of my fire and despite it reporting within a couple of watts it hasn't really helped. I guess I'll have to try using several old school light bulbs to see if I can get it anywhere near with lower currents. Currently if I get a glass of water from the fridge it apparently consumes over 50watts just to operate the solenoid and turn on 3 LED's!!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.