Projects.

A selection of engineering projects spanning embedded systems, motion control, industrial automation, and IoT.

AUTOMATION 2024

Automated Chemical Dipping System

Designed and built for a printed circuit board manufacturer requiring precise sequential wet chemical processing, this system is a fully custom-engineered solution integrating multi-axis motion control, chemical-resistant actuation, and safety-critical process management across a twelve-bath production line. At its core, the mechanism uses a pair of NEMA 23 stepper motors driving a synchronised gantry over a 1200 mm × 800 mm work envelope, achieving positioning repeatability of ±0.3 mm across the full bath array. Motor control is handled by Trinamic TMC2209 drivers operating in interpolated 256-step microstepping mode, commanded over UART from an STM32F4 microcontroller running a custom RTOS task scheduler with deterministic 1 ms tick resolution. The chemical bath management subsystem monitors temperature in all twelve baths via PT100 RTD sensors read through MAX31865 SPI interfaces, with individual PID loops maintaining ±0.5 °C setpoint stability. Bath replenishment is automated via peristaltic pump drivers controlled by a dedicated STM32F1 satellite node communicating over RS-485 Modbus RTU at 115,200 baud. The HMI is a 7-inch capacitive touchscreen running a custom Qt 5.15 interface, allowing operators to configure dip sequences, soak durations, agitation parameters, and rinse cycles. Recipe management supports up to 128 stored profiles with full audit logging to an onboard industrial SD card and optional SFTP export to a plant historian server. Safety architecture includes dual-channel hardwired E-stop, electrochemical fume detection via an MQ-135 array, and a watchdog-supervised relay PLC layer that enforces safe states on any communication timeout or sensor fault. The IP65-rated control enclosure uses custom cable management with chemical-resistant conduit, and was validated in a live production environment over a 90-day trial period before final handoff with full IQ/OQ documentation.

MOTION CONTROL 2024

Maglev Linear Motor Control Platform

A research-grade active magnetic levitation and linear drive platform developed to characterise position control algorithms for contactless material transport applications. The system achieves stable levitation of a 450 g aluminium payload carrier at 8–12 mm air gap across a 600 mm linear track, with sub-millimetre positioning accuracy under dynamic load conditions up to 1.2 kg total suspended mass. Electromagnetic levitation is maintained by eight independently-driven coil modules, each wound with 180 turns of 0.5 mm enamelled copper wire on custom silicon steel laminated cores, producing up to 28 N of controllable lift force per module at 48 V DC bus voltage. Coil current is regulated by discrete H-bridge drivers built around IR2110 gate drivers and IRFB4110 power MOSFETs, capable of 10 A continuous per channel, with active current sensing via INA219 shunt monitors reporting over I²C. Position sensing employs a linear array of 16 Allegro A1324 ratiometric Hall effect sensors at 40 mm pitch, providing 0.1 mm effective resolution through linear interpolation between adjacent sensors. Absolute position is cross-verified by an AS5600 magnetic encoder tracking a strip of N42 NdFeB magnets embedded in the carrier rail, giving a fused position estimate accurate to ±0.05 mm. The real-time control loop executes at 10 kHz on an STM32H743 Cortex-M7 running at 480 MHz. Control architecture is a cascaded PID structure: an outer position loop feeds a middle velocity loop which feeds inner current loops per coil group. State estimation uses a discrete-time Kalman filter fusing Hall array data with an onboard MPU-6050 IMU to compensate for vibration-induced measurement noise and magnetic crosstalk. MATLAB/Simulink was used for model-based design, including plant identification via frequency-sweep excitation, filter co-design, and automatic C code generation deployed to hardware via STM32CubeIDE. Full test characterisation — step response, load disturbance rejection, bandwidth — was logged via a Python 3.11 USB CDC data acquisition interface and post-processed in NumPy.

IOT 2025

Room Monitor IoT Device — ESP32-S3

A compact, battery-backed multi-parameter environmental monitoring node built around the ESP32-S3-WROOM-1U module, designed for dense deployment in office, laboratory, and cleanroom environments requiring continuous air quality, thermal, and occupancy logging with no wired infrastructure dependency. The sensor suite integrates a Sensirion SHT41 precision temperature and relative humidity sensor (±0.1 °C / ±1.8 % RH, I²C), a Sensirion SCD41 true NDIR CO₂ sensor with on-chip pressure compensation and automatic self-calibration (ASC) at 400 ppm reference, an SGP41 metal-oxide VOC and NOₓ index sensor with Sensirion's Gas Index Algorithm running on-device, a BH1750 16-bit ambient light sensor in continuous high-resolution mode, and a dual-element PIR occupancy detector with configurable hold-off timing implemented in firmware. All sensors share a single I²C bus running at 400 kHz, with address collision resolved by a TCA9548A 8-channel multiplexer controlled via GPIO. Wireless connectivity uses the ESP32-S3's integrated 802.11n 2.4 GHz Wi-Fi in station mode, publishing JSON-encoded telemetry at 30-second intervals to an MQTT broker over TLS 1.2 using mbedTLS bundled in ESP-IDF. The device has been validated with both a self-hosted Mosquitto broker and AWS IoT Core, supporting retained messages and last-will-and-testament for network dropout detection. Device provisioning at first boot uses a custom SoftAP captive portal served by a lwIP HTTP server — no serial configuration required. OTA firmware updates are managed through a custom dual-partition rollback scheme: the device fetches a manifest JSON over HTTPS, compares firmware hashes, downloads to the inactive OTA partition, and boots into the new image only after a three-reboot confirmation gate, reverting silently if the gate is not passed. Power management implements ESP32-S3 deep sleep between acquisition cycles, waking on RTC timer every 28 seconds. With all peripherals in sleep mode the system draws approximately 680 µA from a 3.7 V 2000 mAh LiPo cell, giving approximately 120 days of autonomous operation. Battery state is estimated continuously by a MAX17048 coulomb counter over I²C. An onboard 2.9-inch e-ink display (GDEW029T5D, SPI) renders current readings and a last-update timestamp without any standby draw. Firmware was written in ESP-IDF v5.1 with FreeRTOS task priorities structured so the radio stack never starves sensor acquisition. Forty-two units have been in continuous field deployment for over six months with zero hardware failures.