I need to control the power (on/off) of several devices (all at a time, not one by one) from the output of an ESP 32.

So, the goal is to turn on/off the 5V power supply for :

  • 1 LED (using a 270 ohm resistor) : about 10mA
  • 8 "ITR9608" optointerrupter (each using a 270 ohm resistor) : about 8x10mA
  • 8 "SG90" 9G mini servo : about 8x100mA max
  • 1 "MCP23017" : 8 LED outputs, 8 sensors inputs : about 200mA max

So the total should be 1.1A, maybe should say 1.5A as a security factor ?

Are these calculations correct ?

This circuit will be controlled from an ESP32 dev board : it's a 3.3V outputs, about 40mA max.

I've found this circuit : http://www.instructables.com/id/DIY-Motor-Driver-With-ESP32-Controller/

Which kind of circuit should I use ?

I'm a software enginner, but a newbie to electronics, so I'ma little lost in front of all the switching circuit examples that we can found on the internet...


  • \$\begingroup\$ Low side switch with a 3.3V switching NMOS FET 9Vth about 1-1.5V) would be simplest and you won't need to worry about supplying enough base current. \$\endgroup\$ – Brian Drummond Nov 28 '17 at 11:00
  • \$\begingroup\$ Do you have any reference to suggest ? \$\endgroup\$ – Aurelien Nov 28 '17 at 11:06

Your Answer

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

Browse other questions tagged or ask your own question.