Do I need to add power filter capacitors to a blue pill?
The &quot;Blue pill&quot; is a STM32F10 40 pin MPU development board. You are missing bypass capacitors in many places outside of the MPU board. The main 12 volt feed should have a 1,000uF 25volt capacitor to act as a current reservoir. Each power pin of each IC should have a 100nF capacitor from power pin to ground plane. In addition a 4.7uF capacitor should parallel each 100nF capacitor.
Your magnetic sensors should have 10K to 100K pull-down or pull-up resistors in addition to 100nF capacitors to ground to remove contact noise. Digital filters may or may not be needed. Some MPU's offer this as a built-in feature.
Q1, Q2 and Q3 need to have a 100 ohm resistor at the MOSFET gate to prevent spurious operation.
All together this is adding 10 to 12 capacitors at the IC's plus the 1,000uF for the 12 volt input. Without bypass capacitors it will have erratic operation in addition to ground-bounce which can damage CMOS IC's. I see no miss-wire issues if the software drives the existing MPU connections properly.