Smart Home Automation Forum

Full Version: AC voltage and calibration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Hi,

I just received my M16-v2.1 board and will use it with 10A and 20A 0-1V clamps. New to the forum :-)

I'm on a 3x400V+N network and connected L1, L2, L3 and N to the terminals to measure the voltage.
But the voltages that are reported seem to be too low.


I also have a Zennio Kes Plus KNX device that also measures voltage and power consumption. (top 3 values in image below).
I also tried 2 different multimeters and get nearly the same readings as the Zennio (and I measured on the inputs of the M16)

But the M16 readings are 8-12 volts lower.

[Image: voltages.jpg?rlkey=nguhlbrki9j07aex5ver3us95&dl=1]

Is there a way to calibrate the voltages?
I'm using home assistant with ESPhome

If not: can I use the voltages from another home assistant entity (my Zennio) and use these?

After that I would like to start calibration of the CT-clamps: is it advised to do individual clamp calibration for each connection?

Regards,
Nick
About the calibration:
I use SCT013-010  (10A 0-1V) clamp.
When I check the logs for some known loads (100W light bulb, 500W light and hair dryer) I got these values from the logs:

0.41A:  (100W bulb):
[22:28:14][D][sensor:094]: 'ai1': Sending state 1.01400 V with 3 decimals of accuracy
[22:29:14][D][sensor:094]: 'ai1': Sending state 1.01900 V with 3 decimals of accuracy
[22:30:14][D][sensor:094]: 'ai1': Sending state 1.01000 V with 3 decimals of accuracy

1.79A (500W halogen bulb):
[22:36:14][D][sensor:094]: 'ai1': Sending state 1.09700 V with 3 decimals of accuracy

6.56A (1500W hair dryer)
[22:23:14][D][sensor:094]: 'ai1': Sending state 1.24500 V with 3 decimals of accuracy

If I look at the datasheet the values should be between 0v (0A) and 1v (10A)
http://en.yhdc.com/comp/file/download.do?id=943

=> why do I always get values above 1V to start with?  
Or would that be an issue with the clamp?  They are supposed to be original SCT013's.
Picture:

[Image: sct013.jpg?rlkey=nnh0q6yjso7l2v0p8igg9m5ag&dl=1]

Any help or advise is welcome!

Thanks,
Nick
we will test, feedback later.
1. run arduino calibration program code to find your "Sensitivity" value for ESPHome M16v2 component. 
here is arduino code: https://www.kincony.com/forum/showthread.php?tid=3089
before use this arduino code, you need install "ZMPT101B" arduino library firstly.
then before run this code, use multi meter test your L and N voltage , then only "Change this based on actual voltage" in code:
[Image: attachment.php?aid=3696]   
[Image: attachment.php?aid=3697]   
when running this code, serial port will print  "Sensitivity" value at the end.
[Image: attachment.php?aid=3698]   
then change  "Sensitivity" value in home assistant "/homeassistant/esphome/zmpt101b/zmpt101b_custom_sensor.h"
[Image: attachment.php?aid=3699]   
now it's completed.
[Image: attachment.php?aid=3700]
Hi,

Thanks for the info. I ran the procedure for all three phases and slightly adjusted the custom sensor code:
I have different sensitivity values for each sensor and that's why I ended up with this:

#define SENSITIVITY_L1 523.0f
#define SENSITIVITY_L2 513.0f
#define SENSITIVITY_L3 530.25f


    if(this->adcPin==34) {
      this->zmpt101b->setSensitivity(SENSITIVITY_L1);
    }
    if(this->adcPin==36){
      this->zmpt101b->setSensitivity(SENSITIVITY_L2);
    }
    if(this->adcPin==39){
      this->zmpt101b->setSensitivity(SENSITIVITY_L3);
    }



Voltages now kind of match my voltmeter's measurement.



Any tips for the calibration of the CT clamps?
I don't get the values I get from them as they are all over 1V  (see above).  As a result the number of amperes is therefore too high in my readings.

Regards,
Nick
two types of sensr you can chose:
output: 0-50mA or 0-1v dc
if your amperes is therefore too high, because you need to calibration in esphome.

sensor:
- platform: ct_clamp
sensor: adc_sensor
name: "Measured Current"
update_interval: 60s
filters:
- calibrate_linear:
# Measured value of 0 maps to 0A
- 0 -> 0
# Known load: 4.0A
# Value shown in logs: 0.1333A
- 0.1333 -> 4.0


- 0 -> 0
- 0.1333 -> 4.0
these two command line data need replace by yourself. you can use multi meter to test a AC220v load's current, then see the RAW data in esphome log.
Hi,

Yes, but I am using SCT013-10 and SCT-013-20 (10A and 20A) 1V versions.
But why do I see voltages higher than 1 volt in the raw output?

