# Does ct_clamp current sensor include the DC component or just the AC peak-to-peak?

Most simple circuits for interfacing with a CT clamp seem to use a 1:1 ratio voltage divider to convert a bipolar AC input signal (with average voltage 0) to a unipolar AC signal with the zero-crossing offset to Vcc/2.

Of course resistor values are imprecise so the actual offset will not be Vcc/2.
This is not a problem if ct_clamp measures the AC peak-to-peak voltage or the RMS minus the DC component but it is an issue if it measure RMS (or something like that) or the AC absolute peak since those measurements will include the DC component.

So, what type of measurement does ct_clamp do?
For example, if the input has an AC P-P of X volts plus a Y-volt DC offset, what value does ct_clamp read?

Itâ€™ measures current, not voltage.
And it doesnâ€™t measure DC current.

Of course the user output is a current measure. And of course a current clamp wonâ€™t work with DC by Maxwellâ€™s equations

But in most if not all cases you measure a current by measuring the voltage across a known resistance which is of course proportional to the original current â€“ that resistor can be internal or external to the physical current clamp.

You then convert the resulting sinusoidal (analog) voltage to a digital representation using either an external ADC or the analog inputs of an esp32-type device (which employs an internal ADC).

So the digital signal will be sinusoidal â€“ typically representing a sine wave offset by half the VCC (assuming you are not using a bipolar ADC).

My question again is when converting this digital sine wave into a user-friendly current measure, does the ct_clamp sensor measure the (average) peak-to-peak magnitude, the absolute peak magnitude, the RMS or some other measure of the input voltage (which is in turn proportional to the current induces in the winding of the physical current clamp which in turn is proportional to the current flowing in the underlying circuit you are measuring).

I am asking because if the ct_clamp measure the peak-to-peak then one need not worry about the DC offset voltage and indeed it can change without affecting the current calculation. If, however, it uses RMS or absolute peak, then the current measure will depend on the DC voltage offset.

Actually, I think I answered my own question because the measure canâ€™t include the DC offset or else current wonâ€™t be proportional to the signal magnitude.

So, I guess I solved my own question and one does not need to worry about whether the offset varies or drifts (so long as it does so at a timescale greater than the sampling duration)

The ADC input only measures voltage (thatâ€™s all itâ€™s capable of doing.) The `ct_clamp` component sensor reports current, but relies on calibration values related to the number of turns on the current transformer and the value of the load resistor to calculate the estimated current passing through the transformer based on the measured voltage.

To the original question:

AC P-P of X volts plus a Y-volt DC offset, what value does ct_clamp read?

The `ct_clamp` component code calculates the DC offset and subtracts it from the measured voltage. So it should be reporting RMS AC values only.

I repeat, current clamp doesnâ€™t measure any type of voltage. I donâ€™t know if you have some translation issue, but part of your questions make no senseâ€¦

I repeat, current clamp doesnâ€™t measure any type of voltage. I donâ€™t know if you have some translation issue, but part of your questions make no senseâ€¦

I am talking about the ct_clamp platform â€“ i.e. the software code in esp32 homeâ€¦

It presumably takes as input a digital representation of an AC voltage signal (which happens to be proportional to the current) and then computes a measure of the AC voltage and outputs a current based on a linear conversion factor.

For that matter, if you want to be technical, â€ścurrent clampâ€ť doesnâ€™t measure anything as it is more-or-less just a passive coil (plus or minus an internal resistor). It produces an induced current that must then be converted to a (proportional) voltage by passing the current either through an internal or external resistor. The voltage is then measured digitally via an ADC.

If you think I have a â€śtranslationâ€ť issue please:

• Show me a consumer-grade, digital device that measures current without first converting it to a voltage. Even a standard multimeter measures current by measuring a voltage across a known resistance.
• Show me specifically where any of my descriptions of the physics, electronics, or computational aspects are wrong.

Please try to read and understand what I am asking rather than jumping to conclusions.

Thanks. Thatâ€™s what I was hoping forâ€¦ and that makes circuit design easier since I donâ€™t need to worry about D.C. offset and can use a single unipolar input to the ADC rather than a pair of bipolars â€“ allowing me to measure 16 current channels with a 16-channel ADC.

Donâ€™t get hot. You asked multiple times about ct-clamp measuring voltageâ€¦
Now that you tell me that â€śct-clampâ€ť means ct-clamp Esphome component, it makes sense to me.

Perfectly understood now.

Donâ€™t get hot. You asked multiple times about ct-clamp measuring voltageâ€¦
Now that you tell me that â€śct-clampâ€ť means ct-clamp Esphome component, it makes sense to me.

Well you did accuse me of:

I donâ€™t know if you have some translation issue, but part of your questions make no sense

BTW, did you even READ the topic or did you just rush to assume that I didnâ€™t know what I was talking about?
The topic clearly states: â€śDoes ct_clamp current sensor (emphasis added) include the DC component or just the AC peak-to-peak?â€ť

Moreover, I was very careful in my posts to use `CT clamp` (no hyphen, no sensor) when talking about the device and `ct_clamp sensor` when talking about the ESPHome sensor by that very name

Perhaps next time donâ€™t rush to assume that the misunderstanding lies with othersâ€¦

My mistake. Sorry for that. Need to buy bigger phone or glasses.

1 Like