Wiznet makers

Benjamin

Published July 01, 2024 © MIT license (MIT)

43 UCC

11 WCC

4 VAR

0 Contests

0 Followers

1 Following

Original Link

ESPHome-W5500-Ethernet-on-ESP32-boards

Playing around with the ESPHOME and W5500 ethernet module on different ESP32 boards. Goal is to be able to use SPI for ethernet and I²C for other sensors or ext

COMPONENTS Hardware components

Espressif - ESP32

x 1


WIZnet - W5500

x 1


PROJECT DESCRIPTION

Hardware wiring schema

Wiring

And even with this small sized board, there is some room for extra connections!

Possible improvements to investigate:

  • CLK wire for the W5500 SPI bus is set to GPIO08
  • GPIO08 is also the linked to the status led of the ESP32 C3 super mini development board
  • possible or better to use GPIO02 instead?
  • update 18.01.2024: switching CLK to GPIO02 did not seem to work...

ESPHome config

At first, I only got it to work with the arduino framework:

esphome:
  name: esp32c3-super-mini
  friendly_name: esp32c3-super-mini

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

# Enable logging
logger:
  level: DEBUG

# Enable Home Assistant API
api:

ota:

ethernet:
  type: W5500
  mosi_pin: GPIO10
  miso_pin: GPIO09
  clk_pin: GPIO08
  cs_pin: GPIO5
  reset_pin: GPIO04
  interrupt_pin: GPIO03
  clock_speed: 25MHz

i2c:
  scl: GPIO07
  sda: GPIO06
  scan: True
  id: bus_a

sensor:
  - platform: bmp280
    temperature:
      name: "Temperature"
      unit_of_measurement: °C
      accuracy_decimals: 1
    pressure:
      name: "Pressure"
      unit_of_measurement: hPa
      accuracy_decimals: 0
    i2c_id: bus_a
    address: 0x76

After some iterations, it also works with the esp-idf framework; some tweaking of the platformio options was necessary:

esphome:
  name: esp32c3-super-mini-idf
  friendly_name: esp32c3-super-mini-idf
  platformio_options:
    board_build.flash_mode: dio
    board_build.mcu: esp32c3
    board_build.f_cpu: 160000000L

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: esp-idf

So far, connection seems to be lightning fast and super stable.

In my experience, the easiest way of flashing the new ESP32C3 boards is by using the Adafruit ESPTool.

 

Documents
Comments Write