### How to detect broken/disconnected clamp ?

Hi,

do you have any idea how to /with no or minimum hardware adds -  only by software in arduino scetch/ detect if clamp (with built-in sampling resistor) si disconnected ?

thanks

Stanislav

### Re: How to detect broken/disconnected clamp ?

I think you cannot do that reliably. If the analogue input has absolutely no connection to anywhere, it will float to an unknown voltage. It will probably be far enough away from 512 (which is what you expect with our standard bias circuit) for you to be able to be able to say it is disconnected, but there is no guarantee that will be the case.

However, if you put a high value resistor (e.g. 4.7 MΩ) between the analogue input and GND, then I would expect the input to go sufficiently close to 0, and of course there would be no current signal superimposed, for you to say with some confidence that the CT had become disconnected. That resistor will slightly reduce the maximum current that you can measure because the quiescent point is no longer mid-way at 512 counts.

### Re: How to detect broken/disconnected clamp ?

many thanks for your opinion, of course -  "pull down" is some resolution, but....
what about periodicaly switch pin to output to short time and charge capacitor http://www.homautomation.org/wp-content/uploads/2013/09/step41.jpg  and next measure rate of speed drop voltage to 0 (or measure float values if the input is disconnected)  .... (my be most different if clamp is connected or not)

PS: only theory at this time....

### Re: How to detect broken/disconnected clamp ?

I do not understand "speed drop voltage to 0". What is to say the voltage will drop to 0?

### Re: How to detect broken/disconnected clamp ?

use Capacitor is wrong way....

Now I testing easier detecting by average input voltage on pin (input pin is pull down via 10Mohm) :

boolean broken_CT(unsigned int inPinI)
{
long in2=0;
for (unsigned int n = 0; n < 1480; n++)
{
}
in2=in2/1480;
if (in2<100)
{
return false;   //is broken/unconected
}
else
{
return true;  //is OK
}
}

### Re: How to detect broken/disconnected clamp ?

I think you might not need to calculate the average!

If the CT is broken, there will be no alternating voltage (or only a very small alternating voltage) superimposed on the dc level. So if, over a period of 1 cycle of mains, you read one sample > 100 (say), you know the CT is good. If you read < 100 for a whole cycle, you are certain that the CT is bad. If you read < 100 for less than one half-cycle, you might have a large current flowing!

### Re: How to detect broken/disconnected clamp ?

If a CT were to "drop off" the cable around which it is supposed to be clipped, there would be virtually no AC signal from it.  This would be indistinguishable from a situation where the CT is properly connected, but no primary current is flowing.

This is a genuine concern for the PV Router project.  If the output stage happens to be 'on' when the CT is disconnected, it is likely to remain on indefinitely because the control loop has been broken.  I've demonstrated this situation at https://www.youtube.com/watch?v=oF8HACCsK4M   In the case of an immersion heater, there will normally be two mechanisms to prevent overheating.  The situation is no worse than if the heater had been turned on manually and left unattended.

I can't see any way of auto-detecting whether a CT is correctly in place or not.

### Re: How to detect broken/disconnected clamp ?

That's fair comment, but the original specification was "detect if clamp (with built-in sampling resistor) si disconnected".

Your PV Router might detect if the CT had physically fallen off the cable whilst still remaining connected, if you knew how long the tank took to cool and presumed that there was no other source of heating: if the CT didn't show current after this time had expired and the triac was on, you could infer that there was a problem, though you could not tell whether the heater was tripped out or isolated, the triac blown, or indeed the CT had fallen off. Personally, I'd have thought any of the others was more likely than the CT falling off.

For what it's worth, we always used spring-loaded terminals and hook crimps for all feedback connections in closed-loop control systems, precisely for the reason that if the feedback disappears, maloperation (at best) and danger to personnel is almost guaranteed.