Custom ESP32 Devboard for wireless gamecube controller functionality
A custom esp32 devboard with traces for all buttons and potentiometer inputs. Integrated with another esp32 and a GC+2 from 4layertech to emulate a gamecube controller on supported hardware(Wii/Gamecube).
Created by
Eshaan
Tier 3
4 views
1 follower
Timeline
Prasham Yadothare
gave kudos to Custom ESP32 Devboard for wireless gamecube controller functionality ago
Tuff as bricks 🔥
alexren ⚡🚀
approved Custom ESP32 Devboard for wireless gamecube controller functionality ago
Tier approved: 3
Grant approved: $91.00
hey there! I think this project is seriously awesome but i'm returning it for now because your README.md reads more like a journal than a readme. a README.md file usually is a quick "about" of your proejct - i would recommend moving your current one to a JOURNAL.md file and creating a new README file! Feel free to ask in #blueprint if you need any help
Eshaan
added to the journal ago
Adjusted Trace Size

@Nachu let me know that my VIAs and traces weren't wide enough, made all my power and ground traces as wide as possible. I think this should be enough for the specific use case, most traces are 1mm for power.
Eshaan
submitted Custom ESP32 Devboard for wireless gamecube controller functionality for review ago
Iamalive 🚀
requested changes for Custom ESP32 Devboard for wireless gamecube controller functionality ago
Can you change your cart screenshot so it shows the shipping option as well? You need to make sure you're picking the cheapest option!
Eshaan
submitted Custom ESP32 Devboard for wireless gamecube controller functionality for review ago
1Mon
requested changes for Custom ESP32 Devboard for wireless gamecube controller functionality ago
your cart screenshots still dont include the final checkout price. please include shipping cost and tax!
Eshaan
added to the journal ago
Cart Update
I got some information on my other project that I would need to hand solder parts from the extended library to reduce overall costs. However, every part that I COULD hand solder was significantly cheaper or exactly the same price(not accounting for shipping even) by just ordering PCBA from jlcpcb. I looked at alternatives, but nothing from the basic parts library would be an adequate substitue. I've attached photos below for proof as well. I attempted to buy all the parts from a single vendor, but this task was impossible since some parts were only in niche chinese vendors. Unfortunately, I think it would be difficult to reduce the price as of now.




Eshaan
added to the journal ago
Updated Cart
I've added an updated net cart below, unfortunately I didn't submit it in the design rereview. The total comes out to just under 100$, which is higher than I requested on the rereview, I'll pay the rest out of pocket. Can't wait to get started lmao

Eshaan
submitted Custom ESP32 Devboard for wireless gamecube controller functionality for review ago
technical_.
requested changes for Custom ESP32 Devboard for wireless gamecube controller functionality ago
Your repo must include both the KiCAD/EasyEDA files (PCB, SCH, PRO, etc) and the production gerbers. Your cart screenshots also need to show what you are ordering, so a picture of the final checkout cart, and not just the specifications would be appreciated.
Eshaan
submitted Custom ESP32 Devboard for wireless gamecube controller functionality for review ago
Eshaan
added to the journal ago
HUGE SUCCESS
After some research, I managed to find a MUCH cheaper voltage regulator with a smaller footprint!(BL8072CLTR). It has the exact same specs, with even easier implementation. For 2 PCBs, the total parts cost comes to around 25 dollars, with most of the price being due to the standard assembly requirement for the esp32 s3 WROOM s1 itself. It would be very difficult to implement a bare bones MCU due to its larger space requirement and more complicated implementation, which is why I've decided to leave it on. Adding the new voltage regulator has brought down the cost from its original 193$ to 86$. 

Eshaan
added to the journal ago
A deeper dive into my planning

@nimit made me aware of the lack of a repository and the neccesity for more journal entries, so I've added another one elaborating on my thought process behind the build.
Below is the design of a standard gamecube controller: 
All the functionality is presented by the aforementioned GC+2, which takes direct inputs from potentiometers(stickboxes) and switches(buttons, triggers, DPAD, etc.) It takes these inputs and spits out a DATA value for the controller(pin2)

The vibrations, otherwise known as the rumble motors(M+ and M-), are inputted into the GC+2, which has motor drivers to control them. It uses PWM to deliver varying voltages for different rumble functions.
The GC+2.0 itself will be connected to my portable Wii; however, for my wireless gamecube controller adaptation, I need a way to transmit the raw data from the switches and potentiometers(as well as motor inputs) from the console to the controller hub. I felt the ESP32 was perfect for this, due to its small form factor and integrated ESPNOW functionality, a low latency wireless communication protocol. While it would be possible to just use something like a gamecube waybird controller, I wanted split controller functionality that would be able to attach to both my external mount and the portable itself, almost like a switch. I've had experience working with microcontrollers in the past, so it would be more comfortable as well.
I've also added a repository, hopefully I can get the project approved soon so I can ship it out and try using it!
I also managed to lower the quoted price by JLC-PCB by choosing more parts from their standard parts library. Unfortunately, the voltage regulator is extremely expensive, but neccesary.

