ESP32-ethernet-sensor-node for a 3,000+ Unit Seniors Village
ESP32-ethernet-sensor-node
[Project Spotlight] An Ethernet Sensor Node for a 3,000+ Unit Seniors Village — A Real-World W5500 Deployment
Overview
This project isn't a demo or a learning exercise — it's a real embedded system being built for long-term deployment across a 3,000+ unit seniors village. The developer is building it as part of a contract engagement with a company that provides solutions for senior living facilities, and has implemented the entire firmware in C using ESP-IDF, running on an ESP32-S3 with a W5500 SPI Ethernet controller, complete with remote management, sensor telemetry, and OTA firmware updates.
Why This Qualifies as a "Real Solution" Case Study
Unlike a typical IoT demo, this project was designed from the ground up around real operational constraints:
- Unattended, long-term operation: nodes installed across a facility of thousands of units must be manageable without physical access
- Network reliability: wired Ethernet (W5500) was chosen over Wi-Fi to guarantee stable connectivity at facility scale
- Remote maintainability: status checks, reboots, and firmware updates all need to happen without a site visit
- Persistent node identity: each node must retain its configuration (static IP, etc.) across power loss and reboots
What makes this more than a tutorial project is that these constraints are visibly baked into the firmware architecture itself. Rather than buying an off-the-shelf product, the developer designed both the firmware and the hardware from scratch around one specific deployment's requirements.
Network Architecture — W5500 SPI Ethernet
The current firmware runs on an ESP32-S3 dev board with a W5500 SPI Ethernet controller, integrated with ESP-IDF's Ethernet/TCP-IP stack. The boot sequence is structured as follows:
- Load persistent node identity and static IP configuration from NVS
- Initialize the SPI bus and install the W5500 Ethernet driver
- Attach the netif to the TCP/IP stack and wait for link/IP acquisition
- Initialize sensor-facing peripherals: I2C, ADC, GPIO, timers
- Spawn tasks for sensor measurement, heartbeat, UDP streaming, and the TCP console
On top of the network layer, two communication paths run concurrently:
- UDP telemetry: temperature, humidity, air quality, and motion detection values, along with chip/firmware version and IP, are packaged into JSON and periodically sent to the backend
- TCP node console (port 4000): commands like
reboot,stream on/off,ota status, andota flashlet operators inspect and control a node without visiting the site
Sensor Integration
This isn't just placeholder telemetry fields — it includes actual working sensor drivers.
- AHT20 (I2C): temperature and humidity measurement
- MQ135 (ADC): analog air-quality readings via an ADC oneshot + calibration path
- HC-SR505 (GPIO/GPIO expander): motion detection, with interrupt-driven immediate detection support
OTA Updates for Unattended Operation
To update firmware on facility-installed nodes without a physical visit, the project implements an HTTPS-based OTA flow:
- Fetch the manifest file over HTTPS (certificate-pinned TLS)
- Compare firmware versions and download/flash a newer version if available
- Reboot, validate the new image, and roll back on failure
Notably, the rollback validation logic is there specifically to prevent a node from being bricked by a bad firmware push in an unattended environment.
Hardware Roadmap — From SPI to RMII
While the current dev board + W5500 (SPI) combination is being used to validate the firmware, the custom PCB (Rev 1) is planned to move to an ESP32-WROOM-32E with the ESP32's internal Ethernet MAC and an external LAN8720A (RMII) PHY. This frees up the SPI bus for other sensors/peripherals instead of dedicating it to Ethernet. The Rev 1 PCB is currently in pre-layout schematic review.
| Current (Dev Board) | Rev 1 Custom PCB (Planned) | |
|---|---|---|
| MCU | ESP32-S3 dev module | ESP32-WROOM-32E |
| Ethernet | W5500 (SPI) | Internal EMAC + LAN8720A (RMII) |
| Bus usage for Ethernet | Occupies SPI bus | SPI bus free |
| Development stage | Firmware functionally validated | Schematic review, layout pending |
Comparison with Commercial ESP32 Ethernet Products
Comparing this project against commercial ESP32-based industrial Ethernet controllers on the market highlights a clear difference in character.
| Product/Project | Ethernet | Features | Price |
|---|---|---|---|
| ESP32 Ethernet Sensor Node (this project) | W5500 (SPI) → migrating to RMII/LAN8720A | Purpose-built sensor set for a seniors village + custom TCP/UDP protocol + OTA | - |
| NORVI ENET | W5500 (SPI) | 8x DI, 4x AI, DIN-rail, OLED | $108–$134 depending on model |
| Olimex ESP32-PoE / PoE-ISO | LAN8710A (RMII) + PoE | Open source hardware, optional galvanic isolation (ISO) | ~$20.90 for PoE base, ~$29.06 for ISO |
| DFRobot EDGE101 | Ethernet + RS485 + CAN | Metal enclosure, optional 4G, infrastructure/asset monitoring | $39.90 (official store); $46–$57 through resellers |
| Erqos EQSP32CE | Ethernet (ESP32-S3) | RS232/RS485/CAN, 16-channel I/O, built-in MQTT/OTA, DIN-rail | $185 single unit (~€155) |
All of these commercial products target the general-purpose industrial automation/gateway market. This repo, by contrast, was purpose-designed around a specific deployment site (a 3,000+ unit seniors village) — its sensor set and communication protocol were built for that use case from the start — and rather than buying a commercial gateway, the developer is building custom firmware and a custom PCB from scratch. That's what sets it apart.
