shieldv2+emoncms says my apartment uses 50MW of power!?

Okay, so I feel mildly foolish, but I assembled an Arduino and emonTx shield v2 with a Raspberry Pi forwarding station and set up my emonCMS account...


...and honestly everything works really well!  I'm very impressed with how smoothly everything came together.  The CT sensor clipped onto my power input, and the AC-AC adapter (for 220V) plugged in no problem.


...well, maybe one problem, because the stock sketch seems to be telling emonCMS that I'm using about 2000 A (with my stove on; otherwise only about 400A or so) at 26,000V.  I'm hesitant to change anything because I'm just a bit confused.  It certainly does work for letting me know if the stove is on, but...


Is there an obvious calibration step I missed in the assembly and flash?  I'm pleased that my apartment could supply the electrical needs of a small city, but it'd be nice if the readings were accurate and I suspect I just missed something obvious.

pb66's picture

Re: shieldv2+emoncms says my apartment uses 50MW of power!?


The standard sketches all report power rather than current so 400w to 2000w sounds far more feasible and the voltage needs to be scaled by multiplying input by 0.01 in emoncms to be 260v. The sketches mainly transmit whole numbers (ints and longs) so voltage is multiplied by 100 before transmission to give accuracy to 2 decimal places.

May still need a little calibrating, but at least the figures will no longer  suggest you need to remortgage your house to pay your next utillity bill :-)


Robert Wall's picture

Re: shieldv2+emoncms says my apartment uses 50MW of power!?

To add to what Paul wrote above, if you download the default sketch from Github and trace the numbers through (unless you need to change the calibration, there's no need to upload it to your emonTx - you are only looking at it!) you will see that power is in watts, and it is sent as watts, but other values like voltage are multiplied by 10 or 100 before they are sent:

e.g. line 278:   emontx.Vrms=ct1.Vrms*100;
and line 346:   emontx.temp=(temp*10);

It is things like that you need to look out for and reverse in emonCMS.

vputz's picture

Re: shieldv2+emoncms says my apartment uses 50MW of power!?

Hmm, curious choice; I would have expected the emonTX to transmit the most basic information possible (voltage and current) rather than power, and do the post processing to power in emonCMS.  I'll take a look when I get home (and maybe modify it to do so rather than reversing it in emonCMS).


260v seems an odd measurement as well; I'll try to verify with my multimeter (UK power and I've tested it before and the wall voltage seemed on target with that).


Thanks much for the help, though--I wish that had been mildly more obvious (not that I don't greatly appreciate the work everyone has done, but buying the turnkey SD card and flashing the "stock" sketch, one does sort of anticipate it all "just working").  Additionally the RPi seems to lock up after several hours, which I need to investigate (and could be my fault; it wasn't booting without the HDMI cable attached, so I tried rpi-update to update the firmware, which didn't fix the HDMI cable business but may have introduced something else).


(I'm still a big fan of the project)

Thanks a ton for setting me straight!

Robert Wall's picture

Re: shieldv2+emoncms says my apartment uses 50MW of power!?

Most people want power 'out of the box', so that is what the default sketch (which incidentally is pre-loaded into the emonTx V3) gives. You can't get real power from rms current and rms voltage, neither can you get current from power and voltage (unless of course you always have unity power factor), so if you want current, you need to add it to the PayloadTX structure. My guess is it was done that way to keep the RF transmissions to a minimum, which of course helps if you're running off batteries but doesn't really concern you when running off mains power.

Your maximum voltage if you are in the UK should be 253 V, so you do need to check the voltage calibration. I presume you bought the standard AC-AC adapter from the shop? Any other and you will almost certainly need to calibrate the voltage.

vputz's picture

Re: shieldv2+emoncms says my apartment uses 50MW of power!?

I did use the standard AC-AC adapter from the shop, so I'll take a gander at some point.  I made the mods in my emoncms setup and it's looking much more reasonable... although the rPi gateway seems to crash after several hours and I'm not clear why (I left my desktop shelled in watching the log, so hopefully there'll be a clue; last time I was able to ssh in after the crash, so maybe it's just a python problem).  It seems to be mostly on the transmission end, because when I start it up again it spools all the buffered data for a while before settling into the every-second-or-so business.


Still, it's already doing what I wanted: showing me when things are off or on and the relative impact of different items being turned on or off.  I've recommended it to a friend; good project with a couple of bumps.

Comment viewing options

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