emonTx Shield currents are not zero when they should be

Hi there, I finally got my emonTx shield up and running and its producing currents and power for all 4 CTs, passing the data via serial to the RPi running emonHub.

However, even without the CTs having wires inserted I am receiving measurements of around 0.2-0.4 Amperes, while they should be zero. The CTS are of course closed. Is this normal? Being an electrical engineer I think I do understand the calibration procedure for (close to) full load, however, I am worried that there might be an offset at zero load. 0.4 A is not nothing.

Is there a way of calibrating the current offset to zero? Thanks for any help with this.

As you no doubt appreciate, what you’re looking at is most likely noise. If you’re only looking at current, the maths of the rms calculation rectifies the noise, there’s no averaging as such, so it appears as a reading. When you add an a.c. adapter and the calculation switches to real power, there’s no rectification and you’ll almost certainly find that the noise real power is a lot lower than the equivalent apparent power which you’re seeing.

There’s no built-in calibration for an offset to remove the noise, you could of course add that facility to the sketch, or if you’re using emonCMS, you can subtract a fixed value there.

Thanks, that makes sense. Below is a screenshot of the values. The first 4 values are the Irms (caused by noise) of each of the 4 CTs, the next four are the real power values (caused by noise), and the last one is the voltage of the AC adapter. The whole situation is still without wires inserted. Its clear that the noise values for power (around 5W) are in terms of percentage much lower than the noise values for current.

image

I shall see how I can best remove the noise.

As it’s a shield, you could try looking at the Arduino power supply. We believe the noise gets in via the ADC reference from the supply rail. I’m not an Arduino expert and I don’t own one, however I understand that the 7 - 12 V d.c. input can be quieter than the 5 V USB, so if it’s easy, I suggest you look at that area.

Removing the noise source will be a lot better than ignoring the result of measuring it. :grinning:

The noise as @Robert.Wall says, could be inserted by the analog reference, if you have a switched power supply (as the mostly are this days), or a PWM regulator, they works ok for the electronic but introduces noise as analog reference, you can try to avoid this feeding a voltage regulator (like the 7805) with the switched power supply (and add a capacitor at the 7805’s input if there is too much ripple), the idea is that the regulator gets a ripple (for example oscilating between 7-11 volts) that can be supressed when it reduces the voltage to 5 volts.

Remember that the 7805 dissipates the excess of power by temperature, if your circuits needs 100mA and you feed the 7805 with 12volts, it needs to dissipate at least 700mW by temperature, and that it has a dropout voltage, and if the ripple is too close to desired output you look for a LDR (low dropout regulator).

Hope this helps.

A 7805 regulator doesn’t remove as much ripple as one would think.

Dave at EEVBlog demonstrates that in this video clip:

EEVBlog #1116 - How to Remove Power Supply Ripple - YouTube

By this array (a capacitor before regulator) I could sort noise, using 3.3v reference and the device that I built with 100A:50mA sensor, measures 40mA with no load (less than 0.1% works for me), without the capacitor, the same regulator and the device measured 400mA.

I think that the secret to apply this is to maintain the current low, of course Dave’s solution is better because it has less limitations with the output current, thanks for sharing it @Bill.Thomson

Sounds very interesting guys. I am not using an external power supply for the Arduino but its fed via the USB serial connection from the Raspberry Pi. With me not being an electronics expert, would I have to invest in a premium power supply for the Arduino or are there any good filters for the USB?

You’d get best results from using a linear, i.e. not a switching-mode, power supply connected to the
barrel jack on the Arduino. (and not using the USB power input) One with an output in the 7 to 12 VDC range and that can supply 1 Amp, will do the job. Common item, and not too expensive.

1 Like

Thanks Bill, will do that!

Something like one of these:
https://nl.rs-online.com/web/p/ac-dc-adapters/4006822/

thanks, I was just about to ask where I could get one. Would a smaller one like this one do as well? I am told the Arduino only draws 50mA.

As long as the connector on the PSU is compatible with the barrel jack on the Arduino
(or you’re willing to cut off the PSU connector and attach one that is compatible with your Arduino) you should be good to go.

So now I have plugged in the linear power supply but the situation is not changed significantly. It occurred to me that I might need to switch off the power coming through the USB cable from the Raspberry. Would you agree and if so, any clues how to best do that?

Is your Arduino using the USB port for serial comms?
If it is, can you arrange instead a direct serial connection from the Arduino TX/RX/GND to the RPi as per the Wiki? Do bear in mind the Arduino is sending 5 V, so you’ll need a voltage divider in that direction.