Skip to the content
PCBKitNew board
2 layersPirled, the printed circuit board in 3D

Design goals: 1. A single ESP8266 governs up to 4 LEDs + 4 PIR sensors (+4 virtual signals). 2. Any LED can trigger on/off with any grouping of PIR sensors/virtual signals. - Note, logical OR with each other hard-coded.

Copper layers
2
Thickness
1.6 mm
Parts
8
Nets
24
Pads
58
Tracks, vias
62, 1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
17 Jan 2026
Updated
25 May 2026

Overview

Pirled is an open-source printed circuit board by mwalsh161, from the mwalsh161/pirled repository on GitHub. It is a 2-layer board with 8 parts on 24 nets, routed with 62 tracks and 1 via.

It is built around the WEMOS D1 MINI, LM2596S-5.0 and RJ45, with the IRF520NPBF among its other parts. Its parts include 3 connectors, 2 ICs and 1 diode. It belongs with the ESP8266 boards of this library.

Main components

4

README

README.md

PIR LED Controllers

Design goals:

  1. A single ESP8266 governs up to 4 LEDs + 4 PIR sensors (+4 virtual signals).
  2. Any LED can trigger on/off with any grouping of PIR sensors/virtual signals.
    • Note, logical OR with each other hard-coded.
    • Each LED can have a delay associated with certain triggerers.
  3. Discoverable through MDNS.
    • Service name begins with "pirled-controller"
    • Signed firmeware uploadable by Arduino OTA.
  4. Config is controllable in realtime, and supports fairly aggressive polling rates.
  5. No network should not prohibit core detect/dimming functionality.
    • Note, plan to allow sharing sensors...obviously that isn't included here (e.g. not making )

TODO:

  1. When updating something, returning the binary app state in response can drastically cut down on requests (requires more complex JS logic, but that's fine).
  2. Layers are currently pretty heavily tied to arduino/esp. Makes unit-testing harder.
    • Goal: leverage templates + shims to make a test build possible on non-esp hosts.
  3. Sharing sensors
  4. Robust to network outages (e.g. rebind as part of state machine).
    • note reboot is an easy way to do this, but given some GPIO pin activity during boot this would be less than ideal.
    • it would require re-"beginning" all server objects including mdns and maybe arduino ota.
    • would need same logic as setup to effectively switch to the portal

Stretch TODO:

  1. ESP AP mode allows multiple to link together to continue allowing sharing sensors without network
    • what is AP range?
    • would need a "house" key to validate connecting. No security + no SSL...big yikes
    • ...maybe not.

PlatformIO cache setup

This project uses a repo-local PlatformIO core directory at .platformio-core/ so VS Code builds and CLI builds can share the same cache and incremental build context.

If you already have PlatformIO packages installed globally in ~/.platformio, you can optionally symlink these into .platformio-core/ to avoid re-downloading toolchains and frameworks:

sh
ln -s ~/.platformio/packages .platformio-core/packages
ln -s ~/.platformio/platforms .platformio-core/platforms

This is optional. If the symlinks are absent, PlatformIO can manage .platformio-core/ directly.

Docker deployment

The API server can be built as a single production image that also contains the built frontend bundle. Build from the repo root so the Docker build can access both api/ and frontend/:

sh
docker build -f api/Dockerfile -t pirled:latest .

Run it with a bind mount or named volume for persistent app state at /data and publish port 8082:

sh
docker run --rm \
  -p 8082:8082 \
  -v "$(pwd)/api-data:/data" \
  pirled:latest

Notes:

  • The image builds frontend/dist during docker build; no prebuilt frontend artifact is required.
  • Persistent data is intentionally excluded from the image and should be mounted at /data so host backup/restore jobs can access it.
  • The runtime data path can be overridden with PIRLED_DATA_DIR; local non-Docker runs default to api/data.
  • Existing deploys that already mount /app/api/data can either move that host directory to the /data mount or set PIRLED_DATA_DIR=/app/api/data.
  • The frontend already uses relative asset and API paths, which keeps it compatible with subpath deployments.

For a homelab deploy repo, the expected invocation is:

sh
git clone <this-repo>
cd pirled
docker build -f api/Dockerfile -t pirled:latest .
docker run -d \
  --name pirled \
  --restart unless-stopped \
  -p 8082:8082 \
  -v /path/to/persistent/pirled-data:/data \
  pirled:latest

Parts

8
QtyValueFootprintReferences
3RJ45Connector_RJ:RJ45_breakoutJ1, J2, J3
1Barrel_JackConnector_BarrelJack:BarrelJack_SwitchcraftConxall_RAPC10U_HorizontalLED1
1Conn_01x03_PinConnector_PinHeader_1.00mm:PinHeader_1x03_P1.00mm_VerticalPIR1
1IRF520NPackage_TO_SOT_THT:TO-220-3_VerticalPWM1
1LM2596S-5Converter_DCDC:Converter_DCDC_LM2596U2
1WEMOS_D1_miniRF_Module:WEMOS_D1_mini_lightU1

Questions

What parts does the Pirled use?

8 parts, built around the WEMOS D1 MINI, LM2596S-5.0, RJ45 and IRF520NPBF. 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 Pirled KiCad files?

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

Can I use the Pirled design in my own project?

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

Similar boards

  • 2 layers100 × 76 mmEmc flyback, the printed circuit board in 3D

    Emc flyback

    ChengminLi/AI-PCB-layout

    AI agent skill for designing and reviewing power-electronics PCBs, with a human review gate after every step

    90 parts31CC-BY-4.0
  • 2 layers87 × 33 mmBatmon, the printed circuit board in 3D

    Batmon

    pjaos/batmon

    A device to assist in extending the life of EBike batteries.

    58 parts1MIT
  • 2 layers81.3 × 45.7 mmRefactored winner, the printed circuit board in 3D

    Refactored winner

    3lkgrove/refactored-winner

    Racing Timing Light with Remote Trigger.

    22 partsGPL-3.0
  • 2 layers51 × 78.3 mmSEPIC, the printed circuit board in 3D

    SEPIC

    spiwocoal/547452

    Convertidor DC/DC topología SEPIC para ramo Taller de sistemas electrónicos

    22 parts
  • 2 layers40.6 × 56.5 mmDeskcontroller, the printed circuit board in 3D

    Deskcontroller

    kitspace-test-repos/kicad6-file-collection

    5 partsMIT
  • 2 layers76.8 × 74.3 mmPower dist board, the printed circuit board in 3D

    Power dist board

    FieldTracks/power-dist-board

    Power Distribution Board - experimental design

    27 parts
  • 2 layers236.7 × 149.7 mmControllinoA, the printed circuit board in 3D

    ControllinoA

    jibonaronno/documentsA

    It is required to change settings using SCLManager.exe when required for new setup.

    265 parts4