0
\$\begingroup\$

I have a problem with my permanent magnet DC brushed motor. I'm trying to drive it from N-Channel and P-Channel MOSFETs from STM32F100 pin (3,3V logic). I want to turn the motor on and off only, speed is controlled via step-down converter (LM2679-ADJ) and potentiometer. At first I tried to turn the motor on by push button connected to STM pin. Every time the motor has stopped after half of a turn (it has mechanical commutator). Both transistors turned off without my input. Later on I've put instruction in main loop of STM to constantly turn on the N-MOSFET and the motor started to work properly. I wonder what is wrong in schematics that causing that particular situation. I measured voltage across Zener diode and it's 12V when N-MOSFET is turned on. IRF5210 is fully turned on at Vgs=-10V according to datasheet.

Schematics in attachment. Any help will be appreciated.

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ @WesleyLee You are fast as a weasel! rayvburn, please use the schematic editor. \$\endgroup\$ – winny Oct 30 '17 at 19:55
  • \$\begingroup\$ Also, please measure gate-source voltage. 10k pull down sounds like a very high value. Not unreasonable, but high. \$\endgroup\$ – winny Oct 30 '17 at 19:57
  • \$\begingroup\$ "Later on I've put instruction in main loop of STM to constantly turn on the N-MOSFET and the motor started to work properly." So your schematic/hardware works fine.. \$\endgroup\$ – Trevor_G Oct 30 '17 at 20:11
  • \$\begingroup\$ Vgs seems to be right - stays at 3,3V (just like STM's supply voltage) when the N-MOSFET is on. \$\endgroup\$ – rayvburn Oct 30 '17 at 20:43
2
\$\begingroup\$
Later on I've put instruction in main loop of STM to constantly turn on the N-MOSFET and the motor started to work properly.

Then the hardware is obviously working, and you have a software problem.

\$\endgroup\$
  • \$\begingroup\$ The point is - once the N-MOSFET is turned on I want it to stay turned on till the moment I push another push button and turn it off. Now, I have to constatly re-set the pin state to high to achieve continuous turning of the motor. \$\endgroup\$ – rayvburn Oct 30 '17 at 20:21
  • \$\begingroup\$ @rayvburn then your micro may be resetting or you have a bug in the firmware. YOu may have bad grounding or not enough caps on the power lines though to trip the reset. \$\endgroup\$ – Trevor_G Oct 30 '17 at 22:11
0
\$\begingroup\$

It was a software problem. Noises from brushes caused executing interrupt routines from the button which turned off transistors. 470nF ceramic capacitor between motor inputs and 100nF between button legs solved the problem.

\$\endgroup\$
  • \$\begingroup\$ You can accept this answer - even if it is your own - to signify the solution. \$\endgroup\$ – Transistor Nov 4 '17 at 10:43

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.