I’m making a custom keyboard with a Raspberry Pi Pico as the MCU, and i don’t understand what all the different pins are for and how they should be wired up to my key matrix and trackpoint.
My current understanding is that GPIO are normal pins that can be wired to the rows and columns, but what of VBUS, VSYS, 3V3, and all the others that aren’t just GPIO or GND? And how should the ground pins be used here?

The schematic currently doesn’t include the trackpoint because i’m planning to hand wire it and the MCU to the PCB, so i can put them under the PCB in the case and i don’t have to try to fit them onto the board. Is there a better way to connect these that won’t require adding a bunch of space to the board to fit the MCU?
So there is a LOT to cover on this, but I’m going to try and keep it to simple overviews.
- VBUS is the voltage supplied to the device (like 5V from USB)
- VSYS is the systems voltage that can be supplied from the device to the things its connecting to (like keys)
- GPIO standards for General Purpose Input / Output, or an uncommitted digital signal pin that can be controlled by the device. It can act as an input or as an output. In a keyboard’s case, this would be predominantly inputs for the keys themselves. If you have RGB LEDs, these would be outputs.
- ADC VREF is the Analog to Digital Converter Reference Voltage, which is the maximum voltage an ADC can measure and convert to a digital value.
- 3V3 is 3.3V out
- 3V3_EN controls the power to the voltage regulator, which lets you shut off the 3.3V supply coming from 3V3
- RUN is the pin used to start, stop, or reset the microcontroller.
- AGND is the analog ground, a dedicated ground for the ADC. Its separate from the digital ground (GND) to prevent noise from interfering with analog signals. It eventually connects to the power supply ground though.
Edited to add: You’ll use GND (ground) shared for all of these keys.
Can i wire up every row to a ground pin as well as a normal IO pin or do i need to do something more with that?
I’d recommend a read here:
https://www.crackedthecode.co/a-complete-guide-to-building-a-hand-wired-keyboard/
It has a solid overview of each step
-
Create ground plane - 1 entire layer for ground. You’ll just use via to connect them
-
read the data sheet it’ll explain what each pin does. Most of the times single pin can act as multiple things and you need to set certain bit to use certain functions.
-
for layout fan out from MCU and then on 1 layer try to be horizontal and on another vertical.
-
when it comes to crowded board vias are both your friends and enemies so use them wisely.
-
make sure the track length, spacing between track and a via, diameter of via, etc. Are within spec for your manufacturer.
-
check if any pins are differential pair. If so again adjust your software settings. I think vBUS is a for maybe usb but check datasheet.
You may also want to check out Robert Feranec’s YouTube channel he has some really good videos. Even one on full end to end keyboard design https://www.youtube.com/playlist?list=PLXvLToQzgzdftro2qK5In8p6ExsDFdpzw
-
You can put the MCU and other circuitry on the underside, but perhaps use at least a 3-layer PCB so you can run an internal ground plane under the power components.
Is this keyboard a one-off or are you doing production runs? Try to keep all the SMD components on the same side if you can.
If you’re using the pico rather than a bare RP2040, you’ll have a much harder time putting anything on the underside though.
It’s a one off, just for me to use. The case i just finished designing has room for the Pico, trackpoint, and wires to those under where the PCB will go.
How does the ground plane usually work on keyboards with only 2 layers? Would it be enough to just connect everything to a ground pin instead of paying for a third layer?
If you can reasonably have the entire bottom layer be connected to ground without the top layer being too crowded, 2 layers could work.
Wires to the underside components? Can you solder them to thru-holes on the underside of the PCB instead?
Not without moving some switches to fit the trackpoint and diodes to fit the Pico. But how hard can hand wiring that one part be⸮
I’m still not clear on how the ground should work. Is it enough to just wire every row to a ground pin as well as a normal input pin?
I was halfway through a message about return path impedance, but remembered the pico is a carrier board with its ground built in it’s USB connector, and the switches are hardly going to care.
My bad, you’ll be fine 👍
VBUS, VSYS, 3V3 - it is all power pins.
As I understand by reading in the datasheet there are 3 ways to power the Pico board:
-USB Micro-B port
-VBUS Pin
-VSYS Pin
============================
VBUS - can be used for output
VSYS - can be used for output
3v3 - output power 3.3v
GND - ground
From datsasheet:
"VBUS is the micro-USB input voltage, connected to micro-USB port pin 1. This is nominally 5V (or 0V if the USB is not connected or not powered). VSYS is the main system input voltage, which can vary in the allowed range 1.8V to 5.5V, and is used by the on-board SMPS to generate the 3.3V for the RP2040 and its GPIO. 3V3_EN connects to the on-board SMPS enable pin, and is pulled high (to VSYS) via a 100kΩ resistor. To disable the 3.3V (which also de-powers the RP2040), short this pin low. 3V3 is the main 3.3V supply to RP2040 and its I/O, generated by the on-board SMPS. This pin can be used to power external circuitry (maximum output current will depend on RP2040 load and VSYS voltage, it is recommended to keep the load on this pin less than 300mA)
ADC_VREF is the ADC power supply (and reference) voltage, and is generated on Pico by filtering the 3.3V supply. This pin can be used with an external reference if better ADC performance is required. AGND is the ground reference for GPIO26-29, there is a separate analog ground plane running under these signals and terminating at this pin. If the ADC is not used or ADC performance is not critical, this pin can be connected to digital ground. RUN is the RP2040 enable pin, and has an internal (on-chip) pull-up resistor to 3.3V of about ~50kΩ. To reset RP2040, short this pin low."
But I’m not proffessional with microcontrollers.


