Skip to the content
PCBKitNew board
2 layers21.6 × 52.3 mmPs2 pico hat, the printed circuit board in 3D

Ps2 pico hat

No0ne/ps2x2pico399

USB keyboard/mouse to PS/2 interface converter using a Raspberry Pi Pico

Size
21.6 × 52.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
17
Nets
38
Pads
77
Tracks, vias
115, 41
Pours
2
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
23 Aug 2022
Updated
13 Apr 2026

Overview

Ps2 pico hat is an open-source printed circuit board by No0ne, from the No0ne/ps2x2pico repository on GitHub, published under the MIT licence. It is a 2-layer board of 21.6 × 52.3 mm with 17 parts on 38 nets, routed with 115 tracks and 41 vias.

It is built around the BSS138. Its parts include 8 resistors, 4 transistors and 2 connectors. It belongs with the keyboards and input boards and the RP2040 boards of this library.

Main components

1

README

README.md

ps2x2pico

USB keyboard/mouse to PS/2 interface converter using a Raspberry Pi Pico

hw1hw2hw3hw4

Keyboard only (incl. PC-XT) variant: https://github.com/No0ne/ps2pico
There is also an alternative ps2pico firmware for the PC-XT and ps2x2pico hardware: ps2pico-XT-alt.uf2

Additional excellent documentation by Ray: https://minuszerodegrees.net/keyboard/ps2x2pico.htm

PicoMiteVGA variant: https://github.com/No0ne/hid2cdc

PiKVM integration:

ITX-Llama integration: https://github.com/eivindbohler/itxllama

Usage

⚠️ Please note that some older motherboards have non-resettable fuses rated under 300mA.

Check the power consumption of your keyboard/mouse/hub first before plugging in!

Level Shifter wiring diagram

PS/2 Pinout diagram

⚠️ Do not assume wire colors will match cables depicted in photos. Double-check your pinout with a multimeter.

PS/2 passthru

If you also want to use a real PS/2 keyboard and mouse together with your USB devices you can mount another level shifter on top of the pico. These two ports work as PS/2 inputs and are passed through to the PS/2 output ports.

  • GPIO3 LV1 - keyboard data
  • GPIO4 LV2 - keyboard clock
  • GPIO5 LV - 3.3V pull-up
  • GND - GND
  • GPIO6 LV3 - mouse data
  • GPIO7 LV4 - mouse clock

Don't forget to wire HV to 5V and your PS/2 sockets to power the connected PS/2 devices.

PS/2 passthru is especially useful with the PiKVM Pico HID or Pico HID Bridge as you can continue using your existing peripherals.
⚠️ Please note that the UF2 from PiKVM uses different GPIOs due to jumper pins:

  • GPIO26 LV1 - keyboard data
  • GPIO27 LV2 - keyboard clock
  • GPIO16 LV3 - mouse data
  • GPIO17 LV4 - mouse clock

Don't forget to wire LV to 3.3V and GND to GND separately as the level shifter does not fit directly on top of the pico.

Troubleshooting

You can hook up a USB serial adapter to GPIO0 for additional debugging output. The serial settings are 115200 baud, 8 data bits and no parity. You can also use another Pico running the pico-uart-bridge for this.

⚠️ If you have a YD-RP2040 (see silkscreen on back of board if unsure) and are not using a USB hub with its own power supply, you need to bridge two pads of the diode pair near the USB-C port as seen here:

Fix for YD-RP2040

Build

Install needed libraries and tools:

sh
sudo apt install cmake gcc-arm-none-eabi build-essential pkg-config libusb-1.0-0-dev libusb-1.0-0

Get the Raspberry Pi Pico SDK version 1.5.1:

sh
git clone https://github.com/raspberrypi/pico-sdk
export PICO_SDK_PATH=/path/to/pico-sdk
cd $PICO_SDK_PATH
git checkout 1.5.1
git submodule update --init

Update to the latest TinyUSB release 0.17.0:

sh
cd $PICO_SDK_PATH/lib/tinyusb
git checkout 0.17.0

Generate the UF2 file:

sh
cd /path/to/ps2x2pico
mkdir build
cd build
cmake ..
make

Case

There are two case versions for this project, one for the hat variant in freecad/ and one for the level shifter version in openscad/.

Level shifter version

The case is snap fit and doesn't require any fasteners. You can print it as is using ps2x2pico_case.stl in your slicer but various customisation options are included in the underlying OpenSCAD model ps2x2pico_case.scad should you need them. This allows you to adjust tolerances or clearances of the height of the case and the various holes and support posts.

Note that when opening the case in OpenSCAD the BOSL2 library is required.

Resources

Parts

17
QtyValueFootprintReferences
810KLogic_Level_Bidirectional:0603-RESR1, R2, R3, R4, R5, R6, R7, R8
4BSS138Logic_Level_Bidirectional:SOT23-3Q1, Q2, Q3, Q4
2OSHW-LOGOSLogic_Level_Bidirectional:OSHW-LOGO-SLOGO1, LOGO2
1Conn_01x20_Female_leftConnector_PinSocket_2.54mm:PinSocket_1x20_P2.54mm_VerticalJ1
1Conn_01x20_Female_rightConnector_PinSocket_2.54mm:PinSocket_1x20_P2.54mm_VerticalJ2
1Kycon-KMDGX-6S-BSLibrary:KMDGX-6S-BSMini-DIN-6

Questions

How big is the Ps2 pico hat PCB?

It measures 21.6 × 52.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Ps2 pico hat use?

17 parts, built around the BSS138. 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 Ps2 pico hat KiCad files?

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

Can I use the Ps2 pico hat 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).

Similar boards

  • 4 layers36 × 50.2 mmRacer, the printed circuit board in 3D

    Racer

    StuckAtPrototype/Racer

    These are structured into their own files. I could have used submodules, but decided against it.

    83 parts3.8kApache-2.0
  • 4 layers95 × 95 mmCube motherboard, the printed circuit board in 3D

    Cube motherboard

    willem-pennings/balancing-cube

    A cube that balances itself in a corner or edge using reaction wheels

    52 parts1.1kGPL-3.0
  • 2 layers54.6 × 70.9 mmBeagleLogic Cape, the printed circuit board in 3D

    BeagleLogic Cape

    abhishek-kakkar/BeagleLogic

    A Software Suite that implements a logic analyzer with the PRU on the BeagleBone / BeagleBone Black.

    22 parts479GPL-3.0
  • 2 layers44.2 × 29.3 mmI2c tiny usb, the printed circuit board in 3D

    I2c tiny usb

    harbaum/I2C-Tiny-USB

    Cheap and simple I²C to USB interface

    27 parts454
  • 2 layers45 × 45 mmAirCube, the printed circuit board in 3D

    AirCube

    StuckAtPrototype/AirCube

    Works standalone out of the box. Pairs with Home Assistant in minutes. Other platforms are supported through community-contributed extensions.

    61 parts379Apache-2.0
  • 4 layers74 × 104 mmBeepy, the printed circuit board in 3D

    Beepy

    sqfmi/beepy-hardware

    Beepy Hardware

    160 parts348MIT
  • 4 layers70 × 54 mmPicoLab, the printed circuit board in 3D

    PicoLab

    CoretechR/PicoLab

    Web-GUI Embedded Multitool

    285 parts327GPL-3.0