Introduction: Automatic Fan/Air Conditioning System

Welcome! In this Instructable I will walk you through how to build your real own automatic Fan/Air Conditioning System. This Instructable deals with a window winnow, which is misused to cool rooms in the heat of summertime. The goal of this project is to create a system that will automatically monitor and shape the temperature of a elbow room by controlling a common window sports fan. Additionally, the ability to control the fan wirelessly with a smartphone will be enforced using a Esp8266/NodeMCU WLAN Developing board on with the IoT app, Blynk. The main assure system utilizes an Arduino and a few past components. Let's get into IT!

Step 1: Assembly Components

For this Instructable, you will need:

- Arduino Uno (comes with USB data cablegram) - Buy Here (Amazon) (former corresponding boards like the Arduino Mega will work as well)

- 16x2 LCD Presentation (in this protrude, I use a video display without a 16 pin mental faculty adapter. If you have the adapter, Arduino has tutorials happening how to wire the faculty adaptor up to an Arduino Uno)

- DHT11 Temperature/Humidness Sensor (3 pin) - Buy Here (Amazon) - there are 2 versions: a 3 pin and a 4 pin. Here I use the 3 pin detector as it is easier to apply and wire up because you don't have to add a resistance. Make a point to check the pinout of your sensor, as different manufacturers cause slimly different pinouts for this sensor.

- 10k Ohm Pot - Purchase Hither (Amazon)

- 2 Pushbuttons - Buy Here (Amazon)

- Silver Gear Servomechanism - Buy Hither (Amazon) - you make out not have to use a metal gear control system, arsenic it all depends on your window fan. The servo bequeath comprise used to move the switch on the fan, so it all depends on how much drive in is required to move the switch. I use a beefy gilded gear servomechanical because my fan has a sturdy switch, and in general, metal gear servos are way less likely to break than regular plastic gear servos.

- Male to Male & Phallic to Female Jumper Wires - Bribe Here (Amazon River)

- Esp8266/NodeMCU Wifi Development Add-in - Buy Here (Amazon)

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

- Micro USB Cable for programming Esp8266/NodeMCU

- Miscellaneous materials for constructing a twist to set aside the servomechanism to move the switch happening the fan. (A picture of my device will be included further down in the mouth)

Step 2: Wiring It All Up

The custom wiring diagram for the Arduino is shown in a higher place.

*Significant Annotation*

The DHT11 and Esp8266/NodeMCU both still have to be wired up to the Arduino. The servo also needs to be wired raised to the Esp8266/NodeMCU.

Connections:

DHT11 ---> Arduino

VCC ---> 5v (on breadboard)

GND ---> GND (on breadboard)

Betoken (S) ---> Analog Pin A0

____________________________

Arduino ---> Esp8266/NodeMCU

Digital Pivot 8 ---> Digital Oarlock 3 (D3)

Digital Peg 9 ---> Digital Pin 2 (D2)

____________________________

Servo Connections

Red Conducting wire ---> 5v (happening breadboard)

Black/Brown Telegram ---> GND (on breadboard)

Dishonorable/Orange Electrify ---> Digital Pin 0 (D0) on Esp8266/NodeMCU

Step 3: Programming the Arduino

The downloadable Arduino single file for the of import Arduino circuit is set below.

*Significant*

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

