Cannot get serial in working

Nate posted Feb 3 '17, 19:22:

I am having a very very tough time getting the serial MIDI to work. I check all connections, I try different connections, I substitute 6N138 optocouplers of different manufacturers, I swap out Pi boards (2B and 3), I try different codes, .... It looks like everyone and their dog can get this, but I can't-- very frustrating.

The USB MIDI works, so I know for sure that the issue is in the optocoupler configuration. Is it possible to blow the serial port? It never got brought to 5V.

Have I missed anything?

Nimbo77 posted Feb 4 '17, 20:44:

Hi Nate.
Two things:

  1. Have you confirmed your audio setup is working? Is it possible that midi is triggering, but you just can't hear it?

  2. Are you able to post a picture of your circuit?
Nate posted Feb 6 '17, 02:59:

Yes, I've used the USB port on my keyboard, and it works. The keyboard MIDI works in my rack synth but not into the Pi, so it's not a no power issue.

I don't know how to post a picture here.

Nate posted Feb 6 '17, 03:00:

It isn't in the audio out; that is clearly working.

Nate posted Feb 7 '17, 19:42:

Okay, I realized that I wasn't testing the 2015 card. I tried it out, but all it does on the 2B v1.2 is flash the ACT four times slow and four times fast (no matter what is plugged in)-- no sound for either USB MIDI in or the serial circuit.

According to the popular discussion, serial in should work for the 2015 code.

I tried a brand new card and installed the image, and it does the same thing. This seems to be getting ridiculous.

Nate posted Feb 7 '17, 20:50:

Finally got it! I used a model B v1.1 with the 2015 code. Whew!

Nate posted Feb 7 '17, 20:51:

Pi 2, to add

Nate posted Feb 7 '17, 21:28:

The two main things I was doing wrong:

  1. I used a 7.5K resistor instead of 10K-- doesn't make the cut, apparently.
  2. I was sending MIDI data before the Pi was initialized. If that initial time is messed up, it will not read any data afterwards. However, the USB in doesn't require that no data standby time; it'll ignore data until it is ready.

  (not published)
  I want to post as guest