Shruthi-1 no MIDI out

Hi folks, first post… I built a Shruthi-1 from a complete kit and have it nearly all working. It’s the biggest kit I’ve ever completed building and I’m very impressed by the quality of the kit and the support. I almost made it all the way without help, but I’m stumped trying to get any MIDI output from it.

What I know: My computer and drum machine talk to each other just fine, and each one can send Note Ons to the Shruthi but neither ever receives anything from it. When I put a cable in the Shruthi Midi Out connector with power off and checked with my meter from the far end of the cable, I saw continuity from MIDI pin 2 to ground, from MIDI pin 4 to one side of R18 and 218 ohms from there to +5v power, and continuity from MIDI pin 5 to CPU pin 15 (testing on the chip itself) all as expected. Then with power connected and “mid (midi out)” set to “ful”, a logic probe shows steady low on pin 2, and steady high on pins 4 and 5. I tried changing parameters, switching patches, and playing in Jam Mode, and got zilch on the MIDI message monitor screen.

I wasn’t quite sure what I should expect to see but reading some of the posts here I get the feeling that Shruthi’s MIDI out should be pretty chatty. I even tried it with a bamboo cooking skewer wedged under the display, in case CPU socket pins might be shorting against the back of it, but they’re cut extremely short and anyway that made no difference.

What to try next? Everything else works great and this really isn’t do or die, but I’d feel better eating my candy if I had it going too. Thanks in advance!

Maybe you have disabled by mistake the MIDI out in the system settings? There’s a MIDI out option which allows you to configure the function of the MIDI out (thru, sending CC…).

Otherwise, do you have a scope to probe the signal on pin 15 of the MCU?

Thanks for the quick reply! The MIDI out system setting you refer to is the one that includes “ful”, right? If so then no, I tried each of those. No scope here but the logic probe beeps when it picks up any pulses or edges. It showed steady logic high on (MIDI) pin 5, no beeps.

Have you tried to do the same thing on pin6 of the optocoupler to make sure that your probe responds fast enough to detect MIDI signals?

No, I’ll give that a shot. Thanks.

The follow-up is that the logic probe picked up MIDI activity just fine, both off the cable and off pin 6 of the optoisolator. Beeps like a beeping thing. The package says it’s good to 10 MHz so I would’ve been disappointed if not. I also pulled the CPU from its socket to check pin 15 continuity and it’s ok too, dead short to the MIDI pin and completely open to anything else I could find.

I had a Mouser order ready to go out so I added a couple of 644p’s onto it–a head start on a Module Tester project if nothing else. We’ll see what a different chip does when that shows up, but it’s hard to imagine what else in such a simple circuit. And it isn’t bad as it is now, while I’m just learning what to do with it. Thanks again!

…and the wrap-up, after rigging up a programmer and burning and swapping in one of the new ATmegas, is that the processor was fine. (It’s never a bad processor.) Finally I thought to hook a plain MIDI cable from the Shruthi’s out to the drum machine’s in and to connect my USB MIDI adapter from the drum out to the computer. With MIDI thru enabled on the drum machine, a MIDI monitor program on the PC showed the Shruthi talking away. Likewise connecting USB MIDI from the PC to the Shruthi and enabling the Shruthi’s MIDI thru passed Note Ons along from the computer to the drum machine.

It appears I’d been tricked by two problems at the same time. One was that Shruthi’s MIDI out doesn’t seem to play well with the USB MIDI adapter’s input. It looks like the ATmega TXD pin doesn’t have the muscle to pull the input level low for whatever reason–and who knows what’s really at the other end of the line there. The other was that the drum machine–the only device I had handy with native MIDI ports–was only listening for Note Ons and MIDI clocks while the Shruthi was only sending program and control changes. That connection was actually working although not showing any signs of it, which made me think the problem had to be with the Shruthi.

Ironically conventional wisdom from The Forums is that generic eBay USB MIDI adapters are “fine for connecting an Arduino to your PC” but not to be trusted for real instruments. I guess that’s a compliment to the Shruthi. Anyway it’s good to have it resolved and to know that my build was fine all along. I’ll figure out what the next-less-crappy interface option might be if it ever really matters, but that’s a low-priority connection to me and for now I have what seems like a good enough workaround.

Thanks again for the help, Olivier, and again my compliments on a sweet little synth.

One thing worth knowing while doing this kind of tests (and I’m mentioning it because I got fooled by it today) is the running status problem.

At the exception of the naive “thru” mode, the Shruthi does not retransmit the status byte for each message if it is similar to that of the previous message (aka “running status”). This saves MIDI bandwidth, but the drawback is that if you plug things in/out while the Shruthi is powered, the synth on the other end might miss the first complete message - and will be unable to parse all the following messages for which the status byte is not explicitly transmitted. Not a problem in normal use, but when you troubleshoot and plug things in/out all the time, will bite you back…

I had a hairy email troubleshooting session recently about this, I might decide in future firmware versions to always send fully-formed MIDI messages ; or maybe to retransmit the full status byte every 10th message or second or so…

Good to know about the running status thing. Debugging experience has made me very superstitious about things somehow being tainted or corrupted. Cycling power or resetting to a known initial state tends to go on a lot. But yes, retransmitting full status every once in a while seems like a good way to limit the damage from any kind of glitch.

Also, following up on the follow-up: I told myself all day yesterday that I wasn’t going to waste any more time on that cheap USB MIDI cable, but I couldn’t help wondering what the nastiest thing was that could be inside there, and decided that a straight wire between pins 4 and 5 with a high-Z logic input hooked on to sense level would be it. And that’s what folks who’ve cracked open that kind of adapter seem to find most of the time. What’s ultimately “at the other end of the line” from the TXD pin is the 220 ohm resistor to +5v on pin 4. Connected to a normal MIDI in port like the Shruthi’s, there is another 220 ohm resistor in line on the receiver end and also a drop of a volt or a bit more from the optoisolator’s LED, so the USART might sink 6-7 mA driving that. If you replace the resistor and LED with a piece of wire, the TXD pin has to pull close to 20 mA to produce a logic low, which is a lot for something probably designed to run a standard MAX232 input, which might source 50 uA or so.

Most of the Arduino MIDI controller projects seem to use the Arduino MIDI Library with a software serial port. I wondered if the difference might be that a general I/O port used in software serial is rated to pull 40 mA, while hardware serial uses the USART which wasn’t meant to do that. So just now, I tested it with another cable, a couple of bare DIN jacks, and some test clips. I hooked a 390 ohm resistor (first one out of the bag) between the pin 4s of the two jacks for some extra load and jumped straight from pin 2 to pin 2 and pin 5 to pin 5. I plugged the USB MIDI cable into the pc, started the MIDI monitor, switched MIDI modes on the Shruthi, and moved some knobs. And wouldn’t you know, it worked.

I’m not sure how much that’s worth. No doubt the best answer is still to use a better interface. But understanding things is generally good and it’s nice to have a better idea of why that adapter wasn’t working. I have a hunch that I might not be the first, or the last, to run into that problem.