Introduction: Build an ArduinoBoy

The GameBoy. Most likely you owned one back in your childhood. And even if you didn't, most likely you played with your best friend's GameBoy, or maybe you owned its closest competitor, the Sega Game Gear or Nomad. Marvelous little gaming devices, but now that you are all grown up, have you given any thought to what you are going to do with it now? Keep it in the attic to dig out and show your kids what gaming was like in the 20th century? Sell it to a collector? Relive gaming memories by going back through the Legend of Zelda: Link's Awakening for the umpteenth bazillon time?

Did you ever think about turning it into a musical instrument?

Timothy "trash80" Lamb is a chiptune composer currently living in Los Angeles, California. A chiptune composer is a person who uses the sound generator ICs (integrated circuits) found inside video game consoles and handhelds to create music. Mr. Lamb is also the creator of a device known as the ArduinoBoy; a combination of open source hardware and software that can turn any member of the GameBoy family with a cartridge slot and a link cable port into a MIDI sound generator.

Now it should be noted that trash80 was not the first to create such a system. The two big homebrew GameBoy apps used by professional chiptune composers, Nanoloop and Little Sound Disk Jockey, or LSDJ, have had MIDI in capability for quite some time. The problem is that both these apps rely on Microchip PIC hardware to send and receive MIDI signals. No disrespect intended to the standard microcontroller of the electrical engineering industry, but the PIC really is a piece of professional hardware and can be kind of intimidating for those who do not muck about with electronics on a regular basis. There is also little to no support for users of less popular operating systems when it comes to programming these devices (the only official PIC development suite is for Windows, no Linux or Mac support). By using the much simpler Arduino platform, however, the ArduinoBoy gets around these limitations, making it much easier for a would-be chiptune composer to build the tools he or she needs. Plus, while the ArduinoBoy was made to work with trash80's own homebrew GameBoy sound generator program, mGB, it also gets along just fine with Nanoloop and LSDJ.

While trash80 has shared his work on a Google Code web page, he does not have any step-by-step instructions on how one can make their own (its on his to-do list). I decided to help him out in this regard. While not necessarily a step-by-step, this Instructable should give you a general idea on what to do and show you some of my pitfalls so that you can avoid them.

Step 1: Parts, Tools, and Code

Parts

  • An Arduino, generic Arduino, or the parts to make your own. I personally use Modern Device Compay's Really Bare Bones Board kit, which can either be assembled as is and attached to your project using female circuit board pin sockets, or cannibalized for parts to make the Arduino a permanent part of the project.
  • Two 220Ω, seven 2KΩ, and one 270Ω resistors. For this project, 1/4 or 1/8 watt resistors are ideal.
  • One 6N138 opto-isolator.
  • One 1N914 small signal diode.  Don't be surprised if you can only buy them in quantities of 10 or more.
  • One pushbutton that is on only when the button is depressed. For those who speak Engineer, that is a SPST off-(on) pushbutton.
  • Two 5 pin female 180 degree DIN connectors. Make sure you get these exact connectors. There are many different designs for DIN connectors, and few, if any, are compatible with each other.
  • Four two-pin terminal blocks. Although you can just solder all your wires directly to the PCB, using terminal blocks or some other form of connectors will make assembly, disassembly, and parts cannibalization much easier.
  • One general-purpose PC board.
  • One GameBoy link cable.
  • A device that can provide MIDI out, like a keyboard or a computer with the necessary software and adapter.
  • One programmable GameBoy cartridge.
  • Solder.
  • Extra wire. Solid for breadboard work and wiring the PC board, stranded for wires you expect to move often.
  • A case to stuff it all in.
  • Pile of Miscellanea.
Tools

  • Soldering iron.
  • Desodering bulb, pump, or wick. Just in case.
  • Helping hands soldering tool.
  • Safety goggles. Your glasses are not going to cut it.
  • Fire extinguisher, or at least a glass of water. Once again, just in case.
  • Wire cutters.
  • Wire strippers.
  • Needle-nose pliers.
  • Solderless breadboard.
  • Programming or USB cable(s) for both the Arduino and the programmable GameBoy cartridge, if applicable.
  • Rotary tool and/or anything else you need to cut holes and slots in your case of choice.
Code

You are going to need two different pieces of code for this project, both of which can be found on trash80's ArduinoBoy Google Code page . They are found on the right side of the page under the heading Featured Downloads . You will load the ArduinoBoy code into the Arduino, while mGB will be loaded into the programmable game cartridge.

Step 2: Let's Look at the Schematic

A schematic is, quite simply, any document that depicts how a mechanical or electrical device is put together. Those pictures of your lawn tractor with all the parts disassembled with little dotted lines showing how they all fit together? The blueprints the contractor for your home or apartment was so obsessed about? Schematics; both of them.

As far as schematics go, trash80's schematic for the ArduinoBoy is a lot more colorful and lacks straight lines, but is perfectly readable. Unless you are completely anal about engineering conventions, you should have no problems.

You might want to print this out, as we will be referring back to it often.

Step 3: Breadboard Test

Before we get to the actual construction of the finished ArduinoBoy, we first want to make sure all our parts are good. For that, we will use our solderless breadboard, which allows us to create connections between electronic parts without having to solder them together. It's easy. Just look at the schematic and connect the parts as shown.

Remember that there is a comments section on each page. If you get stuck on something, post below and I will try to help you as best as I can.

Step 4: First Test

It is time for two very important tests: the smoke test and the function test.

The first test is quite easy. Simply connect your GameBoy to the device, switch on the GameBoy, and watch the ArduinoBoy's LEDs. If the pin13 LED flashes briefly, followed by the remaining LEDs lighting up in sequential order, sweeping from highest pin to lowest and back two times, ending with two flashes from the LEDs all at once, then chances are good that your ArduinoBoy is in working order. Also be sure to test the mode select button. When you press it, the currently-lit LED should turn off and the next in the sequence will turn on. If, instead, the lights refuse to light up, parts feel abnormally warm to the touch, you see or smell smoke, and/or any part of the circuit explodes or bursts into flames, then refer back to the schematic, double-check all your connections and wiring, replace the damaged components, and perform the smoke test again.

The second test is a little more nerve racking, mainly because if anything goes wrong here, it won't just be the Arduino that will be turned to toast. Load up mGB into your GameBoy, plug the ArduinoBoy into your GameBoy, and connect the MIDI out of your MIDI-compatible device to the MIDI in of the breadboarded ArduinoBoy. Turn on the GameBoy, then the MIDI device, keeping your fire extinguisher close at hand lest anything happen. Try playing a few notes on your MIDI device on channel 1, 2, 3, 4, or 5. If your GameBoy makes a noise reminiscent of an instrument or a sound effect, then proceed to jump out of your chair, staring up toward the heavens, arms outstretched, bellowing "IT'S ALIVE" while laughing manically.



A note on both testing and using your ArduinoBoy: there are web sites out there that offer free MIDI files of popular songs, and you will be temped, sorely tempted, to use them for both testing and in your composition sessions. Resist that temptation. First off, some of the MIDI tracks offered by these sites are not well made. I once found a MIDI copy of the Gorillaz's "19-2000", and one of the instruments did not cut out or fade out, so eventually, this one instrument would overwhelm the rest of the instruments until you stopped the player and started it again. Plus, using these pre-made songs encourages you to continue using pre-made songs. You won't make anything original. You are better off learning how to compose your own music right away.

Step 5: Solder It Up

So, your ArduinoBoy works. Good, it is time to solder it to the printed circuit prototype board.

"Wait! Wait!" you are yelling to yourself. "It works just fine now and I know I will be careful with it. Why potentially mess it up? Why bother soldering?"

Okay then. But think about this for a moment: you and your ArduinoBoy make great music. So great, in fact, that you end up turning chiptune into a legitimate form of music. You bring chiptune into the mainstream. You become famous. So famous, in fact, that you are invited to play at Wrigley Field just before the Cubs take the field. You are still using your breadboarded ArduinoBoy. You and the crew are getting everything set up just so, until one of you notice the most important of your musical instruments, the ArduinoBoy, has gone missing. You finally find it in the hands of a young boy who managed to sneak past security. In his curiosity, he has removed all the components from the breadboard, and unfortunately, you do not have a schematic handy. With only 5 minutes to go before the show starts, you have to cancel your performance. The crowd goes nuts, and in their fury destroy a good chunk of the stadium, causing the game to be canceled as well. The Cubs loose their make-up game and their shot at the World Series yet again, and they have you to blame.

Don't let this highly convoluted scenario happen to you: always make your projects permanent.

