Introduction: Electric Fan With Speed Control

In the light of the searing summer heat and further motivated by a broken AC at work, I have decided to make a hacked-up electric fan for my cooling needs. The fan is actuated by a DC motor and the speed setting can be changed using a knob potentiometer.

Step 1: Tools and Materials

  • Arduino 101 or Arduino Uno
  • Breadboard
  • Potentiometer
  • NPN transistor
  • 1N4148 Diode
  • 48:1 geared DC motor
  • Cardboard


  • Glue gun and glue sticks
  • Thumb tack
  • Scissors

Step 2: Cutting the Fan Blade

  • Cut a piece of cardboard to a rectangular shape, approximately 12 inches long.
  • In the middle of the rectangular piece that was cut, cut a notch approximately half an inch long and a quarter of an inch deep.

Step 3: Adding Pitch to the Fan Blade

  • Slowly and carefully twist both sides of the fan to add a pitch to the fan blade. The greater the pitch the more air it will be pushing through.
  • Using the hot glue gun, glue the shape at the notches cut before.
  • Let it dry, and the cardboard will follow the form.

Step 4: Attaching Fan Blade to Motor

  • Using a thumb tack make a small hole at the centre of the fan blade
  • Poke the geared axle of the motor through this hole.
  • Glue the fan blade to the motor using a bead of hot glue with the hot glue gun.

Step 5: Circuitry

Connecting the Arduino power to the breadboard

  • Connect the 3.3V pin from the Arduino to the red power rail of the breadboard.
  • Connect the ground pin from the Arduino to the black power rail of the breadboard
  • Connect the 5V pin from the Arduino to an unused hole in the breadboard, which will be used to power the DC motor. Use an orange wire for this, since we will use it as a marker for the next step.

Wiring the the DC motor

  • Connect one of the motor wires to the 5V pin you connected with the orange jumper wire previously. Note that when connecting the motors, the order of the wire connection does not matter, it simple means that the motor will turn the opposite direction.
  • Connect the diode between the two motor wires with the negative pin marked by a black line on the diode connected to the 5V pin with the orange wire.
  • Be mindful of the polarity of the 1N4148 Diode.

Wiring the transistor to the DC motor

  • Connect the middle pin to a 100Ω resistor and insures to pin 9 on the Arduino.
  • Connect negative pin of the transistor to the ground rail on the breadboard.
  • Connect the remaining pin of the transistor will be connected to the motor ground.
  • Lastly, connect the other motor wire to the outer leg of the transistor.

Connecting the potentiometer for fan speed.

  • Connectthe middle pin to A0 onthe Arduino.
  • Then, connect the outer pins of the potentiometer to 3.3V and ground (in any order), respectively.

Step 6: Code

The code for controlling the motor is quite simple and straightforward.

// constant pin for the transistor connected to the motor
const int motorPin = 9;

void setup() { //set motorPin as OUTPUT pinMode(motorPin, OUTPUT); }

void loop() { // read the value of the analog potentiomter int potValue = analogRead (A0);

// map the value of the potentiometer to the possible speed of the motor linearly int motorSpeed = map (potValue, 0, 1023, 0, 255);

// make teh motor turn on at the desired speed, using PWM digitalWrite (motorPin, motorSpeed); }

Step 7: Demo

If the fan blade is not pushing air in the direction you desire, simply reverse the way that in which the DC motor was plugged. This will reverse the rotation of the fan blade, thus pushing air in the opposite direction.

Makerspace Contest 2017

Participated in the
Makerspace Contest 2017

Beat the Heat Challenge 2017

Participated in the
Beat the Heat Challenge 2017

Box Contest 2017

Participated in the
Box Contest 2017