Last active
October 1, 2022 15:03
-
-
Save tuxmartin/56a03100202a53c0d5c2f3e17e9ad9c3 to your computer and use it in GitHub Desktop.
IoT: ESPHome current transformer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: test | |
platform: ESP32 | |
board: esp32doit-devkit-v1 | |
wifi: | |
ssid: "My_WiFi_AP" | |
password: "secretPassword123" | |
ap: | |
ssid: "Test Fallback Hotspot" | |
password: "123abc456" | |
captive_portal: | |
logger: | |
api: | |
password: "asdf" | |
ota: | |
password: "asdf" | |
mqtt: | |
broker: 10.123.1.1 | |
port: 1883 | |
topic_prefix: xxx | |
i2c: | |
sda: 21 | |
scl: 22 | |
scan: True | |
ads1115: | |
- address: 0x48 | |
sensor: | |
- platform: ct_clamp | |
sensor: adc_sensor | |
name: "Measured Current A0-GND" | |
update_interval: 6s | |
sample_duration: 5s | |
accuracy_decimals: 4 | |
filters: | |
- calibrate_polynomial: | |
degree: 2 | |
datapoints: | |
- 0.00 -> -0.10 | |
- 0.04 -> 0.92 | |
- 0.20 -> 4.17 | |
- 0.37 -> 8.42 | |
- platform: ads1115 | |
multiplexer: 'A0_GND' | |
gain: 2.048 | |
name: "ADC A0-GND voltage" | |
id: adc_sensor | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.amazon.com/DL-CT08CL5-0-120A-Micro-Current-Transformer/dp/B07KNTK25V | |
https://esphome.io/components/sensor/ct_clamp.html | |
https://esphome.io/components/sensor/ads1115.html | |
https://esphome.io/components/sensor/index.html#median | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment