In the current Mains non-invasive 3.0 and emonTx circuit design, if the current being sensed by the CT clamp sensor exceeds a certain limit (depends on CT turns-ratio and burden resistor value) the Atmega analogue input voltge will go outside the range 0 to Vss. This could potentially damage the chip.
Diodes can be used to clamp the input signal to Vss+Vf and 0-Vf where Vf is the diode forward voltage drop (0.6-0.7V for silicon diodes).
In this example assume:
- Efergy CT with 1350 turns (approx 74mA in secondary circuit when sensing 100A in primary). 100A is about the maximum possible current in a domestic property at 230V in the UK. The emonTx is designed to work up to this limit.
- 24ohm burden resistor
- 5V Atmega 328 suppply voltage
In both waveform diagrams below the blue trace is the voltage seen on the Atmega analoge input. The green trace is the voltage from the voltage divider (R2 and R2).
In the above diagram the simulated current being measured by the CT is within limits (100A).
In the above diagram the simulated current being measured by the CT is outside of limits (200A). If the effect of the clamping diodes can be seen, the waveform is clamped to Vss+Vf and 0-Vf, where Vf is the diodes forward voltage drop. Interestingly the voltage from the biasing voltage divider R2 and R3 fluctuates as its loaded / un-loaded.
I have attached simulation files for LTspice if you whish to simulate the circuit yourself. LTspice can be downloaded for free.
The Atmage 328 has built in diode voltage protection therefore external voltage clamp diodes (as described above) are not essential if voltages outisde of range are not expected, see:
http://www.atmel.com/dyn/resources/prod_documents/doc2508.pdf (see P.2)
To help the internal voltage protection a low value series resistor to limit the current and a de-coupling capacitor to help absorb transients are commonly added.
The ATmel datasheet states that it's not recomended that the current through the internal diodes exceeds 1mA.
The series resistor should be sized accordingly.
A 22 ohm resistor should be sufficient to protect against static, if the input regularly goes outside of range a 100-200 ohm resistor should be used. If too higher value is used then logic level 0 will not be reached. The capacitor value should be small enough not to interfere with the signal, the higher the value the greater the transient protection will be. A higher frequency signal will require a smaller capacitor to avoid signal interference. About 100nF seems to be a good compromise for 50Hz measurement.
Circuit diagram and much information was taken from: http://www.thebox.myzen.co.uk/Tutorial/Protection.html
Conclusion
We are considering include a series current limiting resistor and de-coupling capacitor combo described above in a new versions of the emonTx.
Re: Diode voltage clamps
Hi,
is there any chance to have the file working with easy_spice or gspiceui under linux ?
Re: Diode voltage clamps
Glyn,
Don't forget what happens when there is a fault downstream of the CT. In that case, primary current is limited by the supply fault level, the impedance of the wiring up to the fault and the impedance of the fault itself; and more likely than not the CT will saturate, so it's the peak voltage in saturation that needs to be taken into account.
From my analysis, the circuit element that limits the input current to a safe value is actually the decoupling capacitor on the input bias chain. As it is, with the standard CT and component values, the current remains just within limits. If the decoupling capacitor were to be made any larger, then the current would exceed the rating of the in-built protection diodes.