Any success with "Energy Monitor Shield v0.9b"

Hi,

This may not be the appropriate place to ask, so apologies if that's the case. I purchased a shield and CT sensor as described here:

http://www.seeedstudio.com/wiki/Energy_Monitor_Shield_V0.9b

I'm using EMonlib (current only - https://github.com/openenergymonitor/EmonLib/tree/master/examples/current_only) but am getting very sporadic readings. I've not tried manual calibration, however have tried running with nothing clipped through the CT sensor and storing these readings then taking an average and subtracting it from calcIrms(). Still no dice.

If I run the current_only.ino sample with nothing connected I get by and large the same readings as when something is connected (difficult to say precisely due to the fluctuations), despite expecting a significant increase.

  • Has anyone had any success using this shield? - If I'd looked harder in the store I'd have just picked up the one from here instead.
  • For Emonlib to function can an Arduino be powered by USB, or do I need a 9V mains DC power adapter?

Thanks in advance

Dave

dBC's picture

Re: Any success with "Energy Monitor Shield v0.9b"

For Emonlib to function can an Arduino be powered by USB, or do I need a 9V mains DC power adapter?

Either should work if you're just experimenting in the lab.  For your final calibration/install you'll usually get much better results using the DC power adapter.   There's a discussion on that here:  http://openenergymonitor.org/emon/node/10111.

It looks like your shield can only do apparent power (no AC voltage connection) in which case it's even more important you have a nice clean Vcc as you won't benefit from the natural noise filtering that occurs when you calculate real power.

Robert Wall's picture

Re: Any success with "Energy Monitor Shield v0.9b"

What current are you attempting to measure? Using which CT?

It appears that the input circuitry is similar to the emonTx Shield, so you'd expect similar performance. Thus with the YHDC 100 A : 50 mA CT, you need around 1 A for a reasonably accurate reading.

How are you using the CT? Have you looked at CT Installation in Building Blocks?

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Thanks both,

Using a stable power supply has solved many of my problems. 

I've taken a look at another sample project, emonTx_continuous_watthours [1] and was wondering if simply replacing the voltageSensor readings with a measurement of the voltage at home would provide reasonably accurate kWh measurements? - i.e. is the logic sound?

 

[1] https://github.com/openenergymonitor/emonTxFirmware/blob/master/emonTxV2/emonTx_continuous_watthours/emonTx_continuous_watthours.ino

Robert Wall's picture

Re: Any success with "Energy Monitor Shield v0.9b"

No, I'm afraid the logic isn't sound. The 'continuous' sketch is critically dependent upon the voltage input to get timing information, so without it, it simply won't run correctly - even if it does run at all.

The difference between apparent power (in VA) and real power (in W) comes when you have a load that has a reactive component - the compressor motor in a refrigerator, for example. Normally, you only pay for the real power. You can read more in Building Blocks.

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Thanks Robert, the more I read the more I realize my knowledge is lacking. Hopefully there's a point when that will change! I will read through the "Building Blocks" pages.

Slightly off topic, does you know of somewhere where the emonTx arduino shield is sold pre-assembled? My soldering skills, combined with my cheap soldering iron leave much to be desired.

Robert Wall's picture

Re: Any success with "Energy Monitor Shield v0.9b"

I think the SMT shield has all the very small components fitted, but requires "finishing off" with the sockets, headers, radio module etc. I don't know of anywhere/anyone who offers that service. You could try a post in "For Sale and Wanted", but we all tend to be busy doing our own thing.

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Thanks Robert, one final question before I buy one and potentially return what I have and stop pestering you.

Assuming I use the emonTx_continuous_watthours example and a single CT sensor, replacing the use of RF with Ethernet (W5100), do you imagine using a W5100 ethernet module to make a HTTP request (in send_rf_data) would effect the timings of the 50Hz readings? 

sumnerboy's picture

Re: Any success with "Energy Monitor Shield v0.9b"

I am doing something similar Dave. I have Robin's continuous monitoring sketch (with his PV diversion logic as well) reading 4 CTs and publishing all readings over an ethernet enabled Uno clone (using MQTT). It hums along very nicely and I haven't seen any issues with timing etc. Enabling the workload checks in Robins sketch indicated there was still plenty of processing time available.

My sketches are available here if you want to have a look;

https://github.com/sumnerboy12/hardwicke/blob/master/emontx_pvrouter/emo...

 

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Thanks Robin, good to hear - I'll pick up the shield and brush up on my soldering abilities!

Out of interest what Ethernet shield are you using? - I've been using cheap W5100 clones from eBay and am getting very mixed results with them (so far 50% failure rate!)

Robert Wall's picture

