DIY Midi to Trigger interface? Arduino?

So I got a broken Roland TR77 drum machine for cheap, which I fixed and now it works again.
I ordered the trigger interface from circuitbenders already (the trigger Inputs on the TR77 need -12V, this interface converts +5V to -12V).

Now I am not sure if I want to just put 13 trigger inputs (mini-jack) on the drum machine or maybe figure something out to convert Midi to 13x 5V triggers.

Has anyone done that before? Maybe using an Arduino? I have no experience with Arduino, except building the Kosmo VCO tuners.

I know Tubutec offers a Midi-Trigger interface for Roland drum machines, but in my opinion it’s way too expensive.

Cheers

1 Like

It should be very straight forward if your not needing velocity ( assume this interface can’t do that anyway )

A simple sketch will listen on midi for the note on/of and all you do is match that note to a digital output and set the output high whilst the note is on.

1 Like

The interface can’t do velocity, but the Guiro Sound on the TR77 actually has 2 trigger inputs with different voltages. I think these have different pitches and can also held “on” as long as there is a gate.

So I’t just need an Arduino? No DAC between the Arduino and the trigger outputs? Do you have an idea which Arduino would suit this application best?
Thanks!

I am currently building a midi2trigger/gate module as a Kosmo PCB Project :wink:
It is not yet ready and I can not tell how much longer I will take, because I have little time available at the moment, but I can of course share what I have already.

This is a 7.5 cm wide Kosmo module.
I use a shift register for 8 outputs and then 4 additional outputs directly from arduino pins. I thought 12 outputs should be enough for now. They are buffered by TL074s to protect the outputs and put put 5V triggers/gates. Trigger / gate should be switchable with a spst switch.
I wanted to do midi through from software, so there might be a slight delay, but hopefully not noticeable. Has anyone done this already? Speaking of software, I have not even started the coding, but I think it should not be too difficult…

What do you think? any issues? I might change the order of numbers to be left to right, then up down… I though about using some of the outputs as accents (therefore the current numbering), but this could be set in software, or maybe an additional switch…

2 Likes

Why the shift register? There are twelve digital pins other than the serial pins used for MIDI, and you can use six of the analog pins as digital.

2 Likes

Good point! I started with 16 outputs, but I never counted pins on the nano! xD
I will simplify this!

2 Likes

oof. make this one more output and i will put it directly into the drum machine :smiley:
what do you use the 6N138 for? boosting the input-voltage for the nano?

That’s an optocoupler, required for MIDI input by the MIDI standard.

1 Like

It’s the wrong one, though :grinning: – it’s out of spec for MIDI, and harder to get your hands on than isolators that are within spec.

(the self-contained code for the GAMEBOY MINIMACHINE linked from that post would be trivial to tweak for this task, btw, or you can grab the standard Arduino MIDI library and hack something together on top of that).

2 Likes

Yeah, I’ve been peeking down that rabbit hole. Apparently the MIDI spec mentions the Sharp PC900V and the HP 6N138. But the MIDI spec was written forty years ago, and from what I’ve read the 6N138 was one of the better choices back then, but no longer. And as for the PC900V it’s out of production, but it was a clone of the H11L1 which still is in production and, again from what I’ve read, is still a good choice.

Note these various optocouplers are not drop-in replacements for one another, you need to modify the circuit to use a different one.

Going off old notes, the spec says rise/fall should be <2µs, while the 6N138’s I checked lie between 1-4µs, so guess the HP one was on the faster side since they specify the manufacturer for a JEDEC part. It’s nowhere near the ones with logic outputs; H11L1M is 0.1µs, 6N137 is 0.05µs. And as mentioned, 6N137 is widely available (~60 cents from Tayda, who claim to have 3,988,883 of them in stock…)

2 Likes

Ok, isnt midi 3.3V? The nano specs say input voltage = 7 - 12V. Also, don’t you need a DAC on the nanos outputs?

No, MIDI is 5 V.

You don’t need a DAC. All you need is 5 V triggers which is what a Nano puts out on the digital pins.

2 Likes

So no need to increase the input voltage to the nano?

The Nano, as usual, should be powered with 7–12 V on the VIN pin, or with an external 5 V regulator on the +5V pin. I don’t see a regulator on @sebastian’s drawing and the VIN pin is marked unconnected, so something needs fixing there.

2 Likes

It depends on the midi spec. As of 1.1, the signaling was changed to include 3.3v.

Whats really important is the current loop at 5mA so resistors would need to change for 3.3v implementations.

With 5v, you’d use a pair of 220Ω resistors, but 3.3v uses 3Ω and 10Ω resistors.

Additionally, MIDI out does not require an optocoupler.

3 Likes

How to power your Nano, for people who haven’t seen this already:

4 Likes

I know how to power an Arduino, I thought the input-voltage of 7-12V from the datasheet refers to the I/O pins.

Oh, yeah, sorry, I forgot to show the power section, @analogoutput here it is:

BTW: Why is almost everyone using the L7805 instead of just going with Vin? Is it just to be sure, because 12V is on the edge of the spec of the nano? Something about noise (more caps with the L7805)?

and thanks, @fredrik for pointing out the 6N138 issue (again)! I read it once already, but forgot again when I copied this part from somewhere… the arduinoboy I think. In my stripboard version it works, but better not rely on it! :slight_smile:

Does anyone have a footprint for the midi jacks? I got the sizes correct now, I think, but I need to check out how to make the holes “plated”(?) with copper/tin…

1 Like

Which ones? I have this for a particular horizontal board mount
image

but there are others.

1 Like