Have you ever used a fan and sat down but it just wasn't hitting the right spots for you? Like when it's not hitting your legs or face or when it's blowing too high? And then you have to get up every time and adjust it?
Well, I came across this situation recently and in this project we are going to solve this problem by making a wireless fan that you can fully control using your phone. You can rotate it left and right, tilt it up and down, control the speed of the fan, select the start and end positions of the rotation, and control the speed of the rotation.
Let's get to it!
Please note, if you want a video version of this project, I have made a videothat goes over the whole project an explains each steps very clearly. So if you want a video version, I highly recommend watching the video as it is much easier to follow.Step 1: Breadboard wiring
The first step is to wire everything together on a breadboard. Follow the wiring diagram and carefully connect everything together.
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.
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.
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.
There are a few libaries that you need to install. 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.
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!
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.
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.
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!
Comments