Re: Any success with "Energy Monitor Shield v0.9b"

If you're not totally confident in your soldering abilities, buy a piece of stripboard and a cheap bag of mixed components, and practice on that. Double-sided boards with plated-through holes are tricky until you get the hang of it, and not the place to learn/brush up your skills.

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Thanks for the tip Robert, I may just do that. I'll assess the difficulty once the bits have arrived and go from there.

sumnerboy's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Hi there - my name is Ben, I was just referring to Robin's work ;).

For my EmonTx Shield I am using one of these;

http://www.freetronics.com.au/products/etherten

It has ethernet built into the Uno clone itself and supports POE so I power the whole thing over ethernet as well.

I have a few of those cheap ethernet shields (from China) and have never had any issues. Running 2-3 in prod/live and they haven't missed a beat.

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Sorry Ben! - I had looked at the EtherTen, but was put off due to cost. Though PoE would be awesome for most of my projects, I'll just hope the price falls at some point.

After spending an hour or so soldering a bunch of resistors onto strip board (note to self - Maplin is expensive), I managed to get everything onto the emontx shield and am getting current measurements when hooked upto an uno. The hardest bit were the three-pin jumpers.

I'll pick up a 9V adapter from eBay and see if I can now get some real power readings. 

Both my Uno and the shield have a 9V power connector, will powering the shield also power the uno? - or is the 9V on the shield purely a reference voltage?

 

Robert Wall's picture

Re: Any success with "Energy Monitor Shield v0.9b"

