Skip to the content
4 layers57 × 57 mmPrrplsattiny20 kikit panel, the printed circuit board in 3D

Prrplsattiny20 kikit panel

jimktrains/prrplsattiny20

PRR Position Light Signals based on an ATTiny20 ----------------------------------------------- Thumb for scale.

Size
57 × 57 mm
Copper layers
4
Thickness
0.6 mm
Parts
450
Nets
300
Pads
1,175
Tracks, vias
2,125, 375
Pours
50
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
15 Jul 2025
Updated
14 Oct 2025

Overview

Prrplsattiny20 kikit panel is an open-source printed circuit board by jimktrains, from the jimktrains/prrplsattiny20 repository on GitHub. It is a 4-layer board of 57 × 57 mm with 450 parts on 300 nets, routed with 2,125 tracks and 375 vias.

Its parts include 175 diodes, 175 connectors, 50 capacitors, 25 resistors and 25 ICs. It belongs with the AVR (ATmega, ATtiny) boards of this library.

README

README.md

PRR Position Light Signals based on an ATTiny20

Thumb for scale.

Thumb for scale

In Action!

In The Dark Close Up

The Pennsylvania Railroad (PRR), almost uniquely among railroads, used Position Light Signals (PLS) [1] [2]. (The Norfolk & Western used Colored Position Lights (CPL) [2] which were similar.)

I model N-Scale which is 1:160 scale. From scans of PRR plans [3] the diameter of the signal is 4'4", which becomes 0.325" (8.255mm) for the scale model.

I've designed the system to use 3 wires: +5V, Ground, and Serial. Serial data comes in, the first command extracted, and then the remainder of a packet is retransmitted similar to how WS2812b / NeoPixels work.

Protocol

The serial protocol is Differential Manchester , but kind of overlaid on a double-baud UART frame, so it always starts with the "0" stop bit.

I moved to this from just a plain software UART as the timing on some of my signals was off by a large enough amount to throw everything out of sync. Decoding the differential Manchester packet is much less timing-sensitive. It runs at 300baud/150bps with 4-bit packets.

A packet starts with an 0x4 followed a sequence of 0x3 for Stop, 0x2 for Approach, and 0x1 for Clear, 0x0 for all lights off.

Protocol Example

In this example, the controller sends out a 4-frame packet. Starting with a SOP (Start of Packet) frame, followed by an Approach, then Stop, then All Off. The first signal dutifully forwards the SOP frame. The second frame is for it, though, so it does not forward that one. The rest of the frames are for subsequent signals, so it forwards all subsequent frames until a SOP is encountered again. The second signal does as the first. It forwards the SOP, keeps the frame following the SOP, and forwards any remaining frames until another SOP is encountered.

Also, note how when interpreted as a UART, the packets coming from the signals isn't in sync with the baudrate. I'm sure that there's some way to get a more stable clock on the μC, but it was significantly easier for me to switch to a more forgiving line coding.

There also needs to be at least a 20 symbol pause between frames sent. I think this has to do with how I decode the frame, but it deserves to be looked at.

(The visualization is from PulseView/sigrok. I wrote a custom protocol decoder to help me debug.)

Schematics / PCB

General Notes

I am using an ATTiny20 in a WLCSP package (1.56mm×1.4mm) with 0.4mm balls, and I'm not sure I can solder that at my current skill level.) I'm just bemused at it's physical size, even if it only has 128 bytes of RAM. It fits perfectly in the area available, allows for components on a single side, and has enough I/O to control the LEDs individually.

In order to avoid having to place a resistor per LED, I'm using the pull-up resistors in the microcontroller. Since these are large-resistance resistors, it limits the brightness of the LEDs. While the pull-up resistors aren't any specific resistance and can be pretty variable, the ones within a single chip should be pretty similar. This may mean that signals visibility near each other may be of different brightness, but so far it doesn't appear to be a noticeable issue.

The limited brightness is a potential problem, but I'm going to try up the effective PWM duty cycle. If each light is updated sequentially at the frequency at which the RX pin is sampled spread over the 7 lights -- currently 1200Hz with a 1/7 (14%) duty cycle. Because the LEDs are charliplexed I am limited in which LEDs I could turn on simultaneously. However, because I separated out the center light and I think lucked into arranging the lights in a sensible order I am able to have them on with 100% duty cycle for the 3 basic aspects these display (Stop, Clear, and Approach). For those aspects I think the current brightness is adequate.

PCB Notes

The PCB design is fairly simple, and using 4 layers (Signal, +5V+Minimal Signal, GND, Signal) made routing easier.

To avoid using via-in-pads (and being charged accordingly), there are 3 pins (balls?) that aren't used. If they had been used, each LED could have been directly connected to the μC. As such, I was able to control the LEDs individually by charlieplexing them.