First, after removing all the parts from the solderless breadboard, place them on the PC board and figure out how you are going to fit them all on. There are a couple things that you should keep in mind:

  • Try to get all your ICs to face the same way. That way, you can tell at a glance whether they are all mounted properly.
  • Screw terminals, IC sockets, and wire connectors are your friends. If anything breaks, you want to be able to remove and replace the parts easily. Also, you may have to cannibalize your ArduinoBoy at a later time to build something else. Adding sockets and other connectors can allow you to do this easily.
  • Be mindful of the space you have to work with. Keep parts well away from mounting holes so that you can get mounting hardware and tools to those locations easily. Also, if you are fitting the board in a very small space, like an Altoids tin, you need to keep in mind the space parts like buttons take up. You may have to keep parts of your board clear so that the button has clearance inside the case.
Once you have it all soldered together, it is a simple matter of drilling and cutting the appropriate holes in your case of choice and mounting the circuit board inside it. If you are using a metal case like I did, be sure to use a piece of paper or something to line the bottom of the case so that it does not short out any part of the circuit. Rubber washers would be a good idea, too.

Step 6: Using Your ArduinoBoy

Your ArduinoBoy, if assembled correctly, should behave no differently than any other MIDI input device. When used with mGB, it will have 5 separate MIDI channels. Channels 1 and 2 are steady tone generators, 3 is a tone generator that seems to have a three note pattern in my limited tests (the timbre of the note will change each time you play on this channel, following a pattern), channel 4 provides bass sounds (use like a drum, bass guitar, or synth), and channel 5 is noise (most often used in GameBoy games for explosions and running water).

Plug your MIDI out device into the port connected to the opto-isolator, your ArduinoBoy into your GameBoy, and your reprogrammable cartridge into your GameBoy as well. Set your ArduinoBoy to mGB mode by pressing the button until the LED connected to digital 8 lights up. From here on out, you can use your GameBoy as a MIDI instrument. Adjustments to the sound generated can be made at the GameBoy using mGB's interface, specifically, timbre, octave, channel, and note attack. The other ArduinoBoy modes are used with other GameBoy chiptune creation programs, specifically, Nanoloop and LSDJ and are beyond the scope of this Instructable.

Step 7: Pitfalls You Can Avoid

In the course of completing this project, I made a few design and construction mistakes that, although they did not adversely affect the performance of the ArduinoBoy's core function, they did make construction more challenging and the final presentation a little sloppy. Here are my mistakes and a few common glitches, and how you can avoid or correct them.

Metal Case Work
Of all the design decisions I made, the decision to use an Altoids mint tin as a case was perhaps the most disastrous. The problem is not with the tin itself, but the tools I had available in preparing the case and the fact that I have done very little work with thin sheet metal. First off, use the right tool for the job. Tin snips, or at least the ones I used, tear up the metal rather than cut it cleanly, leaving behind hard to remove sharp edges that do not remain flat to the case. Use a nibbler instead. Also, when drilling holes, always drill from the finish side, or the side that you will see most often (outside), whenever possible. When you drill a hole you are likely to leave burrs in the metal and cause the metal to bend into the hole from the direction you drill. By drilling from the outside, you leave the burrs on the inside of the case, making the outside neater looking and safer for absent-minded people.

Prototype Board
Cheap materials are not always the best to work with. The prototype boards I used to build my ArduinoBoy came from RadioShack and, while perfectly useable, they are hard to solder to by their very nature of being cheaply made. No plated-through holes, so solder is not sucked up into the holes, resulting in these large solder blobs on the board that do not thoroughly hold the soldered parts in place. Try your best to find boards with plated holes. If you can't, I have heard that a little solder flux smeared into the hole just before soldering will wick molten solder into the hole, just as if it were plated. On the subject of cheap proto-boards, keep in mind that because the solder will just pool up at the top, they can be prone to...

Shorts
When I finished soldering together my ArduinoBoy, I noticed that the LEDs were not lighting up properly. Problem was not my wiring, that was perfect, but my soldering. Tiny, pretty much impossible to see amounts of solder and dust were bridging the gaps on the board, preventing some LEDs from lighting and tying other LEDs together. If this happens to you, run a knife blade between the solder joints and clean thoroughly using q-tips, paper towels, and rubbing alcohol.

Super Glue
Try as you might, you can never use super glue without getting some on your fingers. Just a general warning for everyone out there. Don't get me wrong, it is great stuff when two parts have got to stick and stick quickly, but never assume that you can use it without gluing your fingers together.

Step 8: Where Do I Go From Here?

Having trouble getting started with the whole chiptune composing thing? Need inspiration, tips, tricks, and a place to show off your latest tune? For all things chiptunes, and by extension retro gaming, there's 8bitcollective.com . They have a vibrant community of chiptune composers who would be more than willing to help you out in your career.

