Rotating Fan Using Servo Motor and Speed Control

by RonFrtek in Circuits > Arduino

3577 Views, 3 Favorites, 0 Comments

Rotating Fan Using Servo Motor and Speed Control

Rotating Fan using Servo motor and speed control

In this tutorial we will learn how to rotate a fan with adjustable speed using servo motor, potentiometer, arduino and Visuino.

Watch the video!

What You Will Need

Arduino Uno.jpg
arduino-fan2.jpg
HTB1TMikbyjrK1RjSsplq6xHmVXa3.jpg
pctdetail.775-114.1.jpg
VisuinoAdvrtisementRaspberryPiRobot.jpg
F5OFEUQJJ4ZYFKY.LARGE.jpg
  • Arduino UNO (or any other board)
  • Fan module
  • Potentiometer
  • Servo motor
  • Jumper wires
  • Visuino program: Download Visuino

The Circuit

2020-08-24_22-22-51.jpg
FZJ1USDK26CLY4O.jpg

  • Connect Servo motor "Orange" (signal) pin to Arduino Digital pin[2]
  • Connect Servo motor "Red" pin to Arduino positive pin[5V]
  • Connect Servo motor "Brown" pin to Arduino negative pin[GND]
  • Connect potentiometer pin [DTB] to arduino analog pin [A0]
  • Connect potentiometer pin [VCC] to arduino pin [5V]
  • Connect potentiometer pin [GND] to arduino pin [GND]
  • Connect fan module pin [VCC] to arduino pin [5V]
  • Connect fan module pin [GND] to arduino pin [GND]
  • Connect fan module pin [INA] to arduino digital pin [5]

Start Visuino, and Select the Arduino UNO Board Type

F756MJUKEIJALTQ.jpg
FHO2DUKKEIJALTR.jpg

The Visuino: https://www.visuino.eu needs to be installed. 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

In Visuino Add, Set & Connect Components

2020-09-12_13-23-02.jpg
2020-09-12_13-25-13.jpg
2020-09-12_13-24-34.jpg
2020-09-12_13-25-37.jpg
  • Add "Sine Analog Generator"
  • Add "Servo"
  • Select "SineAnalogGenerator1" and in the properties window set Amplitude to 0.30 and Frequency to 0.1
  • Connect Arduino board Analog Pin Out (0) to Arduino board Digital Pin In (5)
  • Connect SineAnalogGenerator1 pin (Out) to Servo1 pin (In)
  • Connect Servo1 pin (Out) to Arduino board Digital Pin In (2)

Generate, Compile, and Upload the Arduino Code

2020-09-12_13-33-05.jpg

In 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.

Play

If you power the Arduino UNO module, the servo motor will start to totate and the Fan module will start to spin, you can adjust the fan speed with a potentiometer. Watch the video for the detail demonstration.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.eu

Downloads