Fixing Gameboy-powered Arduinoboy MIDI glitches

July 26th, 2009

I recently had a little problem when building my Arduinoboy. The Arduinoboy did appear to work, but it was glitchy. Some MIDI notes were ignored or gave strange results, and sync didn’t appear to work at all. I sat down and compared trash80’s schematic to other MIDI 6n138 schematics and I noticed something: There was not resistor between pin 7 and ground in trash80’s schematic, which is is otherwise common in MIDI optocoupler circuits.

Arduinoboy MIDI fix - Before Arduinoboy MIDI fix - after

Left: Before, Right: After. Upper waveform: Test signal source, Lower waveform: Opto-coupler output. Both powered by the Gameboy.

So I set up a prototype circuit with a test signal of 32 kHz to see if I could trace the problem. It turned out that the problem only happens when you power the Arduinoboy from the Gameboy. When powering it with +5V it worked alright and the oscilloscope output looked ok. However when powering it from the Gameboy, the combined losses from the lower output voltage from the Gameboy (The DC/DC only outputs 4.8 V as shown in the previous post) the protection diode at the Gameboy’s link port and trash80’s way of driving the 6n138 resulted in a source voltage of 4V for the 6n138 which made the rise time way to high, as you can see in the left picture.

Adding a 4.7k resistor between pin 7 of the 6n138 and ground decreased the rise time enough to make the circuit work flawlessly. So if you’re having problems with a Gameboy-powered Arduinoboy, try this. Fixed version of trash80’s schematic provided below.

Arduinoboy MIDI fix - schematic

And finally a word of caution. Don’t confuse the 4.7k resistor with the 270 Ohm resistor. A 270 Ohm resistor with a 5% mark (gold strip) can look confusingly similar to a 4.7k resistor. Can you tell the difference below?

4.7k Ohms vs 270 Ohms - Can you tell the difference?

7 Responses to “Fixing Gameboy-powered Arduinoboy MIDI glitches”

  1. reiyano says:

    plan to build an arduinoboy within the year if not the first half of next year provided I have the funds and the time. I dont understand much of what has been said here but it sounds like you solved a power issue. so thank you. Ill bookmark this for future reference. you’re the best nitro. =)

  2. trash80 says:

    Sweet. and whoops. I only had problems when the battery life was low. will add this in and update the site as soon as i’m home. Bad ass work as usual nitro2k01! :)

  3. Mr Tomczak says:

    Fantastic work, nitro2k01.

  4. jesse says:

    I tried this with a an ac adapter powered dmg-01 powering the arduino and anytime a midi message was sent to mgb the gb screen faded and came back after said midi event. No sound would output from the gb either. removed resistor and it was fine (with original glitches and missed midi events back). I’ll try a diff’t gb, alternate adapter (non Nintendo), and batteries. I will also try powering the arduino independently.

  5. nitro2k01 says:

    Are you sure you used the right resistor value, and connected everything correctly?
    My qualified guess is that you either used a much too small value for the fixing resistor I suggested or that you (previously) connected pin 6 of the opto-coupler. (2nd from the bottom on the right side) to V+. Is either of that true?

  6. Arduinoboy… | The only one real authentic FRIEND of MEGAMAN says:

    [...] – finally managed to make one. Used the original schematic of course with nitro20k1′s fix. The circuit requires 6N138 optocoupler and I purchased some off ebay a while go. Now I discovered [...]

  7. Opto-couple confusion – 6N137 or 6N138? – gr33nonline says:

    [...] saw this link: Fixing Gameboy-powered Arduinoboy MIDI glitches and tried a 4.7K from VB (pin 7) to ground and it looks so much better (bottom [...]

Leave a Reply

If you'd rather contact me directly, please use the following e-mail address: It appears that you have Javascript disabled. Please enable it to see my e-mail address.