Saturday, 19 January 2013

Making my own Guitar Hero controller

Last year I had the privilege of being introduced to a video game called Guitar Hero. I had heard the name before but, being a musician myself I didn't think that pressing a few plastic buttons could have much to do with real musical talent, or could evoke in me any real excitement. Until I picked up that wonderful little piece of plastic... I was soon hitting those buttons furiously, playing song after song.

This first experience of mine was on a friend's Xbox with the official Guitar Hero controller, similar to the one shown below. On the fret board you have 5 buttons that have to be pressed according to the scrolling notes displayed on-screen. However, notes are only "played" once you hit the strum bar on the body of the guitar. The strum bar can be be alternated up and down which is useful for playing fast sequences of notes. The whammy bar works similar to that on a real guitar, and can be used on long notes to vary the pitch, adding vibrato to the sound. Using the whammy bar at the right time can also increase you Star Power which builds up during each song. As soon as you have accumulated enough Star Power you can activate it by tilting the guitar - this will momentarily make the crowd more lenient and reduce your chances of being booed off stage.

 After playing Guitar Hero on Xbox I downloaded a free PC clone, Frets on Fire. To play, you pick up your keyboard and hold it like a guitar, using F1-F5 as the frets. I enjoyed playing the three songs included but soon started longing after the real thing, so I ordered a copy of the PC version of Guitar Hero: World Tour. I enjoyed playing it on my keyboard and eventually finished career mode on Hard, but still wished I had a proper Guitar Hero controller.

As I had a lot of free time during the holidays I decided to make my own controller. About two weeks ago I went into a plastics store and found a nifty little plastic guitar just waiting for me to buy it. I am sure the guy who designed this thing had in mind that someone might want to transform it into a Guitar Hero controller. Instead of being glued together like most plastic toys this guitar was neatly fixed together with screws. It had a lot of space in the body for wires and circuit boards and various other contraptions. It had three ready-made plastic buttons which could be removed. It had a sound hole through which you could place a strumming bar. It had a removable bridge and a removable piece of plastic around the sound hole underneath which screw heads could be concealed. It had a removable fretboard underneath which circuitry could be placed. And last, but not least, it was just the right size and shape, and even came with its own guitar bag (admittedly made of very thin, very cheap plastic, but nonetheless).

No sooner did I reach home, than I was tearing it apart - the most enjoyable experience of a tinkerer, second only to putting something new together. I took as my example the original Guitar Hero controller and endeavored to make a similar controller.


I was designing a PC controller and decided to take apart an old PS/2 keyboard and use its circuit board for my own controller. The circuit board of a traditional keyboard is actually quite small, it can fit into the palm of my hand. Inside the keyboard you find three plastic sheets on top of each other. Underneath each key you will find two conductive dots facing each other, but not touching. When you depress the key, the two dots touch, connecting two different nodes on the circuit board. The circuit board detects which two nodes are connected and decides which key was pressed. 

The first thing I had to do was to label the nodes from 1 to 26 and test which nodes correspond to which Guitar Hero button. For example, the five fret buttons are V, C, X, Z, and Shift respectively, Space activates Star Power and Alt is for the whammy bar. Since I was using a multimedia keyboard I was also able to find the combinations for the volume up and volume down keys. In essence all of this meant that for every button in my guitar, two wires would run to the circuit board and a short circuit would be created between a certain two nodes when the switch is activated.

In the original keyboard, the "wires" on the sheets are not actually soldered to the circuit board, the thin coatings only touch the nodes on the board. For this reason graphite was used to coat each node, since graphite makes a good electrical contact. The only problem is, graphite is not a metal and can therefore not be soldered onto. I tried using insulation tape to tape my own wires to the circuit board but this was a failure since the wires would not stay put. I then realised that underneath each graphite node was probably a copper strip, so armed with a Swiss Army knife and great care I managed to scrape off some of the graphite on each node to reveal a nice clean, solderable metal strip.

I decided to use ribbon cable throughout the project since its wires are thin and stranded which means that they have less chance of breaking off where they have been soldered (which did happen once). Also, a group of wires can be run together.

I had the option to use the existing keyboard cable as is, but it would be too short and it would always be hanging from the guitar, even when it is not being used. Luckily I found an old female PS/2 connector in my room. Since the PS/2 connector would be placed on the other half of the guitar as the rest of the circuitry, I decided not to solder the wires onto the circuit board. Instead, I desoldered four metal pins from an old PCI card and soldered these to the circuit board. The female connector had a plug on the other end which could fit on these pins. For the cable, I took the keyboard cable and an old PS/2 mouse cable, checked which wires correspond to which pins and soldered the wires together, making a long male-male PS/2 cable.

Strum bar

