Code Monkey home page Code Monkey logo

circuitsetup / expandable-6-channel-esp32-energy-meter Goto Github PK

View Code? Open in Web Editor NEW
513.0 46.0 102.0 11.03 MB

Hardware & Software documentation for the CircuitSetup Expandable 6 Channel ESP32 Energy Meter. Works with ESPHome and Home Assistant.

Home Page: https://circuitsetup.us/product/expandable-6-channel-esp32-energy-meter/

License: MIT License

C++ 60.37% Shell 0.20% PHP 0.89% C 16.73% JavaScript 10.52% HTML 8.92% CSS 2.36%
energy-monitor energymeter esp32 esphome home-assistant homeassistant

expandable-6-channel-esp32-energy-meter's Introduction

Expandable 6 Channel ESP32 Energy Meter v1.3 Main Board

CircuitSetup Expandable 6 Channel ESP32 Energy Meter

The Expandable 6 Channel ESP32 Energy Meter can read 6 current channels and 2 voltage channels at a time. Much like our Split Single Phase Energy Meter, the 6 channel uses current transformers and an AC transformer to measure voltage and power the board(s)/ESP32. The main board includes a buck converter to power the electronics and ESP32 dev board, which plugs directly into the board. Up to 6 add-on boards can stack on top of the main board to allow you to monitor up to 42 current channels in 16-bit resolution, in real time, all at once!

Usage:

  • North American split single phase 120V/240V 60Hz - mains and/or individual circuits
  • European single phase 240V 50Hz (must provide AC-AC transformer 9V or 12V with at least 500mA output)
  • 3 phase - It is recommended to measure all 3 voltages with 3 voltage transformers. This can be done by using a main board with 1 add-on board (more information below). A single meter can be used to measure 3-phase, but power (wattage) will not be calculated correctly. Power can be calculated in software, but the power factor will have to be estimated ((voltage*current)*power_factor)).

Features:

  • Samples 6 current channels & 1 voltage channel (expandable to 2 voltage)
  • Add-on boards (up to 6) can expand the meter up to 42 current channels & 8 voltage channels
  • Uses 2 Microchip ATM90E32AS - 3 current channels & 1 voltage per IC
  • For each channel the following can also be calculated by the meter:
    • Active Power
    • Reactive Power
    • Apparent Power
    • Power Factor
    • Frequency
    • Temperature
  • Uses standard current transformer clamps to sample current
  • 22ohm burden resistors per current channel
  • Includes built-in buck converter to power ESP32 & electronics
  • 2 IRQ interrupts, and 1 Warning output connected to ESP32
  • Zero crossing outputs
  • Energy Pulse outputs per IC (4 per IC x2)
  • SPI Interface
  • IC Measurement Error: 0.1%
  • IC Dynamic Range: 6000:1
  • Current Gain Selection: Up to 4x
  • Voltage Reference Drift Typical (ppm/°C): 6
  • ADC Resolution (bits): 16

What you'll need:

Setting up the Meter

Expandable 6 Channel ESP32 Energy Meter Diagram Expandable 6 Channel ESP32 Energy Meter Back Diagram

Plugging in the ESP32

The Expandable 6 Channel ESP32 Energy Meter is made so that an ESP32 dev board can be plugged directly into the meter. See the list above for compatible ESP32 dev boards. Always insert the ESP32 with the 3V3 pin in the upper left of the meter. The bottom pins are used to connect the voltage signal (from the power plug) to add-on boards. If the ESP32 is inserted into the bottom pins it will more than likely short the ESP32.

Communicating with the ESP32

The Expandable 6 Channel ESP32 Energy Meter uses SPI to communicate with the ESP32. Each board uses 2 CS pins.

The main board uses the following SPI pins:

  • CLK - 18
  • MISO - 19
  • MOSI - 23
  • CS1 - 5 (CT1-CT3 & Voltage 1)
  • CS2 - 4 (CT4-CT6 & Voltage 2)

The version of EmonESP available here has all of these pins set by default.

For examples of how to set up your config in ESPHome, see here and here.

Add-on Boards

Add-on boards (up to 6) can expand the main energy meter up to 42 current channels & 8 voltage channels. The add-on boards plug directly into the main board as seen here.

The add-on board allows the CS pin to be selected based on the jumper settings at the bottom of the board. This is so multiple add-on boards can be used - up to 6 maximum. Do NOT select more than one CS pin per bank. The CS pins can be:

  • CT1-CT3 (CS):
    • For v1.3 and under:
      • 0
      • 2 (*make sure that an on board LED is not used for IO2 on the ESP32)
      • 12 (*will cause ESP32 to not boot if used)
      • 13
      • 14
      • 15
    • For v1.4 and above:
      • 0
      • 27
      • 35 (do not use - it will not work correctly)
      • 13
      • 14
      • 15
    • For v1.4 rev1 and above:
      • 35 is changed to 2 (may prevent the ESP32 from being programmed - disconnect jumper if so)
  • CT4-CT6 (CS2):
    • 16
    • 17
    • 21
    • 22
    • 25
    • 26

Expandable 6 Channel ESP32 Energy Meter Add-on Diagram

Calibrating Current Sensors & Voltage (AC Transformer)

See here for the calibration procedure, or here for a video

Common Calibration Values
  • Current Transformers:
    • 20A/25mA SCT-006: 11143
    • 30A/1V SCT-013-030: 8650
    • 50A/1V SCT-013-050: 15420
    • 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
  • AC Transformers
    • Jameco 9VAC Transformer 157041:
      • For meter versions:
        • v1.3 or greater: 7305
        • v1.2: 42620

Measuring Power & Other Metering Values

The Expandable 6 Channel ESP32 Energy Meter uses 2 ATM90E32AS ICs. Each IC has 3 voltage channels and 3 current channels. In order for power metering data to be calculated internally, each current channel must have a reference voltage. If the voltage is out of phase with the current, then the current and power will read as negative, affecting the power factor and power calculations. If you have a split single phase or dual phase setup, the solution is to turn around the current transformer on the wire.

v1.1 of the meter used 1 of the voltage channels for each IC. This means that power and metering data would have to be calculated in software, or voltage channels would have to be mapped via changing registers on the IC to get power and metering data from CT2, CT3, CT5, CT6.

v1.2 & v1.3 have JP8-JP11 on the back of the board, that would allow all voltage channels to be connected together, which would allow power and other metering values to be calculated. Most of v1.3 came soldered together.

v1.4 removed JP8-JP11, and has voltage channels connected internally on the pcb.

Measuring Dual Pole (240V) Circuits

For split single phase applications, dual pole circuits have 2 hot wires that total 240V (usually red and black in newer buildings). In most cases both poles are used equally, but in others there may be electronics in the applicance that use only 1 pole. There are 3 different options for measuring these circuits:

  • Monitor 1 phase with 1 CT, and double the current output in software (least accurate) See details on how to do this in ESPHome here.
  • Use 2 CTs to monitor each hot wire on the circuit (if you are monitoring 1 voltage, they should be in opposite directions from eachother)
  • If you have enough wire, and the CT is large enough, run both hot wires through 1 CT in opposite directions

Measuring A Second Voltage

The holes labelled VA2 next to the power plug on the meter main board, and in the bottom right of the add-on board are for measuring a second voltage. To do this you must:

  • Sever (with a knife) JP12 and JP13 on the back of the board for v1.3+, or JP7 for prior versions
  • Use a second AC transformer, ideally one identical to the primary
  • Plug in the second AC transformer to an outlet on the opposite phase to the primary
  • Solder on a pin header, 3.5mm (2.54mm for v1.3 and earlier) screw connector, or DC style jack pigtail on to VA2+ & VA2- (next to the main power/voltage jack)

When voltage jumpers are severed, the voltage reference for CT4-CT6 will be from VA2. This means that current transformers for CT4-CT6 should be hooked up to circuits that are on the same phase as VA2, and CT1-CT3 should be hooked up to circuits that are in phase with the primary voltage. If a CT is not in phase with the voltage its current and power readings will be negative. If, for example, you have 4 circuits in phase with the primary, and 2 in phase with VA2, you can reverse the current transformer on the wire to put it in phase with the voltage (assuming split single phase or dual phase)

For add-on boards, the primary voltage will come from the main board. The optional secondary voltage measurement (also VA2 pins), will be in phase with CT4-CT6.

Measuring 3-Phase Electricity

What you'll need to measure all 3 phases properly:

  • 6 Channel Main Board (v1.4 and above)
  • 6 Channel Add-on Board
  • 3 voltage transformers - one for each phase. These can either be wall, plug-in type (if you have an outlet wired to each phase), or stand-alone transformers wired directly to breakers. They must bring down the voltage to between 9-14VAC. The first one that plugs into the main board also powers the ESP32 and electronics, so it must output at least 500mA.
  • Headers soldered to the VA2 terminals on the main board and add-on board
  • JP12 and JP13 severed on the main board & add-on boards Similar to the above for measuring a second voltage, once JP12 and JP13 are severed:
  • CT1-CT3 on the main board, and CT1-CT3 on the add-on board will be in phase with the 1st phase
  • CT4-CT6 on the main board with the 2nd phase
  • CT1-CT6 on the add-on board with the 3rd phase.

The transformers should be calibrated individually for greater accuracy.

Alternately, you can use 2 add-on boards and connect 1 transformer to to each board:

  • Locate the bottom most pins (i.e. those which the ESP32 does not plug into), marked "VA-" and "VA+" for each add-on board. These normally provide the voltage reference to the add-on board from the main board
  • Cut these pins off
  • Solder a connector, or the wires from a transformer, in the bottom right holes marked "VA2" on the add-on boards. Polarity does not matter (if you are getting negative current readings, reverse the CT on the wire)
  • Do not sever JP12 and JP13

On 3-phase systems, a current transformer that's connected to a phase not in phase with the voltage reference will always result in near-zero active power and power factor.

Setting Up Software

EmonESP/EmonCMS

EmonESP is used to send energy meter data to a local install of EmonCMS, or emoncms.org. Data can also be sent to a MQTT broker through this. EmonCMS has Android and IOS apps. The ESP32 sofware for EmonESP is located here, and can be flash to an ESP32 using the Arduino IDE or PlatformIO. See details on setup here.

ESPHome/Home Assistant

ESPHome can be loaded on an ESP32 to seamlessly integrate energy data into Home Assistant. Energy data can then be saved in InfluxDB and displayed with Grafana. At the same time, the energy data can also be used for automations in Home Assistant.

A new feature in Home Assistant allows you to monitor electricity usage directly in Home Assistant. You can also track usage of individual devices and/or solar using the 6 channel meter!

Flashing ESPHome
  • If you have Home Assistant installed, go to Settings in the left menu, click Add-ons, then Add-on Store (bottom right blue button), Search for ESPHome - Click on Install
  • Click on Open Web UI

ESPHome add-on

  • Click the green + circle in the bottom right to add a new node
  • Fill in the name (for exmaple 'energy_meter', and device type as NodeMCU-32S or Generic ESP32
  • Add your wifi details and click Submit to create the node
  • ESPHome will compile - when it is complete click Download Binary

ESPHome Download Binary

  • Download the ESPHome flasher tool for your OS here
  • Connect the ESP32 that you intend to use with your meter to your computer via USB (it does not need to be plugged into the meter at this point, but if it is, do not plug in the AC transformer yet for the meter at the same time the ESP32 is plugged into USB)
  • In the ESPHome flasher, select the COM port that the ESP32 is connected to
  • Select the .bin file you just downloaded and click Flash ESP (If it doesn't connect, click view logs to see what is going on - you will probably have to hold down the right Boot button on the ESP32 after clicking on Flash ESP)
  • ESPHome will be loaded on the ESP32 with a basic config

ESPHome Flasher

  • Assuming the ESP32 is close enough to the AP you want to connect to for WiFi, it should now be available in ESPHome within Home Assistant
  • In Home Assistant go to Settings > Devices & Services, and click on the blue Configure for ESPHome. It should be highlighted as Discovered
Loading the Energy Meter Config
  • Choose an exmaple config that best suits your energy meter setup here on the ESPHome site, and here for some more advanced configurations
  • In the Home Assistant/ESPHome Web UI, click Edit for the Energy Meter Node
  • Copy/Paste the example config, change any applicable settings, like the current calibrations to the current transformers that you use, and click Save

yaml config edit

  • At this point it's a good idea to close the edit dialog, and click Validate on the main screen to make sure your .yaml file is valid. Fix any errors that may come up.
  • Click Upload to save your configuration to the ESP32. Note that if you have 4 or more add-on boards, you may get an error and run out of memory on your ESP32 if you have a lot of sensors. See details here.

ESPHome node

  • For greater accuracy, you can calibrate the current sensors. See here, or here for a video
  • When updating values for current transformers in the ESPHome config, click Edit, then Upload

Getting Data in InfluxDB

  • If you don't already, install the InfluxDB add-on in Home Assistant via Settings > Add-ons > Add-on Store (bottom right blue button)
  • Open the Web UI, and click on the InfluxDB Admin tab, add a database homeassistant
  • Click on the Users tab (under Databases on the same screen), and create a new user homeassistant with All permissions
  • Go to Settings > Add-ons > InfluxDB > Documentation (top menu) > Integrating into Home Assistant, and follow the instructions for editing your Home Assistant configuration.yaml
  • Restart Home Assistant
  • Data should now be available in Home Assistant and available under http://homeassistant.local:8086 or the IP of Home Assistant

Getting Data in the Home Assistant Energy Dashboard

Home Assistant Energy Config

To display data in the Home Assistant Energy Dashboard you must be using ESPHome v1.20.4 or higher, and have at least one total_daily_energy platform configured in your ESPHome config. time is also needed.

For Total Energy Consumption
#Total kWh
  - platform: total_daily_energy
    name: ${disp_name} Total kWh
    power_id: totalWatts
    filters:
      - multiply: 0.001
    unit_of_measurement: kWh
time:
  - platform: sntp
    id: sntp_time 

Where totalWatts is the sum of all watt calculations on the meter. See an example of this here. In the example, this was done with a lambda template.

For Solar Panels

The same can be done as above to track solar panel use and export. The current channels on the meter that are tracking solar usage must have their own lambda template calculation.

See this example for how you could set this up with the 6 Channel Meter.

For Individual Device/Circuit Tracking

To do this you must have power calulated by the meter, or a lambda template that calculates watts per circuit. Then can use a kWh platform for each of the current channels on the 6 channel energy meter. For example:

#CT1 kWh
  - platform: total_daily_energy
    name: ${disp_name} CT1 Watts Daily
    power_id: ct1Watts
    filters:
      - multiply: 0.001
    unit_of_measurement: kWh

ct1Watts references the id of the watt calculation. In the example config, this is:

      power:
        name: ${disp_name} CT1 Watts
        id: ct1Watts
Setup in Home Assistant
  • Go to Configuration > Energy
  • For total energy, click Add Consumption under Electricity grid
  • The name of the total_daily_energy platform, like 6C Total kWh, should be available to choose
  • You can also set a static cost per kWh or choose an entity that tracks the cost of your electricity
  • For Individual devices chose the name of the individual circuits, like 6C CT1 Watts Daily
  • If monitoring your Solar Panels with a 6 channel meter, you can also set this here, but it will not register unless energy is being consumed by your house or flowing out to the grid.

FAQ

Q: I am getting a low reading, or nothing at all for one CT - what is wrong?

A: Sometimes the jack for the CT is a bit stiff, and you may need to push in the CT connector into the board jack until it clicks. If it is definitely all the way in, it's possible the connector or somewhere else has a loose connection, and we will replace the meter for free.

Q: Does the 6 channel energy meter work in my country?

A: Yes! There is a setting to set the meter to 50Hz or 60Hz power. You will need to purchase an AC transformer that brings down the voltage to between 9-12V AC. Transformers for the US are for sale in the circuitsetup.us store.

Q: I'm getting a negative value on one current channel. What is going on?

A: This usually means that the CT is on the wire backwords - just turn it around!

Q: I'm getting a small negative value when there is no load at all, but a positive value otherwise. What is going on?

A: This is caused by variances in resistors and current transformers. You can either calibrate the current transformers to the meter, or add this lambda section to only allow positive values for a current channel:

  - platform: template
    name: ${disp_name} CT1 Watts Positive
    id: ct1WattsPositive
    lambda: |-
      if (id(ct1Watts).state < 0) {
        return 0;
      } else {
        return id(ct1Watts).state ;
      }
    accuracy_decimals: 2
    unit_of_measurement: W
    icon: "mdi:flash-circle"
    update_interval: ${update_time}

Then for your total watts calculation, use ct1WattsPositive

Q: The CT wires are not long enough. Can I extend them?

A: Yes, you absolutely can! Something like a headphone extension or even an ethernet wire can be used (if you don't mind doing some wiring). It is recommended to calibrate the CTs after adding any particularly long entension.

Q: Can I use this CT with the 6 channel meter?

A: More than likely, yes! As long as the output is rated at less than 720mV RMS, or 33mA.

Q: Can I use SCT-024 200A CTs with the 6 channel meter?

A: If you need to measure up to 200A, then this is not recommended. At 200A, our newest SCT-024's will output 50mA. That means, the max you should measure with the SCT-024 plugged into the 6 channel meter is 132A. In a residential setting with 200A service, it is highly unlickly that you will use more than 132A per phase sustained. In fact, unless you have your own dedicated transformer, and a very large house, it is impossible.

Q: How do I know if my CT has a burden resistor?

A: There is a built in burden resistor if the output is rated in volts. In this case the corresponding jumper on the rear of the meter should be severed.

Q: When using more than 3 add-on boards, ESPHome does not work.

A: ESPHome will run out of stack memory after using more than 15 sensors, or so. You will have to increase the stack memory size before compiling. See details here.

UPDATE: You can replace the esphome: definition in your ESPHome config to solve this issue with the following:

esphome:
  name: 6chan_energy_meter
  platformio_options:
    build_flags: 
      - -DCONFIG_ARDUINO_LOOP_STACK_SIZE=32768

esp32:
  board: nodemcu-32s
  variant: esp32
  framework:
    type: arduino
    version: 2.0.2
    source: https://github.com/espressif/arduino-esp32.git#2.0.2
    platform_version: https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream

More resources:

expandable-6-channel-esp32-energy-meter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

expandable-6-channel-esp32-energy-meter's Issues

Dead link on github page and lowest power consumption that can be measured

There's a dead link on https://github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter , ctrl+f for "here for some more advanced configurations". If I had to guess, I think it should be https://github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/tree/master/Software/ESPHome

In addition to that, I'm curious about something, what's the lowest power consumption a setup using the 6-Channel ESP32 Energy Meter can measure? Don't see that in the specs, or I overlooked it.

Voltage calibration question

Hi,

The documentation currently only has a single sample values for a 9-volt transformer on a 110-Volt line. Could you please document how to modify this value for a 12-V transformer and/or a 230V line?

Odd Voltage Reading

I've set up my 6 channel v1.2 board which I bought some time ago.

I bridged JP8-JP11.

I am EU based with nominal 220V supply. The actual measured V is 221v today.

I am using a SCT-013-000 100A clamp

ESPHome yaml below. Measured voltage is showing in logs/Home Assistant as 62.5V.

I would be very grateful for any help in identifying what I have done wrong with the deployment.

substitutions:
# Change the disp_name to something you want  
  disp_name: 6Cenergymonitor
# Interval of how often the power is updated
  update_time: 10s
# Current Transformers:
#  20A/25mA SCT-006: 11143
#  30A/1V SCT-013-030: 8650
#  50A/1V SCT-013-050: 15420
#  80A/26.6mA SCT-010: 41660
#  100A/50ma SCT-013-000: 27518
#  120A/40mA: SCT-016: 41787
#  200A/100mA SCT-024: 27518
#  current_cal: '27518'
  current_cal: '27518'
# Jameco 9VAC Transformer: 
#  For meter versions: 
#  >= v1.3: 7305
  voltage_cal: '37080'

# mqtt:
#  broker: !secret mqtt_broker
#  username: !secret mqtt_user
#  password: !secret mqtt_pass

spi:
  clk_pin: 18
  miso_pin: 19
  mosi_pin: 23

#IC1
sensor:
  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    update_interval: 30s
  - platform: atm90e32
    cs_pin: 5
    phase_a:
      voltage:
        name: ${disp_name} Volts A
        id: ic1Volts
        accuracy_decimals: 1
      current:
        name: ${disp_name} CT1 Amps
        id: ct1Amps
# The max value for current that the meter can output is 65.535. If you expect to measure current over 65A, 
# divide the gain_ct by 2 (120A CT) or 4 (200A CT) and multiply the current and power values by 2 or 4 by uncommenting the filter below
#        filters:
#          - multiply: 2
      power:
        name: ${disp_name} CT1 Watts
        id: ct1Watts
#        filters:
#          - multiply: 2
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    phase_b:
      current:
        name: ${disp_name} CT2 Amps
        id: ct2Amps
      power:
        name: ${disp_name} CT2 Watts
        id: ct2Watts
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    phase_c:
      current:
        name: ${disp_name} CT3 Amps
        id: ct3Amps
      power:
        name: ${disp_name} CT3 Watts
        id: ct3Watts
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    frequency:
      name: ${disp_name} Freq A
    line_frequency: 50Hz
    gain_pga: 2X
    update_interval: ${update_time}
#IC2
  - platform: atm90e32
    cs_pin: 4
    phase_a:
#this voltage is only needed if monitoring 2 voltages
      voltage:
        name: ${disp_name} Volts B
        id: ic2Volts
        accuracy_decimals: 1
      current:
        name: ${disp_name} CT4 Amps
        id: ct4Amps
      power:
        name: ${disp_name} CT4 Watts
        id: ct4Watts
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    phase_b:
      current:
        name: ${disp_name} CT5 Amps
        id: ct5Amps
      power:
        name: ${disp_name} CT5 Watts
        id: ct5Watts
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    phase_c:
      current:
        name: ${disp_name} CT6 Amps
        id: ct6Amps
      power:
        name: ${disp_name} CT6 Watts
        id: ct6Watts
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    frequency:
      name: ${disp_name} Freq B
    line_frequency: 50Hz
    gain_pga: 2X
    update_interval: ${update_time}
        
#Total Amps   
  - platform: template
    name: ${disp_name} Total Amps
    id: totalAmps
    lambda: return id(ct1Amps).state + id(ct2Amps).state + id(ct3Amps).state + id(ct4Amps).state + id(ct5Amps).state + id(ct6Amps).state ;
    accuracy_decimals: 2
    unit_of_measurement: A
    icon: "mdi:flash"
    update_interval: ${update_time}         
#Total Watts
  - platform: template
    name: ${disp_name} Total Watts
    id: totalWatts
    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
    icon: "mdi:flash-circle"
    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
    
switch:
  - platform: restart
    name: ${disp_name} Restart  
time:
  - platform: sntp
    id: sntp_time

Case mounting tabs and CT numbers

I wanted to use the Orbit 57095 Timer Cabinet to house the energy meter: https://www.orbitonline.com/product/gray-outdoor-timer-cabinet/

The provided 3D printed case didn't really have mounting like I wanted it, so I have modified the STL files to add mounting tabs that line up with existing holes in that cabinet. This cabinet will fit up to the 24-input (3 addon board) energy meter.

The second change was adding numbers to the sides of the case so it can be quickly seen what the CT input number is.

Ideally these changes would be in the source CAD file, and not just the STLs, so if this improvement is desired that would be the proper place to make these changes. I didn't see the CAD files available on GitHub.

Here's the OpenSCAD remix and STLs for a 6-input and 24-input version: case_mod.zip

IMG_20200523_164225
IMG_20200523_164322

Monitoring a 400 A service (2x 200 A panels)

I have 1x 6 channel board and am getting ready to connect things. My goal is to monitor my whole home energy consumption via ESPHome (config taken from this repo) and Home Assistant. My home (located in US) has a 400 A service from the street which is divided at the meter into 2x 200 A panels that are in my garage next to each other. The various circuits in my house are divided up between each of these 2 panels.

Can I monitor this correctly with a single 6 channel board? After reading through the docs, my understanding is that I need:

  • CT1 - Panel 1 Main 240V red
  • CT2 - Panel 1 Main 240V black (inverted clamp?)
  • CT3 - Extra for some 120V circuit on panel 1
  • CT4 - Panel 2 Main 240V red
  • CT5 - Panel 2 Main 240V black (inverted clamp?)
  • CT6 - Extra for some 120V circuit on panel 2

I would then need to somehow combine the readings from CT1, CT2, CT4, and CT5 to get the "whole home" reading.

Does this sound correct?

One part in the docs that confused me a bit was about measuring a second voltage. Does this apply in my situation with having two panels? I would think the voltages are the same between the two. My current plan is to power the board from a single wall outlet coming one of the panels (could be either).

Thanks. Looking forward to getting this up and running soon.

Question about Split Phase 220v

Hello,

I didn't see this explicitly spelled out in the Readme.MD / Wiki:

Do I need two clamps to measure a US based 220v circuit? Is there logic in ESPhome to deal with that? I seem to be getting mixed answers on this. If I need two clamps, do I need to do the severing operation to measure two voltages?

Information flipping back and forth for live data

Screen Shot 2020-11-21 at 11 30 57 AM

Screen Shot 2020-11-21 at 11 31 20 AM

i'm getting data flapping back and forth for some reason. The voltage also seems to be way off. i have it configured for
ct1: Input
CT2: Input
CT3: Solar input
CT4: Solar input
CT5: AC
CT6: Dryer

Isn't reading Voltage at all, Frequency varies wildly

EDIT: Answer likely found (Thanks to digiblurs discord), my power adaptor was AC to DC, I had no idea AC to AC was a thing! After some searching i've found one online and have ordered. Once it arrives, and works, i'll close this issue.

Hi there, my Expandable 6 Channel has just arrived and i'm struggling to get it setup correctly, i'm hoping you can be of help :)

ESPHome flashed, reading coming back into Home Assistant via MQTT, all working. But the readings are wrong. I've used the https://github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/blob/master/Software/ESPHome/6chan_energy_meter_main_board.yaml as my base, and modified with my local values (In the UK, so voltage and frequency are different). Please see this PR for my diff https://github.com/peely/Expandable-6-Channel-ESP32-Energy-Meter/pull/1/files

This is resulting in readings sent over MQTT that have a wildly varing Frequency,
image

And the Voltage reading of near 0 always
image

I'm well aware that this will be a PEBCAK issue, i'm just not sure what config value I can change to fix this 😅

I've got a 50A CT Clamp on CT1, and I also have a 30A clamp on CT2, both on the same live test wire at the moment (I wanted to see the effect clamp size had on readings, my screenshots are only of the 50A clamp). I'm not using the power supply suggested, just another 9V power supply I already had, which my volt meter tells me is outputting 9.12V

Is there anymore information I can provide to help the troubleshooting? I was following this guide linked to by the Home Assistant Energy page. Thank you in advanced.

Free GPIO ports?

Hi,
I have a smart meter which uses an optical interface to send the power mesurments (SML language). For the optical sensor I need a free input port on the ESP32. Is there anything free for that usecase?

Thank you 🙂

EmonESP unable to set port of EmonCMS server

When I try to enter a custom port in the traditional way for the EmonCMS server, such as 192.168.1.3:27015, the code seems to treat the entire string as the hostname field, and uses hardcoded port 80 to try to connect to. So ultimately it tries to connect to 192.168.1.3:27015:80 and spits out errors accordingly.

This might just require pulling in a fix from upstream: openenergymonitor/EmonESP#102

Also, what are the changes in the EmonESP fork? Is it possible to just use the mainstream EmonESP?

Home Assistant Energy Page

This had been reporting on Energy Page completely however now while bars in individual devices are still reporting, the total grid energy graph is not. When I go to Energy configuration in home assistant I see its complaining:

Last reset missing
The following entities have state class 'measurement' but 'last_reset' is missing:
sensor.pm_main_total_daily_kwh_farmbell

Is there new configuration in ESPhome YAML file? I don't see this last reset aspect in the docs.

Here is my current YAML for these sensors:

`#kWh Farmbell Daily

  • platform: total_daily_energy
    name: ${disp_name} Total Daily kWh Farmbell
    power_id: totalWatts
    filters:
    • multiply: 0.001
      unit_of_measurement: kWh
      device_class: "energy"
      state_class: "measurement"

#kWh Pool

  • platform: total_daily_energy
    name: ${disp_name} Total Daily kWh Pool
    power_id: totalWattsPool
    filters:
    • multiply: 0.001
      unit_of_measurement: kWh

#kWh Upstairs AC

  • platform: total_daily_energy
    name: ${disp_name} Total Daily kWh Upstairs AC
    power_id: totalWattsUpAC
    filters:
    • multiply: 0.001
      unit_of_measurement: kWh

#kWh Downstairs AC

  • platform: total_daily_energy
    name: ${disp_name} Total Daily kWh Downstairs AC
    power_id: totalWattsDownAC
    filters:
    • multiply: 0.001
      unit_of_measurement: kWh

switch:

  • platform: restart
    name: ${disp_name} Restart
    time:
  • platform: sntp
    id: sntp_time `

Meter has been flawless by the way thanks!

Thanks,

Chris

Communication with ATM90E32 failed

So- everything was working nicely as expected.

I picked up an addon board, and incidentally placed the ESP32 one row down too far into the pin, which the documentation specifically says do not place the ESP32 into. The ESP responded by bricking itself.

Well, I replaced the ESP32, with another ESP32-WROOM-32D, and placed the board into the proper socket this time. Well, after troubleshooting for a bit, I removed the addon board, and reverted to just placing it into the main board, in its original configuration.

After tinkering a bit more, and removing all non-essential configuration, I have reached the limit of my troubleshooting capabilities, in that, the logs only tell me "[13:20:03][E][atm90e32:132]: Communication with ATM90E32 failed!"

When I accidentally incorrectly installed the ESP32 when adding the addon-board, did this damage the underlying circuit? If not- what other debugging steps should be performed?

This is the ESP32 I am attempting to use currently. The pinout seems to match the original one.

https://www.amazon.com/gp/product/B0718T232Z

It is labeled as ESP32-WROOM-32D

Config

substitutions:
  devicename: "energy_meter"
  friendly_name: "Energy Meter"
  ip_address: 10.100.3.112
  gateway: 10.100.3.1
# Interval of how often the power is updated
  update_time: 15s


# Current Transformers:
#  20A/25mA SCT-006: 11143
#  30A/1V SCT-013-030: 8650
#  50A/1V SCT-013-050: 15420
#  80A/26.6mA SCT-010: 41660
#  100A/50ma SCT-013-000: 27518
#  120A/40mA: SCT-016: 41787
#  200A/100mA SCT-024: 27518
# Jameco 9VAC Transformer: 42620
  voltage_cal: '7305'
  mains_current_cal: '41787'
  normal_current_cal: '11143'

  <<: !include secrets.yaml

<<: !include config/common.yaml

logger:
  level: VERY_VERBOSE
  
esphome:
  name: ${devicename}
  platform: ESP32
  board: nodemcu-32s

spi:
  clk_pin: 18
  miso_pin: 19
  mosi_pin: 23

sensor:
  - platform: wifi_signal
    name: ${friendly_name} WiFi
    update_interval: 60s
#IC1 - Main Board   
  - platform: atm90e32
    cs_pin: 5
    #CT1
#    phase_a:
#      voltage:
#        name: ${friendly_name} Volts
#        id: ic1Volts
#        accuracy_decimals: 1
#      current:
#        name: ${friendly_name} Main A Amps
#        id: CT1_AMPS
#      power:
#        name: ${friendly_name} Main A Watts
#        id: CT1_WATTS
#      gain_voltage: ${voltage_cal}
#      gain_ct: ${mains_current_cal}
#    #CT2
#    phase_b:
#      current:
#        name: ${friendly_name} Main B Amps
#        id: CT2_AMPS
#      power:
#        name: ${friendly_name} Main B Watts
#        id: CT2_WATTS
#      gain_voltage: ${voltage_cal}
#      gain_ct: ${mains_current_cal}
#    #CT3
#    phase_c:
#      current:
#        name: ${friendly_name} A/C Amps
#        id: CT3_AMPS
#      power:
#        name: ${friendly_name} A/C Watts
#        id: CT3_WATTS
#        filters:
#          - multiply: 2
#      gain_voltage: ${voltage_cal}
#      gain_ct: ${normal_current_cal}
    frequency:
      name: ${friendly_name} Freq
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}
#IC2 - Main Board
  - platform: atm90e32
    cs_pin: 4
    #CT4
#    phase_a:
#      current:
#        name: ${friendly_name} Dryer Amps
#        id: CT4_AMPS
#      power:
#        name: ${friendly_name} Dryer Watts
#        id: CT4_WATTS
#        filters:
#          - multiply: 2
#      gain_voltage: ${voltage_cal}
#      gain_ct: ${normal_current_cal}
#    #CT5
#    phase_b:
#      current:
#        name: ${friendly_name} Bedroom Outlets Amps
#        id: CT5_AMPS
#      power:
#        name: ${friendly_name} Bedroom Outlets Watts
#        id: CT5_WATTS
#      gain_voltage: ${voltage_cal}
#      gain_ct: ${normal_current_cal}
#    #CT6
#    phase_c:
#      current:
#        name: ${friendly_name} Server room Amps
#        id: CT6_AMPS
#      power:
#        name: ${friendly_name} Server room Watts
#        id: CT6_WATTS
#      gain_voltage: ${voltage_cal}
#      gain_ct: ${normal_current_cal}
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}

    
switch:
  - platform: restart
    name: ${friendly_name} Restart  

Logs

INFO Reading configuration /config/energy_meter.yaml...
WARNING 'energy_meter': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
INFO Detected timezone 'CST' with UTC offset -6 and daylight saving time from 13 March 02:00:00 to 06 November 02:00:00
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/energy_meter
Processing energy_meter (board: nodemcu-32s; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
PACKAGES: 
 - framework-arduinoespressif32 3.10006.210326 (1.0.6) 
 - tool-esptoolpy 1.30000.201119 (3.0.0) 
 - toolchain-xtensa32 2.50200.97 (5.2.0)
Library Manager: Installing Hash
Library Manager: Already installed, built-in library
Dependency Graph
|-- <AsyncTCP-esphome> 1.2.2
|-- <ESPmDNS> 1.0
|   |-- <WiFi> 1.0
|-- <Update> 1.0
|-- <WiFi> 1.0
|-- <SPI> 1.0
Compiling .pioenvs/energy_meter/src/main.cpp.o
Linking .pioenvs/energy_meter/firmware.elf
Retrieving maximum program size .pioenvs/energy_meter/firmware.elf
Checking size .pioenvs/energy_meter/firmware.elf
RAM:   [=         ]  12.6% (used 41304 bytes from 327680 bytes)
Flash: [=====     ]  48.9% (used 896502 bytes from 1835008 bytes)
Building .pioenvs/energy_meter/firmware.bin
========================= [SUCCESS] Took 13.40 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 10.100.3.112
INFO Uploading /config/energy_meter/.pioenvs/energy_meter/firmware.bin (896624 bytes)
Uploading: [============================================================] 100% Done...

INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from 10.100.3.112 using esphome API
INFO Connecting to 10.100.3.112:6053 (10.100.3.112)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Error connecting to 10.100.3.112: [Errno 111] Connection refused). Re-Trying in 1 seconds
INFO Connecting to 10.100.3.112:6053 (10.100.3.112)
INFO Successfully connected to 10.100.3.112
[13:14:33][I][app:106]: ESPHome version 2021.8.2 compiled on Sep 13 2021, 13:14:01
[13:14:33][C][wifi:499]: WiFi:
[13:14:33][C][wifi:359]:   SSID: [redacted]
[13:14:33][C][wifi:360]:   IP Address: 10.100.3.112
[13:14:33][C][wifi:362]:   BSSID: [redacted]
[13:14:33][C][wifi:363]:   Hostname: 'energy_meter'
[13:14:33][C][wifi:367]:   Signal strength: -64 dB ▂▄▆█
[13:14:33][C][wifi:371]:   Channel: 5
[13:14:33][C][wifi:372]:   Subnet: 255.255.255.0
[13:14:33][C][wifi:373]:   Gateway: 10.100.3.1
[13:14:33][C][wifi:374]:   DNS1: 0.0.0.0
[13:14:33][C][wifi:375]:   DNS2: 0.0.0.0
[13:14:33][C][spi:081]: SPI bus:
[13:14:33][C][spi:082]:   CLK Pin: GPIO18 (Mode: OUTPUT)
[13:14:33][C][spi:083]:   MISO Pin: GPIO19 (Mode: INPUT)
[13:14:33][C][spi:084]:   MOSI Pin: GPIO23 (Mode: OUTPUT)
[13:14:33][C][spi:085]:   Using HW SPI: YES
[13:14:33][C][logger:189]: Logger:
[13:14:33][C][logger:190]:   Level: VERY_VERBOSE
[13:14:33][C][logger:191]:   Log Baud Rate: 115200
[13:14:33][C][logger:192]:   Hardware UART: UART0
[13:14:33][C][:129]: ATM90E32:
[13:14:33][C][atm90e32:130]:   CS Pin: GPIO5 (Mode: OUTPUT)
[13:14:33][E][atm90e32:132]: Communication with ATM90E32 failed!
[13:14:33][C][atm90e32:134]:   Update Interval: 15.0s
[13:14:33][C][atm90e32:156]:   Frequency 'Energy Meter Freq'
[13:14:33][C][atm90e32:156]:     State Class: 'measurement'
[13:14:33][C][atm90e32:156]:     Unit of Measurement: 'Hz'
[13:14:33][C][atm90e32:156]:     Accuracy Decimals: 1
[13:14:33][C][atm90e32:156]:     Icon: 'mdi:current-ac'
[13:14:33][C][:129]: ATM90E32:
[13:14:33][C][atm90e32:130]:   CS Pin: GPIO4 (Mode: OUTPUT)
[13:14:33][E][atm90e32:132]: Communication with ATM90E32 failed!
[13:14:33][C][atm90e32:134]:   Update Interval: 15.0s
[13:14:33][C][restart:021]: Restart Switch 'Energy Meter Restart'
[13:14:33][C][restart:021]:   Icon: 'mdi:restart'
[13:14:34][C][homeassistant.time:010]: Home Assistant Time:
[13:14:34][C][homeassistant.time:011]:   Timezone: 'CST6CDT5,M3.2.0/2,M11.1.0/2'
[13:14:34][C][ota:029]: Over-The-Air Updates:
[13:14:34][C][ota:030]:   Address: 10.100.3.112:3232
[13:14:34][C][ota:032]:   Using Password.
[13:14:34][C][api:095]: API Server:
[13:14:34][C][api:096]:   Address: 10.100.3.112:6053
[13:14:34][C][wifi_signal.sensor:009]: WiFi Signal 'Energy Meter WiFi'
[13:14:34][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[13:14:34][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[13:14:34][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'
[13:14:34][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[13:14:34][V][wifi_signal.sensor:009]:   Unique ID: '94b97eda9788-wifisignal'
[13:14:38][VV][api.service:327]: on_ping_request: PingRequest {}
[13:14:38][VV][api.service:043]: send_ping_response: PingResponse {}
[13:14:43][VV][api.service:327]: on_ping_request: PingRequest {}
[13:14:43][VV][api.service:043]: send_ping_response: PingResponse {}
[13:14:48][VV][api.service:327]: on_ping_request: PingRequest {}
[13:14:48][VV][api.service:043]: send_ping_response: PingResponse {}
[13:14:53][VV][api.service:327]: on_ping_request: PingRequest {}
[13:14:53][VV][api.service:043]: send_ping_response: PingResponse {}
[13:14:58][VV][api.service:327]: on_ping_request: PingRequest {}
[13:14:58][VV][api.service:043]: send_ping_response: PingResponse {}
[13:15:03][VV][api.service:327]: on_ping_request: PingRequest {}
[13:15:03][VV][api.service:043]: send_ping_response: PingResponse {}
[13:15:08][VV][api.service:327]: on_ping_request: PingRequest {}
[13:15:08][VV][api.service:043]: send_ping_response: PingResponse {}

Tracking grid import and export kWh seperatly (grid tied solar)

Hey CircuitSetup, love the product have been using it for many months now.

I have solar, I am using two CTs on the lines from the grid to my mains panel and two CTs on the lines from my grid tied solar to my mains panel. I am using your example ESP configuration for solar and its working great. One thing I would like to but am not familiar enough with ESP programing to figure it out is how to track import and export kWh of my grid side with separate kWh sensors. (The new Energy function of HomeAssistant doesn't tracks them separately and doesn't like it when it goes negative.) So if watts are positive tick the import kWh sensor up and if watts are negative tick the separate export kWh senor up.

Any configuration suggestions here? They would be greatly appreciated, thank you!

Question about data sampling

Hi, I read through Microchip ATM90E32AS datasheet and the respective ESPHome page, but can't seem to understand how this energy meter is sampling data. I am currently running 6 channel meter (v1.4 rev1) with only 4 channels in use (waiting for more CT Clamps for the remaining 2 channels).

Question is really about the values that are send via MQTT.
In yaml file update_interval is set to 10 seconds. Does this mean that meter reports instant value of Voltage, Wattage, Current, Power factor, etc, at a given instant "t", and then after 10 seconds reports the instant value at "t+10sec" ? What about Wh readings?

Or, rather, does the meter sample with a specific sampling rate (what is it?) values for each of the sensors and takes an average of all values over the configured 10 seconds?

If there is a better place to ask these questions, please let me know and I will move this discussion there.

Communication with ATM90E32 failed

Hello - I recently picked up a v1.4 rev1 board (the black one). As I was trying, unsuccessfully so, to calculate the right calibration values on a small test circuit I have (just one light bulb) the board eventually started to say that the communication failed with the sensors. I did swap them out as I was trying to figure the right calibration between all 6 plugs, to see if the measurements were the same.

To simplify I now just power it with usb power and have only one sensor in CT1. Still no dice.

INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from 192.168.xx using esphome API
INFO Successfully connected to 192.168.xx
[07:54:37][I][app:102]: ESPHome version 2022.8.0 compiled on Aug 23 2022, 07:53:54
[07:54:37][C][wifi:491]: WiFi:
[07:54:37][C][wifi:353]: Local MAC: 24:0A:C4:58:E4:54
[07:54:37][C][wifi:354]: SSID: [redacted]
[07:54:37][C][wifi:355]: IP Address: 192.168.xx
[07:54:37][C][wifi:357]: BSSID: [redacted]
[07:54:37][C][wifi:358]: Hostname: 'edison'
[07:54:37][C][wifi:360]: Signal strength: -46 dB ▂▄▆█
[07:54:37][C][wifi:364]: Channel: 1
[07:54:37][C][wifi:365]: Subnet: 255.255.255.0
[07:54:37][C][wifi:366]: Gateway: 192.168.30.1
[07:54:37][C][wifi:367]: DNS1: 0.0.0.0
[07:54:37][C][wifi:368]: DNS2: 0.0.0.0
[07:54:37][C][logger:275]: Logger:
[07:54:37][C][logger:276]: Level: DEBUG
[07:54:37][C][logger:277]: Log Baud Rate: 115200
[07:54:37][C][logger:278]: Hardware UART: UART0
[07:54:37][C][spi:097]: SPI bus:
[07:54:37][C][spi:098]: CLK Pin: GPIO18
[07:54:37][C][spi:099]: MISO Pin: GPIO19
[07:54:37][C][spi:100]: MOSI Pin: GPIO23
[07:54:37][C][spi:102]: Using HW SPI: YES
[07:54:37][C][:129]: ATM90E32:
[07:54:37][C][atm90e32:130]: CS Pin: GPIO5
[07:54:37][E][atm90e32:132]: Communication with ATM90E32 failed!
[07:54:37][C][atm90e32:134]: Update Interval: 10.0s
[07:54:37][C][atm90e32:135]: Voltage A '6C Volts A'
[07:54:37][C][atm90e32:135]: Device Class: 'voltage'
[07:54:37][C][atm90e32:135]: State Class: 'measurement'
[07:54:37][C][atm90e32:135]: Unit of Measurement: 'V'
[07:54:37][C][atm90e32:135]: Accuracy Decimals: 1
[07:54:37][C][atm90e32:136]: Current A '6C CT1 Amps'
[07:54:37][C][atm90e32:136]: Device Class: 'current'
[07:54:37][C][atm90e32:136]: State Class: 'measurement'
[07:54:37][C][atm90e32:136]: Unit of Measurement: 'A'
[07:54:37][C][atm90e32:136]: Accuracy Decimals: 2
[07:54:37][C][atm90e32:137]: Power A '6C CT1 Watts'
[07:54:37][C][atm90e32:137]: Device Class: 'power'
[07:54:37][C][atm90e32:137]: State Class: 'measurement'
[07:54:37][C][atm90e32:137]: Unit of Measurement: 'W'
[07:54:37][C][atm90e32:137]: Accuracy Decimals: 2
[07:54:37][C][atm90e32:156]: Frequency '6C Freq A'
[07:54:37][C][atm90e32:156]: State Class: 'measurement'
[07:54:37][C][atm90e32:156]: Unit of Measurement: 'Hz'
[07:54:37][C][atm90e32:156]: Accuracy Decimals: 1
[07:54:37][C][atm90e32:156]: Icon: 'mdi:current-ac'

3-Phase usage

Hi,
How would I implement this to measure power usage for my 3-phase connection. I am planning to use a single main board.
From what I understand, I could use VA and VA2 to supply separate voltage references coming from separate phases. But that only covers 2 phases. What about the third?

Would I have to buy a main board and 1 add on board. And split the 3 phases between the two boards. (making sure I supply separate VA per phase)

Please correct me If I am missing something.

[power_factor] is an invalid option for [phase_b]. Please check the indentation

I have ran into indentation issue and can't seem to resolve it.
Here is a portion of YAML file I'm trying to run:

root@tuyaconvert:/home/user# cat 6chan_energy_meter-add-on_jp8-jp11.yaml
# Example config for when jp8-jp11 are all bridged - this connects all the voltage channels and allows for power to be calculated by the meter directly.
# Boards >= v1.4 jp8-jp11 are removed and have all voltage channels connected
# 1 add-on board

substitutions:
# Change the disp_name to something you want
  disp_name: cs_nrg_mtr
# Interval of how often the power is updated
  update_time: 10s
# Current Transformers:
#  20A/25mA SCT-006: 11143
#  30A/1V SCT-013-030: 8650
#  50A/1V SCT-013-050: 15420
#  80A/26.6mA SCT-010: 41660
#  100A/50ma SCT-013-000: 27518
#  120A/40mA: SCT-016: 41787
#  200A/100mA SCT-024: 27518
  current_cal: '27518'
# Jameco 9VAC Transformer:
#  For meter versions:
#  >= v1.3: 7305
#  <= v1.2: 42620
  voltage_cal: '7305'

esphome:
  name: cs_nrg_mtr
  platform: ESP32
  board: nodemcu-32s

wifi:
  ssid: XXX
  password: XXX
  manual_ip:
    static_ip: 192.168.17.110
    gateway: 192.168.17.1
    subnet: 255.255.255.0
    dns1: 192.168.17.1

mqtt:
  broker: XXX
  username: XXX
  password: XXX

# Enable logging
logger:
  level: INFO
# Enable Home Assistant API
#api:

ota:

web_server:
  port: 80

spi:
  clk_pin: 18
  miso_pin: 19
  mosi_pin: 23

sensor:
  - platform: wifi_signal
    name: ${disp_name} WiFi
    update_interval: 60s
#IC1 Main
  - platform: atm90e32
    cs_pin: 5
    phase_a:
      voltage:
        name: ${disp_name} Volts A
        id: ic1Volts
        accuracy_decimals: 2
      current:
        name: ${disp_name} CT1 Amps
        id: ct1Amps
# The max value for current that the meter can output is 65.535. If you expect to measure current over 65A,
# divide the gain_ct by 2 (120A CT) or 4 (200A CT) and multiply the current and power values by 2 or 4 by uncommenting the filter below
#        filters:
#          - multiply: 2
      power:
        name: ${disp_name} CT1 Watts
        id: ct1Watts
#        filters:
#          - multiply: 2
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    phase_b:
      current:
        name: ${disp_name} CT2 Amps
        id: ct2Amps
      power_factor:
        name: somename
      power:
        name: ${disp_name} CT2 Watts
        id: ct2Watts
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    phase_c:
      current:
        name: ${disp_name} CT3 Amps
        id: ct3Amps
      power:
        name: ${disp_name} CT3 Watts
        id: ct3Watts
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    frequency:
      name: ${disp_name} Freq A
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}
#IC2 Main
  - platform: atm90e32
    cs_pin: 4
    phase_a:
      voltage:
        name: ${disp_name} Volts B
        id: ic2Volts
        accuracy_decimals: 2
      current:
        name: ${disp_name} CT4 Amps
        id: ct4Amps
      power:
        name: ${disp_name} CT4 Watts
        id: ct4Watts
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    phase_b:
      current:
        name: ${disp_name} CT5 Amps
        id: ct5Amps
      power:
        name: ${disp_name} CT5 Watts
        id: ct5Watts
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    phase_c:
      current:
        name: ${disp_name} CT6 Amps
        id: ct6Amps
      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}

#Total Amps Main
  - platform: template
    name: ${disp_name} Total Amps Main
    id: totalAmpsMain
    lambda: return id(ct1Amps).state + id(ct2Amps).state + id(ct3Amps).state + id(ct4Amps).state + id(ct5Amps).state + id(ct6Amps).state ;
    accuracy_decimals: 2
    unit_of_measurement: A
#    icon: "mdi:flash"
    update_interval: ${update_time}
#Total Amps
  - platform: template
    name: ${disp_name} Total Amps
    id: totalAmps
    lambda: return id(totalAmpsMain).state;
    accuracy_decimals: 2
    unit_of_measurement: A
#    icon: "mdi:flash"
    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
#    icon: "mdi:flash-circle"
    update_interval: ${update_time}


switch:
  - platform: restart
    name: ${disp_name} Restart
time:
  - platform: sntp
    id: sntp_time
root@tuyaconvert:/home/user#

I'm getting this output when trying to run it:

root@tuyaconvert:/home/user# esphome 6chan_energy_meter-add-on_jp8-jp11.yaml run
INFO Reading configuration 6chan_energy_meter-add-on_jp8-jp11.yaml...
INFO Detected timezone 'UTC' with UTC offset 0
Failed config

sensor.atm90e32: [source 6chan_energy_meter-add-on_jp8-jp11.yaml:65]
  platform: atm90e32
  cs_pin: 5
  phase_a:
    voltage:
      name: cs_nrg_mtr Volts A
      id: ic1Volts
      accuracy_decimals: 2
    current:
      name: cs_nrg_mtr CT1 Amps
      id: ct1Amps
    power:
      name: cs_nrg_mtr CT1 Watts
      id: ct1Watts
    gain_voltage: 7305
    gain_ct: 27518
  phase_b:  [source 6chan_energy_meter-add-on_jp8-jp11.yaml:87]
    current:
      name: cs_nrg_mtr CT2 Amps
      id: ct2Amps

    [power_factor] is an invalid option for [phase_b]. Please check the indentation.
    power_factor:  [source 6chan_energy_meter-add-on_jp8-jp11.yaml:91]
      name: somename
    power:
      name: cs_nrg_mtr CT2 Watts
      id: ct2Watts
    gain_voltage: 7305
    gain_ct: 27518
  phase_c:
    current:
      name: cs_nrg_mtr CT3 Amps
      id: ct3Amps
    power:
      name: cs_nrg_mtr CT3 Watts
      id: ct3Watts
    gain_voltage: 7305
    gain_ct: 27518
  frequency:
    name: cs_nrg_mtr Freq A
  line_frequency: 60Hz
  gain_pga: 1X
  update_interval: 10s
root@tuyaconvert:/home/user#

What am I doing wrong?

Communication with ATM90E32 failed Error

Hi,

I recently tried setting up the 6ch main board (v1.4, rev1) to work with Homeassistant through ESPHome, and keep getting the following error for both cs_pin: 4 and cs_pin: 5:

[E][atm90e32:132]: Communication with ATM90E32 failed!

I am currently using the Jameco 157041 power supply, with a HiLetgo ESP-WROOM-32 board (https://www.amazon.com/gp/product/B0718T232Z).

When I check the logs, I get regular updates on the WiFi status and nothing for the CT sensors. Homeassistant currently shows all the sensors as 'Unknown'.

Config

substitutions: 
  disp_name: 6C
  update_time: 10s
  current_cal: '27961'
  voltage_cal: '7305'

esphome:
  name: homeenergymeter

esp32:
  board: esp32dev
  framework:
    type: arduino

logger:

api:
  encryption:
    key: "redacted"

ota:
  password: "redacted"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

spi:
  clk_pin: 18
  miso_pin: 19
  mosi_pin: 23

sensor:
  - platform: wifi_signal
    name: ${disp_name} WiFi
    update_interval: 60s

  - platform: atm90e32
    cs_pin: 5
    phase_a:
      voltage:
        name: ${disp_name} Volts A
        id: ic1Volts
        accuracy_decimals: 1
      current:
        name: ${disp_name} CT1 Amps
        id: ct1Amps
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    phase_b:
      current:
        name: ${disp_name} CT2 Amps
        id: ct2Amps
      gain_ct: ${current_cal}
    phase_c:
      current:
        name: ${disp_name} CT3 Amps
        id: ct3Amps
      gain_ct: ${current_cal}
    frequency:
      name: ${disp_name} Freq A
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}

  - platform: atm90e32
    cs_pin: 4
    phase_a:
      voltage:
        name: ${disp_name} Volts B
        id: ic2Volts
        accuracy_decimals: 1
      current:
        name: ${disp_name} CT4 Amps
        id: ct4Amps
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal}
    phase_b:
      current:
        name: ${disp_name} CT5 Amps
        id: ct5Amps
      gain_ct: ${current_cal}
    phase_c:
      current:
        name: ${disp_name} CT6 Amps
        id: ct6Amps
      gain_ct: ${current_cal}
    frequency:
      name: ${disp_name} Freq B
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}  

switch:
  - platform: restart
    name: ${disp_name} Restart

Logs

INFO Reading configuration /config/esphome/homeenergymeter.yaml...
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from homeenergymeter.local using esphome API
INFO Successfully connected to homeenergymeter.local
[13:55:04][I][app:102]: ESPHome version 2022.9.4 compiled on Oct  9 2022, 13:43:41
[13:55:04][C][wifi:502]: WiFi:
[13:55:04][C][wifi:360]:   Local MAC: [redacted]
[13:55:04][C][wifi:361]:   SSID: [redacted]
[13:55:04][C][wifi:362]:   IP Address: [redacted]
[13:55:04][C][wifi:364]:   BSSID: [redacted]
[13:55:04][C][wifi:365]:   Hostname: 'homeenergymeter'
[13:55:04][C][wifi:367]:   Signal strength: -62 dB ▂▄▆█
[13:55:04][C][wifi:371]:   Channel: 6
[13:55:04][C][wifi:372]:   Subnet: 255.255.255.0
[13:55:04][C][wifi:373]:   Gateway: 192.168.1.1
[13:55:04][C][wifi:374]:   DNS1: 8.8.8.8
[13:55:04][C][wifi:375]:   DNS2: 8.8.4.4
[13:55:04][C][logger:275]: Logger:
[13:55:04][C][logger:276]:   Level: DEBUG
[13:55:04][C][logger:277]:   Log Baud Rate: 115200
[13:55:04][C][logger:278]:   Hardware UART: UART0
[13:55:04][C][spi:101]: SPI bus:
[13:55:04][C][spi:102]:   CLK Pin: GPIO18
[13:55:04][C][spi:103]:   MISO Pin: GPIO19
[13:55:04][C][spi:104]:   MOSI Pin: GPIO23
[13:55:04][C][spi:106]:   Using HW SPI: YES
[13:55:04][C][:129]: ATM90E32:
[13:55:04][C][atm90e32:130]:   CS Pin: GPIO5
[13:55:04][E][atm90e32:132]: Communication with ATM90E32 failed!
[13:55:04][C][atm90e32:134]:   Update Interval: 10.0s
[13:55:04][C][atm90e32:135]:   Voltage A '6C Volts A'
[13:55:04][C][atm90e32:135]:     Device Class: 'voltage'
[13:55:04][C][atm90e32:135]:     State Class: 'measurement'
[13:55:04][C][atm90e32:135]:     Unit of Measurement: 'V'
[13:55:04][C][atm90e32:135]:     Accuracy Decimals: 1
[13:55:04][C][atm90e32:136]:   Current A '6C CT1 Amps'
[13:55:04][C][atm90e32:136]:     Device Class: 'current'
[13:55:04][C][atm90e32:136]:     State Class: 'measurement'
[13:55:04][C][atm90e32:136]:     Unit of Measurement: 'A'
[13:55:04][C][atm90e32:136]:     Accuracy Decimals: 2
[13:55:04][C][atm90e32:143]:   Current B '6C CT2 Amps'
[13:55:04][C][atm90e32:143]:     Device Class: 'current'
[13:55:04][C][atm90e32:143]:     State Class: 'measurement'
[13:55:04][C][atm90e32:143]:     Unit of Measurement: 'A'
[13:55:04][C][atm90e32:143]:     Accuracy Decimals: 2
[13:55:04][C][atm90e32:150]:   Current C '6C CT3 Amps'
[13:55:04][C][atm90e32:150]:     Device Class: 'current'
[13:55:04][C][atm90e32:150]:     State Class: 'measurement'
[13:55:04][C][atm90e32:150]:     Unit of Measurement: 'A'
[13:55:04][C][atm90e32:150]:     Accuracy Decimals: 2
[13:55:04][C][atm90e32:156]:   Frequency '6C Freq A'
[13:55:04][C][atm90e32:156]:     State Class: 'measurement'
[13:55:04][C][atm90e32:156]:     Unit of Measurement: 'Hz'
[13:55:04][C][atm90e32:156]:     Accuracy Decimals: 1
[13:55:04][C][atm90e32:156]:     Icon: 'mdi:current-ac'
[13:55:04][C][:129]: ATM90E32:
[13:55:04][C][atm90e32:130]:   CS Pin: GPIO4
[13:55:04][E][atm90e32:132]: Communication with ATM90E32 failed!
[13:55:04][C][atm90e32:134]:   Update Interval: 10.0s
[13:55:04][C][atm90e32:135]:   Voltage A '6C Volts B'
[13:55:04][C][atm90e32:135]:     Device Class: 'voltage'
[13:55:04][C][atm90e32:135]:     State Class: 'measurement'
[13:55:04][C][atm90e32:135]:     Unit of Measurement: 'V'
[13:55:05][C][atm90e32:135]:     Accuracy Decimals: 1
[13:55:05][C][atm90e32:136]:   Current A '6C CT4 Amps'
[13:55:05][C][atm90e32:136]:     Device Class: 'current'
[13:55:05][C][atm90e32:136]:     State Class: 'measurement'
[13:55:05][C][atm90e32:136]:     Unit of Measurement: 'A'
[13:55:05][C][atm90e32:136]:     Accuracy Decimals: 2
[13:55:05][C][atm90e32:143]:   Current B '6C CT5 Amps'
[13:55:05][C][atm90e32:143]:     Device Class: 'current'
[13:55:05][C][atm90e32:143]:     State Class: 'measurement'
[13:55:05][C][atm90e32:143]:     Unit of Measurement: 'A'
[13:55:05][C][atm90e32:143]:     Accuracy Decimals: 2
[13:55:05][C][atm90e32:150]:   Current C '6C CT6 Amps'
[13:55:05][C][atm90e32:150]:     Device Class: 'current'
[13:55:05][C][atm90e32:150]:     State Class: 'measurement'
[13:55:05][C][atm90e32:150]:     Unit of Measurement: 'A'
[13:55:05][C][atm90e32:150]:     Accuracy Decimals: 2
[13:55:05][C][atm90e32:156]:   Frequency '6C Freq B'
[13:55:05][C][atm90e32:156]:     State Class: 'measurement'
[13:55:05][C][atm90e32:156]:     Unit of Measurement: 'Hz'
[13:55:05][C][atm90e32:156]:     Accuracy Decimals: 1
[13:55:05][C][atm90e32:156]:     Icon: 'mdi:current-ac'
[13:55:05][C][restart:022]: Restart Switch '6C Restart'
[13:55:05][C][restart:022]:   Icon: 'mdi:restart'
[13:55:05][C][mdns:100]: mDNS:
[13:55:05][C][mdns:101]:   Hostname: homeenergymeter
[13:55:05][C][ota:089]: Over-The-Air Updates:
[13:55:05][C][ota:090]:   Address: homeenergymeter.local:3232
[13:55:05][C][ota:093]:   Using Password.
[13:55:05][C][api:138]: API Server:
[13:55:05][C][api:139]:   Address: homeenergymeter.local:6053
[13:55:05][C][api:141]:   Using noise encryption: YES
[13:55:05][C][wifi_signal.sensor:009]: WiFi Signal '6C WiFi'
[13:55:05][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[13:55:05][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[13:55:05][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'
[13:55:05][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[13:55:09][D][sensor:127]: '6C WiFi': Sending state -61.00000 dBm with 0 decimals of accuracy
[13:56:09][D][sensor:127]: '6C WiFi': Sending state -62.00000 dBm with 0 decimals of accuracy
[13:57:09][D][sensor:127]: '6C WiFi': Sending state -61.00000 dBm with 0 decimals of accuracy
[13:58:09][D][sensor:127]: '6C WiFi': Sending state -61.00000 dBm with 0 decimals of accuracy
[13:59:09][D][sensor:127]: '6C WiFi': Sending state -61.00000 dBm with 0 decimals of accuracy
[14:00:09][D][sensor:127]: '6C WiFi': Sending state -61.00000 dBm with 0 decimals of accuracy
[14:01:09][D][sensor:127]: '6C WiFi': Sending state -61.00000 dBm with 0 decimals of accuracy
[14:02:09][D][sensor:127]: '6C WiFi': Sending state -61.00000 dBm with 0 decimals of accuracy
[14:03:09][D][sensor:127]: '6C WiFi': Sending state -62.00000 dBm with 0 decimals of accuracy

Max CT mA output - readme says 33mA peak max, but recommended models sold by your company go all the way up to 100mA.

The readme states that the CTs must not exceed 33mA peak output, yet the models suggested go up to 100mA. What is the correct maximum mA output value? I have 30 and 40A 240V (USA) breakers I want to monitor and am trying to pick the correct CTs. I had found datasheets for a 50A 100mA CT and a 50A 50mA CT but am having trouble actually finding them for sale

https://github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/blob/master/README.md

Current Transformers (any combination of the following, or any current transformer that does not exceed 720mV RMS, or 33mA output)
[SCT-006 20A/25mA Micro](https://circuitsetup.us/index.php/product/20a-25ma-micro-current-transformer-yhdc-sct-006-6mm/) (6mm opening - 3.5mm connectors)
[SCT-010 80A/26.6mA Mini](https://circuitsetup.us/index.php/product/80a-26-6ma-mini-current-transformer-yhdc-sct-010-10mm/) (10mm opening - 3.5mm connectors)
[SCT-013-000 100A/50mA](https://circuitsetup.us/index.php/product/100a-50ma-current-transformer-yhdc-sct-013/) (13mm opening - 3.5mm connectors)
[SCT-016 120A/40mA](https://circuitsetup.us/index.php/product/120a-40ma-current-transformer-yhdc-sct-016-with-3-5mm-jack-16mm-opening/) (16mm opening - 3.5mm connectors)
[Magnelab SCT-0750-100](https://amzn.to/2IF8xnY) (screw connectors - must sever burden resistor connection on the back of the board since they have a built in burden resistor).
[SCT-024 200A/100mA](https://www.poweruc.pl/products/split-core-current-transformer-sct024ts-rated-input-400a) (24mm opening - terminal output)
Others can also be used as long as they're rated for the amount of power that you are wanting to measure, and have a current output no more than 720mV RMS, or 33mA at peak output.

Different voltage readings for connected voltage inputs

I'm in the US with split phase 120V/240V AC power. I just set up my first expandable meter, starting with one of my subpanels where all I want to measure right now are a few 240V HVAC appliances which seem to be balanced (all newly wired with 2 wires plus ground, so no neutrals), so I figured I'd be okay with one AC transformer. So I have not cut the jumpers to enable separate transformers (I'll end up doing that for the meter on my main panel). If I understand correctly, that means they are hardwired together, and I should get the same exact reading for V1 and V2. However, I am seeing ~117V for V1 and ~127V for V2. The voltage calibration values in EmonESP are the same for both.

Rev 1.4 add-on board and GPIO35

The rev 1.4 add-on board has changed to GPIO35 for one of the chip select signals. This GPIO cannot be used because it is an input only pin on the ESP32.

It's not a problem for me, I just moved to another chip select. But I thought I should mention it.

Odd Power readings on one CT

I've got one Main Board with two Addon boards stacked on top. All are working fine, with the exception of Addon 1 CT8 (middle left).
The CT Clamp is clamped to monitor an Air Conditioner. With 18 Amps and 230V, I am expecting to see values around 4,000 Watts; however, I am getting very low values (fluctuating between 2W and 80W).
If the Voltage, Frequency and Amps are correct and using the same power and calibration factors for all sensors, what causes this one to misread?
I've changed 3 CT clamps already, and they all produce similar results.

image
image

Power (watts) not calculated for IC2 on addon board

Hello! I just setup my addon board and am running into an issue where the addon board's IC2 is picking up current values but is not calculating any power.
I am measuring 2 voltages with 2 adapters plugged into different phase outlets. I severed the JP13 and JP12 connections on both the mainboard and the addon board.

The instructions don't specifically mention also severing the addon boards so maybe this is where the issue is from? I was speculating to myself that maybe it's an issue of it not getting any voltage so it's calculating based on 0 volts, but I have no idea if that is the case or not.

Both boards are v1.4.

Everything is working fine for CT 1-10. It's only CT 11, 12, and 13 that are doing this.

Any idea what might be going on with this?

Here's a screenshot of what I'm seeing in Home Assistant:
image

I've checked over my yaml a few times now. I don't think I'm missing anything, but here is the the main sensor setup:

sensor:
  - platform: wifi_signal
    name: ${disp_name} WiFi
    update_interval: 60s
#IC1 Main
  - platform: atm90e32
    cs_pin: 5
    frequency:
      name: ${disp_name} Frequency
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}
    chip_temperature: 
      name: ${disp_name} Port 1-3 Chip Temp
    # Port 1
    # MAINS INPUT A
    phase_a:
      voltage:
        name: ${disp_name} Volts A
        id: ic1Volts
        accuracy_decimals: 1
      current:
        name: ${disp_name} CT1 Amps
        id: ct1Amps
        accuracy_decimals: 3
# The max value for current that the meter can output is 65.535. If you expect to measure current over 65A, 
# divide the gain_ct by 2 (120A CT) or 4 (200A CT) and multiply the current and power values by 2 or 4 by uncommenting the filter below
#        filters:
#          - multiply: 2
      power:
        name: ${disp_name} CT1 Watts
        id: ct1Watts
        accuracy_decimals: 2
#        filters:
#          - multiply: 2
      reactive_power:
        name: ${disp_name} CT1 Reactive Power
        id: ct1ReactivePower
      power_factor:
        name: ${disp_name} CT1 Power Factor
        id: ct1PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_120A}
    # Port 2
    # ELECTRIC RANGE A
    phase_b:
      current:
        name: ${disp_name} CT2 Amps
        id: ct2Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT2 Watts
        id: ct2Watts
        accuracy_decimals: 2
      reactive_power:
        name: ${disp_name} CT2 Reactive Power
        id: ct2ReactivePower
      power_factor:
        name: ${disp_name} CT2 Power Factor
        id: ct2PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_80A}
    # Port 3
    # WATER HEATER A
    phase_c:
      current:
        name: ${disp_name} CT3 Amps
        id: ct3Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT3 Watts
        id: ct3Watts
        accuracy_decimals: 2
      reactive_power:
        name: ${disp_name} CT3 Reactive Power
        id: ct3ReactivePower
      power_factor:
        name: ${disp_name} CT3 Power Factor
        id: ct3PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_80A}

# #IC2 Main
  - platform: atm90e32
    cs_pin: 4
    # frequency:
    #   name: ${disp_name} Port 4-6 Frequency
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}
    chip_temperature: 
      name: ${disp_name} Port 4-6 Chip Temp
    # Port 4
    # MAINS INPUT B
    phase_a:
      voltage:
        name: ${disp_name} Volts B
        id: ic2Volts
        accuracy_decimals: 1
      current:
        name: ${disp_name} CT4 Amps
        id: ct4Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT4 Watts
        id: ct4Watts
      reactive_power:
       name: ${disp_name} CT4 Reactive Power
       id: ct4ReactivePower
      power_factor:
        name: ${disp_name} CT4 Power Factor
        id: ct4PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_120A}
    # Port 5
    # WASHER/DRYER
    phase_b:
      current:
        name: ${disp_name} CT5 Amps
        id: ct5Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT5 Watts
        id: ct5Watts
        accuracy_decimals: 2
      reactive_power:
        name: ${disp_name} CT5 Reactive Power
        id: ct5ReactivePower
      power_factor:
        name: ${disp_name} CT5 Power Factor
        id: ct5PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_80A}
    # Port 6
    # ELECTRIC RANGE B
    phase_c:
      current:
        name: ${disp_name} CT6 Amps
        id: ct6Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT6 Watts
        id: ct6Watts
      reactive_power:
       name: ${disp_name} CT6 Reactive Power
       id: ct6ReactivePower
      power_factor:
        name: ${disp_name} CT6 Power Factor
        id: ct6PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_80A}
        

#IC1 AddOn 1
  - platform: atm90e32
    cs_pin: 0
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}
    # frequency:
    #   name: ${disp_name} Port 7-9 Frequency
    chip_temperature: 
      name: ${disp_name} Port 7-9 Chip Temp
    #Port 7
    # HVAC UNIT 1 A
    phase_a:
      current:
        name: ${disp_name} CT7 Amps
        id: ct7Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT7 Watts
        id: ct7Watts
        accuracy_decimals: 2
      reactive_power:
        name: ${disp_name} CT7 Reactive Power
        id: ct7ReactivePower
      power_factor:
        name: ${disp_name} CT7 Power Factor
        id: ct7PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_80A}
    # Port 8
    # HVAC UNIT 2 A
    phase_b:
      current:
        name: ${disp_name} CT8 Amps
        id: ct8Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT8 Watts
        id: ct8Watts
        accuracy_decimals: 2
      reactive_power:
        name: ${disp_name} CT8 Reactive Power
        id: ct8ReactivePower
      power_factor:
        name: ${disp_name} CT8 Power Factor
        id: ct8PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_80A}
    # Port 9
    # BEDROOM / OFFICE OUTLETS
    phase_c:
      current:
        name: ${disp_name} CT9 Amps
        id: ct9Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT9 Watts
        id: ct9Watts
      reactive_power:
       name: ${disp_name} CT9 Reactive Power
       id: ct9ReactivePower
      power_factor:
        name: ${disp_name} CT9 Power Factor
        id: ct9PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_80A}

