Skip to the content
2 layers115 × 27 mmTwist4, the printed circuit board in 3D

A USB MIDI controller with 4 endless encoders, 4 128x64 OLED displays, and two buttons; works with Twist VCV Rack plugin

Size
115 × 27 mm
Copper layers
2
Thickness
1.6 mm
Parts
59
Nets
41
Pads
174
Tracks, vias
224, 30
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
1 Jul 2026
Updated
29 Sep 2026

Overview

Twist4 is an open-source printed circuit board by rppicomidi, from the rppicomidi/twist4 repository on GitHub. It is a 2-layer board of 115 × 27 mm with 59 parts on 41 nets, routed with 224 tracks and 30 vias.

Its parts include 30 resistors, 9 connectors, 8 capacitors and 4 switches. It belongs with the lEDs and displays boards and the RP2040 boards of this library.

README

hardware/twist4/README.md

twist4 hardware

Top View

The hardware consists of a Raspberry Pi pico board, 4 EC11-type rotary encoders with push switch, 4 SED1306-based 128x64 OLED display modules, and two pushbutton switches. To maximize the responsiveness of the firmware and to make changing the module I2C addresses unnecessary, each of the 4 OLED displays has its own I2C port. Because the RP2040 only has 2 dedicated hardware I2C ports, the hardware design assumes the firmware will drive the displays using PIO state machine-based I2C ports. Similarly, the hardware design assumes the rotary encoder quadrature encoded A and B lines for each encoder will be decoded using a PIO state machine. Because each PIO contains 4 state machines, dedicating one of the RP2040's 2 PIOs to display I2C ports and the other to quadrature signal decoding is feasible.

A simple RC lowpass filter on each encoder A signal and B signal reduces encoder signal glitches. The Schmitt trigger inputs of the RP2040 chip also help. The remaining resistors are there to pull the GPIO pins high. In all, there are 30 10k resistors and 8 0.01uF capacitors on the board.

The schematic and PCB files were created using KiCad 10.0.

Side View

Bottom View, No Pico Installed

Bottom View, Pico Installed

PCB Notes

I purchased the unpopulated PCBs from OSH Park because it was convenient for me. If you choose another vendor, please make sure the vendor supports the oval holes that the encoders use. If you must use a service that does not support oval holes (DKRed, for example), you will need to change the encoder footprint for each encoder and adjust the routing as required. I did not publish Gerber files for this project because PCB vendors vary on their requirements. Also, OSH Park normally allows you to submit a KiCad .kicad_pdb file instead of Gerbers, but at the time of this writing, they have not yet updated their support for KiCad 10.0.

Bill of Materials

  • 1 Raspbery Pi Pico board. You may substitute a Pico H board.
  • 30 10k 1% 0.1W 0603 resistors
  • 8 0.01uF 6.3V (or higher) X7R 0603 capacitors
  • 4 EC11-type encoders with push switch (I used these, but there are a lot of vendors that make them)
  • 4 0.96 inch 128x64 OLED display modules (I used these AITRIP modules). There are a lot of vendors that make similar modules. If you use a different vendor, check the pinout and display dimensions and make sure they match those of the ATRIP module. There are a lot of modules out there that look the same but have the VCC and GND pins reversed. Also check the color. You can get these modules to display in all white, all blue, and a yellow and blue mix that may not work well with the firmware layout of the display. I used white.
  • 8 M2x10 pan head machine screws.
  • 8 M2 nuts.
  • 2 push buttons switches. You can use whatever normally open push switches you prefer. I used these Gebildet waterproof switches because I liked the way they looked.
  • 1 plastic enclosure with clear top. I used a LeMotech 158x90x60mm junction box. It was bigger than necessary, but not by much, and it looks good to me.
  • 1 micro USB panel mount extension cable Adafruit 6068. You can also attach a microUSB cable to the Pico Board and make the cable captive to your enclosure, but using this connector made the finished build a bit nicer.
  • 4 wires with a 0.1" female square pin receptical on one end, 50mm-75mm. I cut two female-female square pin cables (sometimes called DuPont wires) I had lying around in half. I soldered one wire to each of the pushbutton switch termnals and covered the connections with heat shrink tubing for strain relief. The square pin recepticals attach the switch termnals to the circuit board.
  • 3 2-pin male 0.1" spacing square pin headers
  • 2 20-pin female 0.1" spacing square pin sockets, plastic height 8.5mm. You can use short headers if you wish, but the standard pin sockets are less expensive and there is plenty of room in the enclosure for them. I do not recommend soldering the Pico board to the twist4 PCB board because there may not be enough clearance for the encoders' pins.
  • 2 20-pin 0.1" square pin male headers for the Pico Board (omit if using a Pico H)
  • 1 3-pin 0.1" square pin male header for the Pico Board's debug pins (omit if using a Pico H)

