Controlling DC Motors/Lights: Microcontroller to MOSFET
The above diagram shows how to use a microcontoller (like our Arduino-compatible Teeny board) and a MOSFET to turn on/off a DC motor or a light.
In the above diagram:
- “Load”: your light or actuator (including motors, solenoids) and its two leads
- “Load Power +12″: the positive terminal of your power supply; note that this voltage can be different than +12V” as long its within the MOSFET’s specifications
- “MOSFET”: the three leads are labeled [G]ate, [D]rain and [S]ource; refer to the MOSFET’s datasheet to assure which pin is which
- Grounds: the MOSFET’s [S]ource pin connects to the ground of the power supply; the microcontroller’s ground pin should also be connected to the ground of the power supply
- “Control +5V”: this connection is to one of the digital outputs pins of the microcontroller (either Digital I/O or PWM)