Want to expand the capabilities of your ArduinoBoy? Your ArduinoBoy has a built-in function that mGB doesn't actually utilize: MIDI out, specifically, MIDI synchronization. Nanoloop and LSDJ , however, are not only compatible with the ArduinoBoy hardware, but they are able to use this unutilized feature, allowing you to synchronize your GameBoy's sounds with other programmable MIDI instruments, like drums.

Okay, you are now a successful chiptune composer and performer, but now you have a bunch of gigs to go to and you want to lighten the load as much as possible. What are you going to do? Well, so long as you are only using the ArduinoBoy's MIDI in port, you can severely reduce its size. Simply use as small an Arduino clone you can find and leave out the MIDI out port. After all, it seems to work for trash80.

As for me, I'm looking to make a few improvements to my prototype while simultaneously learning more about how it works and how I can compose some real music with it. I'm thinking about designing a few PCBs in Eagle CAD for two different versions: one that uses through-hole components and DIP package ICs, like this one, and another that uses surface mount components whenever possible so I can try out the hotplate reflow solder method and make (hopefully) the smallest full-fledged ArduinoBoy ever made.

Above all, whatever you decide to do with your ArduinoBoy, have fun. If you aren't having fun, then you are obviously doing something wrong. Remember that like everything else in life, composing chiptunes is not about beating someone else. It is about beating yourself, making each tune you compose better than the last. Nobody ever got famous for doing something they didn't love.

Questions? Comments? Marriage proposals? Death threats? Post them below.

Comments

author
0r4 made it! (author)2016-07-05

Wonderful project but keep in mind that the code works on Arduinos that mount ATMega168/328 chip.
If you want to make an Arduinoboy with an Arduino micro (that mounts ATMega32U4), check out this fork:

https://github.com/zeroerrequattro/arduinoboy-micr...

arduinoboy_2016_03.jpgarduinoboy_2016_02.jpgarduinoboy_2016.jpg
author
Jfieldcap (author)2015-05-21

Nice 'ible! Might come back when (if) I get myself a gameboy.

Also, the original gameboy was released in 1989, in the 3 pic it says early 90's. (I don't mean to be rude, just I noticed that and had to point it out)

author
Jfieldcap (author)Jfieldcap2015-05-21

3d pic, sorry

author
JustinW4 (author)2014-11-24

I'm having trouble communicating with the GameBoy using LSDJ and mGB. Nothing seems to work. I'm getting MIDI messages from the output of the optical coupler, but the gameboy doesn't seem to pick anything up. My link cable connects to the analog pins as per the schematic. I'm using a DMG-04 cable. Any thoughts?

author
soeren (author)2012-11-16

hi mr sciene

very nice tutorial! thank you for this.
I've finished building mine, but I have a few questions:

1. is it normal when i hit the button the first 5 times, each of the 5 red led's light up, but the 6th time nr 1 and 2 lights up and the 7th time all of them light up. ?

2. and another thing that frustrates me quite a bit:
- when in mgb mode, the gameboy responds to my midi notes, but the pitches of them are very strange. fx if I play C8 it sounds like C8, but then C#8 and D8 and D#8 also sounds like C8, and E8 is an octave below. and generally the pitches seem to lack any kind of system. this must obviously be a fault somewhere. do you have any clue?

all the best
søren

author
DJsoundestroyer (author)2012-04-22

Ive seen things like this before, but never in a step-by-step form, so thanks! But is was wondering, could your design work with just a link cable, or do i need to get a blank cartridge? Ive seen some far more DIY style ones, with a AVR (an 8-bit micro controller) that goes right into the link cable, no cartridge needed, but i like the idea of an arduino alot better. Thanks!

author
the dashing hero (author)2012-02-01

aaaahh....... the GBA sp, im loving Nintendo!

author
Robot Lover (author)2011-08-01

Where did you get the programmable game cartridge?

author
doomsdayltd (author)Robot Lover2012-01-10

the programmable cart is a cart from either kitsch bent or non finite

author
Robot Lover (author)doomsdayltd2012-01-10

Thanks!

author
anti_communist_fish (author)2011-12-07

is it possible to replace 6n138 with a 4n28?

author
sukoa (author)2011-07-28

Hi, it looks very nice. I got a question, would it be possible to use a touch pad as a midi interface and send signals to the gameboy? If that the case, would it be possible to use the gameboy as a effects pedal?
Thanks in advance,

Sukoa

author
monsterman (author)2011-07-21

will it work with gba

author
hyaki (author)2010-12-28

