Faulty CT sensor or EmonTX shield

Hi guys,

I have been running an EmonTX Arduino shield for the last week or so, with 4 CT sensors. I have played around with the calibration values to get it reading something relatively accurate - I did this by monitoring my inverter output and checking it after a days generation against the total being reported by the inverter itself. 

Using these values I was able to calculate a scale factor and have applied that to all feeds.

It seems to be pretty accurated, my 3kW hot water immersion heater is reporting around 2880W on CT3.

However I noticed my underfloor heatpump, which was being monitored by CT4, was only reporting about 1500W. The reason I queried this was the house usage jumps up by about 2500W when the heatpump turns on.

I swapped the hot water and underfloor CT clamps and lo-and-behold, the CT3 feed is reporting around 2500W.

I have checked the shield and in particular my soldering but everything looks ok. I put my multimeter across the resistors on each of the CT circuits and they all look fine. 

I think I have ruled out a faulty CT clamp, since the same clamp is reporting a different value (i.e. 2500W) when I plug it into CT3 on the shield.

Is there anything else I can do to trouble shoot this? It is not the end of the world, I can live with only 3 CTs, but it would be nice to have all 4 running.

BTW - I have setup the phase angle to 0.2, 0.4, 0.6 and 0.8 for CTs 1-4 respectively, and I am running Robins continuous monitoring sketch (with a bit of my own magic to send MQTT publishes rather than use RF), 

Many thanks,

Ben

Robert Wall's picture

Re: Faulty CT sensor or EmonTX shield

If I haven't got mixed up, it is CT4 input that you suspect is under-reading - giving 1500 W when you expect 2500 W - but the CT itself gives the expected value in one of the other inputs? And you've edited the sketch to use the same Powercal on all 4 inputs? (By default, CT4 on the emonTx V3 is high sensitivity - on the shield it is the same as the others.)

Have you checked the really obvious - the sockets? These have been known to give the impression that the plug is fully inserted when it's not. You've checked the 33 Ohm burden resistor is correct? What dc voltage do you measure on that - it should be half supply, about 2.5 V. To check that, you could download Robin's diagnostic sketch - MinMaxAndRangeChecker is probably the one you want - and check that CT4 input is in the middle and the right sort of shape. It you can put the CT on the same cable as another good one, that will make it very easy to compare.

sumnerboy's picture

Re: Faulty CT sensor or EmonTX shield

Thanks Robert - you are correct - CT4 is giving the under-reading - apologies for my rather convoluted explanation above! I will double check the sockets although I did jiggle them around and give them a good push as it was my first theory for the discrepency. I checked the burden resistor by measuring the resistance with no CT clamp connected - and it was reading a stable 33 ohms. I will check the voltage across it as you suggest. 

I have played around with Robins diagnostic sketch when I first started but I think I was only looking at CT1. I will try this out on CT4 this evening once the heat pump is back up and running (I only run it in the evenings).

I will report back with any findings - thanks for your suggestions.

Ben

sumnerboy's picture

Re: Faulty CT sensor or EmonTX shield

Ok - did some measurements across the burden resistor. The voltage at the resistor on the CT4 circuit (R28) is 4.8VDC, but for the other 3 CT circuits it is 2.4VDC. Clearly that is the problem.

I tried to measure the resistance of R25 and R27 (the voltage dividers) but was getting zero for R25 (I presume because of C4 across that resistor) and about 104KOhms across R27. These measurements were the same for the other CT circuits so I couldn't see any difference there.

Sorry but electronics is not my speciality. The fact the voltage divider is not doing its job is obviously the problem, but I am not sure how to diagnose what the cause any further.

Is it possible there is a fault on my shield PCB? Or a faulty component, i.e. R27 or C4?

 

Robert Wall's picture

Re: Faulty CT sensor or EmonTX shield

"Is it possible there is a fault on my shield PCB? Or a faulty component, i.e. R27 or C4?"

Yes, two of those are possible, I think we can discount C4, but add in R25. You can also add in a fault on the Arduino board.

