In this tutorial we will learn how to control a DC Motor speed using a MOSFET Module.
Watch the video!
Step 1: What You Will Need- DC Motor
- MOSFET Module
- Potentiometer
- Arduino UNO (or any other Arduino)
- Jumper wires
- Visuino software: https://www.visuino.eu
- Connect potentiometer pin OTB to Arduino Analog Pin A0
- Connect potentiometer pin VCC to Arduino Analog Pin 5V
- Connect potentiometer pin GND to Arduino Pin GND
- Connect Arduino digital pin [ 5] to MOSFET Module pin [Sig]
- Connect MOSFET Module pin VCC to Arduino Analog Pin 5V
- Connect MOSFET Module pin GND to Arduino Pin GND
- Connect DC motor positive pin (+) to MOSFET Module pin [V+]
- Connect DC motor negative pin (-) to MOSFET Module pin [V-]
- Connect Power Supply positive pin (+) to MOSFET Module pin [VIN]
- Connect Power Supply negative pin (-) to MOSFET Module pin [GND]
The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial.
Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2
Step 4: In VisuinoConnect Arduino Analog pin 0 to Arduino digital pin 5
Step 5: Generate, Compile, and Upload the Arduino CodeIn Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.
Step 6: PlayIf you power the Arduino module, the motor will start to spin and you can change the speed by sliding the potentiometer.
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this tutorial, you can download it and open it in Visuino: https://www.visuino.eu
Comments