I used a 1.27mm pitch SOIC chip clip as my connectorless connector. (I did manage to make the through-holes a little too small, so it doesn't attach as securely as I would have liked.) Eventually I just soldered some THT resistor legs to these to connect to a breadboard for some of the signal heads.

When panalized, I added some traces that I can use to interconnect columns for testing.

Individual Schematic

Individual Schematic

Front Copper

F.Cu

Inner 1 Copper

In1.Cu

Inner 2 Copper

In2.Cu

Back Copper

B.Cu

Programming and Testing

Here is how I test and program these modules. The Arduino is running this sketch from Junk + Arduino. I added a software serial console to it to make testing easier. The FT232RL in the schematic is actually a breakout board that provides the +5V.

Programming and Testing Schematic

My next step is to use 38 gauge (40mil (0.1007mm) diameter) enameled wire to wire the signals into a wayside signal on a post, and then a signal bridge.

Please excuse my soldering. This is back of what was in the video above. Just a proof of concept that the enamel wire will work. (Well, more that I can make it work, e.g. strip it without breaking it and soldering it.)

with enamel wires

Parts

450
QtyValueFootprintReferences
175YELLOW LEDLED_SMD:LED_0402_1005MetricD1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1 +159
150Conn_01x01JSK:SolderWire-D0.7mm_Drill0.3J1001, J1001, J1001, J1001, J1001, J1001, J1001, J1001, J1001, J1001, J1001, J1001, J1001, J1001, J1001, J1001 +134
25100nFCapacitor_SMD:C_0402_1005MetricC1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1 +9
251MResistor_SMD:R_0402_1005MetricR1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1 +9
2522μFCapacitor_SMD:C_0402_1005MetricC1001, C1001, C1001, C1001, C1001, C1001, C1001, C1001, C1001, C1001, C1001, C1001, C1001, C1001, C1001, C1001 +9
25ATtiny20-UURJSK:WLCSP-12_1.403x1.555mm_Layout6x4_P0.4mm_StaggerU1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1 +9
25Conn_02x08_Counter_ClockwiseConnector:Tag-Connect_TC2030-IDC-NL_2x03_P1.27mm_VerticalJ1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1 +9

More from jimktrains/prrplsattiny20

1
  • 4 layersPrrplsattiny20, the printed circuit board in 3D

    Prrplsattiny20

    jimktrains/prrplsattiny20

    PRR Position Light Signals based on an ATTiny20 ----------------------------------------------- Thumb for scale.

    18 parts

Similar boards

  • 4 layers160 × 62 mmGp4-hil, the printed circuit board in 3D

    Gp4-hil

    azonenberg/openfpga

    Open FPGA tools

    450 parts259
  • 4 layers136.6 × 84.2 mmCiaa rx, the printed circuit board in 3D

    Ciaa rx

    ciaa/Hardware

    Hardware de la CIAA

    450 parts216
  • 4 layers103.5 × 85 mmLTC3 Charge Controller, the printed circuit board in 3D

    LTC3 Charge Controller

    psas/launch-tower

    CAD files and software for the launch tower computer (LTC)

    450 parts19
  • 4 layers100 × 123 mmDuet3 5+ Wifi, the printed circuit board in 3D

    Duet3 5+ Wifi

    Duet3D/Duet3-Mini5plus

    This repository also contains information in the Mini 2+ : a two driver expansion board for the Duet 3 mini 5+

    450 parts12
  • 4 layers373.1 × 220.9 mmSolarpump, the printed circuit board in 3D

    Solarpump

    rivimey/solarpump

    Solar powered pump for allotment garden water supply

    450 parts1
  • 4 layers140 × 100 mmAura, the printed circuit board in 3D

    Aura

    sikevux/aura-asic

    Aura ASIC universal PCB | Created by the Community

    449 partsUnlicense
  • 4 layers130.1 × 183.6 mmMsfOwlClock, the printed circuit board in 3D

    MsfOwlClock

    pete-restall/MsfOwlClock

    MSF Owl Clock

    449 partsMIT

Questions

How big is the Prrplsattiny20 kikit panel PCB?

It measures 57 × 57 mm and has 4 copper layers, 0.6 mm thick.

What parts does the Prrplsattiny20 kikit panel use?

450 parts. 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 Prrplsattiny20 kikit panel KiCad files?

From the jimktrains/prrplsattiny20 repository on GitHub, at the commit this page was made from: the board is pcb/prrplsattiny20_kikit_panel.kicad_pcb and its schematic pcb/prrplsattiny20.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Prrplsattiny20 kikit panel design in my own project?

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