Where to edit wiring for a minimal Zynthian

Here is my din connection (it s a 5pin that I use only for prototyping, here ground is not wired on breadboard
I already tried to swap the connectors

image image image

I am not sure if it is the camera angle but it looks like your black wire on the RPi is connected to pin 8 rather than pin 10.

You are right! I tried to swap rx and rx yesterday and forgot to te swap after, I just invert and still nothing!
I already also test my midi cable with other device to be sure it works fine I tried 5v and 3,3 too, really don t know what to check now!!


here is my boot config
seems to be enabling the uart?

Also I think the MIDI is round the wrong way. Pin 4 of 5-pin DIN should go to resistor feeding pin 2 of opto but it looks like you have them the other way round. (I struggle with identifying 5-pin din pinout so may have misinterpreted but it looks wrong to me.)

i also tried swapping this many time cause I know it s one of the first mistake I made with my Arduino project but it doesn’t work in any way, I also tried with another 6n138, the 2 I have are brand new

Okay, you maybe at the stage I got to where logic failed me so I blindly followed the Zynthian Way and it worked. I implemented this circuit and all was good. It may be related to how the opto inverts the signal.

This is my working MIDI input:

6N137 requires 5V.
RPi input supports 3.3V.
RPi pin 10 has internal pull-up.
6N137 pin 6 is pulled low to provide signal to RPi.

So this circuit provides the current loop for MIDI input, isolation to receiver, correct signal polarity and protection of 3.3V input pins on RPi.

1 Like

Thanks I ll try to add the second diode to see!!
Really thank you for help!

yes, config.txt is allright

1 Like

Also, remove the resistor from pin 7 of 6N138. Leave pin 7 not connected. And probably increase value of pull-up resistor from 470 ohms to a few kilo ohms.

do you think vnc could make a conflict with uart?

No! I can’t see why VNC would have any impact on UART.

I don’t know too :joy: still searching what s the problem!! I am reformatting the sd know and wil all restart from scratch!

Try connecting RPi pin 8 to pin 10 and see whether you can see data sent, e.g. start a comms app like miniterm and check you see what you type then remove the link and check you don’t see it. This will prove the UART is not damaged. You may want to do this with a basic Raspbian install, e.g. Raspbian Lite.

Similarly you could wire the RPi side of the MIDI interface to a 5 pin DIN and connect to a sound module to check the MIDI is being passed through.

IT’s all set up around the TTY port and that’s really what you want to know is functioning. Checking that can be a little bit involved. In the very eary days and when we moved from Pi2 to Pi3 I seem to remember we eeded to change the value of the basic MIDI clock value that set up the TTY port, but that really is ancient history.

A ‘simple’ GPIO sketch using a Raspian SSD would at least allow you to see if you can get the Opto-Isolator actually controlling the GPIO pin that MIDI comes in over.

As @riban says you probably want to check the opto-isolator actually does the sorts of things it’s meant to.

This is what I used for my MIDI in

1 Like

I apologise it looks like the PI outs are different between the H11L1 & the 6N138

I already relied this too, I think my raspberry has a problem

oh damn after reinstalling now cdmi doesn’t work too, I ll stop trying Zynthian I believe, I already spent 2 days on it and all is too cinfusing for me! thanks for your help btw