Hi,
I created a small
add-on board for a Raspberry Pi Zero W. The initial goal was to convert OSC and Bluetooth MIDI to i2c, this part works well but on a later revision of the board I decided to add a Serial MIDI header for both input and output.
I must have made a newbie mistake because I can't get Serial MIDI IN and OUT to work simultaneously. At first I tested the Input and the output separately and they seemed to work, it's when I tested the input and output together that I noticed something must be wrong with my circuit.
I don't have an oscilloscope so it's quite hard to troubleshoot. For testing, I'm sending Midi notes from Max/MSP and the Node.js script on the Raspberry Pi is supposed to pass the MIDI messages to the serial MIDI output. I also have another test function in my script that just sends a note message to the output whenever it receives an OSC message. TTYmidi logs the serial input and the messages supposed to go to the output but these messages are never sent from the RPI. It used to work without any MIDI in connected to the PI but now I can't get the serial midi out to work anymore...
There's also a THRU (4, 5) on my header and I suspect this might be the cause of the whole issue but I'm not sure. Anyway, I don't think this THRU output is working properly either, it should replicate any MIDI message sent to MIDI IN, am I correct ? I need to test this again but I don't think it does.
In Idle state, I measure 4.980V at pins OUT4 and OUT5, this is the normal behavior, right ? I havent measured the current loop yet. I used the 5V specification for the output and a
SN74HCT14PWR and now I'm wondering if I was right to do that. I sometimes see MIDI circuits not using an hexinverter at all and connecting the PIN5 directly, through a resistor to the TX line of the processor but I wanted to protect the GPIO of the Raspberry Pi (they can't handle 5V) in case of a wrong connection. Maybe the hexinverter/Schmitt trigger I chose is wrong ? I was really looking for a small part because there ain't much space on the PCB... The optoisolator on the input is an ACPL for the same reason, it's really small
Well, here's the schematic of my MIDI circuit, I would really appreciate if someone more experienced than me could have a look at it and tell me if I messed up something on the hardware side, otherwise I should try to search on the software side, but appart from
ttymidi and the basic changes made in config.txt, I'm not sure there's much to change.
Thanks.
P.S: There's no issue with USB MIDI and Bluetooth MIDI, only with the serial output apparently.