Arduino Project

Arduino Fan Speed Control Project with DC Motor V4

Course Introduction

In this lesson, you’ll create a simple control system using a rotary encoder to steer a servo and adjust fan speed. Turning the encoder changes the servo angle, while pressing the button cycles through multiple fan speed levels.

Note

If this is your first time working with an Arduino project, we recommend downloading and reviewing the basic materials first.

1.1 Install Arduino IDE(Important)
1.2 Introduction of Arduino IDE

Required Components

In this project, we need the following components:

SN

COMPONENT INTRODUCTION

QUANTITY

PURCHASE LINK

1

Arduino UNO R4 Minima/Arduino UNO R4 WIFI

1

2

USB Cable

1

×

3

Breadboard

1

BUY

4

Wires

Several

5

DC Motor

1

6

TA6586 - Motor Driver Chip

1

×

7

Rotary Encoder Module

1

8

Digital Servo Motor

1

Wiring

6.png__PID:647a6ac2-699d-4976-9e94-abc2598b8de6

Common Connections:

TA6586 - Motor Driver Chip
BI:
Connect to 6 on the Arduino.
FI: Connect to 5 on the Arduino.
GND: Connect to breadboard’s negative power bus.
VCC: Connect to breadboard’s red power bus.

DC Motor
GND:
Connect to TA6586 B0.
VCC: Connect to TA6586 F0.

Rotary Encoder Module
CLK:
Connect to 12 on the Arduino.
DT: Connect to 11 on the Arduino.
SW: Connect to 10 on the Arduino.
GND: Connect to breadboard’s negative power bus.
VCC: Connect to breadboard’s red power bus.

Digital Servo Motor
Connect to breadboard’s positive power bus.
Connect to breadboard’s negative power bus.
Connect to 3 on the Arduino.

Writing the Code

Note
You can copy this code into Arduino IDE.
Don’t forget to select the board(Arduino UNO R4 WIFI) and the correct port before clicking the Upload button.