Tuesday, December 04, 2012

SEGA SMSM With Native MIDI 5 Pin DIN Input

Sometimes it might be nice to interface a SEGA Master System MIDI Interface (SMSM) with old school MIDI gear. This means that we need to add a 5 pin MIDI DIN plug input to our SMSM project, but how?

Well, luckily, the answer is very easy! With only a few extra components, we can take a finished SMSM interface and quickly (without spending too much cash) add a standard MIDI input.

You will need:
• An SMSM interface, finished up to step #23
• A 4n28 optocoupler
• A 100 kΩ resistor
• A 3.3 kΩ resistor
• A 1n4148 diode
• A 5-pin DIN socket or plug (depending on your MIDI gear)

1. Upload the SMSM 100 Arduino MIDI Input Firmware to the Arduino board, which can be found here: http://little-scale.com/SMSM/SMSM_100/SMSM_100_Arduino_MIDI_IN.ino. Use this instead of the SMSM 100 Arduino Serial Input (as shown in the original SMSM tutorial).


2. Here are all of the parts!  The top row is the 1n4148 diode, the 3.3 k Ω resistor and the 100 kΩ resistor. The bottom row is the 4n28 chip and the 5 pin DIN connector.


3. Here is the Arduino board, identical to step #23 from the SMSM tutorial


4. Place the 4n28 chip onto the breadboard. The top left pin is pin 1. The bottom left pin is pin 3. The bottom right pin is pin 4. The top right pin is pin 6.


5. Place the 5 pin DIN connector onto the breadboard. There are five pins on this connector. Looking at the front of the connector, the pins (from left to right) are numbered 1, 4, 2, 5 and 3.


6. Connect pins 1 and 2 of the 4n28 via the 1n4148 diode. The strip should be facing towards pin 1.


7. Connect pin 6 of the 4n28 to the blue vertical breadboard bus via the 100 kΩ resistor. 


 8. Connect pin 5 of the 4n28 to the red vertical breadboard bus via the 3.3 kΩ resistor.


9. Connect pin 4 of the 4n28 to the blue vertical breadboard bus. 


10. Connect pin 1 of the 4n28 to pin 4 of the 5 pin DIN socket. 


11. Connect pin 2 of the 4n28 to pin 5 of the 5 pin DIN socket.


12.  Connect the blue vertical breadboard bus to Arduino ground.


13. Connect pin 5 of the 9 pin SEGA joystick connector to the red vertical breadboard bus. 


14. Connect pin 5 of the 4n28 chip to digital pin 0 (marked RX) on the Arduino board. 


15. Connect the red vertical breadboard bus to Arduino 5V.

0 comments: