Skip to the content
PCBKitNew board
2 layers65 × 56 mmPiswitcher plus board, the printed circuit board in 3D

Piswitcher plus board

FibStack/pi-switcher-plus

The FibStack PiSwitcher Plus board was designed to help you in your next automation project.

Size
65 × 56 mm
Copper layers
2
Thickness
1.6 mm
Parts
48
Nets
72
Pads
176
Tracks, vias
348, 12
Pours
1
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
14 Oct 2022
Updated
31 Oct 2026

Overview

Piswitcher plus board is an open-source printed circuit board by FibStack, from the FibStack/pi-switcher-plus repository on GitHub. It is a 2-layer board of 65 × 56 mm with 48 parts on 72 nets, routed with 348 tracks and 12 vias.

It is built around the ATTINY824-SSU. Its parts include 18 resistors, 9 diodes, 6 transistors, 4 connectors and 1 capacitor. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

PiSwitcher Plus

PiSwitcher Plus

Overview

The FibStack PiSwitcher Plus board was designed to help you in your next automation project.

The board has four high-quality relays allowing it to switch high voltage and currents. Controlling a steam iron or an oven is not the right task for the board, but it will handle most home appliances below 1200W. Each relay has an LED indicator showing when the NO (Normal Open) contact is connected to the COM (Common).

Additionally, the board has four 12-bit ADC channels that can convert electric signals up to 5 volts. The converted value allows more flexibility in the automation decision logic.

The FibStack Dashboard allows testing things on the fly without writing any code. Alternatively, you can control the board using the CLI tool or programmatically using provided libraries. See the Documentation section below for links to Getting Started guide and references.

WARNING

WARNING. Hazard of severe electrical shock or burn when using High Voltage/Current applications. Obey High Voltage/Current safety procedures. FibStack is not responsible for any damage or injury that occurs from improper High Voltage use.

Architecture

PiSwitcher Plus Architecture Diagram

On the PiSwitcher Plus board, the ATTiny824 microcontroller receives commands from the RaspberryPi board through the I2C interface. The software package facilitates communication between the Raspberry Pi and the PiSwitcher Plus board.

The libfibstack library is used by any library or tool directly or indirectly. You can use the libfistack library directly in your C project. Please consult the C API Reference.

The fibstackcli is a convenient tool to get device statuses and switch relays from the command lines.

The fibstacklib_cffi is a Python wrapper around the libfistack library. We provide a fibstacklibpy library for convenience if you want to use it in your Python projects. See the Python API Reference.

The FibStack Dashboard is a convenient web-based UI tool that allows you to control the PiSwitcher Plus board. It consists of the back-end python script and a front-end project that uses Angular.

Project organization

  • piswitcher_plus_board/: this folder is a KiCAD project that contains FibStack PiSwitcher Plus board schematics and PCB layout files.
  • software/attiny824_switch_adc_board/: This folder contains the Microchip Studio project with the source files for the ATTiny824 microcontroller. Note that the build will create the *.hex and *.eep files. Flash the ATTiny program memory with the *.hex file and the EEPROM memory with the *.eep file.
  • software/libfibstack/: C library containing data structures and functions to communicate with the PiSwitcher Plus board.
  • software/fibstackcli/: This folder contains the CLI tool source code.
  • software/fibstacklib_cffi/: This folder contains the source code for the libfibstack library wrapper for Python.
  • software/fibstacklibpy/: The Python library source code.
  • software/py_webapp/: This folder contains the source code for the back-end service.
  • software/ng-webapp/: This folder contains the source code for the FibStack Dashboard UI. The project uses Typescript and Angular framework.
  • software/installer/: This folder contains scripts to install and uninstall the software package on the Raspberry Pi OS. The information on how to create the installation package will be added later.

Development tools

  • Microchip Studio 7.0: The IDE for writing and building source code for the ATTiny chip. We also use this tool to flash the chips.
  • ATMEL-ICE: Hardware tool for flashing program and EEPROM memories.
  • Python CFFI: The Python wrapper library to build the fibstacklib_cffi project.
  • Angular CLI 11.1.1 To develop and build Angular projects.
  • Python 3.7 and up
  • Raspberry Pi OS GCC compiler

BOM

#ComponentsRecommended modelsFootprintQuantity
1PCBRecommended two-layer PCB board of 1.6 mm thickness1
2U1ATTiny824-SSUSOIC-14 package, 3.9x8.7mm pitch: 1.27mm1
3C1Any 100nF 50V SMD capacitor0805 (2012 metric)1
4Q1 - Q62N7002 N-channel MOSFET transistor, 60V 300mASOT-23-26
5RL1 - RL4General purpose SPDT 5VDC relay. Recommended models J0971C, YX201-S-105D, or similar.J0971C4
6D1SMD LED RED0603 (1608 metric)1
7D2, D3, D6, D7SMD LED GREEN0603 (1608 metric)4
8D4, D5, D8, D9Any general purpose SMD Diode, 75V, 200mAMicroMELF4
9R1, R2, R3, R4, R5, R9, R10, R15, R16Any 10K 5% 1/4W SMD Resistor0603 (1608 metric)9
10R6, R7, R8, R11, R12, R13, R14, R17, R18Any 1K 5% 1/4W SMD Resistor0603 (1608 metric)9
11J1Extended GPIO Male Female Header, 2x20, pitch 2.54mm2x20 - P2.54mm1
12J2Optional, Male Header Connector, 2x3, pitch 2.54mm2x3 - P2.54mm1
13J3Male Header Connector, 1x6, pitch 2.54mm1x6 - P2.54mm1
14J4Screw Terminal Block 1x12, Pitch 3.5mm. Alternatively, you can use two of 1x6, three of 1x4, or four of 1x3.1x12 - P3.5mm1

For the Extended GPIO Male Female header connector (J1), we recommend using a component as shown in the figure below. The female part has a height of 8.5mm plus two plastic pieces of 2.5mm. The female part is placed on the bottom of the board and soldered on the top of the board. The male pins should be 9.8mm or longer to allow an additional expansion board to be connected.

Extended GPIO Header Connector

Documentation

I2C Protocol

The software package communicates with PiSwitcher Plus through the I2C (or IIC, TWI) interface. Theoretically, you can send the instructions from any device that supports the I2C interface. We developed a simple protocol that uses only five commands for now. You can write your software to control the board using the commands below.

#CommandDescription
1versionReturns a constant string from the board that represents the Firmware/Hardware version.
2setaddr:<new_address_value>Set the PiSwitcher Plus board I2C address. The valid address value should be an integer between 3 and 119.
3statusReturns a set of values delimited by a colon :. Each value represents a device value. The first four values represent the Relay values, 1 means the relay's coil is energized, 0 otherwise. The last four values represent the values from ADC channels. Example: 0:1:1:0:120:1023:0:785.
4get:<device_id>Returns the value (status) for the specified device. The relay devices IDs are from 0 to 3 inclusive. The ADC channel device IDs are from 4 to 7 inclusive.
5set:<device_id>:<value>Sets the value for the specified device. This command is used to switch relay devices on the PiSwitcher Plus board. The set command doesn't work for ADC devices as they are Read-Only. The valid values for the device_id are from 0 to 3 inclusive. The possible values are 0 and 1.

License Information

This product is open source!

Please review the LICENSE.md file for license information. Distributed as-is; no warranty is given.

Parts

48
QtyValueFootprintReferences
910KResistor_SMD:R_0603_1608MetricR1, R2, R3, R4, R5, R9, R10, R15, R16
91KResistor_SMD:R_0603_1608MetricR6, R7, R8, R11, R12, R13, R14, R17, R18
62N7002fibstack_piswitcher_plus_lib:SOT-23-3Q1, Q2, Q3, Q4, Q5, Q6
5LEDLED_SMD:LED_0603_1608MetricD1, D2, D3, D6, D7
4DDiode_SMD:D_MicroMELFD4, D5, D8, D9
4J0971Cfibstack_piswitcher_plus_lib:J0971CRL1, RL2, RL3, RL4
4MountingHolefibstack_piswitcher_plus_lib:CustomMountingHoleH1, H2, H3, H4
1100nCapacitor_SMD:C_0805_2012MetricC1
1ATtiny824-SSPackage_SO:SOIC-14_3.9x8.7mm_P1.27mmU1
1Conn_01x06_MaleConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ3
1Conn_02x03_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_VerticalJ2
1LOGOfibstack_piswitcher_plus_lib:fibstack_logoG***
1Raspberry_Pi_2_3Connector_PinHeader_2.54mm:PinHeader_2x20_P2.54mm_VerticalJ1
1Screw_Terminal_01x12TerminalBlock_4Ucon:TerminalBlock_4Ucon_1x12_P3.50mm_HorizontalJ4

Questions

How big is the Piswitcher plus board PCB?

It measures 65 × 56 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Piswitcher plus board use?

48 parts, built around the ATTINY824-SSU. 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 Piswitcher plus board KiCad files?

From the FibStack/pi-switcher-plus repository on GitHub, at the commit this page was made from: the board is piswitcher_plus_board/piswitcher_plus_board.kicad_pcb and its schematic piswitcher_plus_board/piswitcher_plus_board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Piswitcher plus board design in my own project?

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

Similar boards

  • 2 layers45 × 72 mmRelay, the printed circuit board in 3D

    Relay

    adarwoo/modbus_relay

    A modbus RTU relay board with 3 relays for the CNC. This uses the ASX framework

    43 parts1
  • 2 layers60 × 99.6 mm9-firefly badge, the printed circuit board in 3D

    9-firefly badge

    lepi-labs/9-firefly-badge

    Firefly jar PCB badge

    22 parts
  • 2 layersDemo, the printed circuit board in 3D

    Demo

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    48 parts547GPL-3.0
  • 2 layers18.8 × 18.1 mmAmoeba royale, the printed circuit board in 3D

    Amoeba royale

    mtl/keyboard-pcbs

    Keyboard PCBs

    48 parts485
  • 2 layers48.1 × 115.6 mmAPU ENG CRANK PANEL, the printed circuit board in 3D

    APU ENG CRANK PANEL

    jrsteensen/OpenHornet

    OpenHornet 1:1 F/A-18C Simulator Repository

    48 parts431
  • 2 layers106 × 55 mmEndcap, the printed circuit board in 3D

    Endcap

    softerhardware/Hermes-Lite2

    A second generation low-cost amateur HF software defined radio transceiver.

    48 parts384
  • 2 layers42.8 × 88 mm18650 pcb, the printed circuit board in 3D

    18650 pcb

    CRImier/MyKiCad

    My KiCad boards. Can't be bothered uploading individually anymore, so here you go.

    48 parts253GPL-3.0