TA12-100 + ads1115 Power metter

Hello,

I have TA12-100 AC current sensor and i would like to use it like the power meter on the dimmable led lights in the living room. So the result should be the graph of the actual power usage during the usage of the lights in the Watts.

TA12-100 is generating voltage 0 - 1 v depending on current flow 0 - 5 A .

I set up the ADC to measure continuously:


ads1115:  
  - address: 0x48
    continuous_mode: True



sensor:
- platform: ads1115
    multiplexer: 'A2_GND'
    gain: 1.024
    name: "ADC_2"
    id: A2_GND 
    update_interval: 5s
    filters:
    - sliding_window_moving_average:
        window_size: 5
        send_every: 2    
    - lambda: return x / 0.00086956521;
    unit_of_measurement: "W"  

Watt conversion i am doing via lambda = where the 0.00086956521 is number what i get by 1/ ( 230 * 5 )

I am testing on the 75 wat bulb, but the results seem to be a little bit random depending on which samples I get measured. Sometimes i have negative values , sometimes 90 w sometimes 30 w.

Can you please help me with which filter to select, and why?
Now i am trying them basically by random :slight_smile:

Finally, I figured out a better solution via the ct_clamp sensor, which does what I need.

  - platform: ct_clamp
    sensor: A2_GND
    name: "Measured Power"
    id: PowerAD_2
    sample_duration: 400ms
    update_interval: 10s
    filters:
      - calibrate_linear:
        - 0 -> 0
        - 0.066 -> 0.326
      - lambda: return x * 230;
    unit_of_measurement: "W"  


1 Like