Hand Assembly Advice

This project assumes you are populating the PCBA by hand. The surface mount components are just resistors and capacitors in 0603 packages, so there are no fine pitch ICs to worry about. Because there are components on both sides of the board, some components are hard to solder once other components are in place. Many of the pads of the resistors and capacitors have a connection to the 3.3V power plane or the ground plane. Those planes can act as heat sinks and make the pads more difficult to solder. If you are solder tacking the resistor or capacitor to one pad and then soldering the other, I recommend tacking the pad that is not connected to the power or ground plane first. This will help prevent "tombstoning" and other frustrations.

I recommend soldering components in the following order:

  1. Solder all surface mount components
  2. Attach the display modules to the PCB using M2 hardware and solder the display modules
  3. Solder the encoders
  4. Solder the 2-pin male headers for switches and debug UART (optional; requires the ground pin from the debug header)
  5. Solder the 20-pin female headers for attaching the Pico board
  6. Solder the wires to the pushbutton switch terminals
  7. Put heat shrink tubing over the connections on the pushbutton switch terminals
  8. Solder the 3-pin male header for the Pico board debug port (Omit if using a Pico H; required if not using a Pico H and using the debug UART)
  9. Solder the 20-pin male headers on the Pico Board itself (omit if using a Pico H)

There are holes in the PCB that are slightly oversized for M2 machine screws. I used these holes to attach the display modules to the board before soldering. The oversized holes allow you to slightly adjust the alignment of all 4 displays so they are straight. The screws hold the boards in place to make soldering easier. The AITRIP OLED modules I used had the headers already soldered. I recommend trimming the leads some before soldering to encourage the solder to attach to the PCB instead of wicking up the leads. You may find the VCC and GND pins are difficult to solder because the power plane and ground plane act as head sinks.

I recommend soldering the encoders from the top before soldering them to the bottom to make sure they are flush to the board.

Testing the PCBA

To test the PCB Assembly (PCBA), plug the Pico board to the 2 20-pin sockets. Take care that the VBus pin on the Pico board is connected to the correct socket pin. Connect the pushbutton switches to the 2-pin headers. Load firmware to the board and make sure all 4 OLED displays work. Verify that the computer enumerates the board as a USB MIDI device named twist4. Use a MIDI monitor program such as Pocket MIDI for PC or Mac or the amidi command line utility for Linux to verify that the encoder twists, the encoder switch presses, and the bank button presses send MIDI messages. If it all works, then get ready to put it in an enclosure.

Preparing the enclosure

The PCBA attaches to the enclosure using the threaded encoder bushings and the nuts that come with the encoders. The push switches each mount to the enclosure the hardware that comes with each switch.

Test the assembled fully populated and solderd PCBA before you mount the assembly in an enclosure. You will need to drill 6 holes in the clear polycarbonate enclosure lid for the encoders and the pushbuttons, and one hole on the side of the enclosure for the USB connector. The hole for the USB connector can be any size between 12mm and 16mm. I centered it on the left side of the enclosure. Make sure you remove burrs and drilling debris when you are done.

