Weird Formfactor NES Game Controller

by Arnov Sharma in Circuits > Remote Control

1001 Views, 5 Favorites, 0 Comments

Weird Formfactor NES Game Controller

Weird Formfactor Retro Game Controller
06.jpg
14 (25).gif
17 (18).gif

Hello and welcome back.

So here's an exciting project that involves retro games:

Unlike traditional controllers, the "Weird Form Factor Game Controller" has two hand grips and a D-pad and ABXY buttons on the left and right sides.

The grips are 3D printed, and two custom boards are being used for the SMD buttons.

This device is driven by a Seeed XIAO M0 board, which features a SAMD21 chip with HID capabilities, as for the unusual design, I grabbed a few fundamental ideas from Nintendo Switch joycons.

This Instructable is about how this controller was made, so let's get started with the built process.

Supplies

these were the components used in this built-

  • Custom PCBs (got from PCBWAY)
  • 3D Printed PCB Holder
  • Vertical Tactile Switch
  • Wires
  • SMD Tactile Switches
  • XIAO M0 DEV Board

3D DESIGN

01.JPG
03.JPG
04.JPG
05.JPG

The idea here was to design the controller in such a way that the D-pad and ABXY buttons would not be positioned on the same board, with the left hand grip holding the D-pad with the left trigger and the right hand grip holding the ABXY Buttons with the right trigger.

Two handgrips were created, each with its own custom PCB containing the D-pad and ABXY Buttons.

Both gamepads are wired together, allowing the user to handle the D-pad in the left hand and the ABXY setup in the right.

The handgrip was designed in a rectangular shape with fillets on each edge to fit comfortably in the user's hand.

PCB DESIGN

sch_page-0001.jpg
02.JPG

The PCB design of this controller was also quite simple; it consists of a Seeed XIAO M0 dev board, which is a SAMD21-based board that supports HID, making it ideal for projects such as game controllers, keyboards, and mice.

I've created a similar NES controller with this arrangement, which you can see at the link below.

https://www.instructables.com/Arduino-Game-Controller-for-NES-and-GBA/

In the previous NES controller project, I manually wired all of the buttons with XIAO and even built a breadboard version that worked.

Using what I learned from that project, I created a simple PCB that connects the one end of each button to I/O pins and the other end to GND pins.

When the switch is pressed, the I/O Pin is pulled down, and XIAO detects the change and executes the key command.

Two PCBs were modeled, one is the main board, which consists of the XIAO with D-pad and left trigger, and the other is the right grip board, which contains the ABXY buttons and right trigger.

The main PCB has a CON6 pad that breaks off six pins, five of which are I/O pins for A,B,X,Y, and the right trigger, while the sixth is a ground pin.

In the PCB Design, I placed a few visually appealing features such as Mario and Pikachu on the soldermask layer, as well as a few dots and marks, to make this board look artistic.

PCBWAY

01.gif
02.gif

After I completed the PCB, I generated the Gerber data, which was then sent to PCBWAY for samples. An order was placed for the PCBs with white soldermask and black silkscreen, which look pretty cool in general.

I received PCBs within a week, and they were excellent, as expected.

I love the quality of PCBs made by PCBWAY. There are other manufacturers available, but their service is always on another level.

Check out PCBWay for getting great PCB service at less cost.

SMD SWITCH ASSEMBLY

03.gif
04.gif
05 (22).gif
  • The first step is to apply solder paste to each component pad.
  • We then used an ESD tweezer to carefully pick and place all the SMD components in their assigned places one by one.
  • Next, we carefully lifted the whole circuit board and place it on my DIY Mini Hotplate which is also homemade just like this project.

After a little time, when the hotplate reaches the temperature where the solder paste is melting, all of the components will be soldered using this hot reflow process.

THT SWITCH

06 (23).gif

We then install the vertical tactile switches on both PCBs and solder their pads with a soldering iron.

Adding Header Pins for XIAO

07 (22).gif

Next, we place two CON7 Female header pin sockets on the main board in order to accommodate XIAO.

Wiring

09 (25).gif

To connect both boards together, we first attach six wires on CON6 Pins on the main board by using a soldering iron.

Following that, we use hotglue to secure all of the connections in place, as these wires will be held responsible for connecting two controllers.

3D Printed Handle Assembly

10.gif
11 (22).gif
12 (21).gif
13 (22).gif
  • Next, we secure the main circuit with its 3D Printed hand grip by using four M2 Screws.
  • We next place the other end of the wire into the right hand grip and connect the CON6 wires to the right PCB's CON6 connector.

I used the same colors wires in this operation, which added additional step of checking the continuity of each port and then placing the wire on the correct port on the right PCB. You can use a various colour wire for this step, which eliminates the need to check the continuity.

  • Following soldering, we use M2 screws to secure the right PCB with its 3D printed grip.
  • At last, we wrap wire with Kapton tape and the controller is now totally constructed.

CODE

Here's the code that is being used in this controller.

#include <Gamepad.h>

Gamepad gp;

void setup() {

pinMode(0, INPUT_PULLUP); //LEFTBUTTON
pinMode(1, INPUT_PULLUP); //RIGHTBUTTON
pinMode(2, INPUT_PULLUP); //UP
pinMode(3, INPUT_PULLUP); //DOWN
pinMode(4, INPUT_PULLUP); //LEFT
pinMode(5, INPUT_PULLUP); //RIGHT
pinMode(6, INPUT_PULLUP); //A
pinMode(7, INPUT_PULLUP); //B

}

void loop() {

int UPLEFT, UPRIGHT, UP, DOWN, LEFT, RIGHT, RIGHTBUTTON, LEFTBUTTON, A, B, START, STOP;

RIGHTBUTTON = digitalRead(0);
LEFTBUTTON = digitalRead(1);
UP = digitalRead(2);
DOWN = digitalRead(3);
LEFT = digitalRead(4);
RIGHT = digitalRead(5);
A = digitalRead(6);
B = digitalRead(7);
START = digitalRead(8);
STOP = digitalRead(9);


if(UP == LOW)
gp.setButtonState(2, true);
else
gp.setButtonState(2, false);

if(DOWN == LOW)
gp.setButtonState(3, true);
else
gp.setButtonState(3, false);

if(LEFT == LOW)
gp.setButtonState(4, true);
else
gp.setButtonState(4, false);

if(RIGHT == LOW)
gp.setButtonState(5, true);
else
gp.setButtonState(5, false);

if(RIGHTBUTTON == LOW)
gp.setButtonState(1, true);
else
gp.setButtonState(1, false);

if(LEFTBUTTON == LOW)
gp.setButtonState(0, true);
else
gp.setButtonState(0, false);

if(A == LOW)
gp.setButtonState(6, true);
else
gp.setButtonState(6, false);

if(B == LOW)
gp.setButtonState(7, true);
else
gp.setButtonState(7, false);

delay(20);
}


Before using the code, you first need to download and install the gamepad library from the URL provided below.

https://github.com/elanthis/gamepad

Then, use this sketch to turn any HID-enabled device—in this case, the XIAO SamD21—into a gamepad.

As of right now, there are only 8 buttons declared in this sketch, but more can be added by implementing changes to the lines below.

  pinMode(0,  INPUT_PULLUP); //LEFTBUTTON
pinMode(1, INPUT_PULLUP); //RIGHTBUTTON


Playing Retro Games

15 (21).gif
16 (22).gif
17 (18).gif
18 (16).gif
  • We connect the XIAO Board to the PC and then open Devices and Printers to see if this configuration is functional or not.
  • In devices and printers, you will see Seeed XIAO Board which has a gamepad logo, we right-click on it and see its properties.
  • The Gamepad setup is confirmed to be functional by pressing the buttons sequentially from D0 to D7, which causes the button push to appear in the properties.

After ensuring the controller is operating using the above method, we launch the GBA emulator and navigate to its controller settings. In it, we properly map each key to its label, and the game controller is now ready to be used for playing retro games.

I tried several games, including Sonic, Mario Card, and Megaman Zero, and they all worked, demonstrating that this project succeeded.

Conclusion

14 (25).gif
Image1.jpg

This controller works and is actually better than I anticipated.

The dual hand grip form factor is actually useful; we can hold these grip controllers in each hand and, thanks to the wire in between them, we can position both of our hands at a distance, which changes the usual stance of using a game controller; and, to be honest, this new method appears to be useful because we can keep things between two controllers like a bowl of chips.

This is not a replacement for proper analogue stick-based game controllers just yet. I'm working on a V2 of this project that will add a few features and fix some design flaws, such as adding a braided cable between two controllers and a motor inside the grips.

This is it for today folks, leave a comment if you need help regarding this project.

Special thanks to PCBWAY for providing components that I've used in this project, check them out for getting all sorts of PCB or PCBA-related services for less cost.

Thanks and I will be back with a new project soon.