# CircuitSetup 6 Channel Energy Meter Main Board with 6 add-on boards - 42 current channels # To reduce the number of sensors, only the power sensor for each current channel is output. # See all options at https://esphome.io/components/sensor/atm90e32.html substitutions: # Change the disp_name to something you want disp_name: Energy Meter friendly_name: CircuitSetup Energy Meter # Interval of how often the power data is updated update_time: 10s # Change current_cal to the corresponding CT's that you're using # If different CTs per current channel, remove or change "${current_cal}" from # "gain_ct" below and replace with the CT calibration number respectively # Current Transformers: # 20A/25mA SCT-006: 11143 # 30A/1V SCT-013-030: 8650 # 50A/1V SCT-013-050: 15420 # 50A/16.6mA SCT-010: 41334 # 80A/26.6mA SCT-010: 41660 # 100A/50ma SCT-013-000: 27518 # 120A/40mA: SCT-016: 41787 # 200A/100mA SCT-024: 27518 # 200A/50mA SCT-024: 55036 current_cal: '11143' # 20A/25mA # This only needs to be changed if you're using something other than the # Jameco 9VAC Transformer: voltage_cal: '7305' packages: common: github://CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/Software/ESPHome/6chan_common.yaml sensor: #IC1 Main - platform: atm90e32 cs_pin: 5 phase_a: voltage: name: ${disp_name} Volts A Main id: ic1Volts accuracy_decimals: 1 power: name: ${disp_name} CT1 Watts id: ct1Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT2 Watts id: ct2Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT3 Watts id: ct3Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} frequency: name: ${disp_name} Freq A Main line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC2 Main - platform: atm90e32 cs_pin: 4 phase_a: power: name: ${disp_name} CT4 Watts id: ct4Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT5 Watts id: ct5Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT6 Watts id: ct6Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC1 AddOn 1 - platform: atm90e32 cs_pin: 0 phase_a: power: name: ${disp_name} CT7 Watts id: ct7Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT8 Watts id: ct8Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT9 Watts id: ct9Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC2 AddOn 1 - platform: atm90e32 cs_pin: 16 phase_a: power: name: ${disp_name} CT10 Watts id: ct10Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT11 Watts id: ct11Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT12 Watts id: ct12Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC1 AddOn 2 - platform: atm90e32 cs_pin: 27 phase_a: power: name: ${disp_name} CT13 Watts id: ct13Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT14 Watts id: ct14Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT15 Watts id: ct15Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC2 AddOn 2 - platform: atm90e32 cs_pin: 17 phase_a: power: name: ${disp_name} CT16 Watts id: ct16Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT17 Watts id: ct17Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT18 Watts id: ct18Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC1 AddOn 3 - platform: atm90e32 #do not use GPIO2 if ESP32 has an on-board LED assigned to it cs_pin: 2 phase_a: power: name: ${disp_name} CT19 Watts id: ct19Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT20 Watts id: ct20Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT21 Watts id: ct21Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC2 AddOn 3 - platform: atm90e32 cs_pin: 21 phase_a: power: name: ${disp_name} CT22 Watts id: ct22Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT23 Watts id: ct23Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT24 Watts id: ct24Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC1 AddOn 4 - platform: atm90e32 cs_pin: 13 phase_a: power: name: ${disp_name} CT25 Watts id: ct25Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT26 Watts id: ct26Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT27 Watts id: ct27Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC2 AddOn 4 - platform: atm90e32 cs_pin: 22 phase_a: power: name: ${disp_name} CT28 Watts id: ct28Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT29 Watts id: ct29Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT30 Watts id: ct30Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC1 AddOn 5 - platform: atm90e32 cs_pin: 14 phase_a: power: name: ${disp_name} CT31 Watts id: ct31Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT32 Watts id: ct32Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT33 Watts id: ct33Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC2 AddOn 5 - platform: atm90e32 cs_pin: 25 phase_a: power: name: ${disp_name} CT34 Watts id: ct34Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT35 Watts id: ct35Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT36 Watts id: ct36Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC1 AddOn 6 - platform: atm90e32 cs_pin: 15 phase_a: power: name: ${disp_name} CT37 Watts id: ct37Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT38 Watts id: ct38Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT39 Watts id: ct39Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #IC2 AddOn 6 - platform: atm90e32 cs_pin: 26 phase_a: power: name: ${disp_name} CT40 Watts id: ct40Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_b: power: name: ${disp_name} CT41 Watts id: ct41Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} phase_c: power: name: ${disp_name} CT42 Watts id: ct42Watts gain_voltage: ${voltage_cal} gain_ct: ${current_cal} line_frequency: 60Hz gain_pga: 1X update_interval: ${update_time} #Total Watts Main - platform: template name: ${disp_name} Total Watts Main id: totalWattsMain lambda: return id(ct1Watts).state + id(ct2Watts).state + id(ct3Watts).state + id(ct4Watts).state + id(ct5Watts).state + id(ct6Watts).state ; accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #Total Watts AddOn1 - platform: template name: ${disp_name} Total Watts Add-on1 id: totalWattsAddOn1 lambda: return id(ct7Watts).state + id(ct8Watts).state + id(ct9Watts).state + id(ct10Watts).state + id(ct11Watts).state + id(ct12Watts).state ; accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #Total Watts AddOn2 - platform: template name: ${disp_name} Total Watts Add-on2 id: totalWattsAddOn2 lambda: return id(ct13Watts).state + id(ct14Watts).state + id(ct15Watts).state + id(ct16Watts).state + id(ct17Watts).state + id(ct18Watts).state ; accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #Total Watts AddOn3 - platform: template name: ${disp_name} Total Watts Add-on3 id: totalWattsAddOn3 lambda: return id(ct19Watts).state + id(ct20Watts).state + id(ct21Watts).state + id(ct22Watts).state + id(ct23Watts).state + id(ct24Watts).state ; accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #Total Watts AddOn4 - platform: template name: ${disp_name} Total Watts Add-on4 id: totalWattsAddOn4 lambda: return id(ct25Watts).state + id(ct26Watts).state + id(ct27Watts).state + id(ct28Watts).state + id(ct29Watts).state + id(ct30Watts).state ; accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #Total Watts AddOn5 - platform: template name: ${disp_name} Total Watts Add-on5 id: totalWattsAddOn5 lambda: return id(ct31Watts).state + id(ct32Watts).state + id(ct33Watts).state + id(ct34Watts).state + id(ct35Watts).state + id(ct36Watts).state ; accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #Total Watts AddOn6 - platform: template name: ${disp_name} Total Watts Add-on6 id: totalWattsAddOn6 lambda: return id(ct37Watts).state + id(ct38Watts).state + id(ct39Watts).state + id(ct40Watts).state + id(ct41Watts).state + id(ct42Watts).state ; accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #Total Watts - platform: template name: ${disp_name} Total Watts id: totalWatts lambda: return id(totalWattsMain).state + id(totalWattsAddOn1).state + id(totalWattsAddOn2).state + id(totalWattsAddOn3).state + id(totalWattsAddOn4).state + id(totalWattsAddOn5).state + id(totalWattsAddOn6).state ; accuracy_decimals: 1 unit_of_measurement: W device_class: power update_interval: ${update_time} #kWh - platform: total_daily_energy name: ${disp_name} Total kWh power_id: totalWatts filters: - multiply: 0.001 unit_of_measurement: kWh device_class: energy state_class: total_increasing