Go Down

Topic: MIDI socket connected to pin 1 apparently sends nothing (Read 2996 times) previous topic - next topic

mildlyodd

Ah ha! OK, thank you the penny has now dropped.

To test my understanding with my own words, the point is that in the circuit you posted on Apr 19, 2015, 05:10 pm the resistors R4 and R5 are both present in a loop which runs from the Micro's Tx pin to the receive unit, which is just the front side of an opto-isolator, and then back to the 5V pin.

Thus, regardless of the opto-isolator, the contribution the current limiting resistance for both pins is at least 2*220 = 440 Ohm.

I now feel comfortable enough to try it....

wabbitguy

Ah ha! OK, thank you the penny has now dropped.

To test my understanding with my own words, the point is that in the circuit you posted on Apr 19, 2015, 05:10 pm the resistors R4 and R5 are both present in a loop which runs from the Micro's Tx pin to the receive unit, which is just the front side of an opto-isolator, and then back to the 5V pin.

Thus, regardless of the opto-isolator, the contribution the current limiting resistance for both pins is at least 2*220 = 440 Ohm.

I now feel comfortable enough to try it....
If you look at the other half of the schematic, that TX section is talking to an RX opto-isolator. Any decent MIDI gear has protection like that built in it.

Except for those $5 special USB to MIDI keyboard interfaces you find on eBay. But that hardly stops anyone from buying and using them. My gear is worth more than those pieces of garbage.

You can head directly to the MIDI Manufacturers page to see what the hardware requirements are:

MIDI Electrical Specs

Try not to dwell on the small stuff, you'll drive yourself crazy and get nothing done.

mildlyodd

#17
Jul 28, 2015, 01:02 am Last Edit: Jul 28, 2015, 11:15 am by mildlyodd
Hi
OK, I still can't get it to work and am running short of ideas again. To recap:

1. I'm using an Arduino Micro with the circuit posted by KevNull on Apr 19, 2015, 04:07 pm (as later edited, same post) with the addition of a 220 Ohm series resistor on the Tx pin output.

2. I'm using this sketch: https://www.arduino.cc/en/Tutorial/Midi?from=Tutorial.MIDI with serial.begin and serial.write() changed to serial1.begin/write.

3. The receive unit is a Zoom RhythmTrak drum machine. Its set to receive on Midi channel 1. I have separately tested it with a different midi source and it responds correctly to incoming Midi data commands.

4. I've noticed that with the receive unit disconnected that the 5V output pin actually sits at 6 - 7 volts depending on the way in which the Micro is powered. It drops to about half that voltage with the receive unit connected which makes sense to me given the current loop principal, though that in turn implies that the average value from the Tx pin is close to 0V.

5. I haven't checked the Tx output in any kind of logic analyser as that's beyond my budget. I've not tried checking it with a LED as I can't see what I'd learn over putting a d.c meter on it (which shows a few tenths of a volt), either way I think I will just see smoothed average response.

I'm open to any new ideas for obvious mistakes, thanks in advance.

mildlyodd

I should have been clearer in my last post. Both measurements I mentioned at bullets 4 and 5 were as measured after the corresponding 220 ohm resistor connected to each pin, not actually at the pin itself.

Grumpy_Mike

Quote
2. I'm using this sketch: https://www.arduino.cc/en/Tutorial/Midi?from=Tutorial.MIDI with serial.begin and serial.write() changed to serial1.begin/write.
OK originally you were sending CC commands now you are sending notes. What do you see on a MIDI monitor?

Quote
I've not tried checking it with a LED as I can't see what I'd learn over putting a d.c meter on it (which shows a few tenths of a volt), either way I think I will just see smoothed average response.
No, a meter will show you average response, an LED will show you spikes by lighting up. You will not see these spikes with a meter.

Time to post a picture of what you have showing all the wiring.

mildlyodd

#20
Jul 28, 2015, 09:02 pm Last Edit: Jul 28, 2015, 09:05 pm by mildlyodd Reason: Forgot attachment.
Hi
Thanks for the prompt.

In preparation for a photo I decided to tidy up the circuit, changing one coloured lead for a different colour to demonstrate that I had wired up the DIN plug properly. Rather humiliatingly I have to confess that the circuit now works and, critically, I didn't spot what feature, whether a stray short etc, might have caused the circuit not to work before. I'm guessing some sloppy soldering was the culprit as I found the DIN plug a bit of a pallava to handle and heat sink. I've attached the photo anyway.

So, I'm now hearing drum sounds from the drum machine triggered by the Micro via Midi. Thanks for your patient suggestions, Grumpy_Mike and WabbitGuy, this episode has restored my confidence a little.

For the benefit of anyone interested out there:-

I found this drawing more reassuring than most 2D diagrams: http://www.philrees.co.uk/midiplug.htm

Page 187 of Music Engineering  By Richard Brice has a simple diagram that clarifies the current loop topic. It was helpful in picturing the total resistance governing the Micro's low pin current ratings. Diagram found here:
Music Engineering (Richard Brice) - google book preview

All the best.

Go Up