8 MIDI outs, hardware

Status
Not open for further replies.

garcho

Member
I have a MIDI master clock ready to be built but for the final few pieces of the puzzle.

If I have 8 UART outputs going to 8 MIDI jacks, should I buffer each with a pair of inverters? Or will a 47Ω resistor in series with each TX pin be sufficient protection for the Teensy? This is a one-off for my own use, so "good enough" is actually good enough. If the answer is "yes, you should buffer them", then I will follow up with a few more questions in a separate reply.

Along with the UARTs, there is the 3V3 47Ω pull-up resistor for each MIDI out. If I have 8 MIDI outputs, that's 7mA each, for a total of 56mA, right? That leaves roughly 200mA left for the convertor to comfortably provide, yes? Is there anyway to guesstimate how much current my sketch will use? Am I safe assuming a MIDI clock sketch with a few LED/button functions is less than 200mA? Is there a better way to proved the power for the 5mA current loop than from the Teensy itself? I plan on using a 5V wall wart.

There will be 8 LED-lit buttons triggered by Teensy GPIO pins but I have each going through a 4k7 resistor to the base of a 2N3904, so hopefully that's 0.7mA per pin and not something to be concerned with?

There is also a 3V 16x2 RGB-on-black LCD display, with an I2C "backpack" (AVR ATMega328p). I'm not sure how to go about measuring total current draw but I could blindly guess and hope it's something like 30-50mA total, including backlight. I'm basically only using the blue LEDs, so it won't be like powering a flashlight or something. It's this particular model: https://www.sparkfun.com/products/14073. Like I said, I plan on powering it (and the Teensy) from an external 5V wall wart so I don't think it matters anyway. As far as the Teensy is concerned, it's only 2 more GPIO pins, right?

Any thoughts, suggestions, answers, haikus?
Thanks for your time!
 
I'd use 74HCT244 as an octal buffer - then you get the MIDI driven from 5V, and protect the Teensy in the process.
Driving MIDI from 3.3V is pretty shaky as the Vf for optocouplers varies. MIDI draws current on average a lot less than 50%
of the time, peaking around 50%, its not so bad.
Use the standard MIDI circuit once at 5V, not the 47 ohms, don't forget...
 
"I'd use 74HCT244 as an octal buffer"
I'm not familiar with those. Would it be something like this:

50181241528_8832028f87_z.jpg


I am assuming I should not connect the Teensy pins directly to the buffer. What value of resistor should I use between the Teensy and the 74HCT244? After that it's just a matter of 220Ω to the DIN jack?

Thanks for your time!
 
You don't need to use resistors between the Teensy outputs and the 74HCT244 inputs.
The 220Ω seems OK according to the MIDI Org spec:

Midi out.jpg

But you need to connect pins 1 & 19 of the 74HCT244 to GND as well to enable the outputs:

74hct244.PNG

Paul
 
If you are laying out a board or doing point to point wiring, you might want to look at the 74HCT541 (or 74AHCT541). Basically the same logic but the '541 has all the inputs on one side of the package and all the outputs on the other side. Makes laying it out a snap. '244 on the left, '541 on the right. Only difference is the enables but you are likely to tie both to ground in either case.
74ahct244.png74ahct541.png
 
I would have suggested the 74HCT245 if it was still available, due to its bussed pinout... I'd forgotten they'd done a
bussed version of the 244.

The 16 bit chips like the 74LVC16244 both bus the signal pinout and spread multiple supply and ground across them for
low inductance, if you ever need more than 8 signals buffered they are worth checking out, I've used the 74LVC16374
16-fold DQ latch before on a 2-layer board that was interfacing SDRAM...
 
The 74HCT245 (and 74AHCT245, too) is readily available from TI, Toshiba, ON and Nexperia.
 
The 74HCT245 (and 74AHCT245, too) is readily available from TI, Toshiba, ON and Nexperia.
Oh yes - there they are - perhaps the database was being updated over the weekend, I've seen this before with Farnell, or
I made a typo in the search...
 
Thanks for the suggestions y'all, I ordered some '541s. So, as long as OE1 and OE2 are held to ground, all inputs will be non-inverting buffers?
 
Thanks for the suggestions y'all, I ordered some '541s. So, as long as OE1 and OE2 are held to ground, all inputs will be non-inverting buffers?

Yup. Or rather the outputs will be driven as buffered versions of the inputs...
 
As mark said,yup. Also make sure you get the T version (74AHCT541 or 74HCT541) as the HC and AHC versions won't work with 3.3V logic.
 
I did indeed get the correct ICs. Thanks much for the advice, and thank you Mark for untying my tongue!
 
Status
Not open for further replies.
Back
Top