🛠 First connection and startup of the UEXT-CH390
Objectives
This tutorial guides you through the physical connection of the Olimex UEXT-CH390 module to a compatible development board (such as Raspberry Pi Pico or ESP32) and the verification of its recognition by the microcontroller. The goal is to establish a stable SPI communication to prepare for sending network data.
Required Hardware
- Olimex UEXT-CH390 module.
- Compatible board: Raspberry Pi Pico/Pico 2 or ESP32 (S3, C3, C5, C6).
- USB cable for power and programming the host board.
- RJ45 Ethernet cable and a router/switch connected to the Internet.
- Computer with Arduino IDE or ESPHome installed.
Steps
- Pin Identification: The module uses the UEXT standard (10 pins). Ensure that pin 1 (usually marked by a dot or arrow on the connector) is aligned with pin 1 of the host board.
- Physical Connection: Insert the module into the UEXT or pUEXT connector of your board. The module is powered by 3.3V; do not force insertion if pins do not align.
- Software Configuration: Open your development environment (Arduino IDE or ESPHome). Select the target board (e.g., RP2040-PICO30U-16 for Pico). If using ESPHome, add the SPI configuration for the CH390 in your YAML file.
- Compilation and Upload: Compile the basic SPI initialization code. Upload the firmware to the board. For RP2040, a specific driver is required to handle the integrated MAC/PHY.
- Network Connection: Plug the Ethernet cable into the module's RJ45 port and your router. Wait a few seconds for the physical link to establish (Ethernet LEDs).
Verification
Open the serial monitor at 115200 baud. You should see messages indicating that the CH390 driver was detected and the MAC address was read. If using DHCP, check your router's interface to see if a new IP address was assigned to the board.
Going Further
Once the connection is established, explore lwIP examples for the Raspberry Pi Pico SDK or configure Home Assistant discovery via ESPHome to integrate the device into your home automation system.
Other tutorials for this board
- First connection and startup of the UEXT-CH390
- Controlling GPIO and sensors with UEXT-CH390
- Complete Use Case: Ethernet Connectivity for Raspberry Pi Pico
- Integrating GPIO with UEXT-CH390 Ethernet
- Connect a RP2040 to the network with UEXT-CH390 and ESPHome
- Advanced Startup: UEXT-CH390 and Raspberry Pi Pico
Code examples for this board
esp32-ch390-lwip-station.inoC++rp2040-pico-ch390-micropython.pyPythonesp32-ch390-udp-sensor-gateway.inoC++esp32-ch390-web-server-local.inoC++rp2040-ch390-iot-home-assistant.inoYAMLrp2040-lwip-ethernet-ping-6.inoC/C++ (Raspberry Pi Pico SDK)