How to Make a Small Fan with Arduino?
1.Introduction
In the hot summer, we need an electric fan to cool us down, so in this project, we will use the Plus control board to control 130 motor module and small blade to make a small fan.
2.Components Required
|
|
|
|
---|---|---|---|
Keyestudio Plus Mainboard*1 |
130 Motor Module*1 |
M-F Dupont Wires |
USB Cable*1 |
3.Component Knowledge
130 motor module:
The motor control module uses the HR1124S motor control chip, which is a single-channel H-bridge driver chip for DC motor. The H-bridge driving part of the HR1124S features low on-resistance PMOS and NMOS power tube. The low on-resistance ensures low power loss of the chip, making the chip work safely for a longer time. In addition, HR1124S has low standby current and low quiescent current, which makes HR1124S easy to be used in toy scheme.
Features:
-
Working voltage: 5V
-
Working current: 200MA
-
Working power: 2W
-
Working temperature: -10℃~ +50℃
Schematic diagram:
4.Circuit Diagram and Wiring Diagram
5.Code
/*
Small_Fan
http//www.keyestudio.com
*/
void setup(){
pinMode(A3, OUTPUT);//set A3 to OUTPUT
pinMode(A2, OUTPUT);//set A2 to OUTPUT
}
void loop(){
//Set to rotate for 3000ms anticlockwise
digitalWrite(A3,LOW);
digitalWrite(A2,HIGH);
delay(3000);
//Set to stop rotating for 1000ms anticlockwise
digitalWrite(A3,LOW);
digitalWrite(A2,LOW);
delay(1000);
//Set to rotate for 3000ms clockwise
digitalWrite(A3,HIGH);
digitalWrite(A2,LOW);
delay(3000);
}
6.Result
Upload the test code successfully, wire up and power on. The small fan will first rotate counterclockwise for 3000ms, then stop for 1000ms, and then clockwise for 3000ms.