ESP32-ETH-v1.4 died during update/installation

Hi,

I am building a PDU/network controller for my network/server rack with an esp32-eth-v1.4 and intended to control the following components:

  • a relay board with 4 relays (4 GPIOs)
  • 2x DHT22 (2 GPIOs)
  • one DS18D20 (1 GPIO)
  • 2x 4 pin PWM 12V fans. (6 GPIOs total, per fan = 1x PWM (IO), 1x switch on/off (IO), 1x RPM in (input pin only))
    For latter one I designed a PCB with a P-channel mosfet and an N-channel transistor (per fan) to turn off the fan via another GPIO/switch.
    I tested the board with a 12V power supply, 3.3V buck converter and a cheap signal generator that generates a PWM signal at 3.3V and it worked just fine.

To supply power, I use a 12V/2A switching power supply, which connects to two buck converters, one set to 5V and the other one set to 3.3V. So I have the VCCs:
12V → fans
5V → relays board
3.3V → ESP32, DHT22, DS18B20
GND → all grounds are connected

The following image shown the pinout of the ESP32-ETH:


So basically I am using all available GPIOs.

To the yaml, I added the part with the fans last, because I had to wait for the PCB to arrive and until then everything worked! The relais switched, the temperatures and humidity were shown … all good. Before I designed the PCB and realized that my fans will not stop at a PWM duty cycle of 0%, I connected one fan (fan1) without the switch pin and regulating the fan worked fine (it just didn’t stop at below 13%).
As mentioned earlier, the PCB I designed worked.

So, now I connected everything on the ESP32-ETH and added the fan switch pins to the yaml and the second fan (fan2). For the switch Pins I had to select GPIO01 and GPIO03 (UART pins), because it were the only still available output pins.

I validated the configuration … all good …
I installed it via the network … no connection to the device … dead …
The red LED in the ESP still lights up, but the ethernet connection does not go online.
I unplugged all pins and tried to do the initial setup again (How I installed ESPHome on the wt32-eth01), but no chance …

I always get “Failed to initialize. Try resetting your device or holding the BOOT button while selecting your serial port until it starts preparing the installation.”

Since it doesn’t have a boot button, I tried to pull one of the EN pins to ground and tried it again, but nothing changes.

IS there anything known about using all pins particularly the UART pins as general IO pins? Could that have destroyed the ESP during the installation?

Is there anything known to recover from it?

Here my yaml:

esphome:
  name: esp32-eth01-rack
  friendly_name: esp32-eth01-rack

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "sdsfsdfdsfsdfsdfsdfsdfsdfsdfdsfsdf"

ota:
  - platform: esphome
    password: "....sdfasfsadfdsafdsafsadfdsafsad.ds.f.asf"


ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO0_IN
  phy_addr: 1
  power_pin: GPIO16


#------------------------------
#-- Individual configuration --
#------------------------------
one_wire:
  - platform: gpio
    pin: GPIO15
    id: ds18b20

switch:
  - platform: gpio
    name: "relay01"
    id: relay01
    pin: 
      number: GPIO2
      inverted: true
  - platform: gpio
    name: "relay02"
    id: relay02
    pin: 
      number: GPIO4
      inverted: true
  - platform: gpio
    name: "relay03"
    id: relay03
    pin: 
      number: GPIO12
      inverted: true
  - platform: gpio
    name: "relay04"
    id: relay04
    pin: 
      number: GPIO14
      inverted: true
  ####### JUST TEMPORARY SWITCHES TO TURN ON OR OFF THE FANs
  - platform: gpio
    name: "fan1_switch"
    id: fan01_switch
    pin: 
      number: GPIO03
      inverted: true
  - platform: gpio
    name: "fan2_switch"
    id: fan02_switch
    pin: 
      number: GPIO01
      inverted: true




sensor:
  - platform: dht
    pin: GPIO5
    temperature:
      name: "DHT22-01-temp"
      id: DHT22_01_temp
    humidity:
      name: "DHT22-01-hum"
      id: DHT22_01_hum
    update_interval: 30s
  - platform: template
    name: "DHT22-01-dew-point"
    lambda: |-
      return (243.5*(log(id(DHT22_01_hum).state/100)+((17.67*id(DHT22_01_temp).state)/
      (243.5+id(DHT22_01_temp).state)))/(17.67-log(id(DHT22_01_hum).state/100)-
      ((17.67*id(DHT22_01_temp).state)/(243.5+id(DHT22_01_temp).state))));
    unit_of_measurement: °C
    icon: 'mdi:thermometer-alert'

  - platform: dht
    pin: GPIO17
    temperature:
      name: "DHT22-02-temp"
      id: DHT22_02_temp
    humidity:
      name: "DHT22-02-hum"
      id: DHT22_02_hum
    update_interval: 30s
  - platform: template
    name: "DHT22-02-dew-point"
    lambda: |-
      return (243.5*(log(id(DHT22_02_hum).state/100)+((17.67*id(DHT22_02_temp).state)/
      (243.5+id(DHT22_02_temp).state)))/(17.67-log(id(DHT22_02_hum).state/100)-
      ((17.67*id(DHT22_02_temp).state)/(243.5+id(DHT22_02_temp).state))));
    unit_of_measurement: °C
    icon: 'mdi:thermometer-alert'
  ### Broadcast MQTT data from sensors --> via automation!

  ### Temperature sensor case DS18B20
  - platform: dallas_temp
    one_wire_id: ds18b20
    #address: 0x1234567812345628
    name: "temperature_PDU"
    update_interval: 30s


  ### FAN control:
  # FAN1
  - platform: pulse_counter
    pin: GPIO36
    name: Fan01 Speed
    id: fan01_rpm
    unit_of_measurement: 'RPM'
    filters:
      - multiply: 0.5
    count_mode:
      rising_edge: INCREMENT
      falling_edge: DISABLE
    update_interval: 3s
  #FAN2
  - platform: pulse_counter
    pin: GPIO39
    name: Fan01 Speed
    id: fan02_rpm
    unit_of_measurement: 'RPM'
    filters:
      - multiply: 0.5
    count_mode:
      rising_edge: INCREMENT
      falling_edge: DISABLE
    update_interval: 3s

output:
  #FAN1
  - platform: ledc
    pin: GPIO33
    frequency: 22500 Hz
    id: fan01_pwm
    # my fans stop working below 13% powerful.                                                                                                                                                                                           
    min_power: 25%
    max_power: 100%
  #FAN2
  - platform: ledc
    pin: GPIO32
    frequency: 22500 Hz
    id: fan02_pwm
    # my fans stop working below 13% powerful.                                                                                                                                                                                                                                                                                                                                                                  
    min_power: 25%
    max_power: 100%



fan:
  - platform: speed
    output: fan01_pwm
    name: "PWM Fan01"
  - platform: speed
    output: fan02_pwm
    name: "PWM Fan02"

I have already ordered a new ESP32-ETH-v1.4 and a Mcp23017 board to add more GPIOs via i2c … However, maybe someone knows anything about what could have gone wrong and maybe there is a way to recover?

Thanks a lot!

Related topic about the ESP32-ETH, which I read for the installation: