In this project we’re building a DIY gamepad using the Bluefruit EZ-Key module and a 3D printed case.

The Bluefruit EZ-Key HID keyboard controller is a bluetooth breakout design for making DIY keyboards and game pads. It’s requires no programing and works with just about any trigger or push button. It takes up to 12 inputs and can be powered with any 3-16 VDC.

The Perma-Proto comes in different sizes which is perfect for making all sorts of projects. The ½ sized Perma-Proto breadboard is like a business card and which makes it perfect for making a small game controller.

Prerequisite Guides

We recommend walking through the guides below - these will help you get familar with the components used in this project.


This is a project that requires a bit of soldering and wiring - It's great for getting practice and well suited for makers with intermediate soldering skills. It's not the easiest 'first-time' beginners project, but it can be done if approached with patience, ambition and positivity. The 3D printing takes 2-3 hours and costs about $1.50 in material. If you don't have access to a 3D printer, check with your local hacker/maker space, library or community collage - they just might have one! Have fun, and happy making!


The parts are available in the Adafruit shop and listed on the right sidebar. Take a moment to look over each components.

Tools & Supplies

You'll need some hand tools, a soldering iron, 3D printer, wires and other maker tools and suppilies. 

Take a moment to review the components in the circuit diagram. This illustration is meant for referencing wired connections - The length of wire, position and size of components are not exact. 

The 500mAh lithium polymer battery is connected to the microUSB lipo charger via JST cable. The Bluefruit EZ-Key has VIN pin connected to a slide switch. The BAT pin on the micro lipo charger is wired to the slide switch. The ground pin on the Bluefruit EZ-Key is wired to the GND pin on the micro lipo charger. 

A 6mm tactile switch is wired to pins 3V and PB on the Bluefruit EZ-Key to serve as a bluetooth pair button.

The 6mm and 12mm tactile button inputs are wired to input pins 0-7 on the Bluefruit EZ-Key. Each tactile button has ground connected to ground rails on the Perma-Proto PCB.

The 1/2 sized Perma-proto breadboard PCB will house the 8 momentary push buttons. The right-side of each buttons will act as the ground connection. Each of the buttons right terminal are wired to the ground rail. The two ground rails are wired together. A single wire for the ground connection is wired to the Bluefruit EZ-Key. Each botton left terminal has a wired connection to the input pins.

The input connections on the Perma-Proto should preferably be made on the back of the PCB and close-to to terminal, not actually on the same through-hole. 

Be very aware and cautious when wiring these connections. It's easy to get lost and loose your place/spot while soldering. Always double check your connections before you solder!

Parts & Settings


PLA @220
10% infill
2 shells
.2mm layer height
50/40 speeds

Takes about 2 hours and 28 grams ($1.29)


Semiflex or Ninjaflex
Extruder @230
4 top layers
10% infill
.2mm layer height
2 shells

Takes about 15 minutes and 3 grams ($0.14)

Printing Parts

The enclosure parts can be printed in PLA or ABS filament. PLA material tends to have less warped corners. We printed out the controller buttons in TPE filament, which makes them flexible and rubbery. No support material is required for the parts.

STLs are oriented to "print-as-is". Our recommend slice settings work well with Printrbots and Orion delta machines.

Prep Slide Switch Wires

Start off by prepairing the wiring for the slide switch. You'll need to measure two pieces of 30AWG silicone-coated stranded wires to about 10cm long. Strip both ends of the wires and apply solder to 'tin' the tips - This helps prevent the stranded wires from coming apart. 

Solder Wires to Slide switch

Secure the slide switch to a Panavise Jr. Secure one wire to the little grabber on the helping third hands with the end of the wire overlapping a terminal on the slide switch. With the wire and switch secured in place, apply solder to join them together. Lightly tug the wire and inspect for a good connection. Repeat this process for the next wire. Add pieces of heat shrink tubing to insultate the exposed connection.

Add heat shrink tubing to the teeth of the Third Hand grabbers to safely secure wires. This helps prevent kinks in the wires and scratches from components.

500mAh Charging Rate

You'll want to up the charging rate on the Micro Lipo charger. To make it safe for all our batteries, we set the default rate to 100mA. You can easy up the charge rate to 500mA by connecting the solder jumper . This will allow the 500mAh lithium polymer battery to charge faster. Melt some solder onto the jumper to close it and set the new charge rate.

Wire Slide Switch to Lipo Charger & Bluefruit EZ-Key

Secure the micro lipo charger PCB to panavise Jr. Apply solder to the BAT and GND pins. Now solder one of the wires from the slide switch to the BAT pin by heating up the pin and inserting the wire while the solder is hot and molten. Repeace this process for the VIN pin on the Bluefruit EZ-Key.

Prep Ground Wire

We'll need a wire to connect ground to the Micro Lipo charger. Measure and cut a piece of 30AWG silicone-coated stranded wire to about 5cm long. Strip and tin both ends of the wire.

Wire Ground to Micro USB Lipo Charger