(Do you have the SMT version or the wire-ended components - if the latter, you're using the wrong circuit diagram, the arrangement is the same, but the relevant components are R15, R17 and C1.)

Two things you write are inconsistent: you measured zero across R25 (R15) and the voltage at the middle of the divider is 4.8 V. Do you mean zero or infinity?  I think we can discount the zero ohms across R25, because if so, the midpoint voltage would be zero too.

The 4.8 V means either the midpoint/ADC input is being pulled up to 5 V, or it's not being pulled down to half way. That could mean either:

1. R25 is open circuit - or you haven't soldered it in properly, or there's a break in the track between the "bottom" end and the common GND connection, or
2. R27 (R17) is short circuit, or the wrong (very low) value (is the colour code correct - the same as R25, yellow, violet, yellow), or there's a whisker of solder or copper linking the PCB track that goes to the midpoint of the divider to the 5 V supply, or there's a whisker of solder or copper linking the PCB track to pin 4 on the ADC header (i.e. the other side of the 33 Ohm burden resistor) to the 5 V supply. The bridge/short could be on the Arduino board.

If you have a spare 470 kΩ resistor, just holding it or tacking it across from any of the CT connections to 0 V (GND) will prove whether it's (1) or (2). If the voltage drops to 2.5 V, it's (1). (Actually, if you have any resistor between about 1 kΩ and 1 MΩ, and it pulls the voltage down below 4 V, then it proves (1) is the problem.)  If you measure anything less than 100 kΩ between the 5 V and any of the CT connections, it's (2).

So if your 104 kΩ is accurate, it's more likely (but not proven) that the problem is (2).

From here on in, it's a Mk.II eyeball job to spot the problem. [ The Mk.II eyeball is better than the Mk.I - it knows what to look for!]

 

sumnerboy's picture

Re: Faulty CT sensor or EmonTX shield

Thanks Robert - this is helping immensely. I have the SMT version so the only soldering I did was for the CT sockets, 9VAC socket and the headers. So I haven't had a soldering iron anywhere near those resistors.

I was surprised to measure 0 ohms across R25 as well but I presumed that was due to C4 providing a 'free wheeling' path for my multimeter? Is that not a likely cause? The same resistor in the other CT circuits gave the same results.

Likewise measuring R27 and the equivalent resistor in the other CT circuits all gave the same reading of just over 100KOhms. Again, I presume this is due to other parts of the circuit effectively dropping the resistance I am measuring. But I am certainly no expert here!

I have tried to read the values of the resistors but the writing is so tiny and I don't have a magnifying glass! They are the SMT versions so are pretty small.

I will try a different Arduino board this evening and see if that gives the same result - so we can eliminate that for starters (sorry I am at work now). I have had a good look around the PCB and can't see any bits of solder that are not where they should be, as I mentioned it came fully assembled, aside from the sockets.

I will try the extra resistor across the CT socket to GND and see what the voltage is. I will report my findings this evening hopefully.

Thanks again for your help.

Robert Wall's picture

Re: Faulty CT sensor or EmonTX shield

The 470 kΩ resistors should be marked "474" - 4 7 and four 0s. You're reading zero across the R25 / C4 combination because you didn't wait long enough! Your multimeter is a voltage source, as it feeds current into the capacitor it will see a high current, which it interprets as a low resistance; but as the charge on the capacitor builds up, the current will decrease and the 'resistance' will increase until current stops flowing into the capacitor and you measure just the resistor in parallel. You need to measure infinity there - or many MΩ, not zero, for an open-circuit R25 to be the problem. So depending on the test current that your meter uses, you might have to wait a few minutes for the 'resistance' to stabilise.

If that is inconclusive, you could try Robin's MinAndMaxValues sketch. Load the sketch (change the input to the correct pin!) and watch the values immediately after you power up. If it takes a while for the pin to go from 0 to 1024 (or so) I favour an open-circuit R25. I expect it to start rising at about 200 counts per second, and slow down, taking a good 20 s to get to about 900 counts.) If it goes instantaneously - which I doubt it will as you read 100 kΩ across R27 - then it's a short to the 5 V rail.

One more test you could try - with the shield unplugged, measure the voltage on the input pin, from GND to the pin and from the pin to 5 V. I'd expect your multimeter to pull the voltage towards whichever rail you are measuring to, so in both cases you measure a small voltage and the sum will be nowhere near 5 V. If it is close to 5 V, that would make me suspect that the fault is in the Arduino. As a further check, run Robin's MinAndMaxValues again as you do it and you should see the numbers go close to zero when you measure pin to GND and close to 1024 when you measure pin to 5 V. (Or instead of your meter, you can use a spare resistor > 1 kΩ). If it does that, it's not the Arduino board. If it stays the same at or near 1024, it IS the Arduino.

 

sumnerboy's picture

Re: Faulty CT sensor or EmonTX shield

Ok - some more results for us to decipher...

First thing - I tried another Arduino, both with an ethernet shield and without. The readings from the A3 and A4 circuits were the same when using the same CT sensor. I.e. I plugged in the underfloor heatpump CT sensor (which is currently running) into both CT3 and CT4 and the readings were the same for both tests. So I am hopeful this eliminates the EmonTX shield since it seems the circuitry is fine.

I did find the readings in these two tests were quite different however. For example the underfloor CT read around 3100 on the Uno with no shield, and 2600 once I added the ethernet shield. 2600 is around the same as the original Arduino was reading. Note the original Arduino is an Uno clone with built in ethernet - so no extra shield, but all the ethernet circuitry on the board, including POE.

So finally, I tried your suggestion of running Robins MinMax sketch with the EmonTX shield disconnected (on the original Arduino) and using my voltmeter to measure from the input pin (A4) to 5V and GND. In both cases the sketch just spat out 1023 constant. I tried it on A3 and the value oscillated between 0 and 1023 every few seconds, for both cases. Not sure if my multimeter is varying the signal as it tries to get a reading? It is a half decent Fluke 75 series multimeter.

Unless you have any further suggestions or ideas I think I will shelve this in the 'too hard' basket and just use the 3 remaining CTs. The extra was just for monitoring purposes, was interested to see how much my HWC and underfloor heatpump were using. So not too big of a deal. 

I would say this however, to anyone reading in the future, that it seems an ethernet shield, or built-in ethernet circuitry on an Uno clone, seems to affect the EmonTX shield!

 

 

sumnerboy's picture

Re: Faulty CT sensor or EmonTX shield

Interesting topic which seems related...http://forum.arduino.cc/index.php/topic,20618.0.html.

My clone + ethernet built-in doesn't seem to suffer from the same variances as an outright ethernet shield, but it is causing these issues on A4.

The plot thickens...

Robert Wall's picture

Re: Faulty CT sensor or EmonTX shield

I suspect the meter may well have been injecting a varying voltage as it tried to autorange, but the main thing about doing that was the input was not tied to 5 V on the A3 input, but it seemed to be on the A4 input. It's looking to me as if the A4 input isn't exactly the same as the others - at this point you need to dig around in the circuit diagrams and layouts for the particular Arduino and Ethernet shield that you're using. The Arduino forum indicates that others believe this to be the case, and if it is, it seems to be something that Glyn & Trystan were unaware of when they developed the Shield.

sumnerboy's picture

Re: Faulty CT sensor or EmonTX shield

Solved! I posted a question on the forums of the guys that manufacture my Arduino clone (www.freetronics.com) who happen to be in Australia. 

http://forum.freetronics.com/viewtopic.php?f=4&t=6024

Turns out they have a MAC address chip on the clone in order to give each board a unique MAC address. That chip uses the I2C bus and as a result they have a couple of pullup resistors built into the board for A4 and A5.

Thankfully, they also have a nice little solder jumper on the bottom of the board to allow easy disabling of this part of the circuit. I have just cut the solder jumper and restarted my EmonTx shield and now the voltage divider for the CT4 circuits is working as expected.

Happy days! The HWC isn't running currently but once it fires up tonight I will check to make sure I am getting sensible readings, but I am pretty confident now those pullup resistors are out of the equation.

Just want to say thanks very much to you Robert, for your patience and thoughtful insight. There is no way I would have gotten to the bottom of this without your help!!

Robert Wall's picture

Re: Faulty CT sensor or EmonTX shield

I've put a note on the Shield Wiki about that - what are the odds that you're not the only one who will get caught by that? (I've also emailed G&T so that if they wish, they can put a note on the Shop website too.)

 

Comment viewing options

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