Wireless Fan Fully Controlled Using Your Phone!

by Projects with Red in Circuits > Arduino

11515 Views, 182 Favorites, 0 Comments

Wireless Fan Fully Controlled Using Your Phone!

thumbnail2.png

In this project, we will be creating a wireless fan that you can fully control using your phone over WiFi. You can rotate it left and right, tilt it up and down, and choose the fan speed and rotation speed. We will be using the ESP32 with a desktop PC fan and a couple of motors to achieve this very easily. I have made a video that goes over the whole project and explains each step very clearly. So if you want a video version, I highly recommend watching the video as it is much easier to follow. Let's get to it!

Supplies

IMG_0430.JPG
IMG_0438.JPG
IMG_0440.JPG
IMG_0441.JPG
IMG_0448.JPG

Here is a list of all the components that are needed for this project:

  • 140mm fan, I am using the Noctua NF-A14. I suggest getting one with as high as possible RPM. The fan used here has 3000 RPM.
  • Nema 17 stepper motor, for the rotation of the fan.
  • A4988 stepper motor driver, to drive and control the stepper motor.
  • DS04-NFC servo motor, this is for the tilt motion.
  • ESP32, as the micro-controller, it has built-in WiFi, which is needed for the wireless connectivity.
  • 12 volts power supply that can deliver 5 amps of current. I used a mains power cable with a power jack DC cable.
  • LM2596 buck converter, to step down the 12v to 5v, as the servo and micro-controller operate on 5v. The 12v is needed for the fan and the stepper motor.
  • 100uF capacitor, this is used to filter the power supply of any voltage spikes.
  • 2 switches.

Breadboard Wiring

Breadboard_Blynk.png

The first step is to wire everything together on a breadboard. Follow the wiring diagram and carefully connect everything together.

Phone Setup (Blynk)

blynk.PNG

To control the fan wiressly using the phone, we will be using Blynk. It is a very easy to use platform that allows you to control Arduino boards from your phone using WiFi. First you need to install the Blynk app on your phone.


Create a New Blynk Project

Screenshot_20210819-154602.png

Once the Blynk app is installed on your phone.

  1. Create a new project.
  2. Choose a project name.
  3. Choose the "ESP32 Dev Board" as the device.
  4. Select Wi-Fi as the connection type.

Add All the Widgets

Screenshot_20210819-154631.png
Screenshot_20210819-155732.png

Insert the same widgets as you see in the image, and ensure all the virtual pins matches with the image.

  • You will need two buttons for the tilt up and down.
  • A slider for the fan speed. Ensure the slider range is from 0 to 4095.
  • A button to toggle auto mode on and off. Ensure it is a switch and not a push button.
  • Another slider for the rotation speed. Ensure the slider range is from 50 to 300.
  • Two buttons to turn the fan left and right.
  • Two final buttons to set the start and end positions of the rotation.

Remember that all virtual pins need to match to what you see in the image.

Once all these widgets are added, go to the project settings and make sure the "Notify devices when app connected" is switched on.


Arduino Sketch

ard.PNG

Libraries needed

All these libraries can be easily installed using the Arduino IDE library manager.

  • Blynk by Volodymyr Shymanskyy.
  • ESP32Servo by Kevin Harrington and John K. Bennett.


Get the Arduino sketch from this repository.

There are only 3 variables that you need to change in the sketch:

  • auth which is the Blynk authentication code that you receive by email when you create the project on the Blynk app on the phone.
  • ssid your WiFi name.
  • pass your WiFi password.

Once you have made these changes, upload the sketch to the ESP32.

Breadboard Demo/testing

IMG_0450.JPG

Once the code is uploaded and everything is connected on the breadboard. Connect the power and turn it on using the switch.

You now can open the Blynk app you created and connect to the ESP32.

Once you are connected, you will be able to use all the widgets and control the fan!

Stripboard Version

IMG_0453.JPG
IMG_0454.JPG
Stripboard.png

Once you have confirmed that everything is working properly on the breadboard version. You can create a stripboard version. This will make it have a much smaller footprint and very easy to use, as all you need is to just connect the components to the stripboard and not worry about having wires everywhere.

3D Printing!

model.PNG
IMG_0456.JPG

If you have a 3D printer. You can download all the 3D models here.

Print all the parts.

For the motor shaft connector, top part, and the left fan attachment, use 3mm threaded insert nuts in the holes for extra stability.

Assemble the fan as you can see from the photo.

Done!

thumb_noText.png

You have now created your own wireless fan! Which you can easily control using your phone.

I highly recommend watching the video if anything is not clear, and also remember to subscribe if you enjoyed or found this project/video useful!

Thank you!