Drilling the polycarbonate lid is much less forgiving because the holes for all 4 encoders need to be spaced properly, and the line of the encoders has to be parallel to the long edge of the lid. I printed the top silkscreen layer of the board and used the cross mark inside the circle that marked each encoder shaft location as a drilling template. I aligned this on my enclosure lid by eye, which was a mistake. I would use an adjustable square to align the template if I did it again. I drilled small 1/8" pilot holes and then slowly redrilled the holes with progressively larger drills until the encoders fit. The encoder bushings require holes for M7 machine screws. The encoders I used have anti-rotation tabs that prevent the encoders from screwing all the way flush with the lid. To accommodate those, I mounted the PCBA in the holes I drilled for the encoders. I could see the anti-rotation tabs through the plastic. I used a permanent marker to mark the locations of tabs. Then I removed the PCBA and drilled a 3/32" hole in the location I marked. Then I used a precision file to enlarge the holes until all encoders mounted flush to plastic lid. Finally, I drilled mounting holes for the push switches. I aligned those by eye. Again, I should probably have used an adjustable square. Once I had all the holes drilled, I carefully removed burrs and drilling debris, cleanded the lid with soap and water, and then dried the lid with a microfiber cloth. If any dust or bit of drilling waste sticks to an OLED panel or the the inside of the polycarbonate lid, you will see it and it will annoy you.

Final Assembly

Mount the micro USB adapter cable to the side of the box. Optionally, fit the gasket seal under the polycarbonate lid. Mount the PCBA to the box lid. Plug the Micro USB adapter cable to the Pico board. Mount the two pushbutton switches to the box lid. Connect the switches to 2-pin connectors on the PCBA. Run through the tests to make sure everything still works. Screw the lid to the enclosure. Test one more time. You are done.

Parts

59
QtyValueFootprintReferences
3010kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R2, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R20, R21, R22, R23 +14
80.01uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1, C2, C3, C4, C5, C6, C7, C8
8MountingHoleMountingHole:MountingHole_2.5mmH1, H2, H3, H4, H5, H6, H7, H8
4OLED Module ConnectorConnector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ4, J7, J8, J9
4RotaryEncoder_SwitchRotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mmSW1, SW2, SW3, SW4
1Bank 1Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ3
1Bank 2Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2
1Debug UARTConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1
1Pico 1-20Connector_PinSocket_2.54mm:PinSocket_1x20_P2.54mm_VerticalJ5
1Pico 21-40Connector_PinSocket_2.54mm:PinSocket_1x20_P2.54mm_VerticalJ6

Similar boards

  • 2 layers216.9 × 86.8 mmSweepbling lp pcb, the printed circuit board in 3D

    Sweepbling lp pcb

    davidphilipbarr/Sweep

    Sweep - a small promicro based keyboard inspired by the Ferris.

    59 parts2.1k
  • 2 layers132.3 × 94.9 mmCheapino, the printed circuit board in 3D

    Cheapino

    tompi/cheapino

    An affordable split 36 keys keyboard

    59 parts1.2kCC-BY-4.0
  • 2 layers100 × 24 mmSTM32 Klipper Expander, the printed circuit board in 3D

    STM32 Klipper Expander

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    59 parts1.1kGPL-3.0
  • 2 layers77.5 × 20.4 mmTester, the printed circuit board in 3D

    Tester

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    59 parts915
  • 2 layers100 × 96 mmBacklight, the printed circuit board in 3D

    Backlight

    jackw01/scanlight

    A better light source for scanning color negative film

    59 parts397CERN-OHL-W-2.0
  • 2 layers95.3 × 100 mmBeyblock20, the printed circuit board in 3D

    Beyblock20

    ChrisChrisLoLo/beyblock20

    The magnetic, modular, 20-key macropad that can join together to form an ortholinear board

    59 parts335GPL-3.0
  • 2 layers94 × 94.5 mmVikropad, the printed circuit board in 3D

    Vikropad

    sadekbaroudi/vik

    This is a VIK module designed to mount a PER56 scroll ring, with a 35mm Cirque Trackpad and optional WS2812B LEDs.

    59 parts220CERN-OHL-P-2.0

Questions

How big is the Twist4 PCB?

It measures 115 × 27 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Twist4 use?

59 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 Twist4 KiCad files?

From the rppicomidi/twist4 repository on GitHub, at the commit this page was made from: the board is hardware/twist4/twist4.kicad_pcb and its schematic hardware/twist4/oled-encoder-channel.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Twist4 design in my own project?

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