This was one of the parts of the project I enjoyed most. I remember lying awake one night before the holiday trying to think of a way to make my own strum bar. I had acquired two neat push-button switches for a varsity project and wanted to use these. But how do you convert two push-buttons into a strum bar which can alternate up and down? Something told me that I would have to use some sort of a hinge. If you could place a hinge on top of the guitar and place one push-button on each side to hold it up you would have a strum bar, but that would be a very ugly sight. So I decided to place a door hinge underneath the sound hole, place a push-button on each side, and then fasten to the hinge a plastic strum bar which sticks out of the sound hole. This way, when you push the strum bar down, the hinge pushes up against the push-button, and when released, the push-button returns the hinge to its original position.

After fastening the hinge to the guitar I made two brackets from aluminium to hold the push-buttons in place. It was quite tricky to get the push-buttons properly aligned. At first I cut out a plastic strum bar from an old transparent CD (the ones you find at the bottom of a pack of recordable CDs), but it was rather flimsy and made two cracks where it was fastened to the hinge. Later I used this as a template and cut out a new one from the back cover of the old keyboard which proved to be much sturdier.

Fret buttons

For the fret buttons, I decided that I would cut out a row of five plastic keys from the old keyboard. Each key is made up of a removable plastic keytop, a plastic base into which the keytop fits, and a rubber cap underneath the base which acts like a spring. However, I decided to use the rectangular buttons such as Alt and Ctrl instead of the square keys, as this looks more like the keys on the official controller.

At first I tried cutting out the corresponding parts of the plastic sheets and very carefully soldering the wires to the conductive traces, but while it worked most of the time there always seemed to be one or two wires with a bad connection.

I saw that this was not a very reliable solution so I started looking elsewhere. The only other switches I could think of was mouse micro switches. So I gutted one or two old mice and desoldered five micro switches. I then placed these on a veroboard and soldered the corresponding wires.

I cut out a column of five key bases and carefully mades holes in the plastic fretboard through which these bases could fit. Two screws would hold everything together. A problem with the mouse switches was that you only have to depress them very slightly, while a normal keyboard key has to be depressed much more which gives a more natural feeling. I could not place the rubber caps underneath the key base as they would fall out. To solve this problem I cut out the middle part of the rubber cap (see picture) and placed it between the keytop and the base, instead of placing it underneath the base. This lifted the key slightly so that you have to press it down before it clicks.

Another problem was that, as you can see from the bottom-left picture, the keytop has a hole underneath so that it cannot press against the mouse switch. I therefore cut screws to the correct length and screwed them underneath the keytops so that the screw head can depress the switch (top-right picture).

After assembling all of this I placed the PC board underneath and fastened everything together. It was necessary to wrap insulation tape around the screws as they would otherwise cause a short-circuit between some of the switches.

Control buttons

The plastic guitar had three removable buttons that represent the volume/tone buttons on a real guitar. I needed one button for the Start button, and I also wanted to use one button each for volume up and volume down. I used the same principle as for the fret buttons and soldered three mouse micro switches onto veroboard. The bottom of the plastic buttons were hollow, so I filled it with epoxy.

Tilt sensor (Star Power)

At each step in my project I tried to keep the functionality of my own controller similar to that of the official controller. This meant that I needed to design a tilt sensor that activates Star Power (i.e. activates the Alt key combination) when the guitar is tilted vertically. In order to do this I took a small switch as shown and cut a piece of metal that could rotate and hit the switch when the guitar is tilted. This mechanism works more effectively when the guitar neck is "thrown" backwards in the air. I glued the switch to the inside of the guitar body at the correct angle. Between the switch and the piece of metal I glued two pieces of fridge magnet to prevent the metal piece from bouncing.

Whammy bar

This was an interesting part of the project. On the official controller you can move the whammy bar in various degrees; the more you press it down, the more the pitch bends. You can also do the same with your mouse by moving it left and right, but when you press Spacebar the whammy is either on or off; nothing in-between. I considered integrating a mouse circuit board into my controller but this proved to be too difficult, so I settled for the on/off system. I needed a long rotating rod that goes into the guitar near the bridge and makes contact when it is pressed down, and it needs to have spring-like motion.

An old project of mine, a soldering station, had an aluminium rod with a crocodile clip at its end for holding objects. I took this rod to use as the whammy bar. It has a nice matte metallic appearance and bends easily, but not so easy that you would bend the whammy bar during use.

It's hard to say how I came up with the first peculiar-looking prototype on the left. I had the idea of using a micro switch that presses against the inside of a cylinder when you bend the rod; allowing the whammy bar to rotate. However, this prototype didn't work very well.

I then started wondering whether I needed a switch at all. The only thing I really needed was two pieces of metal making contact. I kept the idea of using a cylinder, but this time a metal cylinder. If I had an aluminium rod and an metal cylinder, I only needed to make the rod touch the sides of the cylinder. So I went into the garage and cut off a piece of copper pipe, cut four slits on the one end and bent the sides into legs. I then cut four slits on the other end as well and strung elastic band to hold the rod in the middle (see picture). In this way the rod stays in the middle, but touches the sides when the whammy bar is pressed down. I soldered the one wire directly onto the copper. For the other wire, I placed a brass washer on the end of the rod and used a side cutter to pinch the aluminium above and below it, and soldered the wire to the brass washer.

The final product