Skip to the content
PCBKitNew board
2 layers72 × 28 mm4button-3wire, the printed circuit board in 3D

Replacement firmware and optional wired remote for UGREEN brand USB 2.0 sharing switch

Size
72 × 28 mm
Copper layers
2
Thickness
1.6 mm
Parts
10
Nets
6
Pads
47
Tracks, vias
119, 0
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
12 Feb 2019
Updated
13 Feb 2019

Overview

4button-3wire is an open-source printed circuit board by GeorgeIoak, from the GeorgeIoak/usbswitch-remote repository on GitHub, published under the Unlicense licence. It is a 2-layer board of 72 × 28 mm with 10 parts on 6 nets, routed with 119 tracks and 0 vias.

Its parts include 4 switches, 2 diodes, 1 capacitor, 1 resistor and 1 connector.

README

README.md

usbswitch-remote

Replacement firmware and optional wired remote for UGREEN brand USB 2.0 sharing switch.

I've tested this on a version of the switch from 2017 which had five USB type A sockets, and the button was in one corner. Newer versions of the same product appear to have four Type B and one Type A, which no longer violates the USB spec, and the button is in the center. I'm not sure if those units use compatible firmware.

This device is effectively a high-speed analog multiplexer, based on a tree of three SV7030 USB 2.0 switch chips controlled by an STM8S003F3 microcontroller.

Firmware

The STM8 is a low-cost 8-bit micro with 8kB of flash memory, and there's an available PCB footprint for an STLink or compatible debug interface.

There is no GCC or LLVM port, but we can tolerate SDCC for a small project like this!

The included firmware is written in C for the bare metal, no vendor libraries are needed. It supports switching channels using the built-in button or an optional wired remote. The original firmware had quite bad button debouncing, which is fixed. I've also omitted support for automatic switching with voltage sensing. It could be added, but I didn't want the feature as I found it distracting.

Remote

To have direct control over switching to each of the four channels, a simple wired remote with four lighted buttons can be added using an audio cable and some passive components. See the included schematic. It uses a variant of charlieplexing that drives four LEDs as usual, then splits the two remaining currents paths into two buttons each, using an RC circuit to disambiguate them. If this needs a name, I'm calling it Tucoplexing after my cat Tuco! 😸

Parts

10
QtyValueFootprintReferences
4SW_Push_LED_Separate4button-3wire:SW_LightedPush_ITW_Series39_SmallPadsSW1, SW2, SW3, SW4
21N4001Diode_THT:D_DO-35_SOD27_P7.62mm_HorizontalD5, D6
10.1uFCapacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mmC1
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR4
1MountingHoleMountingHole:MountingHole_3.2mm_M3H1
1PCB Audio Jack4button-3wire:Jack_3.5mm_7mmSpacingJ1

Questions

How big is the 4button-3wire PCB?

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

What parts does the 4button-3wire use?

10 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 4button-3wire KiCad files?

From the GeorgeIoak/usbswitch-remote repository on GitHub, at the commit this page was made from: the board is 4button-3wire/4button-3wire.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the 4button-3wire design in my own project?

Its repository publishes it under the Unlicense licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers57 × 55.2 mmLogicAnalyzer, the printed circuit board in 3D

    LogicAnalyzer

    gusmanb/logicanalyzer

    24 channel, 100Msps logic analyzer hardware and software

    10 parts5.1kGPL-3.0
  • 2 layers32.2 × 15.4 mmProtector, the printed circuit board in 3D

    Protector

    byrantech/laptop

    anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.

    10 parts4.3kMIT
  • 2 layers26 × 18 mmConn, the printed circuit board in 3D

    Conn

    yaqwsx/KiKit

    Automation tools for KiCAD

    10 parts2.1kMIT
  • 2 layers44.3 × 30.5 mmLime2-SATA RevA, the printed circuit board in 3D

    Lime2-SATA RevA

    OLIMEX/OLINUXINO

    OLINUXINO is Open Source / Open Hardware, low cost from EUR 24 Linux Industrial grade Single Board Computer capable to operate -25+85C

    10 parts1.5k
  • 2 layers17.8 × 43.2 mmNano Adapter, the printed circuit board in 3D

    Nano Adapter

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    10 parts1.1kGPL-3.0
  • 2 layers53.9 × 23.2 mmBuffer, the printed circuit board in 3D

    Buffer

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    10 parts1kGPL-3.0