A forward-compatible gamepad using 3d printed cases and open source hardware. This controller is inspired by the many smartphone gamepads and and game-focused phones that have come and gone. New phones come out, more powerful hardware arrives, and the old products are left underspecced or incompatible.
I want to play action/platformer games on my phone. The straw that broke the camel's back was "Prinny: Can I Really Be the Hero?" - I couldn't beat a boss because my fingers kept missing the intangible touchscreen controls. I want a gamepad that is compact to carry, comfortable to hold, and works with multiple phones.
This version of the project uses USB-C to directly connect to the phone, and I plan on using an AVR chip to handle USB communication. Using a physical connection complicates phone compatibility but eliminates the battery and has better upgrade potential (battery bank for the phone, headphone jack, microSD slot, etc) through USB. The shell is 3d printed to adapt to multiple phones. Future versions can involve the community for improvements, support for more phones, and artwork.
I received my PCBs and components. I tried to assemble. I failed. The flex PCB and QFN parts were more challenging than I expected and I botched soldering the atmega and FFC connector. Rather than sink more time into an early design, I've decided to cut my losses and continue to v0.2. I could complete v0.1 with the help of a friend however v0.2 has so many changes and v0.1 has several flaws (not dealbreakers but annoyances) that I think my time is better spent moving on.
The craft table. This LED light is the best thing ever. Light is so important for seeing small details. The next upgrade will include magnification.
An example of flex being a pain in my butt. The board is flexed and creates too much gap to solder properly.
Here are 2 boards connected and mocked up on a phone.
The FFC is very flexible. It can handle one-time bends too. This gives me more options.
Lessons from v0.1:
- review instructions before attempting new soldering techniques
- use the right tip (mine was too fine and I couldn't find the spare)
- tape down flex boards
- the flex trigger works well
- you can't hold flex PCB in alligator clips. It bends the PCB which misaligns pins/pads. Taping it to a hard surface works.
- attaching the USB-C connector (meant for 0.8mm FR4) to the thin flex was a bad idea (I knew this but wanted to try anyway)
- read the datasheets, I wired a 4-pin crystal wrong (could be kludged)
- the USB-C connector sticks out more than expected
- the FFC cables are very flexible and easy for a user to install
- reusing the same board for both sides of the phone complicates the routing
- reusing the same board increases the board size, negating some of the benefit
- the yellow flex PCB is kinda ugly and would limit art
- components on both sides are annoying to solder (I knew this but wanted to try anyway)
- why didn't I put debug pads on this?
- my "space saving" reset button is difficult to use in practice
Let's take a look at v0.2 (not final).
Changes for v0.2
- flex features have been removed
- moved all components to one side
- the trigger will hinge, similar to the Switch trigger. This simplifies the PCB but complicates the case
- the double sided feature (reusing the same board for both sides) is gone
- a few 0.1" standard headers are added, connected to some digital and some analog pins
- USB-C connector has been recessed so the PCB sits closer to the phone
- the face pads have be reshaped to accommodate silicone buttons from multiple controllers
- plans to use Switch Lite silicone and buttons as soon as they're available aftermarket
- added simple PCB art
- crystal wiring has been fixed
- FFC location has been fixed so I can use straight-through FFC
My roommate got a Switch Lite and the buttons are excellent. They're firmer than the DS or PSP face buttons, the buttons sit a little higher, and I can feel the rubber dome collapsing (unlike the PSP face buttons which are mushy, there's not much tactile response). These are the best handheld console buttons I've felt yet and they'll work perfectly in the controller once more aftermarket parts are available.
The headers are intended for debugging, programming, and testing future features like analog joysticks and audio output. However I realized that they could be an attractive feature. This is the first atmega32u4 breakout I've seen with a male USB-C connector (the Elite-C and Goldfish have female USB-C). This could open the door to other DIY phone accessories.
v0.2 is almost ready and the PCB will be ordered soon. I've recruited the help of my friend [ldrrp] to ensure 0.2 works the first time.
I swapped the solderable headers with a FFC connector. This is a small flat cable that's common, generic, and cheap. I settled on the FH12-8S-0.5SH(55) which is a 0.5mm pitch 8-pin cable. This connector had a small enough footprint that I could fit it in the existing 2sq inch outline.
-Power and ground tracks have been made thicker. I set this in the net classes which the autorouter uses.
-Retention pegs and cutouts have been added to keep the PCB in place.
-Modeled top panels.
One more review then 'll order the PCB and parts. I have lots of ideas for the future but I want a working unit in my hands first.
This was a slog. Lots of measuring with calipers and fiddling with Fusion. I did a lot of work that I had to refactor it into another body, got a couple graphical glitches in Fusion, struggled to import the PCB for reference, etc. But it's a little over half done now.
v1 case todo:
-cut a slot for the wires that connect each half
-make a top panel to hold the buttons in place.
-shape the start/select button slot
-hold the PCB into the case?
I've based this off my Nexus 6P case. The measurements haven't been adjusted for my Pixel 3 (not XL) yet. I'm going to leave it as-is for easy removal and so I can fudge the location of the phone. v1 is being designed with front access for easier debugging.
Here's the inside of the knockoff SNES controller that I based this on and took measurements from. v1 will use the D-pad and face buttons, two of the D-pad rubber (I have another) because they're narrower, the start/select rubber cut in half, and the shoulder buttons and rubber.
Here's where the PCB will sit in the case. There's actually a lot of ways I can play with the dimensions. The USB connector can move up or down, which will shift the entire PCB, with the width and distance from the phone can change, shoulder placement can change, etc. This will make a good testbed.
The shoulder button in the corner will bend and slide into a little slot inside the larger slot. I'll have to check the tolerances later to make sure the printer can make the thin tabs that will hold the shoulder button in place. The larger gap will hold the rubber dome. In the future I'll 3d print the shoulder button, maybe even with living hinge built into the case (inspired by the Fusion 360 hack chat).
The PCB has some changes. The shoulder button has moved to the other side. The USB-C connector edge cut has been tweaked (reading the docs helps lol) and now it looks more like the PD Buddy Wye that uses the same connector. I realized that it was incorrect when I loaded both models into Fusion and saw the connector clipping through the PCB. After changing the connector I shaved a tiny bit of width off the outer dimension. I tried to change the shoulder button cuts to a single cut (instead of an open slot) but pcbnew complained. Might do that again later.
The process for getting the model into Fusion is dumb and I need to improve it. Export as VRML, import into Blender, export as STL, import into Fusion. That's the "simplest" way I could find that included all the traces and components. I need to either get 1-click exporting or script it.
I have some ideas for future versions. Like a rigid PCB for the main portion and a strip of flex that acts as triggers and connects both sides. Switching to rigid would reduce cost, fit the USB connector better, and give me a colorful solder mask. I have some sick PCB art planned that uses OSHpark's purple and gold or PCBway's red and gold. The art will remain a surprise until I can pull it off.
Hurray! I won a $20 coupon from the Flexible PCB contest. That'll give me 3 copies, enough for 1 1/2 complete controllers. The PCB is almost ready. I'm in the process of 3d modelling the case and sometimes I make minor tweaks to the PCB to fit. I'll try to finalize the PCB and BOM this week and send it off for manufacture.
Woohoo it's routed! And the DRC passes. I'll post source on Github soon and then start work on the 3d printed case. EDIT: source on github.
Here's the evolution of the layout. I took a screenshot of the bottom half since that's the interesting part. It's fairly easy to move components and then autoroute with FreeRouting. I've shuffled a lot of components, changed the edge cuts, made the board slightly shorter and fatter, and shrunk the start/select buttons.
v0: Bad. Components were roughly placed on the board. I accidentally had 10 mil track width so the USB-C connector wouldn't route.
v1: It works. It routes now but it's ugly, the USB resistors are too close to the buttons, and there's very little room for future features. The autorouter found some interesting routes near the USB connector that I wouldn't have thought of (I hope they work).
v2: Better. The start/select buttons are in the wrong spot. I wanted the USB power and data lines shorter, and I didn't want them to cut across the tracks for the button contacts. Many of the components have been rotated - I selected the atmega, all the components underneath, and the header pins, then rotated. The flex area for the USB connector now goes down instead of sideways.
v3: Good layout. I moved the start/select buttons (the smaller contacts) into the bottom corner, moved the components slightly, and reassigned some pins. There's breathing room now so I could easily route analog components (the pins on the left side of the ATMega).
v4: Tweaks for the DRC. This is the last change for now. I adjusted the clearance on the USB-C pads (4 mil pad clearance instead of 6 mil) and barely moved the reset jumper. The autorouter ended up changing a lot of routes but it looks fine
Time for physical layout. I did some mockups on cardboard. Fitting into 2sq inches is a challenge. For now I'm going with a 2x1 vertical layout so that I can fit the shoulder buttons, but I could make it shorter and wider or even a 1.41x.141 square.
I opened up a knockoff SNES controller to measure the silicone membrane. One minor issue is that the ABXY silicone won't fit with a 1-inch width layout but the D-pad will. For the first version I'll use a D-pad silicone on both sides. Later I'll look into smaller button sets like GBA, DS, and PSP. I'll also look into dome switches like those used in the 3DS, PS Vita, and Switch.
There are a number of changes that could save space -make it shorter and wider -shrink the start/select button contacts -use smaller components (currently 0805) -make the cuts as small as possible (check oshpark specs) -move the header pins that connects the 2 sides -adjust the flex PCB running to the L/R shoulder buttons -make the reset button a jumper (done) -swap ATMega 32u4 for the smaller 32u2 (questionable) -use the internal oscillator instead of an external crystal (highly questionable)
The only USB-C male connector available in KiCad by default was this Molex 105444. I selected it for now to get the PCB going but this looks like a PITA. Please comment if you have recommendations.
One my ideas was "controls on top", letting my palms rest on the sides of the phone. This layout has pros and cons, and after going over it with my fiance we decided against it. I still like the idea though. Here's a mockup that uses the flexible PCB to accommodate different size phones.
The current plan is a smaller PCB that will make the phone more like a PSP. The two halves will be connected with a ribbon cable, flat flexible cable, or whatever. The prototype will probably use magnet wire soldered on.
The prize in the flexible PCB contest is a voucher for 3 copies of 2 square inches of PCB from OSHpark. That'll only fit one side of my design. So I'll make this double sided - one side is the D-Pad, the other is the face buttons. Then I can make 1 complete controller and have another half spare. I can complete the spare half with an ATmega and experiment with it.
Finally, here's my schematic progress. Gunna try routing the PCB now.
I've been spoiled by hardware controls, growing up with things like the GBA, Nintendo DS, and the HTC Dream / G1. The DS was a haven for homebrew and made a nice PDA before smartphones came around. My first cellphone was a used HTC Dream, with a well laid out keyboard that solidly flicked open, physical button on front, and a trackball that was fantastic for RDP/VNC.
This idea started in 2014, playing emulators in the break room at work. By that time I had a newer phone - touchscreen only with a few capacitive buttons on the front. I hated it. I couldn't touch type, couldn't use terminal worth a damn, couldn't easily control a mouse over VNC, and couldn't play action games.
The straw that broke the camel's back was "Prinny: Can I Really Be the Hero?" - I couldn't beat a boss because my fingers kept missing the intangible touchscreen controls. So I started mocking up a controller that would work with my phone.
I brainstormed and sat on it for white a while. In 2017 I started working on physical versions. I made one test with an Arduino and HC-05 bluetooth module, and then went to the nrf51822 SoC bluetooth module. Progress halted for most of 2018 while I dealt with life stuff.
Now it's 2019. Phone UIs and mobile game design have gotten better but playing action games is still putrid. I'm back, full force, ready to slam out a design in time for the Flexible PCB Contest.