At the doorway
26-bit Wiegand reader
Request-to-exit input
Door contact & lock relay
PROJECT 003 / EMBEDDED SYSTEMS & SOFTWARE
A network-connected door access system I designed: controller hardware, embedded firmware, central management and a custom enclosure.
Explore the enclosure in 3DLocal card validation, relay control, door contact monitoring and request-to-exit handling.
Wired Ethernet, MQTT heartbeats and events, card synchronisation and OTA updates.
A PHP/MySQL application for cards, permissions, controllers, logs, backups and firmware.
01 / SYSTEM DESIGN
The controller validates a presented card against its local whitelist and handles the unlock sequence. A central web application maintains the card database and assigns permissions to individual doors. MQTT connects those two parts of the system.
26-bit Wiegand reader
Request-to-exit input
Door contact & lock relay
Local whitelist and settings
Access decisions & door monitoring
Activity and system event storage
Apache / PHP / MySQL
Mosquitto message broker
Listener service & firmware hosting
The controller checks its local card list, processes access and publishes an event. The listener writes that event to the central database for the management interface.
The application sends a card-sync command over MQTT. The controller then downloads its assigned card list from the server and updates the local whitelist.
02 / HARDWARE & FIRMWARE
The controller pairs a NodeMCU V3 with a W5500 Ethernet module. Its firmware separates access processing, storage, networking, time synchronisation and the local web interface into dedicated modules.
Wiegand card input, local whitelist lookup, unlock processing and REX handling sit alongside door contact monitoring and held-open detection.
Cards, settings, recent activity and system events are stored on the controller. Local web pages expose door state, card management, configuration, firmware details, heap, flash and Ethernet diagnostics.
Static Ethernet configuration, link monitoring, NTP timestamps, MQTT heartbeats and remote commands support day-to-day operation. OTA updates, backup and restore, and a fallback access-point configuration portal support maintenance.
03 / THE CENTRAL APPLICATION
The server runs the PHP/MySQL application alongside Mosquitto. A long-running PHP listener, managed by systemd, consumes controller messages and updates status and event records.
Manage cards, bulk imports and exports, controller assignments and synchronisation. Admin, Editor and Viewer roles control application access.
View online status, firmware version, last heartbeat and sync status. Open individual controller details and review access and system events.
Upload firmware centrally and initiate OTA deployment to one controller or all controllers. Download and restore controller configuration backups.
Status messages update controller details and heartbeat times. Event messages populate access and system logs for the web interface.
04 / THE PHYSICAL BUILD
I also designed the controller enclosure. This preview renders the supplied STL geometry directly, so you can inspect the model before completed-build photographs are added.
Loading enclosure model...
Drag to rotate · Arrow keys rotate · + / − zoom · No automatic motion
05 / ENGINEERING LESSONS
During an MQTT stability investigation, the Ethernet link stayed up while the W5500 socket closed repeatedly. Broker settings, authentication, keepalive and payload size did not explain the behaviour. Returning the chip-select wiring to the stable configuration restored MQTT, heartbeat and card-sync operation.
The central listener ran for roughly 17 hours before a stale PDO connection caused a “MySQL server has gone away” error. Automatic reconnection and retry are the next server-side reliability task, so a lost database connection does not require a service restart.
Heap usage, the largest free memory block, MQTT uptime and W5500 behaviour remain part of the monitoring work. The fallback web interface also needs continued attention to memory fragmentation and large HTML construction.
06 / CURRENT STATUS
The system is running with Ethernet communications, local card access, central permissions, remote commands, door monitoring, event logging, OTA deployment and backups working.
Next steps are listener database reconnection, continued controller web-interface stability work and longer-term monitoring. Bulk card synchronisation also needs its server-address handling brought into line with the single-controller path.
Completed-build photographs will be added as the project documentation grows.
Explore another project