Wiznet makers

Lihan__

Published October 29, 2025 ©

10 UCC

6 WCC

0 VAR

0 Contests

0 Followers

0 Following

Original Link

SOHO MQTT Multi-Stack Gateway with WIZnet W5500

ESP32 + W5500 gateway links ESP-NOW and LoRa sensor nodes to a Mosquitto broker, delivering a compact yet scalable MQTT system for SOHO environments.

COMPONENTS
PROJECT DESCRIPTION

Project Overview

To reduce Wi-Fi AP load and battery constraints, we designed a ESP32 + W5500 multi-stack gateway.
The gateway supports ESP-NOW (short-range), LoRa (long-range) and Ethernet (MQTT) in parallel, abstracting node control/monitoring through a REST-like JSON interface. It integrates with a Mosquitto broker running on a Raspberry Pi 3B and handles real-time data from dozens of nodes.

Key Features

Wired Stability – low-latency, high-reliability MQTT via W5500

Wireless Scalability – up to 20 ESP-NOW slaves; LoRa as long-range fallback

Modular Design – hot-swappable ESP32 cards on a 6-slot backplane

JSON-based SD – payload includes node MAC, type, command, data fields

Lightweight Queueing – 100–300 ms publish spacing to smooth broker bursts

Hardware Setup

Main Board

SPI link: W5500 ↔ ESP32

6 slot connectors (UART, I²C, power)

Slot Card (ESP32)

Vertical header for optional E220-900T22D

On-board antenna for ESP-NOW

Slave Node (ESP8266)

Deep-sleep sensor or relay driver

Li-ion or solar power

 

Performance Results

MetricAverage
ESP-NOW RTT3–5 ms @ -60 dBm
LoRa 9600 bps latency120 ms / packet
MQTT burst (10 msgs)40 ms dequeued (100 ms spacing)
Gateway CPU load≤ 25 % (Wi-Fi off)

Lessons Learned

SPI Bus – separate CS pins for W5500 and LoRa to avoid contention.

Queue < 100 ms works on Mosquitto + Pi 3B, but LoRa bandwidth becomes the bottleneck.

ChatGPT speeds up code, yet JSON schema still needs human validation.

Future Improvements

Proof-of-concept RabbitMQ/AMQP on an Ubuntu server (9th-gen i7)

Integrate OTA firmware updates

Replace slot cards with ESP32-S3 to add BLE Mesh

 

 

Documents
Comments Write