Secure the lipo charger PCB to the Panavise jr. Solder the ground wire into the GND pin. Double check connection by tugging on the wire, ensuring a solid connection. Remove from Panavise jr. when complete.

Wire Ground to Bluefruit EZ-Key

Secure the Bluefruit EZ-Key to the Panavise jr. Apply solder to the G pin and insert the remaining end of the ground wire while the solder is moltent. Double check connection is solid. Remove from Panavise jr. when complete.

Wired Power Circuit

Double check your work. The power circuit is now complete! Next step is to plug in the JST cable from the lithium polymer to the lipo charger.

Test Power Circuit

Plug in the JST cable from the 500mAh battery to the JST port on the lipo charger. The slide switch will power on the circuit when the switch is set to the farthest terminal with the wire connection. If the LED lights on the Bluefruit EZ-Key, everything is good!

If the LED doesn't power on, double check your wiring. The battery may be drained, so check that too!

Prep Perma-Proto Half-size PCB

In this project, we're using the half-size perma-proto PCB. We'll add the buttons with the PCB oriented with the labels right-side up.  

Install tactile buttons

Add 6mm buttons to the Perma-Proto by inserting them into place with the terminals going into the through-holes.

If the terminals don't insert all the way, try bending them slightly until they fit into place.

Ensure the oriention of the buttons are correct - terminals should be pointing up/down as opposed to left/right. Polarity will matter once the ground and inputs are wired.

Two 12mm buttons go on the far right, acting as the "A" and "B" buttons.

Installed buttons

Double check your buttons are properly oriented and exactly in the right spot! You can follow the photo and circuit diagram to cross reference the button placement.

Solder buttons to Perma-Proto

Once the buttons are installed, you'll need to solder them in place. Secure the Perma-Proto PCB to a Panavise Jr. and apply solder to the button terminals.

Saw bottom corners from Perma-Proto PCB

Next up, we'll need to remove the bottom left and right corners from the Perma-Proto PCB. I recommend using a rotary power tool like a DREMEL. You're going to need to do this in a well ventilated area. You're also going to need to wear safety glasses. I recommend using a 'thin cut' attachment.

Trimmed Perma-Proto PCB

You're going to want to trim off the power+ground rails from pins 1-2 and 29-30. We won't be using these in this project, so it's OK to remove them. 

Don't skip this step, its actually very important - The removal of the two corners is necessary for the PCB to fit into the enclosure.

Prep Ground Wires

Next up, we need create short wires that will connect all the buttons ground together in series. We'll need 8 pieces of 30AWG silicone-coated stranded wire that are about 5-10mm long. Strip both ends of each wire using wire strippers. Use the helping third hands to secure wires while tinning.

Ground Wires

Here's the full set of 30AWG silicone-coated wires all cut and tinned. They're short and thin!

Button Ground Placement

Insert each ground wire into the through-holes before soldering into place. You'll want to assess the placement and double check the front and back of the PCB. In this project, I'm using the right side of the buttons terminals as the ground - so all of them need to be this way. Note, once the PCB is flipped over, the 'right-side' becomes the 'left-side'. Take this in consideration, as it can start getting confusing. I myself had to resolder a few times!

Solder Ground Wires

Apply solder to the designated button input through-holes. Ensure the wire is soldered to the correct through-hole on the power/ground rail. Use tweezers to assist you while heating up solder and inserting wires. You'll need to connect the top and bottom ground rails together by wiring up a piece of wire. 

When you've completed soldering ground wires, snip off any excess terminals/wires with flush diagonal cutters.

Soldered Ground Wires

And now we have ground wires! Double check your connections and ensure the polarity of each button is correct. If you managed to miss one, go back and heat up the pin, remove wire and try again. The Perma-Proto PCB has a high quality solder mask and copper through-holes, so you can do several attemps. 

Wire Perma-Proto PCB ground to Bluefruit EZ-Key ground

Next up, we're going to wire up a main ground connection from Perma-Proto to the Bluefruit EZ-Key. Secure the Perma-Proto to Panavise jr. Secure the Bluefruit EZ-Key to one of the grabbers on the helping third hands.

Measure up a wire to about 5cm, long enough to connect both components together. This wire will go into one of the available ground pins on the Perma-Proto.

Wire Buttons to EZ-Key Inputs

Now we need to wire each button from the Perma-Proto to the input pins on the Bluefruit EZ-Key.

Measure and cut wires for the button inputs. These wires can be 5cm long. You'll need to do the same song and dance - strip both ends, apply solder to tin the tips. Apply solder to the pin and then insert the wire while solder is molten. You'll need to do this for all 8 buttons. Double check each pin and wire connection before soldering. You should be constaintly checking the back and front of the PCB, making sure you're soldering the correct pin.

Wired Buttons to Bluefruit EZ-Key

And now we have the button inputs wired to the Bluefruit EZ-Key, yay! You'll want to, yet again, double check your connections to ensure everything is right.

Wire BlueTooth Pair button to EZ-Key

