
StopLight2
mikeblas/stoplight
hardware and software for a stoplight controlled by a Raspberry Pi

hardware and software for a stoplight controlled by a Raspberry Pi
StopLight1 is an open-source printed circuit board by mikeblas, from the mikeblas/stoplight repository on GitHub. It is a 2-layer board of 111 × 173 mm with 44 parts on 65 nets, routed with 237 tracks and 1 via.
It is built around the L7805 and FS20-600. Its parts include 13 resistors, 11 diodes, 6 transistors, 4 fuses and 3 switches.
This project provides hardware and software for a stoplight controlled by a Raspberry Pi.
In the late 1990s, I purchased a traffic signal from a curiosities shop. It's a full-scale signal, appropriate for "real" outdoor use; each lens is about 20cm in diameter, and it's a giant green beast. During the lockdowns in 2020, I finally found the time to get it working in a fun and useful way.
This project includes a printed circuit board design that hosts a Raspberry Pi Zero W and implements a mains-based power supply and switching circuits for each of the lamps in the signal. I chose the Pi Zero because it gets me onto the wireless network, and has enough computing power to do interesting things with the signal. With a little research, it should be possible to find a smaller board that has WiFi connectivity, but I already had an unused Pi Zero, so I just went with it.
The board further hosts a generic wireless remote control board built around the PT2272 receiver chip. The chip gives four latched outputs from a four-button key fob style RF remote. This remote can be used to control the stoplight.
And of course, the project includes software to make it do something.
This project is "done enough" for now. All the features below are implemented, and the wish list features are not yet implemented.
The hardware is done; amazingly, I didn't have to re-print the board and got it right on the first try. The only problem was using a 7805 regulator. The voltage drop made it run red hot, so I replaced it with a three-pin PC-based switching regulator, which works fine. The filter capacitor on the output of the supply wasn't adequate, so I increased it. That, of course, required a part with a bigger footprint so the mounting is a bit lumpy, but it works fine.
The software implements several modes, selectable by the remote. First, we can turn the thing off:
Then, we have one of a few modes active:
We mostly leave the light in disco mode, and it's fun to see it blinking away.
I'd like to add a few more modes:
There's also a couple of interesting things that I'd like to add:
Since the project is built and installed, then I'm not very motivated to work on these things. Maybe in the winter I'll get another Pi Zero and set it up so I can run the core on my bench, and get to work on those feature. The design has on-board LEDs for all of the outputs, so pretty much no support circuitry is necessary. I just need to build and populate one of my spare PC boards.
stoplightd is the stoplight daemon program. This is the controller that runs on the Pi (as I'm working on it)
proto are various fragments and scratch projects as I sort out GPIO, how the hardware works, and try out ideas.
pcb is the hardware project for KiCad.
Installing KiCad just to take a peek is a big ask, so here are some links:
This project uses libdaemonize.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 7 | 1N4002 | Diode_THT:D_DO-41_SOD81_P10.16mm_Horizontal | D1, D2, D3, D4, D5, D6, D7 |
| 6 | 10K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R4, R5, R6, R11, R12, R13 |
| 6 | 2N3904 | Package_TO_SOT_THT:TO-92 | Q1, Q2, Q3, Q11, Q12, Q13 |
| 4 | 220 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R14, R15, R16, R19 |
| 4 | Fuse | Fuse:Fuseholder_Cylinder-6.3x32mm_Schurter_0031-8002_Horizontal_Open | F1, F2, F3, F4 |
| 4 | LED | LED_THT:LED_D5.0mm | D11, D12, D13, D19 |
| 3 | 1K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1, R2, R3 |
| 2 | 1935336 | StopLight1:1935336 | J1, J2 |
| 2 | G5LE-14_DC5 | StopLight1:G5LE-14-DC5 | K1, K2 |
| 1 | 220uF 50v | Capacitor_THT:CP_Axial_L20.0mm_D10.0mm_P26.00mm_Horizontal | C2 |
| 1 | 3.3uF | Capacitor_THT:CP_Radial_D5.0mm_P2.00mm | C1 |
| 1 | ADA3708 | StopLight1:ADA3708_RPI-ZERO | A1 |
| 1 | FS20-600 | StopLight1:XFMR_FS20-600 | T1 |
| 1 | G5LE-14_DC5 | StopLight1:G5LE-14 DC5 | K3 |
| 1 | L7805 | Package_TO_SOT_THT:TO-220-3_Vertical | U2 |
It measures 111 × 173 mm and has 2 copper layers, 1.6 mm thick.
44 parts, built around the L7805 and FS20-600. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the mikeblas/stoplight repository on GitHub, at the commit this page was made from: the board is pcb/StopLight1/StopLight1.kicad_pcb and its schematic pcb/StopLight4/StopLight4.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask mikeblas before reusing the design.

mikeblas/stoplight
hardware and software for a stoplight controlled by a Raspberry Pi


Allen-Synthesis/EuroPi
EuroPi: A reprogrammable Eurorack module based on the Raspberry Pi Pico

peterheinrich/InternetOverSpaghetti
Transmitting IP packages over a pair of spaghetti thus demonstrating how media independent IP really is.


Tircown/ERCF-easy-brd
More informations on how to reset for flashing:\ https://wiki.seeedstudio.com/Seeeduino-XIAO/#enter-bootloader-mode

matthewcieplak/super-sixteen
Code and schematics for the Super Sixteen Eurorack sequencer

NikodemBartnik/Mini-Mars-Rover
Educational robotic platform made to look like a mini mars rover

starlightk7/OpenSFC
OSHW Reproduction Parts related to the Super Famicom / Super Nintendo game console