tttapa / Control-Surface

Arduino library for creating MIDI controllers and other MIDI devices.
GNU General Public License v3.0
1.23k stars 138 forks source link

Midi Schematic for making pcb #127

Open benwadub opened 4 years ago

benwadub commented 4 years ago

hi, do you know where I can find a clear schematic of midi in out and thru to write it in eagle please?

IsThisNameGoodEnough commented 4 years ago

You can access the MIDI hardware standard for free here: https://www.midi.org/specifications-old/item/midi-din-electrical-specification

The standard has all the info you need to create the schematic.

benwadub commented 4 years ago

You can access the MIDI hardware standard for free here: https://www.midi.org/specifications-old/item/midi-din-electrical-specification

The standard has all the info you need to create the schematic.

thanks I lll look at it, hope I ll find the value of resistor I need for teensy 3.5 midi in out thru

benwadub commented 4 years ago

midi schematic.pdf could you confirm that the symbol I rounded on schematic can be a 74hc14E? and for teensy 3.5 with 3.3v that Re is 33 ohm and rf 10 ohm? Rd and RB are 220 ohm electronic is really new for me and English not my mother language! thanks for help!

tttapa commented 4 years ago

I don't see anything on the pdf you posted, but I presume you're talking about the triangular symbol. It's a buffer.

A 74HC14 contains six inverters, you could connect two inverters in series to get a non-inverting buffer.
You don't really need it, as the Arduino's UART has an output buffer, but it might not be a bad idea to use an external buffer, especially at 3.3V, since Rc = 10Ω isn't going to limit the current enough to save the Arduino when you accidentally short the output, by using the wrong cable, for instance.

You could also decide to use a 5V buffer, and use Rc = 220Ω to protect the output (the current will be limited to ~23 mA when you short the output to ground).

benwadub commented 4 years ago

hi i havent seen you replied here sorry! so you think I could remove the 74hc14? and with the teensy 3.5 would it work without it? I have to build a second MIDI Thru interface and doesn't have a 74hc14 here. do you have a buffer ref that could be used in place of it? I have some component laying around

tttapa commented 4 years ago

The MIDI baud rate is just 31250 symbols/s, so almost any buffer will do. You can even use an NPN transistor for the second inverter, as proposed by the MIDI standard:

Leaving the buffer out completely is at your own risk. The MIDI cable goes out to the outside world, so it's not impossible for it to receive a static discharge, get shorted out, etc.

IsThisNameGoodEnough commented 4 years ago

Hi benwadub. As ttapa mentioned you don't actually need the buffer for it to work with the teensy, but if you accidentally short the DIN TX pin to ground then you'll probably burn out the pin on the teensy you're using for the DIN-MIDI output. The buffer will give you some insurance on not damaging your board in that instance.

If you do decide to include a buffer you have three options:

If it's helpful I attached a snapshot of a schematic I put together for a project using both a DIN-IN and DIN-OUT. Each part name can be searched on digi-key.

Capture

benwadub commented 4 years ago

thank you! I have nothing of this here, and don t know how to solder cms component, I ll order again a 74hc14 that worked the first time, really thank you for reply guys!

benwadub commented 4 years ago

does an mc74hc04 would do the job? I have it in an old Thomson Mo6 that I could desolder.

tttapa commented 4 years ago

You can probably use it, but I wouldn't sacrifice a vintage computer to get a single chip that costs literally a couple of cents new (on Conrad, for example).

IsThisNameGoodEnough commented 4 years ago

Just in case anyone reads through this thread looking for a simple schematic, here's an updated version that I've confirmed works well. The ICs called out in the image are for surface mount variants, but they also come in through hole as well. As for the diode, a good through hole candidate is P/N BAW76-TR, although any general purpose diode should work. Hope it helps someone.

EDIT: The schematic is assuming that your micro-controller pins are 3.3V. If you're using a 5V microcontroller, the only change needed is to swap the two 3.3V references in the schematics to 5V.

MIDI In-Out Schematic