Skip to the content
PCBKitNew board
2 layers111 × 173 mmStopLight1, the printed circuit board in 3D

hardware and software for a stoplight controlled by a Raspberry Pi

Size
111 × 173 mm
Copper layers
2
Thickness
1.6 mm
Parts
44
Nets
65
Pads
160
Tracks, vias
237, 1
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
3 Sep 2020
Updated
28 Dec 2022

Overview

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.

Main components

2

README

README.md

stoplight

This project provides hardware and software for a stoplight controlled by a Raspberry Pi.

Context

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.

Status

This project is "done enough" for now. All the features below are implemented, and the wish list features are not yet implemented.

Hardware Features

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.

Software Features

The software implements several modes, selectable by the remote. First, we can turn the thing off:

  • Turn off the light; minimal processing, nothing illuminated.
  • Turn the light back on; whatever mode was active last resumes.

Then, we have one of a few modes active:

  • Traffic light. Red, green, yellow, in a realistically timed cycle.
  • Random single flash. Flash a single (selectable) lamp at a regular interval.
  • Random flash. Flash a randomly selected lamp one at a time.
  • Random flash. Flash each lamp at random intervals. This is "disco mode"!
  • Manual selection. Turn a lamp off or on, and it stays that way.

We mostly leave the light in disco mode, and it's fun to see it blinking away.

Wish List

I'd like to add a few more modes:

  • Clock. Flash lights to make a binary time-of-day clock.
  • Weather indicator. Show tomorrow's predicted weather (temperature and precipitation)
  • Stock market indicator. If the market is open, show the directional change in a particular index.

There's also a couple of interesting things that I'd like to add:

  • Mode memory. It would be great to have the system restore its mode when it starts up again after a reboot or power failure.
  • Monitoring. Anything I can monitor in my home network is monitored -- lots of SNMP collectors and some Influx scripts pull data in to Grafana. Adding
  • Web page. It would be cool to have a little web server to present a UI for changing modes, looking at statistics, and so on.
  • Mobile app. A web API would enable a mobile application for modes and stats, too.

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.

Project Layout

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.

Images

Installing KiCad just to take a peek is a big ask, so here are some links:

Dependencies

This project uses libdaemonize.

Parts

44
QtyValueFootprintReferences
71N4002Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1, D2, D3, D4, D5, D6, D7
610KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR4, R5, R6, R11, R12, R13
62N3904Package_TO_SOT_THT:TO-92Q1, Q2, Q3, Q11, Q12, Q13
4220Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR14, R15, R16, R19
4FuseFuse:Fuseholder_Cylinder-6.3x32mm_Schurter_0031-8002_Horizontal_OpenF1, F2, F3, F4
4LEDLED_THT:LED_D5.0mmD11, D12, D13, D19
31KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R2, R3
21935336StopLight1:1935336J1, J2
2G5LE-14_DC5StopLight1:G5LE-14-DC5K1, K2
1220uF 50vCapacitor_THT:CP_Axial_L20.0mm_D10.0mm_P26.00mm_HorizontalC2
13.3uFCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC1
1ADA3708StopLight1:ADA3708_RPI-ZEROA1
1FS20-600StopLight1:XFMR_FS20-600T1
1G5LE-14_DC5StopLight1:G5LE-14 DC5K3
1L7805Package_TO_SOT_THT:TO-220-3_VerticalU2

Questions

How big is the StopLight1 PCB?

It measures 111 × 173 mm and has 2 copper layers, 1.6 mm thick.

What parts does the StopLight1 use?

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.

Where can I download the StopLight1 KiCad files?

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.

Can I use the StopLight1 design in my own project?

Its repository states no licence, so its author keeps all rights: ask mikeblas before reusing the design.

More from mikeblas/stoplight

1
  • 2 layers105.5 × 148 mmStopLight2, the printed circuit board in 3D

    StopLight2

    mikeblas/stoplight

    hardware and software for a stoplight controlled by a Raspberry Pi

    37 parts7

Similar boards

  • 2 layers100 × 120.5 mmStopLight4, the printed circuit board in 3D

    StopLight4

    kitspace-test-repos/kicad6-file-collection

    59 partsMIT
  • 2 layers40.6 × 110 mmEuropi surface mount, the printed circuit board in 3D

    Europi surface mount

    Allen-Synthesis/EuroPi

    EuroPi: A reprogrammable Eurorack module based on the Raspberry Pi Pico

    92 parts584CC0-1.0
  • 2 layers132.1 × 45.7 mmIPoS, the printed circuit board in 3D

    IPoS

    peterheinrich/InternetOverSpaghetti

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

    42 parts342
  • 2 layers59.7 × 57.5 mmFunBox, the printed circuit board in 3D

    FunBox

    GuitarML/FunBox

    Stereo guitar pedal platform using Daisy Seed.

    61 parts289MIT
  • 2 layers90.8 × 35.6 mmERCF easy brd, the printed circuit board in 3D

    ERCF easy brd

    Tircown/ERCF-easy-brd

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

    28 parts195GPL-3.0
  • 2 layers111.3 × 106.4 mmSuper Sixteen v1, the printed circuit board in 3D

    Super Sixteen v1

    matthewcieplak/super-sixteen

    Code and schematics for the Super Sixteen Eurorack sequencer

    141 parts171
  • 2 layers91.4 × 71.1 mmPico w rover, the printed circuit board in 3D

    Pico w rover

    NikodemBartnik/Mini-Mars-Rover

    Educational robotic platform made to look like a mini mars rover

    20 parts143MIT
  • 2 layers144.1 × 182.2 mmSHVC CPU-01, the printed circuit board in 3D

    SHVC CPU-01

    starlightk7/OpenSFC

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

    498 parts114CERN-OHL-S-2.0