We'll need an extra 6mm tactile button to serve as the bluetooth pair button. This will help you pair the Bluefruit EZ-Key to different devices. You'll need to measure and cut two piecess of 30AWG silicone-coated stranded wire. Apply heat shrink tubing to the exposed terminals to insulate the connections.

The two wires will need to connect to the 3V and BT labeled pins on the Bluefruit EZ-Key.

Soldered Inputs to Bluefruit EZ-Key

And now we have a complete circuit! 

Heat Shrink Input Wires

Let's go ahead and make the wiring from the button inputs a bit more organized. Cut a piece of heat shrink tubing and split it down the middle. Bundle up all of the input wires and wrap the piece of heat shrink around the wires. Apply a bit of heat to seal the heat shrink tubing.

Now we can mount the components to the enclosure!

Add screws to bottom cover

Let's start by fastening two #4-40 3/8 flat Phillips machine screws into the two holes on the bottom cover part [not the holes in the corners]. Fasten until you see the screw thread slightly protrude the top of the stand-off - so, not all the way.

Mount Micro USB Lipo Charger to bottom cover

Let's mount the micro USB lipo charger to the bottom cover. Place it over the stand-offs with the machine screw lined up with the mounting hole on the lipo charger PCB. Make sure the USB charging port is facing the outter edge.  Hold the component firmly in place while you fasten the machine screw, all the way.

Mount Bluefruit EZ-Key to bottom cover

Next up, we'll need to mount the Bluefruit EZ-Key to the bottom cover. Let's do the same song and dace we just did for the lipo charger to the Bluefruit EZ-Key. Note, the mounting holes on the Bluefruit EZ-Key are just a bit smaller than the micro lipo charger, so you'll need to loosen the hole if the #4-40 machine screw doesn't go in. I used a sharp and pointy #4-40 screw to tap the hole - it just barely broke the PCB because the mounting hole is small, so do it slowly and carefully.

Mount Bluefruit EZ-Key to bottom cover

Now we have both components mounted to the bottom cover.

Mount Bluetooth Pair button to bottom cover

There's a small platform for the bluetooth pair button to rest on. You may want to bend the leads apart. Add a dap of super glue to the top surface of the platform and then quickly place the button on top, with the button facing the outter edge. Allow glue to dry before proceeding.


Plug in 500mAh Lithium Polymer Battery

OK, now is a good time to plug in the JST cable from the battery to the JST port on the micro USB lipo charger.

Mount Perma-Proto to bottom cover

Now we need to mount the Perma-Proto PCB to the bottom cover. Carefully coil the input wires underneath the PCB and place it on top of the two tall stand-offs. Line up the mount holes with the stand-offs and hold the PCB in place. Insert two #4-40 3/8 flat Phillips machine screws into the Perma-Proto until it's fastened to the stand offs. Fasten all the way until the PCB is completely secured.

Insert 500mAh battery

We need to insert the lithium polymer in between the Perma-Proto PCB and the bottom cover. There should be enough clearance for the battery. You'll want to arrange the wires so that they aren't being kinked or scrunched up.

Be careful not to scratch or puncture the battery!

Install Ninjaflex buttons into case

Before we insert the circuit into the top enclosure, add the ninjaflex rubbery buttons to the enclosure. These need to be in place before the circuit is installed.

Insert circuit into case

Place the circuit into the enclosure at a 45-ish degree angle so that the Perma-Proto PCB goes underneath the clips on the inside fo the enclosure. Ensure the micro USB port on the lipo charger is facing the cut out on the encosure. Carefully slide it into the enclosure, but don't close it completely, yet!

Install slide switch into case

With the circuit half-way inserted, pull out the slide switch from the circuit and press it down into the cut out for the slide switch. The clips will hold the switch and prevent it from being pushed all the way inside the enclosure.

Once the slide switch is inserted in place, close up the bottom cover!

Fasten bottom cover to case

Insert four #4-40 3/8 flat Phillips machine screws to the corners of the bottom cover. Fasten all the way to tighten and completely close the enclosure.

Add cover to top case

To finish off this project, you can add a cover to the front of the enclosure to change up color scheme. In this project I used a black color to add contrast to the pink enclosure. You can apply adhesives like E600 to the parts for a perminent seal, or you can use funtac like I did.

Charge Battery and Play!

And thats about it! The circuit is finished, project assembled and ready to play! Or is it? I recommend fully charging the 500mAh battery before playing. Plug in a micro USB cable to the lipo charger. The charger has an on-board LED indicator that lights green when the battery is fully charged. Red LED indicates the battery is charging.

Changing Button Mapping

Check the EZ-Key introduction guide for button mapping details!

Pairing with Devices

A freshly baked, 'never-been-used' Bluefruit EZ-Key will automatically start searching for a device to pair with. Your bluetooth enabled device should pick up the EZ-Key within a minute. If you're having issues with pairing, or unfamiliar with pairing bluetooth devices, you should check out the pairing page on the EZ-Key introduction guide.

This guide was first published on Feb 15, 2015. It was last updated on Feb 15, 2015.