#IC2 AddOn 1
  - platform: atm90e32
    cs_pin: 16
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}
    # frequency:
    #   name: ${disp_name} Port 10-12 Frequency
    chip_temperature: 
      name: ${disp_name} Port 10-12 Chip Temp
    #Port 10
    # WATER HEATER B
    phase_a:
      current:
        name: ${disp_name} CT10 Amps
        id: ct10Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT10 Watts
        id: ct10Watts
        accuracy_decimals: 2
      reactive_power:
        name: ${disp_name} CT10 Reactive Power
        id: ct10ReactivePower
      power_factor:
        name: ${disp_name} CT10 Power Factor
        id: ct10PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_80A}
    # Port 11
    # HVAC UNIT 1 B
    phase_b:
      current:
        name: ${disp_name} CT11 Amps
        id: ct11Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT11 Watts
        id: ct11Watts
        accuracy_decimals: 2
      reactive_power:
        name: ${disp_name} CT11 Reactive Power
        id: ct11ReactivePower
      power_factor:
        name: ${disp_name} CT11 Power Factor
        id: ct11PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_80A}
    # Port 12
    # HVAC UNIT 2 B
    phase_c:
      current:
        name: ${disp_name} CT12 Amps
        id: ct12Amps
        accuracy_decimals: 3
      power:
        name: ${disp_name} CT12 Watts
        id: ct12Watts
      reactive_power:
       name: ${disp_name} CT12 Reactive Power
       id: ct12ReactivePower
      power_factor:
        name: ${disp_name} CT12 Power Factor
        id: ct12PowerFactor
      gain_voltage: ${voltage_cal}
      gain_ct: ${current_cal_80A}

