By gate I assume you mean an on / off signal of various voltages. The best way to protect the Arduino is by using an opto isolator.
Then all you have to do is to protect the input of the opto isolator.
Against negative voltages with a clamping diode. And excess positive ones with a resistor and Zeners diode.
Hi,
I think you had better assume that we do not even know what a synth gate is.
A link to explain what one is and what it is supposed to do, would help.
As you may have read arduino's are limited to 5V or 3,3V as maximum input levels, digital or analog.
The controller IC has no protection as such, so if any signal greater than 5V or 3.3V is being applied, then some scaling of the signal will have to occur.
Modular analog synthesizers use patch cables, so you can configure different sounds. A GATE signal is typically coming from a keyboard note press (sequencers and other things use them too to signal an event is on/off too). When the key is pressed the +V DC goes to a fixed level and is held there until released when it goes back to 0 V DC. No pitch, just on or off state. 0 V DC is considered off and the high +V DC is considered on. Different brands of synthesizers use different levels of the +V DC, but mostly they can all recognize each others on states when inter-patching different machines. As long as the GATE goes above +2V DC the majority of modular synth GATE inputs will recognize this as on. The GATE outputs of the different brands are really all over the place with some 2V, 5V, 10V, 12V, 15V... etc. There are a few rare negative volt ones too.
Analog synthesizers also use another type of signal for patching setups called control voltage or CV. This is for patching the changes of pitch and other settings. This signal is more of a gradient one and can be swept anywhere between -20V to +20V and maybe more. It is not uncommon to mix and match GATE and CV when experimenting with patching cables and also by accident.
Those are some of the reasons needed for the protection.
Ya, I mean negative dc polarity. I’m sure there are some rare synths that do that inversion you are mentioning, but I’m not ever going to own one or worry about it.
Yes again, usually that is the scale for the octaves. Luckily my project isn’t going to need any CV stuff.
Will this circuit work (attached jpg)? On the left is a jack for the synth cords to send the gate in to the circuit. Then a resistor and two schottky diodes (BAT42). Do my component values look ok?
My understanding is that the diodes will trim off any volts that are above the + rail or below (-) gnd. The pin will still be high when the gate is above +5V? What happens when the GATE is -?
As long as the GATE doesn’t exceed the diode max specs nothing will blow?
At a pinch it would function but it is not a very good circuit for the job you require. First off when there is nothing attached then the input is floating and can read either a zero or one. Next it provides no isolation from the synths and the Arduino. At best this could result in injecting hum at worst you could short things out. Wen dealing with a lot of unknown external circuits it is always best to optically isolate things. It is not for nothing that MIDI uses an opto isolator.