-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CT1-3 not reporting with warning about atm90e32.sensor operation time #189
Comments
Update, I've also flashed a LILYGO T-ETH-Lite-ESP32-S3 and attempted the same thing and am getting the same behavior. CT4-6 work, CT1-3 don't. |
Have you tried configuring the first chip to use a different CS line? |
Can I specify any unused GPIO pin as a cs_pin? (keeping in mind that I'm using the configs directly from this repo and on the board directly from the store, so if cs_pin 5 is not advised, then the repo should not specify that as the pin to use). That said, the 2nd board (the Lilygo one) doesn't have that warning. Here's it's config + logs: # CircuitSetup 6 Channel Energy Meter Main Board example config
substitutions:
# Change the disp_name to something you want
disp_name: Energy Meter
friendly_name: CircuitSetup Energy Meter
# 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
# 50A/16.6mA SCT-010: 41334
# 80A/26.6mA SCT-010: 41660
# 100A/50ma SCT-013-000: 27518
# 120A/40mA: SCT-016: 41787
# 200A/100mA SCT-024: 27518
# 200A/50mA SCT-024: 55036
current_cal: '41660'
# Jameco 9VAC Transformer:
# For meter versions:
# >= v1.3: 7305
voltage_cal: '7305'
esphome:
name: energy-meter
friendly_name: "${friendly_name}"
project:
name: circuitsetup.6c-energy-meter-main
version: "1.4.1"
esp32:
board: esp32s3box
framework:
type: arduino
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
captive_portal:
esp32_improv:
# Sets up Bluetooth LE to allow the user
# to provision wifi credentials to the device.
authorizer: none
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
- platform: esphome
dashboard_import:
package_import_url: github://circuitsetup/Expandable-6-Channel-ESP32-Energy-Meter/Software/ESPHome/6chan_energy_meter_main_board.yaml@master
import_full_config: true
web_server:
port: 80
spi:
clk_pin: 7
miso_pin: 5
mosi_pin: 6
sensor:
- platform: wifi_signal
name: ${disp_name} WiFi
update_interval: 60s
#IC1
- platform: atm90e32
cs_pin: 8
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: 60Hz
gain_pga: 1X
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: 60Hz
gain_pga: 1X
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
device_class: current
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
device_class: power
update_interval: ${update_time}
#kWh
- platform: total_daily_energy
name: ${disp_name} Total kWh
power_id: totalWatts
filters:
- multiply: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
switch:
- platform: restart
name: ${disp_name} Restart
time:
- platform: sntp
id: sntp_time
|
You select the CS for each of the 2 ICs with a jumper. The jumper selection must match what you have in the YAML. Just try a different one and make sure it matches your jumpers. |
True... Then I still believe you have an issue with the GPIO 5 on your ESP32 variant. But my knowledge of ESP32 is too shallow to help you further. |
I'd agree, but given that both ESP32's (from different mfg with different firmwares) have the same issue, i'm leaning towards it being the main board. I suppose I could breadboard the first one so that I could move the pin that way. But 2 different boards with the same issue? That seems less likely. I'm hoping @CircuitSetup will see this and respond with some further diagnostics I can take. |
The I don't think it would matter in this case, since you're getting connected with GPIO 4 with the Lilygo T-eth board, but take a look at the ethernet example, it uses software SPI, and a compile with the esp-idf. Try that just to make sure there isn't something limiting on the hardware SPI bus. You very well may have a defective meter. If that's the case I'll get you a replacement. |
Sadly no dice. Used the given example: esp32:
board: esp32s3box
variant: esp32s3
framework:
type: esp-idf
#.... cut.....
spi:
interface: software
clk_pin: 7
miso_pin: 5
mosi_pin: 6
sensor:
- platform: wifi_signal
name: ${disp_name} WiFi
update_interval: 60s
#IC1
- platform: atm90e32
cs_pin: 8
phase_a:
voltage:
|
Okay, please open a ticket on circuitsetup.us so I can get you a replacement meter. |
Recently started tinkering with my newly arrived board. It's a v1.4 rev 1.
I have a Aokin ESP32 ESP-32S NodeMCU-32s board hooked up and flashed with ESPHome using the sample from this repo for the main board with no alterations other than the wifi config and setting the current_cal to the be the appropriate one for the CTs (SCT-010).
The board boots fine and reports CT4-6, but does not report CT1-3. It has these warnings in it:
Since only half of these are reporting
For reference here's the yaml and logs:
And the logs:
The text was updated successfully, but these errors were encountered: