Introduction: Mechanical Fan/Air Conditioning System

Welcome! In this Instructable I will manner of walking you through how to build your very own automatic Fan/Air Conditioning System. This Instructable deals with a window fan, which is used to cool down rooms in the heat of summer. The goal of this project is to create a arrangement that will automatically monitor and regulate the temperature of a room by controlling a common window winnow. To boot, the ability to control the rooter wirelessly with a smartphone volition constitute implemented using a Esp8266/NodeMCU Wifi Growth board along with the IoT app, Blynk. The main moderate system utilizes an Arduino and few other components. Let's go into it!

Step 1: Assembly Components

For this Instructable, you will need:

- Arduino Uno (comes with USB data cable) - Buy Here (Amazon) (other similar boards like the Arduino Mega bequeath work as fountainhead)

- 16x2 Liquid crystal display Display (in this project, I use a display without a 16 pin 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 manipulation the 3 pin detector as information technology is easier to use 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 deliver slightly different pinouts for this sensor.

- 10k Ohm Potentiometer - Buy Here (Amazon)

- 2 Pushbuttons - Buy Here (Amazon)

- Golden Gear Servomechanism - Buy Here (Amazon River) - you do not have to use a metal gear servo, as it all depends along your window fan. The servo will be used to move the trade on the fan, so it all depends on how a lot force is required to move the switch. I use a beefy gold gear servo because my fan has a sturdy trade, and in the main, metallic gear servos are style less likely to break than regular plastic gear servos.

- Male to Phallic &A; Male to Female Jumper Wires - Buy up Hither (Amazon)

- Esp8266/NodeMCU Wifi Development Circuit board - Buy up Here (Amazon)

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

- Micro USB Cable for programing Esp8266/NodeMCU

- Heterogeneous materials for constructing a device to allow the servo to move the turn on the winnow. (A picture of my device will be included further down)

Step 2: Wiring It All Up

The bespoke wiring diagram for the Arduino is shown above.

*IMPORTANT Observe*

The DHT11 and Esp8266/NodeMCU both tranquillize have to be wired equal to the Arduino. The servomechanical also needs to be wired up to the Esp8266/NodeMCU.

Connections:

DHT11 ---> Arduino

VCC ---> 5v (on breadboard)

GND ---> GND (on breadboard)

Bespeak (S) ---> Analog Pin A0

____________________________

Arduino ---> Esp8266/NodeMCU

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

Extremity PIN 9 ---> Digital Pin 2 (D2)

____________________________

Servo Connections

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

Sarcastic/Brown Wire ---> GND (on bread board)

Yellow/Orange Wire ---> Digital Pin 0 (D0) on Esp8266/NodeMCU

Step 3: Programming the Arduino

The downloadable Arduino file cabinet for the chief Arduino circuit is located below.

*IMPORTANT*

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

*If you already accept some of these libraries installed (double watch, as at that place are many different 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 along Survey, Include Library, and then click on Make out Libraries. Wait for all of the libraries to load, and so type LiquidCrystal in the look for bar. It should be the first library to picture up, by Arduino and Adafruit. (FYI this may already be installed, atomic number 3 this is extraordinary of the libraries that often comes inbuilt when you download the IDE. If IT is, then sporty get along to the side by side paragraph) Make sure IT is the most recent version, and click Install. When IT is through with installation, preclude of the IDE.

To download the dht11 program library, go here, and click on the green button on the right that says "Clone operating theater Download", and click "Download ZIP". A zip file out should constitute downloaded to your device. Open back up up Arduino IDE and sink in along Sketch, Include Library, and Bestow .ZIP Program library. Select the compressed ZIP Indian file you barely downloaded. Once the library has with success been installed, close out of the IDE once more. Atomic number 75-open it and navigate to the Custom_Fan_AC_System. Now you can select your board and port and upload information technology to the Arduino.

Step 4: Scene Up Blynk With the Esp8266/NodeMCU

First off, download the Blynk app from either the App Store (iOS) operating room the Google Play Store (Android).

Open up the app, and make an write u. Create a New Project, and discover it Automatic Fan A/C System of rules. Opt Esp8266 or NodeMCU for the twist (either should influence). Choose WLAN every bit the link character. Then detent "Create Project". An certification code should be created. That will glucinium utilized later.

Instantly click on the screen (or swipe left) and a bill of fare should pop up. Click on Titled Button, and enter System Control as the public figure. For Pin, scroll to Digital and select D1. Slide the Mode from the Push to the Switch. For the off label, name IT Room. For the on label, name it Unsettled. Past click All right at the top right of the screen. Click on the screen once again to go to the menu, and click slider. Key it Fan Switch. For the Pin, scroll to Virtual and prize V0. If the set range is from 0-1023, convert the 1023 to 180. Then cluck OK at the top right. Click on the screen one last clock and scroll dispirited until you see Segmented Switch. Click "Add Option" and since my fan has three settings, Soured, Low, and High, I named the first option Off, then Low, then High. DO NOT CONNECT THIS SWITCH TO A PIN. Place this transposition below the slipper. (the reasonableness for this electric switch will become clear later)

_____

There is one more library (possibly two) you demand to install, and that is the Blynk library. Again, go into the Arduino IDE, to Cartoon, Admit Subroutine library, then Library Handler. Search Blynk in the hunt box, and the one by Volodymyr Shymanskyy should come up. Download the latest version and formerly it is done, close verboten of the IDE.

_____

Make sure you have the Servo library installed. It is a built-in library for the IDE, so information technology should embody installed. The subroutine 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 inside the IDE. It is rather simple, just open the IDE and go to File, Preferences, and in the Additional Boards Managing director URLs boxful, type in:

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

Then click OK.

_____

Locomote to Tools, Dining table, past Boards Manager. Seek for Esp8266. If it is not installed, install it and exit kayoed of the IDE once more.

_____

Open up the IDE, and plug your Esp8266/NodeMCU into your device with the Micro USB Cable. Micturate sure the Arduino Uno is unplugged. Go to Tools and take the easy port, and for the Board, choose NodeMCU 1.0 (Clairvoyance-12E Module).

_____

Download the file in for the Esp8266/NodeMCU above, and read through my comments and fill in the necessary data. Once that is done, upload it to the board.

Step 5: Constructing the Servomechanical/Fan Throw Twist

Here I will show you how I constructed a device to allow the control system to substitution the fan between Low, Graduate, and Off.

I used a piece of clear tubing that fit snugly around the switch over of my fan, and I used Lego Technic pieces to create an branch with a sliding holding mechanics that would mount under the window, just like the fan. This all depends on your buff and the setup of the board. I have a desk near the fan, so I can just mount it to something connected the desk. If you make out not have a solid stationary object near the window, you whitethorn need to attach the servo to the fan directly.

The Lego weapon bottom move freely for a certain distance, a distance that allows for the switch to move in full from destruction to end. I also mounted a Lego piece to the servo horn aside using some small screws and brass adapters that came with the servos. I did not strongly fixed the Lego arm around the tube that is happening the electrical switch because the switch needs to move freely sufficient because the angle of the tube changes due to the switch being a hemicycle. I equitable successful a Lego corner around the switch then the branch would non have trouble turning the devotee off and on. Thither is a video below that you can download and watch that shows the arm up impendent and how it moves the switch. On to testing!

Step 6: Testing & Overall Account of Project

I decided to make this project after my brother and I repeatedly disagreed on the temperature of our room. I like the fan on much so the room is really cool, and he ends up turning remove the fan a lot of the time, saying that it is too cold. Additionally, when it is hot kayoed, I sometimes draw a blank to turn away the fan on when I'm non in the room, and when I go capable sleep the room is so hot, and I have to turn around connected the fan so, which doesn't variety the temperature fast enough for a good sleep. So I part to make a organisation that can solve the problem.

_____

This system of rules has two elements: the Automatic Part and the Non-automatic Part

The Automatic Part is controlled by the Arduino, where it constantly takes the temperature and displays it on the Liquid crystal display screen. The Arduino as wel uses the two pushbuttons to adjust the desired temperature of the room. In Automatic Mode, or Room Mode, the Arduino turns on the fan when the desired temperature is lower than the actual temperature. When the desired temperature is reached, it turns hit the fan. The Blynk App is used to manipulate the whole system, as the button can twist the fan into Room Mode and into Mobile Fashion, which allows for the user to control the servo and the fan remotely. When in Mobile Mode, the user uses the slider to control the servosystem. The Arduino still keeps displaying the Current Temperature and the Desired Temperature on the Liquid crystal display.

_____

Testing:

Once you have uploaded the cypher onto some the Arduino and the Esp8266/NodeMCU and created a way for the servo to control the rooter throw, you have to turn everything on. Power up the Arduino and Esp8266/NodeMCU (whether that be through USB, a 5v reservoir, etc.) and wait a few seconds until everything is turned on. Then open the Blynk app and move in the project screen and hit the play clitoris at the top true. It should be connected to the Esp8266/NodeMCU. Click the pushbuttons to make sure they aline the desired temperature, and make a point the LCD also changes with it. In the Blynk app, click the substitution so the system is in Mechanised Mode. Then move the slider and release it and you should attend the servosystem move (to the position of the keep down of degrees that the slider shows. If it doesn't show the value, go under into the skidder and curb the flip that says "Exhibit Appreciate"). Move the skidder around until you get the mathematical numbers that move the servo so your buff turns on and off. Enter these Book of Numbers into the Arduino encrypt. * I lonesome programmed in the low and off settings, even though mine has a high setting, Eastern Samoa the low place setting is powerful enough * Re-upload the inscribe to the Arduino.

The purpose of the segmented switch underneath the skidder is to presentation the values for the settings happening the fan, since you will be dominant remotely with the yellow-bellied terrapin. I metamorphic the name of my options to

Option 1. Off - (value)

Option 2. Low - (prise)

Selection 3. High - (value)

This way I make out where to put the slider when I am dominant the fan remotely. You should enter your servomechanical values into the options and so you bed where to travel the slider. So you can switch the System hinder into Board (Automatic) Mode.

____

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

//

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

Exist the First to Share

Recommendations

  • Anything Goes Contest 2022

    Anything Goes Contest 2022