Nice Tutorial :) thanks
Btw, what about the LED how many required and the voltage?

author
SHIFT! (author)2010-12-12

Interesting concept! But could it also work on a Gameboy Advance since it can also play original gameboy games?

author
WillTheRescue (author)2010-11-29

If I won't be using the midi-out feature, can I just scrap that and those components all together? or will it cause wiring and/or other issues?

author
modeve (author)2010-02-17

You also want 100% (or maybe it's 91%) isopropyl alcohol instead of rubbing alcohol. Available in most drugstores.

author
Kasm279 (author)modeve2010-07-04

its 91%, ive got a jug of it on my desk lol

author
onef (author)2010-06-03

I  have assembled a parts list for jameco.com. Does everything look right here?
Optocoupler DC Input 1 Channel DARL W/Base DC Output 8-Pin Plastic Dip Black Bulk:
Part no. 42489

@ RES,CF,220 OHM,1/4 WATT,5%,(100 BAG):
Part no. 690700

@ RES,CF,2K OHM,1/4 WATT,5%,(100 BAG):
Part no. 690937

@ RES,CF,270 OHM,1/4 WATT,5%,(100 BAG):
Part no. 690726

SOCKET,STD DIN,FEMALE,5PIN, PANEL MOUNT:
Part no. 15844

Connector Terminal Blocks 2 Position 3.5mm Solder Straight Thru-Hole 10A:
Part no. 2094506

EXPERIMENTER?S PHENOLIC PROTOTYPE BOARD:
Part no. 616673

Diode Switching 100 Volt 2-Pin DO-35:
Part no. 36311

author
Expressed (author)2010-03-01

Would it be possible to use Ableton Live and midi it to an Arduinoboy with a Prosound DMG-01? ALso, do you need to buy an arduino chip and the bare bones kit, or just one or the other? 

author
modeve (author)2010-02-17

A tapered reamer (hand tool) is a good addition to the toolbox for enlarging, smoothing rough holes.

Here's a  2"x3" vectorboard from digikey for around $6
Digikey # V2025-ND

author
M8R-9kie08 (author)2009-12-12

 You're missing the 1n914 diode on your parts list. Do the whole thing over.

author
trash80 (author)2009-11-03

Hello all. Nice instructable.

daulef:
MIDI out acts as a thru in modes where midi out isnt useded (All modes other then LSDJ master sync)

Also I did just that once, built a arduinoboy inside of a DMG.
http://www.flickr.com/photos/trash80/sets/72157606262638032/

author
daulef (author)2009-09-12

Any idea how you'd go about implementing a midi thru?

author
daulef (author)2009-09-06

what about an arduino-boy so small it could fit in the gameboy? directly wired to the link port? might have to sacrifice the battery compartment though... hmm... just ordered a cart and link cable (my original is long gone!) from these guys: http://store.kitsch-bent.com/
so i might just give this a shot!

author
Finnl (author)2009-07-12

I really like this picture!

author
scienceguy8 (author)hardyboy2009-07-06

Yep, that's the right one for the Arduino, but you will need some support hardware to make it work, specifically a 16MHz ceramic resonator or a crystal and a pair of 22 picofarad caps, plus a programming port of some sorts. Your best bet is to either buy a prebuilt or kit Arduino or Arduino clone if you are new to this, but if you absolutely want to go about building your own Arduino clone into the ArduinoBoy, I suggest taking a look at the schematic for the Really Bare Bones Board from the Modern Device Company, here:

http://moderndevice.com/RBBB_revB.shtml

author
killthewiseone (author)2009-06-26

nice tutorial man, i'm glad i found this as there's not much extra info over on the google group. ive been researching into building one and this is a huge help. my problem is some of the components for the build are not widely available in ireland, it means ordering from abroad and postage is gonna cost more than the parts themselves. are those midi in-only arduinoboys for sale anywhere? financially it might make more sense for me to buy, albeit less satisfying!

author

Unfortunately, I've tried getting in contact with trash80, the fellow building the MIDI in only ArduinoBoys, but he hasn't returned my emails. As far as I know, he is still working on them, and quite possibly distributing a few to his chiptune composing friends. As to finding the parts you need in Ireland: typing "electronic parts suppliers in Europe" into Google provides several links of dubious origins, but you may have better luck than me. What you might try doing is contacting someone here in the States and ask them to order the part(s) you need, then have them mailed to you.

About This Instructable

119,283views

126favorites

More by scienceguy8:Build an ArduinoBoyBe Dr. Freeman for Halloween
Add instructable to: