Skip to the content
PCBKitNew board
2 layers50 × 72 mmVirtaboksi, the printed circuit board in 3D

12/24/48V power switch for solar powered applications

Size
50 × 72 mm
Copper layers
2
Thickness
1.6 mm
Parts
66
Nets
52
Pads
216
Tracks, vias
312, 48
Pours
7
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
6 Jul 2023
Updated
4 Nov 2023

Overview

Virtaboksi is an open-source printed circuit board by zouppen, from the zouppen/virtaboksi repository on GitHub. It is a 2-layer board of 50 × 72 mm with 66 parts on 52 nets, routed with 312 tracks and 48 vias.

It is built around the STM8S003F3P6, SRV05-4 and SP3485EN-Y, with the IRF4905, ZMM5V6-MS and MMBT3906 among its other parts. Its parts include 19 resistors, 13 transistors, 8 diodes, 7 connectors and 5 ICs. It belongs with the STM8 boards of this library.

Main components

7

README

README.md

Virtaboksi

Virtaboksi is a multi-purpose 3-channel common-earth power switch, rating 12–48 VDC, 20 A. It has multiple operating modes:

  • Home/away switch supporting three individual groups and is optimized for solar energy off-grid applications.

  • Water pump controller with pressure sensor input and control for combined submersible and pressure pump system. Additionally, a throw-over switching capability to drop loads while pumping.

  • Generic Modbus RTU server (slave) with 3 solid-state "coils", 3 digital outputs, and 4 digital inputs.

3D model

In the picture above the Powerpole connector colors are incorrect. Red is used for inputs and black for outputs. In a real product, the three groups have different colors: red, yellow and blue.

Design principles

  • Flexible voltage options; 10–34 V input on first group, 10–60 V on second and third group.
  • High current support. With passive cooling, 20 A loads can be controlled. MOSFETs are capable of switching over 100 A continuous current in case where cooling and PCB traces are reinforced.
  • Small size: Thanks to transistor control, the size is way smaller than for three contactors of similar rating.
  • Low losses: Internal resistance <10mΩ.
  • Rugged: All digital I/O ports are short-circuit, reverse voltage and surge protected.
  • Power saving: When loads are off, the power consumption is minimal, less than 5mW, allowing it to be left powered on over dark winters.
  • Hacker friendly: You can create your own firmware for the STM8 microcontroller, allowing real-time and stand-alone control of your loads and connectivity to other peripherals up to 1 km distance over RS-485.

Operating modes

Home/away mode

Status: 💚 Functional

This unit provides priority output on OUT1 when the switch is in either home or away position. Home controls OUT2 and OUT3 groups and can be used to control two separate voltages as long as they have a common ground.

An example use case is a solar off-grid system with two 12V batteries in series providing 24 volts, plus 12 volts generated from 24V using a step-down DC converter. DC converter is not included in the package.

In that case this switch can be used to turn the loads partially while being away, such as keeping refrigerator running but turning off lights while not present. When using a DC converter, its input is connected OUT1 its output (12V) to IN3.

Maximum voltage in IN1 is 34 VDC. The limitation comes from the internal power supply. In case you want to use higher voltages in IN1, cut the trace F1 on the bottom of this board and power the system directly from a regulated 3.3 VDC supply via the terminals.

IN2 and IN3 are rated for 60 volts maximum, making it possible to control 48V nominal voltage loads. Minimum voltage for all groups is about 10 volts. Under 10 volts, MOSFET control becomes unreliable.

How to connect

In home/away mode, when I1 is shorted to the ground, the oprating mode is away. When I2 is shorted, the mode is home. If both connectors are open, operating mode is off.

Optionally, LED anodes can be connected directly to O1 and O2. They represent home and away operating modes, in that order. There is a current limiter controllable by R1 to limit the maximum current of O1...O3 to about 15 mA by default, so series resistors are not needed.

If your solar controller has a low battery condition relay, it can be connected to I3. When the input is high, the system is forced to off mode, ignoring the state of home/away switch.

I4 is not used in this mode.

Water pump controller mode

Status: 🔬 Hardware OK

Hardware is capable, but no firmware support yet.

Modbus RTU server mode

Status: 🔬 Hardware OK

RS-485 hardware is tested and some firmware tests performed, but no Modbus implementation exists yet.

Building firmware

To build firmware, you need CMake and sdcc. The preparations are very standard CMake stuff. In firmware subdirectory, run:

sh
mkdir build
cd build
cmake ..

And then, make compiles it. Alternatively, make upload to compile and flash.

License

The firmware is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The hardware is provided as source-available: The schematics and PCB layout are provided for reference only. The files can be freely distributed without limitations but no derivative works are allowed without a permission from the copyright holders.

Parts

66
QtyValueFootprintReferences
610Resistor_SMD:R_0603_1608MetricR9, R10, R13, R14, R17, R18
6HeatsinkOwn parts:Heatsink_AAVID_576802B03900G-nocourtHS1, HS2, HS3, HS4, HS5, HS6
6IRF4905Package_TO_SOT_THT:TO-220-3_VerticalQ2, Q3, Q5, Q6, Q8, Q9
6ZMM5V6-MDiode_SMD:D_MiniMELFD3, D4, D5, D6, D7, D8
45kResistor_SMD:R_0603_1608MetricR19, R20, R21, R22
4MMBT3906Package_TO_SOT_SMD:SOT-23Q10, Q11, Q12, Q13
4MountingHole_PadMountingHole:MountingHole_3.2mm_M3_Pad_ViaH1, H2, H3, H4
313kResistor_SMD:R_0603_1608MetricR8, R12, R16
32N7002Package_TO_SOT_SMD:SOT-23Q1, Q4, Q7
368kResistor_SMD:R_0603_1608MetricR7, R11, R15
3Powerpole 01x02Powerpole:45A-VERT-PAIRJ5, J6, J7
2220Resistor_SMD:R_0603_1608MetricR1, R6
2SRV05-4Package_TO_SOT_SMD:SOT-23-6U1, U3
110uCapacitor_SMD:C_1206_3216MetricC1
11uCapacitor_SMD:C_0603_1608MetricC3
120kResistor_SMD:R_0603_1608MetricR5
122uCapacitor_SMD:C_0603_1608MetricC2
1AMSRI-783.3-NZConverter_DCDC:Converter_DCDC_RECOM_R-78E-0.5_THTU2
1External_01x06Connector_Phoenix_MC:PhoenixContact_MCV_1,5_6-G-3.5_1x06_P3.50mm_VerticalJ2
1FuseOwn parts:Fuse-kindof_1x02_P3.6mm_D0.4mm_OD1mmF1
1LEDLED_SMD:LED_0805_2012MetricD2
1Optional_01x03Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ3
1Panel_01x06Connector_Phoenix_MC:PhoenixContact_MCV_1,5_6-G-3.5_1x06_P3.50mm_VerticalJ1
1SMAJ33ADiode_SMD:D_SMA_HandsolderingD1
1SP3485ENPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU4
1STM8S003F3PPackage_SO:TSSOP-20_4.4x6.5mm_P0.65mmU5
1TagConnect_TC2030-NLConnector:Tag-Connect_TC2030-IDC-NL_2x03_P1.27mm_VerticalJ8

Questions

How big is the Virtaboksi PCB?

It measures 50 × 72 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Virtaboksi use?

66 parts, built around the STM8S003F3P6, SRV05-4, SP3485EN-Y and IRF4905. 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 Virtaboksi KiCad files?

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

Can I use the Virtaboksi design in my own project?

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

Similar boards

  • 2 layers34 × 71.8 mmPutkiranta, the printed circuit board in 3D

    Putkiranta

    zouppen/putkiranta

    Jotakin sekoilua

    18 parts
  • 4 layers100 × 80 mmNice Buoy V1 0, the printed circuit board in 3D

    Nice Buoy V1 0

    pnn69/Kicad_PCB

    Schematics and PCB's designed with Kicad

    160 parts
  • 4 layers243.8 × 171.5 mmNeotron Pico, the printed circuit board in 3D

    Neotron Pico

    Neotron-Compute/Neotron-Pico

    A Neotron powered by the Raspberry Pi Pico

    242 parts250
  • 4 layers243.8 × 245.5 mmNeotron Common Hardware, the printed circuit board in 3D

    Neotron Common Hardware

    Neotron-Compute/Neotron-Common-Hardware

    Contains KiCad footprints and symbols shared across multiple Neotron projects.

    287 parts4CC-BY-SA-4.0
  • 2 layers98.2 × 53.3 mmPre Ignition, the printed circuit board in 3D

    Pre Ignition

    OpenLogicEFI/Hardware

    Hardware is based off an open source project called Speeduino by Josh Stewart.

    102 parts19
  • 4 layers243.8 × 171.5 mmNeotron pico, the printed circuit board in 3D

    Neotron pico

    kitspace-test-repos/kicad6-file-collection

    240 partsMIT
  • 4 layers50 × 50 mmTherm, the printed circuit board in 3D

    Therm

    ControlSystemIntegrators/Therm_temp_4_20_xmtr

    Fully analog 2-wire 4-20 mA NTC thermistor temperature transmitter, built from multi-sourced parts — plus an instrumentation-theory tutorial. Default build: 20-40 C for chocolate temperature control.

    45 partsMIT
  • 2 layers65 × 35 mmJuksautin, the printed circuit board in 3D

    Juksautin

    zouppen/pumpunjuksautin

    Tricking NTC thermistor on a heat pump

    27 parts7GPL-3.0