*If you already have some of these libraries installed (double check, as there are many disparate 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 Library, so fall into place connected Manage Libraries. Waiting for all of the libraries to load, and then eccentric LiquidCrystal in the search bar. Information technology should be the ordinal library to show up, aside Arduino and Adafruit. (FYI this may already be installed, as this is one of the libraries that often comes built-in when you download the IDE. If it is, then just go to the next paragraph) Make a point it is the almost recent edition, and click Install. When information technology is done instalmen, close unconscious of the IDE.

To download the dht11 library, go here, and click along the green button connected the rightist that says "Clone or Download", and chatter "Download ZIP". A zip file should be downloaded to your device. Open back up Arduino IDE and clink on Sketch, Include Subroutine library, and Add .ZIP Subroutine library. Select the compressed ZIP file you just downloaded. Once the program library has with success been installed, side by side out of the IDE once more. Re-open it and navigate to the Custom_Fan_AC_System. Now you can select your gameboard and port and upload it to the Arduino.

Step 4: Setting Up Blynk With the Esp8266/NodeMCU

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

Coarse up the app, and make an account. Make over a New Picture, and name it Automatic Fan A/C System. Take Esp8266 or NodeMCU for the device (either should work). Select Wifi as the joining type. Then click "Make up Project". An authentication code should be created. That bequeath be ill-used advanced.

Now click on the screen (surgery swipe odd) and a menu should pop up. Click connected Styled Release, and enter Scheme Ascendence atomic number 3 the name. For Tholepin, scroll to Digital and select D1. Slide the Mode from the Push to the Switch. For the cancelled label, name it Room. For the happening label, name it Mobile. And then click OK at the top decent of the CRT screen. Click on the screen again to go to the menu, and snap slider. Name it Lover Alternate. For the Pin, scroll to Virtual and select V0. If the set range is from 0-1023, change the 1023 to 180. Then dawn OK at the top right. Click on the screen incomparable last time and scroll down until you see Segmented Permutation. Click "Add Option" and since my devotee has triad settings, Off, Double-bass, and High, I titled the first option Off, then Low, then High. Act Non Join THIS SWITCH TO A Immobilise. Place this permutation below the slider. (the reason out for this switch wish become clear later)

_____

There is one more library (possibly two) you pauperization to install, and that is the Blynk depository library. Again, go into the Arduino IDE, to Sketch, Include Subroutine library, then Depository library Managing director. Hunting Blynk in the search box, and the one by Volodymyr Shymanskyy should come up. Download the latest version and one time it is done, walking out of the IDE.

_____

Make a point you have the Servo library installed. IT is a built-in 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 interlingual rendition and pass away verboten of the IDE.

_____

The Esp8266 of necessity to comprise apparatus within the IDE. It is rather simple, just barefaced the IDE and go to File, Preferences, and in the Additive Boards Manager URLs box, type in:

HTTP://arduino.esp8266.com/stable/package_esp8266c...

Then detent OK.

_____

Attend Tools, Board, then Boards Manager. Look for for Esp8266. If it is not installed, install it and exit out of the IDE once more.

_____

Open up the IDE, and fireplug your Esp8266/NodeMCU into your device with the Little USB Cable. Make a point the Arduino Uno is unplugged. Exit to Tools and select the procurable port, and for the Board, choose NodeMCU 1.0 (Extrasensory perception-12E Mental faculty).

_____

Download the file for the Esp8266/NodeMCU above, and read through my comments and shade the essential information. Erstwhile that is done, upload information technology to the board.

Step 5: Constructing the Servo/Fan Switch Device

Here I bequeath show you how I constructed a device to allow the servo to switch the devotee 'tween Low, High, and Off.

I used a objet d'art of make tubing that fit snugly round the switch of my buff, and I used Lego Technic pieces to create an arm with a sliding holding mechanism that would mount under the windowpane, just like the fan. This all depends along your fan and the setup of the way. I have a desk near the buff, so I can just mount it to something happening the desk. If you do not sustain a solid unmoving object near the window, you may need to attach the servo to the fan directly.

The Lego set arm terminate motility freely for a predestinate outdistance, a distance that allows for the switch to move fully from end to oddment. I also mounted a Lego spell to the control system tusk by using some elflike screws and brass adapters that came with the servos. I did not powerfully secure the Lego set branch around the tube that is along the switch because the switch needs to move freely enough because the angle of the tube changes due to the switch being a semicircle. I but made a Lego box around the switch so the subdivision would not have trouble turning the fan on and off. In that location is a television down the stairs that you can download and watch that shows the arm up close and how it moves the switch. Happening to testing!

Step 6: Testing &A; Overall Explanation of Project

I decided to make this project after my brother and I repeatedly disagreed on the temperature of our elbow room. I like the devotee on a lot so the room is very unemotional, and he ends up turn turned the fan a lot of the clock, saying that information technology is too cold. To boot, when it is igneous out, I sometimes forget to release the fan on when I'm not in the room, and when I climb on to sleep the elbow room is so hot, and I have to turn on the sports fan then, which doesn't change the temperature allegretto enough for a good sleep. So I set out to make a system that can solve the problem.

_____

This system has two elements: the Automatic Set off and the Manual Part

The Automatic Part is controlled by the Arduino, where it perpetually takes the temperature and displays it on the LCD screen. The Arduino also uses the two pushbuttons to adjust the in demand temperature of the way. In Automatic Mode, or Room Musical mode, the Arduino turns on the fan when the desirable temperature is lower than the actual temperature. When the desired temperature is reached, it turns off the fan. The Blynk App is used to control the whole system, Eastern Samoa the clit can turn the fan into Room Mode and into Mobile Style, which allows for the exploiter to control the servo and the fan remotely. When in Mobile Style, the user uses the slider to control the servosystem. The Arduino inactive keeps displaying the Current Temperature and the Desired Temperature connected the Liquid crystal display.

_____

Examination:

Formerly you have uploaded the code onto both the Arduino and the Esp8266/NodeMCU and created a way for the servomechanical to control the fan switch over, you have to good turn everything on. Power upwardly the Arduino and Esp8266/NodeMCU (whether that be through USB, a 5v reference, etc.) and hold few seconds until everything is turned on. Then open the Blynk app and enter the project screen and hit the play push at the upper right. IT should be connected to the Esp8266/NodeMCU. Click the pushbuttons to piss sure they adjust the in demand temperature, and make predestinate the LCD also changes with it. In the Blynk app, click the switch so the system is in Mobile Modality. Then move the slider and release IT and you should see the servo move (to the position of the figure of degrees that the slider shows. If it doesn't show the appreciate, run short into the slider and check the switch that says "Show Value"). Move the slider or so until you get the exact numbers that move the servomechanical so your fan turns on and off. Insert these numbers into the Arduino code. * I entirely programmed in the contralto and off settings, even though mine has a high setting, equally the low setting is powerful enough * Re-upload the code to the Arduino.

The purpose of the segmented switch underneath the Pseudemys scripta is to expose the values for the settings on the fan, since you testament be controlling remotely with the slider. I changed the discover of my options to

Selection 1. Off - (value)

Selection 2. Low - (value)

Option 3. High - (value)

This way I make love where to put the slider when I am controlling the fan remotely. You should enter your servo values into the options so you know where to impress the yellow-bellied terrapin. Then you lavatory flip-flop the System back into Room (Automatic) Mode.

____

Once that is cooked. just set the craved temperature of the room with the two pushbuttons, and the Arduino system volition do the work!

//

If you have any questions/problems, feel free to drop them down beneath and I'll embody happy to assistant you unsuccessful! :)

Be the First to Share

Recommendations

  • Anything Goes Competition 2022

    Anything Goes Contest 2022