Skip to content
JP.

> initializing portfolio...

> loading projects [6/6]

> calibrating formation control...

> ready.

All Projects
EMBEDDED SYSTEMSHack-A-Bot 2026

GridBox Smart Factory

MicroPythonRaspberry Pi Pico 2nRF24L01+FlaskPCA9685BMI160
GridBox Smart Factory

Overview

Returning with the same team from Hack-A-Bot 2025 (where we placed 3rd), we entered the 2026 competition aiming for 1st place. GridBox is a miniature autonomous smart factory that captures wasted energy from motor deceleration — addressing the fact that factories waste around 30% of their energy through heat dissipation. The system uses two Raspberry Pi Pico 2 microcontrollers communicating over nRF24L01+ wireless at 50Hz: one controls the factory floor (DC motors, servos, conveyors) while the other runs a SCADA monitoring station with OLED dashboard. The core innovation is a capacitor array that stores regenerative braking energy and releases it back into the system, achieving up to 69% energy savings in intelligent mode. Features include weight-based sorting via motor current analysis, IMU vibration fault detection under 100ms (ISO 10816), and intelligent load shedding. The competition was fierce with many strong teams and innovative ideas, and while we didn't place, the engineering depth of the energy capture system and the lessons learned made it an invaluable experience.

Key Highlights

Fully autonomous bottling and sorting — zero human input
Wireless SCADA: custom 6-type binary datagram protocol at 50Hz
49% energy reduction via adaptive speed routing
IMU fault detection in under 100ms (ISO 10816 compliant)
Weight-based sorting using motor current signature analysis
Flask + SQLite web dashboard with real-time monitoring
259 source files, 44,186 lines of code in 24 hours

Gallery

The complete GridBox system running autonomously — conveyor belt, hopper, sorting servos, and wireless SCADA all operational
1 / 13

The complete GridBox system running autonomously — conveyor belt, hopper, sorting servos, and wireless SCADA all operational

3D CAD Model

GridBox Conveyor System — Fusion 360 CAD — drag to rotate, auto-rotates when idle.

Deep Dive

Returning from 2025 — Aiming for First

After placing 3rd at Hack-A-Bot 2025 with the AI Camera System, the same team reunited for the 2026 competition with higher ambitions — we were aiming for 1st place. The challenges were significantly harder than the previous year, and the competitors brought amazing ideas. While we didn't place this time, the technical depth of our energy capture system and the engineering lessons made it a deeply meaningful experience.

The workbench during the 24-hour hackathon — soldering, prototyping, and debugging through the night with the team.
The workbench during the 24-hour hackathon — soldering, prototyping, and debugging through the night with the team.

The Energy Waste Problem

Factories waste approximately 30% of their energy through heat dissipation from motors and machinery. GridBox demonstrates that this wasted energy can be captured and recycled. When DC motors decelerate, they generate back-EMF current that is normally dissipated as heat. Our system routes this regenerative current through a 2N2222 NPN transistor into a capacitor array, storing the energy for later use. The second Pico monitors the capacitor bank and releases stored energy back into the power bus when demand spikes, reducing peak power draw. Testing showed up to 69% energy savings in intelligent mode versus baseline operation — a massive potential saving for small factories.

System architecture — dual Pico 2 design with wireless SCADA, I2C sensor bus, energy recycling transistor, and Flask web dashboard.
System architecture — dual Pico 2 design with wireless SCADA, I2C sensor bus, energy recycling transistor, and Flask web dashboard.

Dual Pico Architecture

The two Raspberry Pi Pico 2 microcontrollers serve fundamentally different roles. Pico A is the factory floor controller — it drives the DC motors via PCA9685 PWM driver, controls servo-based sorting gates, reads ADC current sensors through 1Ω sense resistors at every power branch, and manages the energy recycling transistor. Pico B is the SCADA station — it receives wireless telemetry via nRF24L01+ PA+LNA radio modules, displays real-time system state across 5 OLED views, drives a MAX7219 7-segment display for quick-glance status, and forwards data via USB serial to the Flask web dashboard with SQLite persistence. The custom binary datagram protocol transmits 6 message types in 32-byte packets at 50Hz.

Wireless communication — nRF24L01+ PA+LNA modules achieving 50Hz datagram rate between factory floor (Pico A) and SCADA station (Pico B).
Wireless communication — nRF24L01+ PA+LNA modules achieving 50Hz datagram rate between factory floor (Pico A) and SCADA station (Pico B).

