# Simple e-stop circuit

I have a motor controller that has an electronic stop function where if I put 5v on a pin the motor runs. Once that 5v gets interrupted (goes to ground) the motor stops immediately.

On my device I have what’s called a “safety edge” - basically a bumper. At normal times the bumper is simply a wire with a 8k ohm resistor. If the bumper gets pressed the resistance goes to 0 ohm.

I have a feeling this is super basic but what’s the circuit that allows me to feed my controller with 5v and then cut off that 5v if my number goes from 8k ohm to 0 ohm (gets pressed)?

• 5v gets interrupted is not the same thing as goes to ground Apr 9, 2022 at 17:57
• start by looking up pull up resistor. follow it up with voltage divider since it is 8k-close and not just open-close
– Abel
Apr 9, 2022 at 18:00
• Depending on the type of motor, placing a short circuit onto the motor inputs (with no power applied) can act as a breaking function to a free spinning motor. As for the resistor on the line, could it actually be a capacitor, which might filter out generated noise, or a heavy diode to prevent a back emf pulse when removing power?
– Nedd
Apr 9, 2022 at 20:39

Well at least on paper this appears to work using a voltage divider and a pull up resistor configuration.

• Hi - based on help from GodJihyo and others this is the solution i've come up with. I wanted to add it so anyone in the future could see the solution. That said i would also welcome if there was something wrong with my answer or had tweaks to it. Apr 11, 2022 at 20:07
• DaveInPA - Hi, Thanks for explaining that you intend it as an answer (and have accepted it). Apr 11, 2022 at 20:36

The obvious thing to do would be to disconnect the switch from where it connects to +5V and the resistor and connect it to ground instead. The input would be pulled up to 5 V through the resistor and when the switch is closed it would ground the input.

If you can't modify the switch in this way you would need some electronics to sense when the switch is closed and pull the input low.

Here is a circuit that does this. The 8000 ohm resistor in the bumper and the 470 ohm resistor form a voltage divider such that when the switch is open there is not enough voltage to turn on the transistor. When the switch closes the voltage is enough to turn on the transistor, pulling the output low.

This is just a generic example circuit, the exact implementation would depend on the input requirements of the controller. Also since this is safety related, any of this is done at your own risk.

simulate this circuit – Schematic created using CircuitLab

• This is super helpful and i've been looking at how to use the concept of a pull up resistor with a voltage divider myself. If i can minimize components for this it would be ideal given my use case. That said...what if i do a classic 2 resistor voltage divider and use 12V (which i have available) as R1 and the "bumper" with the 8k resistor as R2. Then i connect R2 to ground and R1 to 12V and size R1 so we get 5V between the 2. Then when i hit the bumped and the 8k resistor gets shorted to ground i have a pull up resistor situation and i ground the controller pin? Apr 11, 2022 at 18:39
• @DaveInPA That should work, the only problem is what happens if the bumper gets disconnected somehow, then you have 12V on the input to the controller which may damage it. You would probably need to look at some sort of protection for the input in case that happens. Apr 11, 2022 at 19:05