

Raspberry Pi Bluetooth LE HID Game controller
- Size
- 126.4 × 97.8 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 29
- Nets
- 48
- Pads
- 174
- Tracks, vias
- 169, 17
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 8.0 (file 20240108)
- Created
- 18 Jan 2025
- Updated
- 31 Mar 2025
Overview
Gamepad is an open-source printed circuit board by kevinisabelle, from the kevinisabelle/raspigamecontroller repository on GitHub. It is a 2-layer board of 126.4 × 97.8 mm with 29 parts on 48 nets, routed with 169 tracks and 17 vias.
It is built around the MCP3008-I/P. Its parts include 9 switches, 8 resistors, 2 connectors, 1 capacitor and 1 IC. It belongs with the keyboards and input and radio and wireless boards of this library.
Main components
1README
README.mdRaspberryPi Bluetooth LE HID Game controller
Reference documentation
- HID Usage Table: https://www.usb.org/document-library/hid-usage-tables-16
- Device Class Definition for Human Interface Devices (HID): https://www.usb.org/document-library/device-class-definition-hid-111
- HID over GATT Profile 1.0: https://www.bluetooth.com/specifications/specs/hid-over-gatt-profile-1-0/
- Bluez dbus interfaces: https://github.com/bluez/bluez/tree/master/doc
Current Issues:
- Reconnection not working automatically
- The number of axies also seems to be limited.
Setup
Install python and bluez
#sudo apt get py3-setuptools
sudo apt update && sudo apt upgrade -y
sudo apt install libbluetooth-dev
# Blutooth
sudo systemctl enable bluetooth
sudo systemctl start bluetoothEnable Spi0 and Spi1
- Run the raspi-config app and enable Interface Spi.
- Then modify /boot/firmware/config.txt
- Add these if not present:
dtparam=spi=on
dtoverlay=spi1-3cs- Reboot
Setup bluez service parameters
sudo nano /lib/systemd/system/bluetooth.service
# Modify the exec start
ExecStart=/usr/libexec/bluetooth/bluetoothd -E --noplugin=*
# Save the file and restart bluetooth
sudo systemctl daemon-reload
sudo systemctl restart bluetoothGenerating the Hid Report Map and Payload Interface
In the HidTools folder, use the HidReportMapCreator program.
- Create a copy of the KiGPSimple.cs class and name it as you like
- Modify the Program.cs and use the new class to create the device reference
- Run the program
- Copy the python code from the output in the python/GamepadValues.py file
- Modify the python/UpdaterService.py and adapt the _update_gamepad_controls according to the generated GamepadValues1 class
Running
Start the program
- Copy the content of the python folder on the Pi
- Run with
sudo python3 App.py- Once the program is properly started, you can connect it to Windows using the Bluetooth configuration like any device.
- Once the device is bonded in Windows, you can open the "Set up USB controller" to display connected Gamepads.
Debugging
Using dbus-tool
Use dbus-tool to check Bluez is connecting with the program properly:
sudo dbus-monitor --systemUsing Wireshark
Use Wireshark on Windows to inspect the GATT services packets.
- Start a session using Pcap2
- Filter out protocol USB
!(\_ws.col.protocol == "USB")- Or you can filter in the proper services:
(\_ws.col.protocol == "ATT" || \_ws.col.protocol == "SDP" || \_ws.col.protocol == "SMP" || \_ws.col.protocol == "GAP" || \_ws.col.protocol == "GATT" || \_ws.col.protocol == "HCI_EVT")Using Hid Explorer
You can also use this great online tool (which runs in the browser): https://nondebug.github.io/webhid-explorer/ . Using this tool you can connect to the recognized HID devices and see their definition and notifications.
Hid Creator output example:
Hid Report Map and Payload interface creator
---------------------------------------------------
Notes:
-------
1. This tool is used to generate a report map and payload for a HID device.
2. The report map is a list of instructions that the device uses to send data to the host.
3. It will generate the Python class code for the report payload to use in the python part of this project.
---------------------
Report Map Descriptor
---------------------
0x05, 0x01 # Usage Page (Generic Desktop Controls)
0x09, 0x05 # Usage (Gamepad)
0xA1, 0x01 # Collection (Application)
0x85, 0x01 # Report ID 1
0x05, 0x09 # Usage Page (Button)
0x19, 0x01 # Usage Minimum (1)
0x29, 0x08 # Usage Maximum (8)
0x15, 0x00 # Logical Minimum (0)
0x25, 0x01 # Logical Maximum (1)
0x75, 0x01 # Report Size (1)
0x95, 0x08 # Report Count (8)Parts
29| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | R10K | Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder | R1, R2, R3, R4, R5, R6, R7, R8 |
| 1 | Button1 | Button_Switch_THT:SW_SPST_Omron_B3F-40xx | SW1 |
| 1 | Button2 | Button_Switch_THT:SW_SPST_Omron_B3F-40xx | SW2 |
| 1 | Button3 | Button_Switch_THT:SW_SPST_Omron_B3F-40xx | SW3 |
| 1 | Button4 | Button_Switch_THT:SW_SPST_Omron_B3F-40xx | SW4 |
| 1 | Button5 | Button_Switch_THT:SW_SPST_Omron_B3F-40xx | SW5 |
| 1 | Button6 | Button_Switch_THT:SW_SPST_Omron_B3F-40xx | SW6 |
| 1 | Button7 | Button_Switch_THT:SW_SPST_Omron_B3F-40xx | SW7 |
| 1 | Button8 | Button_Switch_THT:SW_SPST_Omron_B3F-40xx | SW8 |
| 1 | C_Polarized | Capacitor_THT:CP_Radial_D4.0mm_P2.00mm | C1 |
| 1 | LIN1 | Potentiometer_THT:Potentiometer_Bourns_PTA6043_Single_Slide | RV1 |
| 1 | LIN2 | Potentiometer_THT:Potentiometer_Bourns_PTA6043_Single_Slide | RV2 |
| 1 | LIN3 | Potentiometer_THT:Potentiometer_Bourns_PTA6043_Single_Slide | RV3 |
| 1 | LIN4 | Potentiometer_THT:Potentiometer_Bourns_PTA6043_Single_Slide | RV4 |
| 1 | MCP3008 | Package_DIP:CERDIP-16_W7.62mm_SideBrazed_Socket | U1 |
| 1 | PiZero2W | Connector_PinSocket_2.54mm:PinSocket_2x20_P2.54mm_Vertical | J2 |
| 1 | PowerConnector | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J1 |
| 1 | ROTARY1 | Potentiometer_THT:Potentiometer_Bourns_PTV09A-1_Single_Vertical | RV5 |
| 1 | ROTARY2 | Potentiometer_THT:Potentiometer_Bourns_PTV09A-1_Single_Vertical | RV6 |
| 1 | ROTARY3 | Potentiometer_THT:Potentiometer_Bourns_PTV09A-1_Single_Vertical | RV7 |
| 1 | ROTARY4 | Potentiometer_THT:Potentiometer_Bourns_PTV09A-1_Single_Vertical | RV8 |
| 1 | SW_SPST | Button_Switch_THT:SW_DIP_SPSTx01_Slide_9.78x4.72mm_W7.62mm_P2.54mm | SW9 |
Similar boards
- 2 layers380 × 148.5 mm

- 2 layers100 × 100 mm

RecurBOY
cyberboy666/recurBOY
a rpi0 video-instrument – created in collaboration with Guergana Tzatchkova
35 parts122GPL-3.0 - 4 layers43.2 × 43.2 mm

Pogobot head
nekonaute/pogobot
Pogobot is an open-source open-hardware robotic platform for swarm robotics
140 parts21 - 2 layers100 × 100 mm

I n c u r
cyberboy666/i_n_c_u_r
a r_e_c_u_r video sampler extension circuit - adding knobs, cv and serial midi control
38 parts16GPL-3.0 - 4 layers101.6 × 141.7 mm

- 2 layers111.4 × 40.9 mm

Rainworks Electrical
IceyPlazza/EWB-EPA-Rainworks
26-27 EWB EPA Rainworks project; We're putting a sensor box in the ground!
29 parts7 - 2 layers150 × 69 mm

Programming jig r1.0
butterstick-fpga/programming-jig
A FT232H based production programming jig for the ButterStick
50 parts6 - 2 layers56 × 65 mm

DataHat
challengerjdb/RaspberryPiHat-datalogger
My name is Jacob Bendell, and I’m a student at the University of Pennsylvania studying Electrical Engineering. I took this past year off from school to avoid online classes and intern at Amped Innovation, a start-up in…
22 parts6
Questions
How big is the Gamepad PCB?
It measures 126.4 × 97.8 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Gamepad use?
29 parts, built around the MCP3008-I/P. 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 Gamepad KiCad files?
From the kevinisabelle/raspigamecontroller repository on GitHub, at the commit this page was made from: the board is pcb/kicadproj/gamepad.kicad_pcb and its schematic pcb/kicadproj/gamepad.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Gamepad design in my own project?
Its repository states no licence, so its author keeps all rights: ask kevinisabelle before reusing the design.