Bluetooth Controller
Makerspace 3 - Retro Bluetooth Controller
In this makerspace project I created my own retro game controller powered by an ESP32. It could connect to a phone or computer through Bluetooth and play retro games.
My Goal:
Create a gamepad that communicates over Bluetooth to a computer, and is able to take inputs from buttons and relay that information to the connected computer
Why a controller?
I had not used the ESP32 dev board to emulate a gamepad / input device, and I had never created anything on a protoboard before, so a controller seemed like a good fit.
CAD Model:
I created the shell for the controller in Onshape with holes for the buttons.
The bottom shell has holes for the ESP32 development board.
For the final design I reprinted the top shell to be taller and have larger holes for the buttons to reduce the chance of them getting stuck.
3D Printing:
I 3D printed the top and bottom shell for the gamepad with my new Anker Make 3D printer.
Electronics:
I used protoboard as the base of my controller. I soldered all of the electronics to protoboard and wired them together.
While soldering the first board, I touched the soldering iron to one of the output extensions that would connect to the ESP32. This made the output extension unusable. I removed the extension from the board, but there was still solder in the pins. I could not heat all of the solder at the same time, and thus could not put in a replacement output extension. This forced me to remake the entire board.
While remaking the board, there seemed to be a very small short. I could not find the short, but by adding a high resistance resistor, I could increase the resistance of the entire circuit and get rid of the small short.
Note: The missing pins on the image of the damaged output extension is from the way I had to pull it out of the protoboard, not the soldering iron.
Before soldering anything, I planned out all the connections in Google slides. (Google slides for the win.)
First Board: (After)
Remade Board:
Remade board with ESP32 attached:
Code:
I found a library online called ESP32-BLE-Gamepad (https://github.com/lemmingDev/ESP32-BLE-Gamepad) that made it much easier to have my ESP32 dev board connect to a computer and emulate a gamepad.
I then programmed the ESP32 dev board to detect changes in voltage across its pins, and use that to determine inputs from the buttons on the protoboard.
(On the right is some of the code:)
Final Product / Reflection:
The final product I had created was a bluetooth gamepad that could connect to a computer or phone and provide inputs for retro games.
This project was a step up in quality from previous electronic projects that used breadboards. I created something more permanent than previous projects by using protoboards. I taught myself soldering and how to emulate a device using the development boards I had on hand (ESP-32's).
For my next project, I intend to take another step in quality by creating my own PCBs.