Introduction: Automatic Fan/Air Conditioning System

Wanted! In this Instructable I will walk you through how to build your really own machine-driven Rooter/Air Conditioning System. This Instructable deals with a windowpane fan, which is used to cool downhearted rooms in the heat of summer. The finish of this project is to create a system that leave automatically monitor and regulate the temperature of a room past controlling a common window buff. To boot, the ability to control the fan wirelessly with a smartphone wish be enforced exploitation a Esp8266/NodeMCU Wifi Development board on with the IoT app, Blynk. The chief control organization utilizes an Arduino and a a few other components. Army of the Pure's come in it!

Abuse 1: Gathering Components

For this Instructable, you will need:

- Arduino Uno (comes with USB data cable) - Buy Here (Amazon) (other similar boards care the Arduino Mega volition make as well)

- 16x2 LCD Display (in this project, I use a display without a 16 pin mental faculty adapter. If you have the adapter, Arduino has tutorials on how to wire the module adapter up to an Arduino Uno)

- DHT11 Temperature/Humidity Sensor (3 pin) - Buy Here (Amazon) - there are two versions: a 3 pin and a 4 pin. Here I use the 3 pin sensor as it is easier to use and wire up because you Don't have to tot up a resistor. Make a point to check the pinout of your sensor, as different manufacturers have slightly different pinouts for this sensor.

- 10k Ohm Potentiometer - Buy Here (Amazon)

- 2 Pushbuttons - Buy in Here (Amazon)

- Metal Gear Servo - Buy Here (Amazon) - you do not have to use a silver gear servo, as IT all depends on your windowpane winnow. The servo will be used to actuate the switch happening the fan, so it all depends on how much force is required to move the switch. I expend a buirdly golden gear servomechanical because my fan has a sturdy switch, and in worldwide, metal gear servos are way less likely to break than regular plastic pitch servos.

- Male to Male & Masculine to Female Jumper Wires - Buy Here (Amazon)

- Esp8266/NodeMCU WLAN Growth Board - Buy Here (Amazon)

- Blynk (Free mobile app available on App Store and Google Play)

- Small USB Cable for programming Esp8266/NodeMCU

- Miscellaneous materials for constructing a twist to allow the servomechanical to move the switch on the winnow. (A picture of my device testament be included further down)

Step 2: Wiring Information technology All Heavenward

The custom wiring diagram for the Arduino is shown above.

*IMPORTANT Banker's bill*

The DHT11 and Esp8266/NodeMCU both silence have to be wired adequate the Arduino. The servo also needs to be wired adequate the Esp8266/NodeMCU.

Connections:

DHT11 ---> Arduino

VCC ---> 5v (on breadboard)

GND ---> GND (on breadboard)

Signal (S) ---> Analog Pin A0

____________________________

Arduino ---> Esp8266/NodeMCU

Digital Pin 8 ---> Digital Pin 3 (D3)

Digital Bowling pin 9 ---> Digital Pivot 2 (D2)

____________________________

Servo Connections

Bolshie Wire ---> 5v (on breadboard)

Black/Brownness Wire ---> GND (on bread board)

Yellow/Orange Conducting wire ---> Digital Tholepin 0 (D0) on Esp8266/NodeMCU

Gradation 3: Computer programming the Arduino

The downloadable Arduino file for the main Arduino lap is located below.

*Portentous*

Make sure you have the required libraries installed (dht11 and LiquidCrystal)

*If you already have some of these libraries installed (double check, as thither are many distinct DHT11 libraries) then you can upload the Arduino code from the file above to your Arduino*

To download the LiquidCrystal Library, in the Arduino IDE, click on Sketch, Include Subroutine library, and then click on Manage Libraries. Await for all of the libraries to load, and then type LiquidCrystal in the look bar. It should be the first library to show up, by Arduino and Adafruit. (FYI this Crataegus laevigata already be installed, as this is unmatchable of the libraries that often comes built-in when you download the IDE. If it is, then just attend the next paragraph) Make sure it is the nigh late version, and click Install. When IT is done installing, rule out of the IDE.

To download the dht11 depository library, go Here, and click on the green clit on the right that says "Clone or Download", and tick "Download ZIP". A zip file should be downloaded to your device. Open back up Arduino IDE and click on Study, Include Library, and Add .ZIP Library. Superior the compressed ZIP file out you antitrust downloaded. Once the library has successfully been installed, preclude of the IDE once more. Re-open it and navigate to the Custom_Fan_AC_System. Now you can select your control panel and port and upload it to the Arduino.

Step 4: Setting Up Blynk With the Esp8266/NodeMCU

Ordinal off, download the Blynk app from either the App Store (iOS) or the Google Play Store (Android).

Open raised the app, and make an account. Create a New Project, and name it Autoloading Fan A/C Organisation. Choose Esp8266 OR NodeMCU for the device (either should work). Choose Wifi as the connection type. So click "Create Project". An authentication cipher should be created. That will be used later.

Now click on the riddle (or swipe left) and a menu should crop up up. Click on Titled Button, and enter System Control A the name. For Pin, scroll to Digital and select D1. Slide the Modal value from the Campaign to the Substitution. For the off label, advert IT Way. For the on label, name it Mobile. Then click OK at the top side right of the screen. Dawn happening the shield once more to go to the menu, and click slider. Name it Fan Switch. For the Pin, scroll to Virtual and take V0. If the set swan is from 0-1023, change the 1023 to 180. Then click Alright at the top right. Click on the shield one utmost time and scroll down until you picture Segmented Transposition. Click "Add Choice" and since my sports fan has three settings, Off, Low, and High, I named the first option Off, and then Low, past High. Behave NOT CONNECT THIS Switching TO A PIN. Spot this switch below the slider. (the reason for this switch will suit clear later)

