thebradleysanders / ESPHome-Arduino-Port-Expander

An Arduino Port Expander for ESPHome with added Arduino Mega 2560 support
14 stars 10 forks source link

W32-ETH01 with Mega2560 gets stuck periodically #5

Open Mess88 opened 1 year ago

Mess88 commented 1 year ago

Hello, First thing thanks for great sollution working well until it stops. I use ESPHome an ESP32 based board with LAN connection. Pins 12 and 14 are used for SDA and SCL, connected to Arduino mega pins 20 and 21, with standard DuPont cables (12-15cm). Now after ~12-30hours everything stops working, ESP gets to stuck state where it needs to have I2C lane disconnected and restarted before starts working again. Both Arduino and ESP are powered from 5v supply.

thebradleysanders commented 1 year ago

I had a similar issue, I found that changing the power supply fixed the issue, what power supply are you using? Also, when you mention "it needs to have I2C lane disconnected and restarted" are you physically disconnecting the SDA & SDL cables to fix it?

Mess88 commented 1 year ago

I'm using DIN mounted 5V 3A from MeanWhell, it supplied 4x ArduinoMEGA, ESP32, ESP8266 board and few LED cotton strings. I'll check the current drawn from it. But looks like i may have a issue with power surges from I2C line from Mega2560... As looks like second ESP board now died in this configuration. I moved the W32-ETH01 board to separate power supply putting 2,5Amps on 12V with step-down 5V, and after a while it died. I don't have an oscilloscope to check for power peaks but i'm thinking of putting some optoisolation between Mega2560 and ESP boards.

thebradleysanders commented 1 year ago

Interesting. I believe the only difference my configuration has than yours is my Arduino Mega is being powered by 5v via the USB port, then the W32-ETH01 is powered off the mega 5v pin. I don't have the equipment to test why you have surges, optoisolation would be the next best solution.