Hi all, wanted to share a small issue I was having with th I2C interfaces. I initially tried GPIO pins 8 and 9 to control the SCD30. This worked for about 3-4 minutes, and then sensor starting timing out and hanging the esp32 device. I then tried various other GPIOS, including 43&44, 11&12, but was faced with the same issue. I have 2 kits, so I know it was some sort of configuration issue. I finally tried pins 1&2 and this did the trick. Both are stable. Here is the yaml contents for anyone interested:
Yeah I was actually pointing out that there should be no difference between the first and second set of GPIOs used. Other than GPIO0 being a potentially dangerous choice.
Thanks for the comments. I have one working set (S3+SCD30) using pins 1 and 2. However on the second set (also using pins 1 and 2), I seem to have lost both my USB ports (com, and jtag). When I plug in using the COM port, I get the error that the USB device is not recognized and canât retreive logs from the device through wi-fi. Using the other USB port, nothing happens. I can still flash the unit and collect logs over wi-fi using Esphome. In this âbadâ unit, it may work for a minute or 2 but then start to timeout. It sometimes also becomes unresponsive as well but I can ping it. The tx LED is always green? It seems to flash now and then? Which pins would you recommend for I2C connections? edit: Forgot to mention that the reset button no longer seems to work. In the log after power down/up, I sometimes get the error: reset failed, will go into safe mode after 8 failures
Log of bad set:
NFO ESPHome 2023.7.1
INFO Reading configuration /config/esphome/esphome-web-2fb0d8.yamlâŚ
INFO Starting log output from esphome-web-2fb0d8.local using esphome API
WARNING Canât connect to ESPHome API for esphome-web-2fb0d8.local: Error connecting to (â192.168.2.180â, 6053): [Errno 111] Connect call failed (â192.168.2.180â, 6053) (SocketAPIError)
INFO Trying to connect to esphome-web-2fb0d8.local in the background
INFO Successfully connected to esphome-web-2fb0d8.local
[11:30:51][I][app:102]: ESPHome version 2023.7.1 compiled on Aug 11 2023, 11:13:02
[11:30:51][C][wifi:543]: WiFi:
[11:30:51][C][wifi:379]: Local MAC: 48:27:E2:2F:B0:D8
[11:30:51][C][wifi:380]: SSID: âace-2.4â[redacted]
[11:30:51][C][wifi:381]: IP Address: 192.168.2.180
[11:30:51][C][wifi:383]: BSSID: 00:03:7F:82:46:76[redacted]
[11:30:51][C][wifi:384]: Hostname: âesphome-web-2fb0d8â
[11:30:51][C][wifi:386]: Signal strength: -26 dB ââââ
[11:30:51][C][wifi:390]: Channel: 6
[11:30:51][C][wifi:391]: Subnet: 255.255.255.0
[11:30:51][C][wifi:392]: Gateway: 192.168.2.2
[11:30:51][C][wifi:393]: DNS1: 192.168.2.2
[11:30:51][C][wifi:394]: DNS2: 0.0.0.0
[11:30:51][C][logger:301]: Logger:
[11:30:51][C][logger:302]: Level: DEBUG
[11:30:51][C][logger:303]: Log Baud Rate: 115200
[11:30:51][C][logger:305]: Hardware UART: UART0
[11:30:51][C][i2c.arduino:053]: I2C Bus:
[11:30:51][C][i2c.arduino:054]: SDA Pin: GPIO1
[11:30:51][C][i2c.arduino:055]: SCL Pin: GPIO2
[11:30:51][C][i2c.arduino:056]: Frequency: 50000 Hz
[11:30:51][C][i2c.arduino:059]: Recovery: bus successfully recovered
[11:30:51][I][i2c.arduino:069]: Results from i2c bus scan:
[11:30:51][I][i2c.arduino:075]: Found i2c device at address 0x61
[11:30:51][C][scd30:120]: scd30:
[11:30:51][C][scd30:121]: Address: 0x61
[11:30:51][C][scd30:139]: Altitude compensation: OFF
[11:30:51][C][scd30:143]: Automatic self calibration: ON
[11:30:51][C][scd30:144]: Ambient pressure compensation: 0mBar
[11:30:51][C][scd30:145]: Temperature offset: 0.00 °C
[11:30:51][C][scd30:146]: Update interval: 60s
[11:30:51][C][scd30:147]: CO2 âCO2 Sensor 2â
[11:30:51][C][scd30:147]: Device Class: âcarbon_dioxideâ
[11:30:51][C][scd30:147]: State Class: âmeasurementâ
[11:30:51][C][scd30:147]: Unit of Measurement: âppmâ
[11:30:51][C][scd30:147]: Accuracy Decimals: 1
[11:30:51][C][scd30:147]: Icon: âmdi:molecule-co2â
[11:30:51][C][scd30:148]: Temperature âTemperature 2â
[11:30:51][C][scd30:148]: Device Class: âtemperatureâ
[11:30:51][C][scd30:148]: State Class: âmeasurementâ
[11:30:51][C][scd30:148]: Unit of Measurement: â°Câ
[11:30:51][C][scd30:148]: Accuracy Decimals: 2
[11:30:51][C][scd30:149]: Humidity âHumidity 2â
[11:30:51][C][scd30:149]: Device Class: âhumidityâ
[11:30:51][C][scd30:149]: State Class: âmeasurementâ
[11:30:51][C][scd30:149]: Unit of Measurement: â%â
[11:30:51][C][scd30:149]: Accuracy Decimals: 1
[11:30:51][C][captive_portal:088]: Captive Portal:
[11:30:51][C][mdns:112]: mDNS:
[11:30:51][C][mdns:113]: Hostname: esphome-web-2fb0d8
[11:30:51][C][ota:093]: Over-The-Air Updates:
[11:30:51][C][ota:094]: Address: esphome-web-2fb0d8.local:3232
[11:30:51][C][api:138]: API Server:
[11:30:51][C][api:139]: Address: esphome-web-2fb0d8.local:6053
[11:30:51][C][api:141]: Using noise encryption: YES
[11:30:54][W][component:204]: Component scd30.sensor took a long time for an operation (0.06 s).
[11:30:54][W][component:205]: Components should block for at most 20-30ms.
[11:30:56][W][component:204]: Component scd30.sensor took a long time for an operation (1.00 s).
[11:30:56][W][component:205]: Components should block for at most 20-30ms.
[11:30:57][W][component:204]: Component scd30.sensor took a long time for an operation (1.00 s).
[11:30:57][W][component:205]: Components should block for at most 20-30ms.
I have 2 separate units: ESP32-S3+SCD30 (1), ESP32-S3+SCD30 (2). Both the units were having timeout issues when using pins other than 1 & 2. One unit is âperfectâ. It ran all night and no issues this morning. The second unit is having issues as described in my response below
I managed to get the bad set working by trying different combinations of boot + reset and separating out the dupont wires away from each other. I still have the USB issues but at least the sensor is now reporting reliably at least within an hour
[12:25:56][D][scd30:186]: Got CO2=101.87ppm temperature=24.06°C humidity=47.07%
[12:25:56][D][sensor:094]: âCO2 Sensor 2â: Sending state 101.87086 ppm with 1 decimals of accuracy
[12:25:57][D][sensor:094]: âTemperature 2â: Sending state 24.06271 °C with 2 decimals of accuracy
[12:25:57][D][sensor:094]: âHumidity 2â: Sending state 47.06879 % with 1 decimals of accuracy [12:26:22][I][ota:113]: Boot seems successful, resetting boot loop counter. [12:26:22][D][esp32.preferences:114]: Saving 1 preferences to flash⌠[12:26:22][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[12:27:05][D][scd30:186]: Got CO2=112.81ppm temperature=24.15°C humidity=47.37%
[12:27:05][D][sensor:094]: âCO2 Sensor 2â: Sending state 112.80892 ppm with 1 decimals of accuracy
[12:27:05][D][sensor:094]: âTemperature 2â: Sending state 24.14549 °C with 2 decimals of accuracy
[12:27:05][D][sensor:094]: âHumidity 2â: Sending state 47.36633 % with 1 decimals of accuracy
Thanks! I put much shorter wires for the I2C (about 8cm), and ran it overnight. It ran good for several hours (this is the one with the USB issue) but I woke up this morning to find the unit unresponsive. The other unit with the longer wires has been rock solid. I think I have a defective esp32-s3 dev kit, as there is no USB connection possible. Anything I can do to confirm that I have a HW issue and not a SW issue?
Actually, I disconnected the sensor from the esp32 and still have the same issue where the esp32 is unresponsive and USB is not recognized so right now it doesnât seem to be related to the sensor
Suspected that too initially. Tried USB from a computer, phone chargers: 5V 750ma, and 5V 3A. It was using 5V 3A charger yesterday and is unresponsive now. Other set was tested using the same power with no issues so far
I used a 470uf one, and no difference. Still unresponsive. Power light is on only. When I press boot or rst button, light goes off and when I release it comes on. When USB is connected to COM port, laptop says USB device is not recognized. When connected to USB port, laptop detects nothing.