Hi Everyone,

I was wondering if i was going this correctly.

here is a output gpio to a stepper motor step pin.

Here is a input from a pushbutton which is on a 24v circuit.

Any suggestion to reduce failure rate and noise will help.

Thank you

For the output, why not use opto-isolators as well?

I feared a delay in the opto.

In the above image the slew rate to go from 24V to 0.xV may be more of a factor of speedy signal propagation than to ignite a LED using 3.3V in a opto-coupler.

I do most of my projects with ESP32’s. I know that when the voltage exceeds the ESP32’s operating voltage the ESP gives up the smoke, quickly. Thus, my position that there should be as much isolation between the ESP32 and 24V as possible.