In this tutorial we will learn how to rotate a fan with adjustable speed using servo motor, potentiometer, arduino and Visuino.
Watch the video!
Step 1: What You Will Need
- Arduino UNO (or any other board)
- Fan module
- Servo motor
- Jumper wires
- Visuino program: Download Visuino
Step 2: The Circuit
- Connect Servo motor “Orange” (signal) pin to Arduino Digital pin
- 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 
Step 3: Start Visuino, and Select the Arduino UNO Board Type
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 Visuino Add, Set & Connect Components
- 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)
Step 5: Generate, Compile, and Upload the Arduino Code
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.
Step 6: 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