Back to projects

TriLeds

2022 · Sole author, 72 commits, January to October 2022.

My 2022 EPHEC final-year project: modular LED triangles that snap together with magnets and pogo pins, controlled from a Flask API and a React app with a colour wheel and a guided tour.

What I delivered

  • Modular LED triangles that snap together: N35 magnets, pogo pins, WS2815 LED strips
  • 3D-printed housings designed in SolidWorks, refined over several prototypes
  • A Flask API on a Raspberry Pi 3: JWT authentication, rate limiting, 15 animation modes
  • A React app with a colour wheel and a guided tour
  • A deployment that survives a reboot: Gunicorn, Nginx, systemd

In numbers

animation modes
15
commits, sole author
72
from January to October 2022
10 months
Raspberry Pi 3 runs the LEDs, the API and the app
1
CAD render of one TriLeds triangle module
One triangle module, designed in SolidWorks after several printed prototype iterations.

Context

My final-year project (TFE) for my Bachelor's degree in IT at EPHEC: a physical, modular lighting product, built solo from the 3D-printed hardware up to the web app that controls it.

The problem

A lighting installation made of separate physical triangles only works if every triangle connects, draws power and exchanges data reliably with its neighbours, and survives being snapped together and pulled apart over and over without a connection failing.

Constraints

The connectors had to hold under repeated assembly and disassembly without a soldered joint. The animation logic had to run smoothly on a Raspberry Pi 3 with no dedicated GPU. And because the API exposed over the network controlled real hardware, it needed real authentication, not an open endpoint.

What I built, in detail

Modular LED triangles that snap together with N35 magnets and connect through pogo pins, wired with WS2815 addressable LED strips. A Raspberry Pi 3 hosts everything: the LED driver, a Flask API (JWT authentication, rate limiting) exposing 15 animation modes, and a React app with a colour wheel and a guided tour for first-time users. The triangle housings went through several rounds of SolidWorks design and 3D-printed prototypes before the shape held its magnets and pogo pins reliably. The whole stack deploys with Gunicorn behind Nginx, run as a systemd service so it survives a reboot.

Decisions

Pogo pins instead of soldered connections
Triangles needed to snap together and come apart repeatedly without wearing out a connection. Pogo pins carry both power and data across the magnetic joint, so reassembling the installation never means re-soldering it.
Impact The installation comes apart and goes back together without a soldering iron.
A JWT-authenticated API in front of the hardware
The Flask API sits between the web app and the Raspberry Pi's LED driver, with JWT authentication and rate limiting on it. The React app and its guided tour talk to that API, never directly to the hardware.
Impact No request reaches the LEDs without a valid token, and rate limiting caps how often anyone can call the API.
Iterating the housing in 3D-printed prototypes
SolidWorks let me test a magnet-and-pogo-pin fit on screen, but only a printed prototype showed whether the joint actually held under real assembly. Several print-and-test rounds shaped the final triangle before it was reliable enough to wire and light up.
Impact The final housing keeps its magnets and pogo pins in place through repeated assembly.

Result

A working modular lighting installation with 15 animation modes, controllable from a guided-tour web app, and the project that first got me building a physical product end to end, from the printed housing to the Python on the Pi and the app, the same instinct behind Studio Cocha's 3D-printed work today.

72 commits, sole author, January to October 2022, public repo.

Stack

  • Python
  • Flask
  • React
  • Raspberry Pi
  • SolidWorks
  • Gunicorn
  • Nginx
Global architecture diagram of the TriLeds system
The system's global architecture, from triangle to Raspberry Pi to web app.
Electronic schematic of the TriLeds circuit
The electronic schematic: WS2815 strips, power and data routed through the pogo pins.
Close-up of the pogo-pin connector used between triangles
The pogo-pin connector: power and data across the magnetic joint, no solder.
Early wireframe of the TriLeds control app's animation-mode screen
An early wireframe of the control app. Real photos of the finished triangles are still to come.
Back to projects