help with schmitt trigger circuit

Hi.

Could someone help with this schmitt trigger circuit?

The input is coming from an analog synth GATE and it should turn the microcontroller digital input pin on and off.

Synth GATEs are typically 2-10V depending on what type of synthesizer you have. They are just on or off signals. Sometimes they are negative ons by mistake or from weird models. Analog synthesizers have high impedance inputs (100k) and low impedance outputs (1k).

This circuit is a single side supply schmitt trigger. Does my op amp need any negative volt protection at the inputs? Does it need any over voltage protection (15 max or so)?

How do my resistor values look? I would like to have the upper threshold be 2V to turn the pin on and then 1V to turn the pin off.

Does the microcontroller pin need any protection from over or negative volts? I'm thinking the op amp output would never go out of the 0-3.3V range.

Would the pin ever float? Do I need any pull-up or pull-down resistors?

Are there any other issues I should be concerned about? This is all I can think of.

I would appreciate any comments on improvements for this circuit. Thanks!!

See attached pic.

synth gate schmitt trigger.png

LTSpice is a great tool for experimenting with circuits like that, and it is free.
Attached is a screenshot of a quick simulation, with a 10 Hz 3V sine wave input.
It switches at about 2.4 V and 0.5 V. No worries about input protection for the Arduino, but you should consider the specific requirements and restrictions of the op amp you choose. You will want a rail-to-rail output (as is the LT6003).

Might be hard to find an opamp that runs on 3.3volt, and has rail2rail outputs.
When I plug in the numbers, I get a 1volt and a 2volt switch point.
If... the opamp output swings rail2rail.

Why an opamp.
AFAIK Arduino's digital pins have schmitt trigger inputs.
Just use a voltage divider to get the gate voltage in range of those 30% and 60% of VCC switch points.
Arduino pins also have clamping diodes, so with high value divider resistors you also have pos/neg/overvoltage protection.
Leo..

Edit: A 100k resistor (no opamp) between signal and Arduino input (3.3volt Arduino) also has 1volt and 2volt switch points. And the input is protected to +/-100volt (1mA fault current).

Just out of interest;
This is the real Schmitt trigger: Otto Schmitt paper

Russell

jremington:
LTSpice is a great tool for experimenting with circuits like that, and it is free.
Attached is a screenshot of a quick simulation, with a 10 Hz 3V sine wave input.
It switches at about 2.4 V and 0.5 V. No worries about input protection for the Arduino, but you should consider the specific requirements and restrictions of the op amp you choose. You will want a rail-to-rail output (as is the LT6003).

Cool. Thanks! I'll grab that LTSpice. I wonder why this calculator says 2V and 1V?

idk. I'll breadboard and test.

Wawa:
Might be hard to find an opamp that runs on 3.3volt, and has rail2rail outputs.
When I plug in the numbers, I get a 1volt and a 2volt switch point.
If... the opamp output swings rail2rail.

Why an opamp.
AFAIK Arduino's digital pins have schmitt trigger inputs.
Just use a voltage divider to get the gate voltage in range of those 30% and 60% of VCC switch points.
Arduino pins also have clamping diodes, so with high value divider resistors you also have pos/neg/overvoltage protection.
Leo..

Edit: A 100k resistor (no opamp) between signal and Arduino input (3.3volt Arduino) also has 1volt and 2volt switch points. And the input is protected to +/-100volt (1mA fault current).

Dang, that is convenient! Did not know. Thank you, sir. Well now I know how to do a schmitt trigger anyways. Doesn't hurt.

Might be hard to find an opamp that runs on 3.3volt, and has rail2rail outputs.

Not at all. LT has several, such as the LT6003.