Hi Guys! I'm trying to get MIDI input into an arduino using this instructable
And one's I've found like it. I can't for the life of me figure out why it's not working. I'm trying to run the program under the midi input schematic to simply have the Pin 13 led turn on when it receives MIDI number 60.
I think the problem lies somewhere in getting output from my optoisolator. I've probed the input of the isolator, and I appear to be getting some input into the isolator. But all I get is 5v on the output, nothing that looks like it could be serial data. I've checked my wiring around a million times, and I'm fairly certain that I'm wiring it up correctly. Any ideas? Thanks!
What Arduino setup do you have?
For some reason I can never get MIdi circuit based on 6N138 to work with "minimal/breadboard" Arduino, then I use this
But I can never get this to work with Arduino boards, so then I use the 6N138 circuit.
Also the Midi connector illustrations are from the back of the socket, not the plug.
Don't know if that helped you any
Sorry for the confusion...You're saying the 4n28 circut worked with arduino for you? Or you couldn't get it to work? I've only tried the 6n138.
Yeah, I checked my pinout on the connector, it looks right to me. I did however screw it up the first time. Why isn't there a standard for notation for this? Or is there one I'm unaware of?
It depends on your type of Arduino.
If you have a board, like UNO, it should work with the 6N138, I used it myself yesterday.
If you have a breadboard Arduino or something like it, I would use a 4N28 circuit.
I don't know why. It's only my experience
I see, yeah I'm using an UNO. I've also tried with my Mega. No luck on either.
I just looked at the circuit at instructables again
try changing R1 to 5,6K, and R2 to 1,2K
that's what I use and it works on my UNO
Also, try to power it with a power supply, not the USB
Thanks for the suggestion. I tried it, and nothing. Still probing the input, and getting data into the isolator, but nothing out. Interestingly enough, I grabbed my MIDI shield (which I'm trying to avoid using) and got output from it's optoisolator, and all the way to the Rx pin on arduino. However, the LED still wouldn't turn on.
Well, Okay. I got the MIDI shield to work, and the light blinks upon 60 sent. So I suppose that's progress. However, I still get nothing out of my opto isolator when not using the MIDI shield. I do see output probing the Rx of the MIDI Shield. So, for some reason, my naked opto isolator won't fire. Such a simple circuit, I can imagine what's wrong.
Try removing the 100K altogether and change the 3K3 to a 6K8.