

RelayController
Relay Control Board using Pico W
- Size
- 42 × 65 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 16
- Nets
- 56
- Pads
- 143
- Tracks, vias
- 94, 0
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 22 Mar 2026
- Updated
- 23 Mar 2026
Overview
RelayController is an open-source printed circuit board by DrJonEA, from the DrJonEA/RPIPicoW-RelayControl repository on GitHub, published under the MIT licence. It is a 4-layer board of 42 × 65 mm with 16 parts on 56 nets, routed with 94 tracks and 0 vias.
It is built around the ULN2003. Its parts include 3 switches, 2 capacitors, 2 ICs, 2 connectors and 1 resistor. It belongs with the home automation and IoT boards and the RP2040 boards of this library.
Main components
1README
README.mdDrJonEA: RPIPicoW-RelayControl
A Raspberry Pi Pico W based Relay control board. Using a ULN2003 as driver for a 5Volt Relay.
Example controlling the Relay via an onboard SPST switch. Plus remote control of MQTT/TLS.
This project is featured on my Youtube Channel DrJonEA.
Clone and Build
The example is built using the Pico SDK version 2.2.0 and a number of libraries which are included as submodules. Please clone the repository using the recurse submodules switch.
I've written a blog post on how to clone, build and debug my projects. It covers command line and VSCode build. I hope this help you get started.
Schematic, PCB Design and Components
The PCB folder contains the KiCAD project files for the PCB Design.
Components:
| Designator | Footprint | Quantity | Designation |
|---|---|---|---|
| "Id" | "Designator" | "Footprint" | "Quantity" |
| 1 | "C1" | "CP_Radial_D10.0mm_P5.00mm" | 1 |
| 2 | "I2C2,I2C1" | "PinHeader_1x04_P2.54mm_Vertical" | 2 |
| 3 | "J4,J3" | "PinHeader_1x04_P2.54mm_Vertical" | 2 |
| 4 | "O1" | "ScrewTerm_Oiyagai_01x02_5mm" | 1 |
| 5 | "A1" | "RaspberryPi_Pico_Common_Unspecified" | 1 |
| 6 | "C2" | "C_Disc_D4.7mm_W2.5mm_P5.00mm" | 1 |
| 7 | "K1" | "Relay_SPDT_SANYOU_SRD_Series_Form_C" | 1 |
| 8 | "ST1" | "ScrewTerm_Oiyagai_01x03_5mm" | 1 |
| 9 | "U1" | "CERDIP-16_W7.62mm_SideBrazed_LongPads_Socket" | 1 |
| 10 | "D1" | "D_DO-41_SOD81_P10.16mm_Horizontal" | 1 |
| 11 | "SW2" | "SW_PUSH_6mm" | 1 |
| 12 | "SW1" | "SW_Latch_7x7_DPDT" | 1 |
| 13 | "R4" | "R_Axial_DIN0309_L9.0mm_D3.2mm_P15.24mm_Horizontal" | 1 |
| 14 | "U2" | "WS2812B Strip" | 1 |
Examples Projects
exp/TestLeds
A test project to check the WS2812B LEDs and Switch on the board
exp/TestRelay
A test projec to check the Relay works. Uses the switch to toggle the relay state. Shows the state of the relay on the WS2812B LED
Main Project
This is a MQTT device connecting to a MQTT Broker (I use Flespi.io). It connects over TLS using WolfSSL to provide a TLS connection. The device will then take commands on the topic "TNG/{DEVICEID}/TPC/Relay/req". With a Payload as JSON saying {"on": True} or {"on": False}.
To build this examples the following environment variables are used to source credentials:
- WIFI_SSID
- WIFI_PASSWORD
- MQTT_CLIENT
- MQTT_USER
- MQTT_PASSWD
- MQTT_HOST
- MQTT_PORT
I have a course showing how I build these types of MQTT Devices over on Udemy.
Python Control Example
Python scripts which can interact with the device are included in the py folder. They require the client id of the device the are controlling in this form:
python3 on.py {DEVICE_ID}
The scripts take credentials for the client from the followin environment variables:
- MQTT_USER
- MQTT_PASSWD
- MQTT_HOST
- MQTT_PORT
NOTE: To use MQTT the device and the client must have different Client IDs (or MQTT_USER).
Parts
16| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | Conn_01x04_Pin | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | I2C1, I2C2 |
| 2 | Touch Display | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J3, J4 |
| 1 | 1000uF | Capacitor_THT:CP_Radial_D10.0mm_P5.00mm | C1 |
| 1 | 10uF | Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm | C2 |
| 1 | 1N4007 | Diode_THT:D_DO-41_SOD81_P10.16mm_Horizontal | D1 |
| 1 | 220R | Resistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P15.24mm_Horizontal | R4 |
| 1 | Elect | JonLib:ScrewTerm_Oiyagai_01x02_5mm | O1 |
| 1 | RaspberryPi_Pico | Module:RaspberryPi_Pico_Common_Unspecified | A1 |
| 1 | SANYOU_SRD_Form_C | Relay_THT:Relay_SPDT_SANYOU_SRD_Series_Form_C | K1 |
| 1 | SW_DPDT_x2 | JonLib:SW_Latch_7x7_DPDT | SW1 |
| 1 | SW_SPST | Button_Switch_THT:SW_PUSH_6mm | SW2 |
| 1 | Screw_Terminal_01x03 | JonLib:ScrewTerm_Oiyagai_01x03_5mm | ST1 |
| 1 | ULN2003 | Package_DIP:CERDIP-16_W7.62mm_SideBrazed_LongPads_Socket | U1 |
| 1 | ~ | JonLib:WS2812B Strip | U2 |
Similar boards
- 4 layers99.6 × 76.2 mm

- 2 layers31 × 64 mm

Power driver
jmfriedt/SDR-GB-SAR
Opensource, openhardware implementation of a Software Defined Radio (SDR) Ground Based Synthetic-Aperture RADAR (GB-SAR)
6 parts70 - 2 layers160 × 100 mm

MPCNC Nano Estlcam Shield
tnn85/MPCNC-Nano-Estlcam-Shield
Ein CNC Shield für die MPCNC in Verwendung mit Estlcam
96 parts70 - 2 layers42.5 × 43.2 mm

ElectronicFocuser
jlecomte/ascom-oag-focuser
Open Source ASCOM-Compatible OAG Focuser For Astrophotography
4 parts55MIT - 4 layers100 × 49.8 mm

- 2 layers134 × 91 mm

- 2 layers75 × 60 mm

DUTler V2
TheYoctoJester/dutler
A bench butler for your Device Under Test: turns a Raspberry Pi Pico into a USB-serial console bridge with power-relay and MOSFET strap/reset control for embedded-Linux bring-up and hardware-in-the-loop.
54 parts23Apache-2.0 - 4 layers76 × 82.5 mm

Nucleo64 CNC
terjeio/CNC_Breakout_Nucleo64
CNC breakout for STM324F411 and ST32F446 development boards
120 parts22
Questions
How big is the RelayController PCB?
It measures 42 × 65 mm and has 4 copper layers, 1.6 mm thick.
What parts does the RelayController use?
16 parts, built around the ULN2003. 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 RelayController KiCad files?
From the DrJonEA/RPIPicoW-RelayControl repository on GitHub, at the commit this page was made from: the board is PCB/RelayController/RelayController.kicad_pcb and its schematic PCB/RelayController/RelayController.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the RelayController design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).