gerber files

hello can annybody help me i tried to make the gerber files of the 3 pcb but eagle showing corrupted files
can annybody send me the 3 gerber files of the pcb thank you

Can I monitor voltage on both phases of a split-phase 240v residential feed at <= 5s intervals?

Maybe this answer is buried in the documentation somewhere but I haven't found it (yet).
I am led to this project by my need to monitor my incoming voltage for sags & swells. I need to accumulate incoming voltage data to present to my utility to demonstrate that there is a loose neutral somewhere upstream of my meter (neighbor sees the same issue). Once I get that solved, I will be like the rest of your users and monitor my power consumption.
I currently have borrowed Siemens 9630 power meter and record the RMS L-N voltage every 5 sec. To determine if the issue is load-dependent, I need CTs for the meter but there are no (affordable) split-core ones that can be used with the 9630 and I am not willing to pull the meter & disconnect the mains so I can install (affordable) CTs.
This project looks like what I need (current and future) as long as I can sample/monitor line voltage and log min and max and potentially pull that data with Node-Red or push to InfluxDB and use Grafana. I'd like at least 5s reporting intervals, perhaps faster and I can average those samples elsewhere.
I considered making a voltage monitor with an ESP32 and a bunch of AC-to-RMS chips but you've already done the heavy lifting and I should support that before re-inventing the wheel.
The attached graphic is what I am seeing and it is not healthy for my appliances.
Incoming voltage 06-Jan-22