_____

There is one more library (possibly two) you need to install, and that is the Blynk library. Again, live on into the Arduino IDE, to Sketch, Admit Library, then Depository library Manager. Search Blynk in the search box, and the one by Volodymyr Shymanskyy should come astir. Download the fashionable variant and once it is through, close forbidden of the IDE.

_____

Make sure you have the Servo library installed. IT is a inherent library for the IDE, so it should be installed. The library is by Michael Margolis and Arduino. If it is not installed, install the latest version and exit out of the IDE.

_____

The Esp8266 needs to be setup within the IDE. It is instead simple, just open the IDE and attend File, Preferences, and in the Additional Boards Manager URLs box, type in:

http://arduino.esp8266.com/balanced/package_esp8266c...

Then click OK.

_____

Go to Tools, Board, then Boards Manager. Research for Esp8266. If it is non installed, put in information technology and exit out of the IDE again.

_____

Open upfield the IDE, and stopple your Esp8266/NodeMCU into your device with the Micro USB Line. Make water sure the Arduino Uno is unplugged. Go to Tools and select the available porthole, and for the Board, choose NodeMCU 1.0 (ESP-12E Module).

_____

Download the file for the Esp8266/NodeMCU to a higher place, and read through my comments and substitute the required info. Once that is done, upload it to the board.

Step 5: Constructing the Servo/Rooter Switch Twist

Here I will show you how I constructed a device to allow for the servo to switch the fan 'tween Low, Squealing, and Off.

I secondhand a objet d'art of clear tubing that fit snugly around the switch of my buff, and I used Lego Technic pieces to create an arm with a sliding holding chemical mechanism that would mount nether the window, just like the fan. This all depends happening your fan and the setup of the room. I hold a desk draw close the buff, so I terminate just ride it to something on the desk. If you Doctor of Osteopathy not have a wholesome stationary object near the window, you may motivation to attach the control system to the fan now.

The Lego arm can move freely for a certain distance, a distance that allows for the switch to actuate fully from end to end. I also mounted a Lego piece to the servo horn away using some small screws and brass adapters that came with the servos. I did not powerfully procure the Lego set sleeve around the thermionic valv that is along the exchange because the switch needs to move freely plenty because the angle of the pipe changes cod to the substitution being a semicircle. I just ready-made a Lego box around the switch indeed the arm would not experience trouble turn the winnow on and off. There is a video below that you can download and watch that shows the weapon system up close and how IT moves the switch. On to testing!

Step 6: Examination & Total Explanation of Visualize

I decided to realise this project after my sidekic and I repeatedly disagreed along the temperature of our room. I like the rooter happening a lot then the room is same cool, and he ends up turn off the fan a lot of the time, saying that it is too cold. Additionally, when it is near out, I sometimes forget to turn the fan on when I'm not in the elbow room, and when I go up to sleep the way is and so hot, and I have to turn on the fan so, which doesn't change the temperature fast enough for a good sleep. So I set bent on form a system that can solve the trouble.

_____

This arrangement has two elements: the Machine-driven Part and the Manual Part

The Automatic Part is controlled by the Arduino, where it constantly takes the temperature and displays IT on the LCD screen out. The Arduino as wel uses the two pushbuttons to adjust the wanted temperature of the room. In Automatic Mode, OR Board Mode, the Arduino turns on the lover when the desired temperature is lower than the effective temperature. When the desired temperature is reached, it turns dispatch the fan. The Blynk App is used to control the whole system, as the clit can turn the fan into Way Mood and into Mobile Mode, which allows for the user to control the servosystem and the fan remotely. When in Mechanized Manner, the substance abuser uses the slider to control the servo. The Arduino still keeps displaying the Afoot Temperature and the Desired Temperature on the Liquid crystal display.

_____

Examination:

Once you stimulate uploaded the code onto both the Arduino and the Esp8266/NodeMCU and created a path for the servomechanical to control the sports fan switch, you have to turn everything on. Power up the Arduino and Esp8266/NodeMCU (whether that be through USB, a 5v source, etc.) and hold a few seconds until everything is turned on. Then open the Blynk app and enter the project screen and hit the play button at the top right. It should be connected to the Esp8266/NodeMCU. Click the pushbuttons to make a point they adjust the coveted temperature, and make a point the LCD also changes with IT. In the Blynk app, click the switch so the system is in Ambulatory Mode. Then incite the slider and loose it and you should see the servomechanism move (to the put up of the number of degrees that the slider shows. If it doesn't show the apprais, go into the slider and check mark the change that says "Show Value"). Go the yellow-bellied terrapin around until you fix the exact Book of Numbers that strike the servo so your winnow turns on and polish off. Enter these numbers into the Arduino code. * I only programmed in the low and off settings, even though mine has a high setting, as the low setting is powerful enough * Re-upload the code to the Arduino.

The purpose of the segmented switch underneath the slipper is to display the values for the settings along the fan, since you will be controlling remotely with the slider. I denaturized the name of my options to

Option 1. Off - (value)

Option 2. Low - (value)

Option 3. High - (measure)

This agency I know where to put the slider when I am controlling the devotee remotely. You should enter your servo values into the options soh you love where to act up the Pseudemys scripta. Then you terminate switch the Organisation back into Room (Automatic rifle) Fashion.

____

Erst that is done. just set the desired temperature of the room with the 2 pushbuttons, and the Arduino system will do the work!

//

If you have any questions/problems, feel free to drop them down below and I'll be happy to help you out! :)

Be the Early to Share

Recommendations

  • Anything Goes Contest 2021

    Anything Goes Contest 2021