Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
MIDI
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Electrical specifications=== MIDI 1.0's electrical interface is based around a fully isolated [[current loop]]<ref name="MIDI specification" /> along the red and blue lines in the following [[Circuit diagram|schematic]]: [[File:MIDI IN OUT simplified schematic twisted-pair.svg|alt=MIDI interconnection schematic|center|718x718px]] "DIN / TRS" in this schematic indicates that either a [[DIN connector]]{{Efn|The original MIDI 1.0 specification mandated DIN-5. The current source pin or hot pin ("H" in this schematic) corresponds to pin 4 of a 5-pin DIN. The current sink or cold pin ("C" in this schematic) corresponds to pin 5 of that DIN. The shield pin ("S" in this schematic) corresponds to pin 2 of that DIN.}} or a [[TRS phone connector]]{{Efn|Three variants on how to use TRS phone connectors are called ''Type A'', ''Type B'', and ''TS'' (a.k.a. ''Type C'' or ''Non-TRS''). ''Type A'' became part of the MIDI standard in 2018. ''Type A'' pin assignments are: the current source or hot pin ("H" in the schematic) is ring of the TRS, the current sink or cold pin ("C" in the schematic) is the tip of the TRS, and the shield ("S" in the schematic) is the sleeve of the TRS.}} may be used.<ref>{{Cite web |title=[Updated] How to Make Your Own 3.5mm mini stereo TRS-to-MIDI 5 pin DIN cables |url=https://www.midi.org/midi-articles/updated-how-to-make-your-own-3-5mm-mini-stereo-trs-to-midi-5-pin-din-cables |access-date=2023-12-14 |website=The MIDI Association |language=en-gb |archive-date=14 December 2023 |archive-url=https://web.archive.org/web/20231214070734/https://www.midi.org/midi-articles/updated-how-to-make-your-own-3-5mm-mini-stereo-trs-to-midi-5-pin-din-cables |url-status=live }}</ref><ref>{{Cite web |title=A simplified guide to MIDI over TRS minijacks β minimidi.world |url=https://minimidi.world/ |access-date=2023-12-14 |website=minimidi.world |archive-date=14 December 2023 |archive-url=https://web.archive.org/web/20231214070735/https://minimidi.world/ |url-status=live }}</ref> To transmit a logic 0 and a start bit, the sender's [[UART]]{{Efn|Universal Asynchronous Receiver/Transmitter ([[UART]]) is hardware that transports bytes between digital devices. When MIDI was new, most synthesizers used discrete, external UART chips, such as the [[8250]] or [[16550 UART]], but UARTs have since moved into [[microcontrollers]].<ref name=SparkFun>{{Cite web |title=MIDI Tutorial - SparkFun Learn |url=https://learn.sparkfun.com/tutorials/midi-tutorial/hardware--electronic-implementation |access-date=2023-12-15 |website=[[SparkFun]] |archive-date=15 December 2023 |archive-url=https://web.archive.org/web/20231215011929/https://learn.sparkfun.com/tutorials/midi-tutorial/hardware--electronic-implementation |url-status=live }}</ref>}} produces a low voltage. This results in a nominal 5 [[milliampere]]s<ref name="MIDI specification" /> current flow [[Current source|sourced]] from the sender's high voltage supply,{{efn|1=MIDI nominally uses a +5 volt source, in which case the resistance assignments are R1=R2=R4=220[[Ohm|Ξ©]] and R3=280Ξ©. But it is possible to change the resistance values to achieve a similar current with other voltage supplies (in particular, for 3.3 volt systems).}} which travels rightwards along the red lines though the [[Shielded cable|shielded]]{{Efn|The MIDI specification provides for a ground "wire" and a braid or foil shield, connected on the Shield pin, protecting the two signal-carrying conductors on the Hot and Cold pins. Although the MIDI cable is supposed to connect this Shield pin and the braid or foil shield to chassis ground, it should do so only at the MIDI out port; the MIDI in port should leave its Shield pin unconnected and isolated. Some large manufacturers of MIDI devices use modified MIDI in-only DIN 5-pin sockets with the metallic conductors intentionally omitted at pin positions 1, 2, and 3 so that the maximum voltage isolation is obtained.}} [[twisted-pair]] cable and into the receiver's opto-isolator. The current exits the opto-isolator and returns back leftwards along the blue lines into the sender's UART, which [[Current sink|sinks]] the current.{{Efn|It is often easier to use [[NPN transistor|NPN]] or [[Field-effect_transistor#n-channel_FET|nMOS]] transistors to ''sink'' current than to use [[PNP transistor|PNP]] or [[Field-effect_transistor#p-channel_FET|pMOS]] transistors to ''source'' current, because [[electron mobility]] is better than hole mobility.}} [[Resistors]] R1 and R2 limit the current and are equal to provide a [[Balanced line|balanced impedance]]. The [[diode]] is for protection.<ref>{{Cite journal |last=Russ |first=Martin |date=1988-01-01 |title=Practically MIDI (SOS Jan 1988) |url=https://www.muzines.co.uk/articles/practically-midi/3458 |journal=Sound on Sound |issue=Jan 1988 |pages=56β59 |access-date=14 December 2023 |archive-date=14 December 2023 |archive-url=https://web.archive.org/web/20231214192852/https://www.muzines.co.uk/articles/practically-midi/3458 |url-status=live }}</ref> This current turns on the opto-isolator's{{efn|MIDI's original reference design uses the obsolete [[Sharp Corporation|Sharp]] PC900, but modern designs frequently use the 6N138.<ref name="SparkFun" /> The opto-isolator provides [[galvanic isolation]], so there is no conductive path between the two MIDI devices. Properly designed MIDI devices are therefore relatively immune to ground loops and similar interference.}} [[LED]] and [[phototransistor]], so the receiver's UART can read the signal with the help of [[pull-up resistor]] R3 to the receiver's voltage supply. While the supplies in the original specification are 5 [[volts]], the receiver and sender may use different voltage levels. To transmit a logic 1, a stop bit, and while idle, the sender's [[UART]] produces the same high voltage as its [[Voltage source|voltage supply]] provides, which results in no current flow. This avoids wasting power when idle.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
MIDI
(section)
Add topic