Voltage and VAR Discrepancy/Non-Zeros on no current

Just got my 2x 6 channel setup (all components from CircuitSetup store) and wondering about some data I'm getting. Not sure if I'm missing something or what. My setup is with a 60W incandescent light bulb for test and calibration. Kill-A-Wat is reading 0.43A, 51.8W @ 118.2V. All of the CT clamps are on the hot wire for the bulb for testing.

CT1 - CT2: 200A CT (SCT-024)
CT3 - CT12: 80A CT (SCT-010)

As you can see in the first screenshot, the Current and Power look pretty good, however the Voltage and Reactive Power have quite a range.
Image1

In the second screenshot, this is with the bulb completely unplugged, no current at all. As you can see, quite a few non-zero values.
Image2

Questions:

  1. What would cause the VAR to have such a swing in readings from the
    same source?
  2. The variance in voltage, is that just due to the
    polling frequency of ESPHome? With just the one reference voltage, I was expecting the ports on the same chip to read the same voltage
  3. With no current, what would cause so many values to be non-zero?

ESPHome YAML below for reference.

Thanks in advance!

substitutions:
  device_name: power_panel_meter
  friendly_name: Power Panel Meter
  update_time: 10s
  voltage_cal: '7344'
esphome:
  name: ${device_name}
  platform: ESP32
  board: nodemcu-32s
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
logger:
api:
ota:
web_server:
spi:
  clk_pin: 18
  miso_pin: 19
  mosi_pin: 23
#IC1 Main
  - platform: atm90e32
    cs_pin: 5
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}
    frequency:
      name: ${friendly_name} Port 1-3 Frequency
    chip_temperature: 
      name: ${friendly_name} Port 1-3 Chip Temp
    #Port 1
    phase_a:
      voltage:
        name: ${friendly_name} CT1 Voltage
      current:
        name: ${friendly_name} CT1 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT1 Power 
      reactive_power:
        name: ${friendly_name} CT1 Reactive Power
      power_factor:
        name: ${friendly_name} CT1 Power Factor   
      gain_voltage: 7344
      gain_ct: 29532  
    #Port 2 
    phase_b:
      voltage:
        name: ${friendly_name} CT2 Voltage
      current:
        name: ${friendly_name} CT2 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT2 Power 
      reactive_power:
        name: ${friendly_name} CT2 Reactive Power
      power_factor:
        name: ${friendly_name} CT2 Power Factor     
      gain_voltage: 7344
      gain_ct: 34105
    #Port 3
    phase_c:
      voltage:
        name: ${friendly_name} CT3 Voltage
      current:
        name: ${friendly_name} CT3 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT3 Power
      reactive_power:
        name: ${friendly_name} CT3 Reactive Power
      power_factor:
        name: ${friendly_name} CT3 Power Factor
      gain_voltage: 7344
      gain_ct: 41660
#IC2 Main
  - platform: atm90e32
    cs_pin: 4
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}
    frequency:
      name: ${friendly_name} Port 4-6 Frequency
    chip_temperature: 
      name: ${friendly_name} Port 4-6 Chip Temp
    #Port 4
    phase_a:
      voltage:
        name: ${friendly_name} CT4 Voltage
      current:
        name: ${friendly_name} CT4 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT4 Power 
      reactive_power:
        name: ${friendly_name} CT4 Reactive Power
      power_factor:
        name: ${friendly_name} CT4 Power Factor 
      gain_voltage: 7344
      gain_ct: 41660
    #Port 5 
    phase_b:
      voltage:
        name: ${friendly_name} CT5 Voltage
      current:
        name: ${friendly_name} CT5 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT5 Power 
      reactive_power:
        name: ${friendly_name} CT5 Reactive Power
      power_factor:
        name: ${friendly_name} CT5 Power Factor  
      gain_voltage: 7344
      gain_ct: 41660
    #Port 6
    phase_c:
      voltage:
        name: ${friendly_name} CT6 Voltage
      current:
        name: ${friendly_name} CT6 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT6 Power
      reactive_power:
        name: ${friendly_name} CT6 Reactive Power
      power_factor:
        name: ${friendly_name} CT6 Power Factor
      gain_voltage: 7344
      gain_ct: 41660
#IC1 AddOn 1
  - platform: atm90e32
    cs_pin: 0
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}
    frequency:
      name: ${friendly_name} Port 7-9 Frequency
    chip_temperature: 
      name: ${friendly_name} Port 7-9 Chip Temp    
    #Port 7
    phase_a:
      voltage:
        name: ${friendly_name} CT7 Voltage
      current:
        name: ${friendly_name} CT7 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT7 Power 
      reactive_power:
        name: ${friendly_name} CT7 Reactive Power
      power_factor:
        name: ${friendly_name} CT7 Power Factor
      gain_voltage: 7344
      gain_ct: 41660
    #Port 8
    phase_b:
      voltage:
        name: ${friendly_name} CT8 Voltage
      current:
        name: ${friendly_name} CT8 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT8 Power 
      reactive_power:
        name: ${friendly_name} CT8 Reactive Power
      power_factor:
        name: ${friendly_name} CT8 Power Factor
      gain_voltage: 7344
      gain_ct: 41660
    #Port 9
    phase_c:
      voltage:
        name: ${friendly_name} CT9 Voltage
      current:
        name: ${friendly_name} CT9 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT9 Power
      reactive_power:
        name: ${friendly_name} CT9 Reactive Power
      power_factor:
        name: ${friendly_name} CT9 Power Factor
      gain_voltage: 7344
      gain_ct: 41660
#IC2 AddOn 1
  - platform: atm90e32
    cs_pin: 16
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}
    frequency:
      name: ${friendly_name} Port 10-12 Frequency
    chip_temperature: 
      name: ${friendly_name} Port 10-12 Chip Temp  
    #Port 10
    phase_a:
      voltage:
        name: ${friendly_name} CT10 Voltage
      current:
        name: ${friendly_name} CT10 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT10 Power 
      reactive_power:
        name: ${friendly_name} CT10 Reactive Power
      power_factor:
        name: ${friendly_name} CT10 Power Factor
      gain_voltage: 7344
      gain_ct: 41660
    #Port 11
    phase_b:
      voltage:
        name: ${friendly_name} CT11 Voltage
      current:
        name: ${friendly_name} CT11 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT11 Power 
      reactive_power:
        name: ${friendly_name} CT11 Reactive Power
      power_factor:
        name: ${friendly_name} CT11 Power Factor
      gain_voltage: 7344
      gain_ct: 41660
    #Port 12
    phase_c:
      voltage:
        name: ${friendly_name} CT12 Voltage
      current:
        name: ${friendly_name} CT12 Current
        accuracy_decimals: 3
      power:
        name: ${friendly_name} CT12 Power
      reactive_power:
        name: ${friendly_name} CT12 Reactive Power
      power_factor:
        name: ${friendly_name} CT12 Power Factor
      gain_voltage: 7344
      gain_ct: 41660

Missing a ;

I just compiled the 6 channel and in the Energy_Meter.cpp, line 347 is missing a semicolon. Line 347 should be like this:

totalCurrent += AddOn1_totalCurrent;

Expandable 6 Channel ESP32 Energy Meter Add-on Board

I got my Expandable 6 Channel ESP32 Energy Meter Main Board up and running well then realized I needed more channels :>) I added the Expandable 6 Channel ESP32 Energy Meter Add-on Board that is providing data on channels 10, 11 & 12 but not giving data on on channels 7, 8 & 9. I am using the supplied "6chan_energy_meter-add-on_jp8-jp11.yaml" and have tried moving my CT's around but still unable to get anything on 7, 8 & 9. What could I be doing wrong?

I am using ESPHome and viewing data via HomeAssistant. Any feedback would be much appreciated.

Importing data to the energy dashboard

so im not sure where to put the code for kwh
#Total kWh

  • platform: total_daily_energy
    name: ${disp_name} Total kWh
    power_id: totalWatts
    filters:
    • multiply: 0.001
      unit_of_measurement: kWh
      time:
  • platform: sntp
    id: sntp_time

like does it go into the programing in esp home or does it go in my configuration file on home assistant im just confused cause wherever i put it i get errors

Reboot Loop with ESP32 emon

Can you tell me why I get this continuing loop?

ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4
Starting AP
WiFi interface ready
WiFi client started
E (6693) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (6693) task_wdt: - loopTask (CPU 1)
E (6693) task_wdt: Tasks currently running:
E (6693) task_wdt: CPU 0: IDLE0
E (6693) task_wdt: CPU 1: IDLE1
E (6693) task_wdt: Aborting.
abort() was called at PC 0x4016fe84 on core 0

ELF file SHA256: 0000000000000000

Backtrace: 0x4008880c:0x3ffbf8f0 0x40088a89:0x3ffbf910 0x4016fe84:0x3ffbf930 0x40086f81:0x3ffbf950 0x401867af:0x3ffbca10 0x401717ff:0x3ffbca30 0x4008b249:0x3ffbca50 0x40089a9a:0x3ffbca70

Rebooting...

Feature request: EmonESP change sampling rate

Would it be possible to add the option to adjust the sampling rate on the EmonESP via the web access? Currently it is doing every second which is crating 1000's of data points. If not do I just add a delay in the emoncms.cpp?

Thanks,
Matt

wrong value power factor !!

I use the counter with the ES32 , I have a problem with the power factor sometimes for loads I have the right value, sometimes for other loads I have a lower value !!!
for example i should have 0.98 but the function eic.GetPowerFactorA() return 0.52
how do i solve this problem?

phase_a, phase_b, phase_c nomenclature

I may be overthinking this, but shouldn't phase_a, phase_b and phase_c nomenclature really be channel_a, channel_b and channel_c for each ATM90E32 IC as each input is on the same phase (CT1, CT2 and CT3 on supply voltage and CT4, CT5 and CT6 on VA2 assuming JP12/JP13 severed)?

Chip selects in the 36 channel example

These don't appear to be right, i get an error on the 35 as
ESP32: GPIO35 (34-39) can only be used as an input pin.

and 27 doesn't appear in the expansion board J4 and J7 schematics pinouts.

...
#IC1 AddOn 2
  - platform: atm90e32
    cs_pin: 27  <==== perhaps 2?
...
#IC1 AddOn 3
  - platform: atm90e32
    cs_pin: 35  <==== perhaps 12?
...

I ran into some other quirks, not sure if I don't understand something or if my hardware is acting up. Main board and 3 expansion boards and new ESP32.

First configured with the chip selects for the three boards you sent:
0/16 2/17 12/21

Result:
IO12 did not respond (blank states displayed for the 3 CT inputs on the third expansion board, first atm90e32)

Changed chip selects to:
0/16 2/17 13/21

Result:
IO13 responded but problem moved to IO2 (blank states displayed for the 3 CT inputs on the second expansion board, first atm90e32) -- weird?

Changed chip selects to
0/16 2/17 15/21

Result:
IO15 responded but IO2 did not respond (blank states for the 3 CT inputs on the second expansion board, first atm90e32)

Changed chip selects to
0/16 14/17 15/21

Result:
This set of chip selects works and all states are reported by ESPHome. I'll live with this for now but sure would like to know if this a software or hardware issue.

How to properly connect current transformers to each input

Hi, I want to use the 6 channel meter to measure the following:

  • Input of the house, split phase (2x clamps)
  • Washer/Dryer breaker, split phase (2x clamps)
  • breaker #3 (1 clamp)
  • breaker #4 (1 clamp)

I started by connecting it as follows:

  • Chip 1:
    • Phase A: whole house phase 1
    • Phase B: whole house phase 2 (inverted clamp).
    • Phase C: breaker #3
  • Chip 2:
    • Phase A: washer/dryer phase 1
    • Phase B: washer/dryer phase 2 (inverted clamp).
    • Phase C: breaker #4

I get proper readings for the whole house and for the washer/dryer, but I get 0A for the two separate breakers. I want to understand what I'm doing wrong before I open the electric panel again.

Is the third measurement on each chip supposed to be in the same phase as the other two? I took it off the panel and tried each input separately with a resistive load and it reads correctly on every port/input, and power is always a positive number.

Board Version Compatibility

I have a v1.2 board up and running.

I have an EU 220V 3 phase supply in my house. I have read that to properly monitor the supply and my 3 phase equipment I need to stack two boards. Two boards will be useful in any event as my supply is not as good as I would like and it is common to find >20v variations across the phases which I'd like to track independently.

If I now purchase a new board from you it will be v1.x (1.4?) that you will send to me.

Does v1.2 stack with the current version (physically and in terms of components), OR, do I need to order two new boards to complete my set-up.

Thanks
John.

Power supply glitch

I have two energy meters, one with no add-on boards and one with 3 add-on boards. On the unit with 3 add-on boards the unit has been locking up and would require a power cycle to work again. The other unit has not locked up. I suspected the difference was the current draw from one vs the other.

In diagnosing this issue I have been looking at the power supplies as a source of the problem. I have captured the signals with my scope as shown below. Yellow is the 3.3V at C36 (AC coupled). Red is the rectified incoming voltage at C33. Blue is the un-rectified voltage at J4. The lower yellow trace is a zoom of the glitch event.

It can be seen that the 3.3V supply has a glitch due to the voltage at C33 dropping too far. This seems to happen during a period of high current draw (likely WiFi transmission). The incoming voltage in blue seems fine so I don't believe it is a line voltage problem.

LeCroy90

I have added an additional 100uF to C33 and I have not observed a lock up after that. To be clear the captured waveforms are with an unmodified unit.

I know board space is limited but I'm actually not even sure an additional 100uF is sufficient. The industry accepted standard for hold up time is one cycle, or 16.7 ms at 60 Hz (even worse at 50 Hz). If the input power lost a cycle (e.g. switching to battery backup) while the WiFi were transmitting, I would guess 200uF is not sufficient for this scenario. In addition, it is possible to add 3 more add-on boards, further increasing the current draw and the need for more capacitance.

I hope my comments do not come across as overly critical. Thanks for your time!

Components/Hardware Details

hi there,

I need your help!
Which hardware do you have select?
Do you have details or maybe a datasheet/shopping link?
The BOM list is missing up to several components.

best regards
kim

Sensors reading with a very small negative value

Hello, I am using your 6C main board to read the energy through four different lines in my power box. AC for upstairs, AC for downstairs, washing machine, and dryer. I've got everything configured and working well, except for one issue I cant seem to figure out.

When the appliances are currently "off", the 6C unit is sending a very small negative value in the watts sensor. I would ignore this except it gets amplified up to the kWh reading and therefore the energy cost reading in the Energy dashboard within Home Assistant.

I've triple checked my yaml within ESPHome and everything seems to be correct, it's mostly the same copied from your example file.

What can I do to make this value absolute?

I'm using all four "100A/50ma SCT-013-000" clamps. When the appliances turn on, I get a positive watt reading, so the issue is not that the clamps are on backwards (I've double checked that).

What is interesting is that when one of my AC units is running, all the values are in the positive. Image below:

image

But when no appliance is running, watt values are slightly negative.

image

emonESP won't stay connected to wifi

Hi! I've been trying to figure this out all day, I think maybe the device watchdog is being fired but I don't know how to prove it.

When I connect the usb cable and watch the output in the arduino serial monitor, it runs just fine for hours.

As soon as I disconnect the serial cable the device appears to reset every 10 seconds or so (hard to figure out exactly)

I ended up hard coding the AP information and disabling the part that loads it from EEPROM and i can see the device connect and disconnect from my router now.

But I have no idea how to keep it connected, or what's causing it to disconnect.

I'm trying to use emonESP loaded through Arduino, and only want to send MQTT information

Feature requests: EmonESP

Not sure the best place to document this so I put it here.

I'd like to request a few features for the EmonESP software. I have been using the ESPHome software because I require the configuration options but I have these issues:

  • I am quickly running into stack overflow issues and I already need to limit the number of things I report.
  • I don't like the necessity of recompiling for every change.
  • It's very cumbersome handling the data in Home Assistant. With Emoncms it is easier to manage this kind of data.

Mainly I would like more flexibility in the configuration of EmonESP:

  • Allow for setting the calibration constant individually for each input on each add-on board
  • Allow for configuring an arbitrary multiplier for each current and power report
  • Allow for easily setting the ADC PGA for each input (split the bits of the register for ease of use)
  • Report power and power factor (in addition to current) for each input

Thanks for reading!

Issue with <esp_task_wdt.h> and a Wifi Redeclaration

Just pulled newest version and trying to build via platformio. getting an error that it cant find <esp_task_wdt.h> which doesnt make sense since its part of arduino-esp32.
It appears to be looking for the feedLoopWDT which i dont see declared anywhere:
src/http.cpp:78:19: error: 'feedLoopWDT' was not declared in this scope
Also getting two other interesting issues that dont seem to make sense.

src/http.cpp:59:51: error: no matching function for call to 'BearSSL::WiFiClientSecure::connect(const char*&, int&, int)'

Power mismatch

I'm using esphome with my CircuitSetup 6 channel meter to monitor my home power usage. I live in the USA, with split phase 120V/240V. I have one phase of the mains connected to a CT but I cannot fit a second CT in my rat's nest of a panel right now, so I am concentrating on tracking particular loads instead.

For example, my home AC compressor uses 240V. I have a CT on only one of the legs of this appliance. Right now it is reporting a current of 19.10A and a power usage of 1814.44W. My single voltage sensor reports 121.3V. I happen to know (from another monitoring system) that the other phase of my power is considerably lower, around 116V. Still, the split phase voltage should be ~237V. Given this, I would expect 19.1A * 237V to give an apparent power of 4526W. Given the reported (I presume) real power of 1817W, that's a power factor of 0.4. Now I know the power factor of inductive loads can be pretty poor, but I find myself surprised that it would be that bad.

For another example, I have my electric resistive stove (with a presumed power factor of 1) connected through a different CT. That one is reading 35.72A when the stove is on, but only 4285W. I would expect it to read closer to 237V * 36A => 8532W.

So, how does power calculation work in this system? Why am I seeing such strange values? And how can I get some more confidence in these readings?

Here is my esphome yaml config.
esp_powermeter.yaml.txt

Here are the readings I'm receiving.
2022-05-10-174133_500x910_scrot

Can't calibrate - won't read 0 amps

I'm either missing something in the documentation or something is going on with my board. After I get my calibration tuned in on a 60w light bulb, the amperage is wrong when turning the bulb off. With no current flowing, it reads about 0.2 amps. Turning the light on again yields (accurately) 0.44(ish) amps. Completely unplugging the CT clamp from the board yields 0.2 amps as well.

I have v1.3 of the 6 channel hardware and haven't altered it in any way. Looks like JP8-11 are not connected. I'm using esphome like so:

- platform: atm90e32
    cs_pin: 5
    phase_a:
      voltage:
        name: "Volts A"
        id: "ic1Volts"
        accuracy_decimals: 1
      current:
        name: "CT1 Amps"
        id: "ct1Amps"
        accuracy_decimals: 3
# Voltage using a 12VAC power transformer
      gain_voltage: 7063
# Current calibration using a 100A/50ma SCT-013-000
      gain_ct: 18874
    phase_b:
      current:
        name: "CT2 Amps"
        id: "ct2Amps"
# If the wattage is backwards due to the phase 180 degrees from the clamp direction
#        filters:
#          - multiply: -1.0
      gain_ct: 18874
    frequency:
      name: "Freq"
    line_frequency: 60Hz
    gain_pga: 1X
    update_interval: ${update_time}

Any idea what I'm doing wrong here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.