nimit 🚀
requested changes for Custom ESP32 Devboard for wireless gamecube controller functionality ago
You don't have a github repository linked to the project!! Also, your journal is one big entry, which isn't allowed for this tier
Custom ESP32 Devboard for wireless gamecube controller functionality was submitted for review ago
Eshaan
added to the journal ago
PCB Routed
After working for about a week, I've finally managed to complete the board. I kept forgetting to make journal entries over the time, so I'll be documenting all my progress here.
I first needed to consider applications of the MCU. I'm using a GC +2.0 gamecube controller emulator from 4layer tech.
To access my required button features, I determined it necessary to use 17 IO pins for a combination of digital and PWM outputs. For my vibration motors, I needed to figure out if they required digital or analog input. Researching the electrical diagram for the motor controller on the GC+2.0 showed that PWM was used for the controls as well, allowing me to directly tap the PWM and feed it through an ESP32 IO input. 
For flash memory access, I decided to implement the USB-C spec. The ESP32 has D+ and D- pins that can directly interface with it. 
To drive the motors wirelessly, a small motor controller would be required. I decided on the L293D, since its easily implementable, has a small footprint, and has the ability to control more than 1 motor if I would need it in the future. 
Gamecube controller rumble motors draw 5v or 3.3v. For the current draw on the 3.3v line, the controller requires a max of 1.5A. Standard voltage regulators cannot supply this, so I had to spring for a high-end 2A voltage regulator. There wasn't much documentation, so I had to mimic the standard circuit provided in the datasheet; mostly standard, with power lines connected to decoupling capacitors which bypass to ground.

For interfacing and troubleshooting components, I added 3 status LEDs(3.3v test, 5v test, blink/file upload) as well as 40 pins.
Boot and reset buttons were standard, pulling EN high and pulling IO0 low.
Finally, for wireless low latency capabilities, I decided on using ESPNOW as a communication protocol, requiring antenna access on the module.
With the rough layout completed of what I would need, I drafted a schematic using the ESP32 schematic checklist and external open source schematics. Be aware if you are replicating that the voltage regulator VOUT sense is marked as an output instead of an input on the TI symbol; ERC will throw an error, its the symbol's fault, shouldn't be an issue.

The footprint for the USB-C port in KiCad for the M-12 USB C is faulty, you need to download a revised version from the manufacturer. The mechanical holes only have .2mm clearance as well, so I shrunk some of the pads on the final pcb to account for this.

With the schematic done, I began to lay out the PCB. Organization was fairly self-explanatory, with my goal to minimize overlapping traces and minimizing space between pins and decoupling capacitors/pulldown resistors. Because of the compact nature of my board, as well as integration for 5v and 3.3v circuits, I decided to use a 4 layer board to maximize signal integrity. Layer 1 was for signal wires and short power connections, layer 2 was my ground plane, layer 3 was a mix of 3.3v copper fill and 5v fill, and layer 4 was for aux connections. Figuring out layer 3 was the biggest hurdle, since I wasn't able to overlap 3.3v and 5v traces, including signal wires. I had to minimize signal traces moving over fill boundaries as well. After some work, I managed to get a decent arrangement to start routing. 
I prioritized USB-C signal integrity by mapping the data pins as a differential pair.
Because of the nature of the board as a 4 layer, I was able to have easy trace management with little overlap. The power and ground planes allowed me to just connect through-hole vias to any 3v3, 5v, and GND(with the exemption of those needing pulldowns or decoupling). Notably, I needed to swap my motor PS capacitor for a bulk capacitor due to its potentially high impact on PWM motor signal integrity. Routing all the traces got me this finished board.
Because of the variety of parts outside the JLCPCB and KiCad standard parts library, and due to component shortages by JLCPCB, many components needed off-market alternatives, like the LEDs and my bulk capacitor. Notable choice was to use the n16 model of the ESP-32 for high flash storage(macro/recall). 
JLCPCB CAD Viewer(USBC and ESP are offset for some reason, pins line up but apparently its an issue that gets fixed in DFM).

Overall, the project turned out really well for a first time PCB. I had little to no references for my requirements, but I managed to actually make something that could work! No errors in ERC(except aforementioned ignore) or DRC, just warnings for cosmetic errors, isolated copper fills, and reference errors to the standard footprint library since I edited the footprints. Practically everything follows the recommended spec from manufacturer datasheets.
Eshaan
started Custom ESP32 Devboard for wireless gamecube controller functionality ago