Scheme and source code I use:


Checked this scheme on arduino Leonardo - it works. It even works with 5V from usb - no additional power required.

But when I try to do the same scheme with R1 D1 or NodeMCU - it doesn't want to work. It seems I have tried everything except of changing of scheme - pins, apps...

Could you explain what am doing wrong? Is it occurs because of boards based on esp8266?

P.S. Added "servo" tag because I don't need it but the same situation occurs with servos.

  • \$\begingroup\$ On a different note. That wiki is wrong about "flyback диод". The body diode inside MOSFET is too slow. You should add an external Schottky diode in parallel with the motor. \$\endgroup\$ Commented Feb 11, 2018 at 6:01

1 Answer 1


Fixed it! The reason is MOSFET requires 5V to be opened. Nodemcu and Wemos have pinouts which work with 3V only. I just replaced MOSFET with the similar one from the same manufacturer and with similar price but which works with 3V.

I also figured out that this problem fully independents from Arduino manufacturer by itself because even one of the cheapest Arduino clones - Dccduino works normally.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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