4/28/2013

Microcontroller Advanced Kit - MIDI Controller 6N137



This project shows you how the hardware of a MIDI interface works and goes through some simple examples to show how the controller can be used in MIDI systems. First we will start by explaining the details of the hardware interface. Then we will look at the MIDI protocol and see how simple it is to write custom software for this MIDI controller.

There are only a couple parts needed to build the MIDI connections. A few resistors, a diode, and a small 8 pin IC and that is it. The controller part of the system is a 2051 microcontroller (a 20 pin version of the popular 8051). The MIDI interface connects to the serial port of the 2051 (pins 2 and 3). The 2051 also has a reset circuit (the 10 uF capacitor and the 8.2k resistor) and an oscillator circuit (the 24 MHz crystal and the two 33 pF capacitors). For more information on the 2051, The only thing not shown is the 5 volt power supply that creates Vcc (5 Volts DC) for the circuit. An LM7805 and 220 uF capacitor is included with the kit to create 5 Volts DC from a 9 to 12 Volt DC source.


The 6N137 isolates one electrical system from another. There is no electrical connection between devices connected by MIDI. When a current flows through the internal LED connected between pins 2 and 3, the LED transmits light to a light detecting diode. The diode is activated and the Output at pin 6 is pulled low by the internal transistor. If no current flows then the Output floats. Rather than let it float, we connect an 8.2k resistor to pin 6 to lightly pull the voltage at the Output to 5 Volts when the circuit in not active.


The microcontroller sends signals through the MIDI port by controlling the voltage at its pin 3. The current is provided by the 5 volts (Vcc) connected to pin 4 of the MIDI Out port. When the MIDI Out port is connected to a MIDI In port of another system the following circuit is created.




AD8016ARB TMS320F2812PGFA     PCF8584T  SN75176BP PCM1801U
PCI9080-3 MAX211ECAI MAX708CSA MAX1922ESA LM339D
MAX3185CWP LM2903N  MC34119P IR2110       LM2575T-5.0
IR2153       MAX1617MEE        MAX813LCSA MAX797CSE LM358D







No comments:

Post a Comment