enter image description hereMay I ask somebody to have a look at my schematic? It's rather not complicated.

M1 - fan motor, controlled by IRL540 Logic level transitor. I'm decided whether the fan will be controlled using pwm.

M2 - motor used to control door. Controlled by mosfet driver TC4420.

D1 - the purpose of this diode is to prevent reverse polarity.

SW1, SW2 - magnetic sensors used to check the door position.

I am wondering about MCU power supply filtration, because during my tests MCU was powered either by JLink or USB, but now I need to take care about power supply on my own. Does the blue pil already has some internal capacitors and adding addional ones won't be nescessery or should I add them?

  • 1
    \$\begingroup\$ Not everyone will know what a blue pill is.. Also adding capacitors around isn't a panacea.. There are a lot of other issues to consider. \$\endgroup\$ – Wesley Lee Jun 29 at 23:57

The "Blue pill" 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.

| improve this answer | |
  • 7
    \$\begingroup\$ The "Blue Pill" is apparently a development board for an STM32F10 MCU, not just a bare MCU, so it probably has the necessary bypass capacitors and other support components on-board. \$\endgroup\$ – Peter Bennett Jun 30 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.