- The plastic is soft, and easily gets white stress marks. Use care when making the modifications to the case.
- The decal on the front of the controller is very sensitive to heat. Too much heat from the hot glue gun, heat gun, or soldering iron will cause the decal to lose its texture (which ends up looking really bad).
- Exacto knives and/or a dremel work well for case modifications.
- Remove the six screws from the back of the case
- Open the case, and remove the screw holding in the PCB
- Take everything out of the case
There are a number of struts and support elements that get in the way of our components, so we need to remove them.
A) Remove strut adjacent to the 'A' button
B) Remove top-center strut
C) Remove the plastic around the cable hole so that it is flush with the rest of the case
D) Remove the two struts closest to the cable hole
E) Cut off the top off of the top-right d-pad strut so that it is level with the adjacent strut
F) Remove the other top support element
The plastic screw posts strip extremely easily, so it is necessary to replace them with fittings for machine screws.
RED - 5.5mm tall
BLUE - 7mm tall
- Use superglue to attach the metal screw terminals.
- Carefully bore out the PCB so that M2.5 screws will fit
- Carefully bore out the back of the case so the M2.5 screws (and heads) will fit
- 6mm M2.5 screw in the PCB
- 8mm M2.5 screws in the case
- Top center screw in the case back is not used
Remove the three "upper middle" standoffs, remove the USB cable hole support to mirror the front half of the case, and shave down the two left standoffs so that an nRF24L01+ will fit snugly.
Using a soldering iron and pliers (or other such magic), remove the components from the front and back of the PCB.
The wires will get later trimmed, so it's easiest to make them long (6+ inches).
The specifics here depend on the exact OLED you purchased, but in this case, the bottom legs of the OLED needed to be removed.
The goal here is to have the OLED fit nicely in the case, in a position where the display will be vertically and horizontally aligned with the edges of the case.
This part is a pain in the ass, and if you don't screw it up the first time, you are probably a superhero.
I found it works best to first cut off the label material, and then cut through the case.
Once you have the viewport cut and the OLED lining up nicely, use a black sharpie to fill in the gray edges of the viewport walls.
Now you can place all of the components in the case, make sure everything fits, and make the remaining case modifications.
You will need to cut holes for the following, in the position you will glue everything into place:
- On/off switch
- Teensy USB port
- microSD card
- WS2812B LED (where the original USB cable exited the case)
The exact placement is left as an exercise for the reader, as each controller ends up being a little different.
For the most part, the specific I/O pin mapping is flexible, as long as you remember where you connected everything. Once it's all wired up, you will specify the pin mapping in config.h.
The radios, OLED, and microSD reader all communicate over SPI. This means that you will have unique CS and CE wires for each component, and then shared VDD/GND/MOSI/MISO/SCK.
Each radio and the microSD reader needs to have the following pins wired up:
- VDD
- GND
- MOSI
- MISO
- CS
- CE
- SCK
The OLED display needs the following pins wired up:
- VIN
- GND
- MOSI
- SA0
- RST
- DATA
- SCK
The most space efficient method seems to be daisy-chaining VDD/GND/MOSI/MISO/SCK.
Connect This | To This |
---|---|
Teensy 3.3V | Charge controller IN+ |
Teensy GND | Charge controller IN- |
Battery+ | Charge controler B+ |
Battery- | Charge controller B- WIRE THE SWITCH IN HERE |
Teensy VIN | Charge controller OUT+ |
Teensy GND | Charge controller OUT- |
Connect the NES PCB ground to Teensy ground, and each of the button leads to a digital pin on the Teensy.
If you want to use the voltage readout and charge status on the controller, you will need to wire up a simple voltage divider between the charge controller in/out and Teensy.
The specifics here will depend on the LiPo charge controller you are using, but you can see how this is consumed in battery.cpp.
The LED needs 3.3V, GND connected to the Teensy, along with a data pin of your choosing.
Glue all of the components into place, being careful to avoid warping the front decal with too much heat.
When it's all said and done, you should have something that looks approximately like this: