I have a circuit which reads push-button presses. If it is pressed, it turns on the door by rotating motor. In this system, safety and stability are keys.
I added r/c filter to debounce button and cables are also shielded. Pull-up resistors also exist but there is a problem which is voltage spike.
Let me explain with some examples, when i run a drill next to cables, it reads randomly button presses or when i shake circuit roughly, it randomly reads button presses. It happens rarely but the system should be stable and does correctly for a long time such as months, years, so these random presses are not acceptable.
To solve this, I added a relay and connected it to power with a push button. When push button pressed current flows to relay and switch it. I read button presses from relay. It works stable. But I am not sure that i am doing right or whether there is a better way to prevent those spikes.
If there are any other viable solutions to this problem, i would like to appreciate to hear.
(Push button wires are about ~50cm)
Kicad project files Kicad Project Files