I hope your 9 V adapter has an ac output, because the 'power' socket on the Shield is only the ac voltage measurement! Feeding it 9 V dc won't work. The Shield draws its power from the Arduino. And note the recent thread that pointed out that you need a clean power supply for accuracy at low powers, due to power supply noise getting into the measurements.
[Noise in Arduino-based builds: http://openenergymonitor.org/emon/node/10111]

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Thanks Robert, that's an interesting post. I'll play it safe and pick up the one from the OpenEnergyMonitor store, I should have thought this through more - this will be my third order in almost as many days.

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

My power adapter arrived today and I guess I should now be able to get accurate readings, assuming my soldering is up to scratch.

Trying to keep things simple and using the sample voltage_and_current sketch (voltage PIN0, 234.26 calibration, 1.7 power factor. Current CT1, 111.1 calibration factor) with an Arduino uno, I get the following:

-1315.20 1359.68 210.52 6.46 -0.97 
-1293.03 1332.01 208.48 6.39 -0.97 
-1292.86 1329.29 208.35 6.38 -0.97 
-1291.90 1327.51 208.36 6.37 -0.97 
-1305.68 1342.72 208.32 6.45 -0.97 
-1296.47 1331.38 208.68 6.38 -0.97 
-1286.88 1322.74 208.31 6.35 -0.97 
-1292.88 1328.07 208.50 6.37 -0.97 
-1292.20 1327.81 208.44 6.37 -0.97 
-1294.83 1330.60 208.39 6.39 -0.97 
-1289.58 1324.43 208.11 6.36 -0.97 
-1293.44 1328.99 208.17 6.38 -0.97 
-1290.58 1325.26 208.10 6.37 -0.97 
-1294.13 1329.76 208.22 6.39 -0.97 
-1292.73 1327.55 208.11 6.38 -0.97 
MICROWAVE ON.
-1599.34 1881.38 207.73 9.06 -0.85 
-1565.05 1854.49 207.79 8.92 -0.84 
-3278.12 3379.91 207.17 16.31 -0.97 
-3261.33 3363.46 206.57 16.28 -0.97 
-3266.01 3368.47 206.77 16.29 -0.97 
-3267.35 3370.54 206.64 16.31 -0.97 
-3273.51 3376.27 206.83 16.32 -0.97 
-3272.76 3375.20 206.72 16.33 -0.97 
MICROWAVE BACK OFF.
-1289.36 1324.61 207.75 6.38 -0.97 
-1289.86 1325.03 208.06 6.37 -0.97 
-1288.56 1322.73 208.12 6.36 -0.97 

So I can see an increase in current when switching the Microwave on, which is good. However I notice the voltage is only reported as ~208, I was expecting close to around 231 which is what gets reported by a plug-in power monitor. Connections on the power socket look reasonable, I was also expecting a positive value for real power, though that could just be my misunderstanding.

Have I done something silly with the voltage code[0], or have I likely not soldered something quite right?

[0] http://pastebin.com/PCR7Cs1G

 

Robert Wall's picture

Re: Any success with "Energy Monitor Shield v0.9b"

"Have I done something silly with the voltage code[0], or have I likely not soldered something quite right?"
Probably neither. Is yours an Ideal adapter from the Shop? Which model exactly? And what are you doing between the adapter and the analogue input pin? I can't see a voltage input on their circuit diagram. The voltage calibration depends on what's going on there. If you want to flog through the theory, it's in Building Blocks. If you struggle, ask.

"I was also expecting a positive value for real power"
That's convention. We call Import positive, Robin calls export positive. Flip your ct over if it's wrong.
There are full calibration instructions in Building Blocks.

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

The adapter is the ideal one from the shop, model DB-06-09. At the moment the emontx v2 shield is connected up to an arduino uno, no RF module or temperature sensor is in use

If the reported voltage (Vrms) is dependent on the components, their tolerances and other factors I presume I can measure voltage using a third party monitor and then adjust the calibration factor until I get a matching Vrms value from emonlib? Or is this not sound logic?

Thanks again Robert, flipping the CT sensor over did indeed solve the problem of negative readings.

Robert Wall's picture

Re: Any success with "Energy Monitor Shield v0.9b"

You confused me because you said you had that third party shield, not the emonTx Shield V2. Your voltage calibration coefficient for the emonTx Shield V2 is 268.97 - from Building Blocks > Calibration. (Theoretically - component tolerances will affect that of course.) Your logic is sound, the full calibration procedure is there in BB in the same place as the constant.

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Thanks Robert. With the updated constant I'm getting sensible readings with the emonTx v2 arduino shield combined with an arduino uno and the ideal  DB-06-09 adapter.

However, when an Ethernet shield is introduced the reported Vrms drops:

193.70 238.73 77.45 3.08 0.81 
191.91 231.13 77.09 3.00 0.83 
191.54 229.00 77.20 2.97 0.84 
192.31 227.83 77.31 2.95 0.84 
190.16 225.78 77.26 2.92 0.84 

The shield in question is a "HanRun" labeled W5100 based shield and seems to match the one described in this datasheet:

https://www.terraelectronica.ru/ds/pdf/a/arduino-a000056-datasheet.pdf

To get an accurate Vrms reading I must set the voltage calibration to 795, is it normal for the calibration factor to need to be adjusted this must when using additional shields?

 

dBC's picture

Re: Any success with "Energy Monitor Shield v0.9b"

I'm guessing your Vcc has sagged with the addition of the ethernet shield.   You should be able to confirm that with a voltmeter.  How are you powering the Arduino?

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Hi dBC, Arduino is currently powered with a USB charging plug (Apple Branded). I plan to pick up 4xAA battery pack to use as the supply and see if that improves things.

Using a cheap DMM I get a fairly constant 4.85v on the 5V pin. Is that what you suggested I confirm?

 

 

dBC's picture

Re: Any success with "Energy Monitor Shield v0.9b"

a fairly constant 4.85v on the 5V pin. Is that what you suggested I confirm?

Yep.  So long as it's the same with or without the ethernet shield then it's probably not the problem.  Make sure you have the ethernet cable plugged in at both ends when you test, as those ethernet ports use more power when they're actually "lit up".

Also check that your ethernet shield doesn't use any of the IO pins that your emonTx shield does.  If you've got a conflict there, that could explain it.

[EDIT] It looks like your A0 might be conflicted.  That seems to be the input the emonTx shield uses for voltage measurements, and your ethernet card appears to use it to for the SD card write protect.   It looks like there's a solder jumper on the ethernet shield that might help.   I vaguely recall someone else having this same problem a while back.  A1 might be an issue too:

http://arduino.cc/en/uploads/Main/arduino-ethernet-shield-05-schematic.pdf

 

Robert Wall's picture

Re: Any success with "Energy Monitor Shield v0.9b"

I put a paragraph in the Wiki about the compatability problem. If your problem turns out to be similar, let me have details so that it can be added.

davehope's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Thanks for that, I imagine working around the A0+A1 conflict is going to be difficult at best, are you aware of any ethernet shields that do not conflict? - I was reading this post but am keen to avoid the £60 cost of the EtherMega.

http://openenergymonitor.org/emon/node/10111

dBC's picture

Re: Any success with "Energy Monitor Shield v0.9b"

Both A0 and A1 appear to be used for the onboard SD card features.  If you could find an ethernet shield that doesn't have onboard SD card you might be ok.  Alternatively, if you're not using the SD card aspect of your ethernet shield (or you are but you don't care about write protect and card present), you could put the ethernet shield on top of the emonTx shield, and simply bend or snip A0 and A1 so that those signals never get to the ethernet shield (bend them on the ethernet shield, not the emonTx shield as it does need to get to them).  More details here:

http://shieldlist.org/arduino/ethernet-v5

Comment viewing options

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