Sorting & Control System

The conveyor belt moves items past a current sensor. Heavier objects increase the DC motor load, causing a measurable current spike through the 1Ω sense resistor. When the ADC reading crosses the weight threshold, the PCA9685 triggers a servo gate to deflect the item into the correct bin — heavy or light. No dedicated weight sensor is needed, just motor current signature analysis.

Sorting flow — items enter hopper, conveyor moves them past the current sensor, weight is detected via motor load, servo deflects to the correct bin.
Sorting flow — items enter hopper, conveyor moves them past the current sensor, weight is detected via motor load, servo deflects to the correct bin.

Wireless Protocol

Communication between the two Picos uses a custom 6-type binary datagram format optimised for 32-byte nRF24L01+ packets. Message types include: sensor telemetry, motor commands, fault alerts, energy status, heartbeat, and configuration. The protocol achieves 50Hz update rate with CRC error checking, ensuring reliable real-time monitoring even in the electrically noisy hackathon environment.

Custom wireless protocol — 6-type binary datagram format for efficient 32-byte packets at 50Hz between Pico A and Pico B.
Custom wireless protocol — 6-type binary datagram format for efficient 32-byte packets at 50Hz between Pico A and Pico B.

SCADA Monitoring

The SCADA station provides multi-layer monitoring: a 0.96" SSD1306 OLED cycles through 5 views (system overview, power draw, fault log, motor status, energy savings), a MAX7219 7-segment display shows quick-glance status codes, and a Flask web dashboard with SQLite persistence provides full historical telemetry accessible from any device on the network.

SCADA monitoring station — OLED displays real-time system status, power draw, and fault alerts wirelessly from Pico B.
SCADA monitoring station — OLED displays real-time system status, power draw, and fault alerts wirelessly from Pico B.

My Role — Design & Mechanical Engineering

My primary role was CAD design and mechanical engineering. I designed the conveyor belt system, sorting mechanisms, and chassis layout. However, the 3D printer was unavailable during the hackathon — we only had about 3 hours of available printing time. I had to drastically cut down my CAD designs to fit the constraint, reducing what would have been a 12-hour print to under 3 hours. This taught me how to design for manufacturing constraints: considering print time, orientation, and material usage from the start, which is critical for real-world production where you cannot spend excessive time on prototyping.

CAD model of the chassis — designed for rapid fabrication, optimised for minimal 3D print time under the hackathon constraint.
CAD model of the chassis — designed for rapid fabrication, optimised for minimal 3D print time under the hackathon constraint.

Rapid Prototyping Under Pressure

When 3D printing wasn't sufficient for all parts, I switched to hand-fabricating prototypes from wood. I cut all the wood pieces by hand using workshop tools, sanded them into precise shapes for the conveyor belt frame and mounting plates. It was a reminder of fundamental workshop skills — using hand saws, files, and sandpaper to achieve the tolerances needed. The wood prototypes actually worked well for the conveyor guides and structural supports, proving that sometimes the simplest fabrication method is the most reliable under time pressure.

Conveyor belt system — DC motor drives the belt while current sensors detect the weight of each item passing through.
Conveyor belt system — DC motor drives the belt while current sensors detect the weight of each item passing through.

Burning Through Four Picos

We burned through a total of four Raspberry Pi Picos during the hackathon — expensive but meaningful for the experimental challenge. The failures came from pushing the current sensing and power routing beyond safe limits while iterating on the energy capture circuit. Each failure taught us something: incorrect transistor biasing, exceeding GPIO current limits, and ground loop issues between the motor power supply and logic supply. By the fourth Pico, we had a robust power isolation scheme that kept the system running reliably for the full demo.

Integration testing — wiring the Pico 2 controllers, servo drivers, nRF24L01+ radios, and power distribution. Four Picos were burned during this phase.
Integration testing — wiring the Pico 2 controllers, servo drivers, nRF24L01+ radios, and power distribution. Four Picos were burned during this phase.

Interactive Lab

Factory Sorter — GridBox Conveyor!

Click the hopper to drop objects onto the conveyor. The system auto-detects weight by measuring the DC motor current — heavier objects increase the load, causing a measurable current spike. Watch the real-time current graph: when it crosses the threshold, the servo sorts it into the correct bin.