midi in (hardware serial) fails after some time

Status
Not open for further replies.

mattvenn

Member
I built a midi clock -> sync pulse converter with a Teensy LC

https://github.com/mattvenn/kaoss-volca-sync

I used the opto isolator circuit shown here; https://www.pjrc.com/teensy/td_libs_MIDI_sch_t3.png

Here's the source: https://github.com/mattvenn/kaoss-volca-sync/blob/main/src/clock.ino

It was working totally fine and then a few days ago it blinked once and then stopped. Blinking once means it has received at least 16 midi clocks.

I did some debugging yesterday and concluded it was a problem with the MIDI library I was using (here is the diff from that work https://github.com/mattvenn/kaoss-v...1ead9479971cb7e8df68496b1cc820db22b3e16c40cea)

It worked fine for some minutes and then after a few power cycles failed in the same way.

If I just print the received serial from serial2 I always get the midi clock byte and it never seems to fail so I don't think it's a circuit level failure.

Any ideas why this would stop working after about 16 pulses received?

Thanks,
Matt
 
well this turned out to be a hardware level failure. I was using pin 17 as 5v supply from USB to power the opto isolator.
Sometimes at startup this pin would be low instead of high.
I checked with a multimeter and it's not a direct connection to usb power input.
I've now moved the opto supply to the 5v pin next to the usb connection.
 
Status
Not open for further replies.
Back
Top