Wireless Fan Fully Controlled Using Your Phone!

8,427

170

28

Introduction: Wireless Fan Fully Controlled Using Your Phone!

About: My name is Reda, I recently started a YouTube channel called Projects with Red, where I share some useful and/or fun projects that you can do and learn from. I am also planning to share all projects here on In…

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

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.

Step 1: Breadboard Wiring

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

Step 2: Phone Setup (Blynk)

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.


Step 3: Create a New Blynk Project

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.

Step 4: Add All the Widgets

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.


Step 5: Arduino Sketch

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.

Step 6: Breadboard Demo/testing

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!

Step 7: Stripboard Version

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.

Step 8: 3D Printing!

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.

Step 9: Done!

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!

Robots Contest

Participated in the
Robots Contest

Be the First to Share

    Recommendations

    • Meatless Challenge

      Meatless Challenge
    • Sculpt & Carve Challenge

      Sculpt & Carve Challenge
    • Backyard Contest

      Backyard Contest

    28 Comments

    0
    DonnyG4
    DonnyG4

    Question 2 months ago on Step 4

    How do l get the code from my email
    on too my Blynk where do l fine the gadgets that control wireless fan 🤔 😤 😒 on my phone because l can't see it. Its on your phone but your not showing us how u got it?....am almost there it's just the code & the gadget control 🤔 than am done

    0
    Projects with Red
    Projects with Red

    Answer 2 months ago

    For the authentication code, you can go to the blynk app, open the project, and go to the project settings, then there you will have an option to re-send the authentication code to your email, after that, check your email (including junk/spam folder) to see the email received by Blynk, which will have the authentication code.

    For the gadgets, simply swipe from the right and all the gadgets will show up, then just drag and drop them to insert.

    0
    DonnyG4
    DonnyG4

    Reply 2 months ago

    How come when I go in the library I can't find myESP32, 😩 I don't know if l got the right 1 because it not picking it up, I just can't find the software when I do find the software it still come up area rrrrrr all the time it was so frustrated all the hard work l put in it and nothing comes out?.......

    0
    DonnyG4
    DonnyG4

    Reply 2 months ago

    Hi just can't get past the skate l have try anything u said but nothing seems to works it keeps coming up wrong file l just don't know what am doing wrong and when l copy the file like yours how come l can't get the same as u and why can't u just show us how u get it instead of showing off pictures u never show us how u program it the skate it makes sense 🤔 it easy for u because u program. This is 1 off the hardest thing ever done now l know why people don't make it?.........

    0
    DonnyG4
    DonnyG4

    Tip 2 months ago on Step 5

    which is the Blynk authentication code that you receive by email when you create the project on the Blynk app on the so how do fine the cod or it on my phone l still can't connect 🤔

    0
    DonnyG4
    DonnyG4

    Question 2 months ago on Step 2

    Hi there Im a bit stuck can u please tell me if I'm on right 1
    because my different from yours my say Blynk legacy Thank u

    0
    Projects with Red
    Projects with Red

    Answer 2 months ago

    Hello, the Blynk legacy app should still work perfectly fine with this project 👍.

    0
    b33ma247
    b33ma247

    10 months ago

    Hi, Great little project, and very well broken down.
    Also excellent explanation on how to use the blink app.
    I was wondering, is there anyway to connect to your WiFi using just the blink app or some other workaround, or would you always have to change the arduino code to suit SSID & Password

    0
    DonnyG4
    DonnyG4

    Reply 2 months ago

    Hi there do u know how to download the right Blynk because my comes up different from his and I'm stuck and I can't make it and finished my project need help if anyone can help me feel free please 😅

    0
    DUPLICATE_Gabep82
    DUPLICATE_Gabep82

    Reply 9 months ago

    Yes there is a way. It can be slightly finicky with the app at first but it does work and can be done by using the Esptouch app and setting up smartconfig which you would enable this functionality in your code. Now, it’s a good idea to also keep the code for the manual option of setting up the wifi and maybe comment it out as it gives you the option to do either one if something doesn’t work. Here is a little article that explains what it is and even gives some examples on what code looks like.

    https://www.techtonions.com/esp32-using-smartconfig/

    0
    Projects with Red
    Projects with Red

    Reply 10 months ago

    Thank you very much! That is a good question, to my knowledge you can't use the Blynk app itself to do that since you need the WiFi connection in the first place to communicate with the phone. However, this can be done using an external way, for example using a screen with some sort of input to enter the SSID and password, then using that data to connect to WiFi and then to Blynk. That is a common thing to do.

    0
    DonnyG4
    DonnyG4

    Question 3 months ago

    Hi l just wondering 🤔 where do u get the testing breadboard pcb from because I'm a bit stuck 🤔 l brought everything?..... but l don't think l got the right 1 as u

    0
    Projects with Red
    Projects with Red

    Answer 3 months ago

    Hello :), I don't know exactly what you mean by the testing breadboard PCB, but if you mean the brown board in step 7, that's called a stripboard.

    0
    DonnyG4
    DonnyG4

    Reply 3 months ago

    Thank u l got it now

    0
    DonnyG4
    DonnyG4

    Tip 3 months ago on Step 6

    Sorry for this but where do u get them black thing from and what are they call Thank u

    0
    Projects with Red
    Projects with Red

    Reply 3 months ago

    What do you mean by that exactly.

    0
    ahmadel.sayed.5832
    ahmadel.sayed.5832

    10 months ago

    Well done. very nice explanation about how it works with a good project

    0
    Projects with Red
    Projects with Red

    Reply 9 months ago

    Thank you very much!

    0
    n4mwd
    n4mwd

    10 months ago

    Well done. Nice explanation about how it works.