100W bulb: [sensor:094]: 'ai1': Sending state 1.01000 V with 3 decimals of accuracy
1500W heater:[sensor:094]: 'ai1': Sending state 1.24500 V with 3 decimals of accuracy

=> so even for low wattage I have raw values of > 1V
But according to specs of SCT013 I believe it should be within 0V and 1V range?

So I understand the calibrate_linear but not why I have raw values that seem too high?
RAW just a value of ADC, it's not actually value, it's not important.
so every CT sensor need calibration.
I did some more testing:
- only connected 1 single CT to first port (ai1)
- tested with a stable load of 3.33 amps (a halogene lamp of 750W)
- set the update interval to 5 seconds in esphome 

from the logs I filter out the raw values and they are very jumpy:

Line  113: [23:55:28][D][sensor:094]: 'ai1': Sending state 1.16500 V with 3 decimals of accuracy
Line  147: [23:55:33][D][sensor:094]: 'ai1': Sending state 1.03000 V with 3 decimals of accuracy
Line  176: [23:55:38][D][sensor:094]: 'ai1': Sending state 1.15000 V with 3 decimals of accuracy
Line  205: [23:55:43][D][sensor:094]: 'ai1': Sending state 1.18100 V with 3 decimals of accuracy
Line  234: [23:55:48][D][sensor:094]: 'ai1': Sending state 1.18700 V with 3 decimals of accuracy
Line  266: [23:55:53][D][sensor:094]: 'ai1': Sending state 1.18400 V with 3 decimals of accuracy
Line  295: [23:55:58][D][sensor:094]: 'ai1': Sending state 1.16700 V with 3 decimals of accuracy
Line  324: [23:56:03][D][sensor:094]: 'ai1': Sending state 1.09100 V with 3 decimals of accuracy
Line  353: [23:56:08][D][sensor:094]: 'ai1': Sending state 1.07500 V with 3 decimals of accuracy
Line  382: [23:56:13][D][sensor:094]: 'ai1': Sending state 1.06500 V with 3 decimals of accuracy
Line  411: [23:56:18][D][sensor:094]: 'ai1': Sending state 1.06200 V with 3 decimals of accuracy
Line  440: [23:56:23][D][sensor:094]: 'ai1': Sending state 1.06400 V with 3 decimals of accuracy
Line  469: [23:56:28][D][sensor:094]: 'ai1': Sending state 1.05200 V with 3 decimals of accuracy
Line  498: [23:56:33][D][sensor:094]: 'ai1': Sending state 1.06400 V with 3 decimals of accuracy
Line  527: [23:56:38][D][sensor:094]: 'ai1': Sending state 1.00400 V with 3 decimals of accuracy
Line  556: [23:56:43][D][sensor:094]: 'ai1': Sending state 0.93600 V with 3 decimals of accuracy
Line  585: [23:56:48][D][sensor:094]: 'ai1': Sending state 0.88700 V with 3 decimals of accuracy
Line  618: [23:56:53][D][sensor:094]: 'ai1': Sending state 0.90700 V with 3 decimals of accuracy
Line  647: [23:56:58][D][sensor:094]: 'ai1': Sending state 0.95100 V with 3 decimals of accuracy
Line  676: [23:57:03][D][sensor:094]: 'ai1': Sending state 1.09000 V with 3 decimals of accuracy
Line  705: [23:57:08][D][sensor:094]: 'ai1': Sending state 1.17200 V with 3 decimals of accuracy
Line  734: [23:57:13][D][sensor:094]: 'ai1': Sending state 1.18100 V with 3 decimals of accuracy
Line  763: [23:57:18][D][sensor:094]: 'ai1': Sending state 1.06300 V with 3 decimals of accuracy
Line  792: [23:57:23][D][sensor:094]: 'ai1': Sending state 0.95900 V with 3 decimals of accuracy
Line  821: [23:57:28][D][sensor:094]: 'ai1': Sending state 0.88600 V with 3 decimals of accuracy
Line  850: [23:57:33][D][sensor:094]: 'ai1': Sending state 0.94900 V with 3 decimals of accuracy
Line  879: [23:57:38][D][sensor:094]: 'ai1': Sending state 1.07400 V with 3 decimals of accuracy


Tested with some other clamps (10A - 1V) but am getting the same result.

No idea what I can do next but haven't been able to get a proper reading yet.

Regards,
Nick

(12-18-2023, 11:05 PM)admin Wrote: [ -> ]RAW just a value of ADC, it's not actually value, it's not important.
so every CT sensor need calibration.

I am attempting the calibration but have such a big spread in these raw values: ranging from 0.88 to 1.19V of raw value of ADC state for a stable load.
Or is that interval of 5 seconds too low like this?
it's normal. because it's AC load, The load is not constant, and the power grid is changing, the CT sensor's signal also is AC signal.
Pages: 1 2 3 4