SmartVent: Intelligent Climate Control
by ayaannisar12 in Circuits > Remote Control
41 Views, 1 Favorites, 0 Comments
SmartVent: Intelligent Climate Control

By: Mohammad Ayaan Nisar and Gatik Goyal
SmartVent is a Wi-Fi-enabled, automated air vent designed to improve indoor climate control and optimize energy efficiency. It uses an ESP32 microcontroller, a temperature sensor, and a servo motor to dynamically regulate airflow based on room temperature. It gathers data from weather forecasts, and room temperature to give you the optimal airflow experience. By opening or closing vents intelligently, SmartVent ensures that heating and cooling systems operate more efficiently, reducing wasted energy.
Supplies
- ESP32 Development Board
- Micro Servo Motor (MG90S)
- Temperature Sensor (DHT22)
- 3D Printing Filament (PLA)
- Power Supply – 5V, 2A Micro USB Adapter
- Breadboard
- Prusa MK4
Create the Base Frame

Step 1: Create the Base Frame
The base frame will what the vent's foundation. It will house the 3 flaps of the vents and the different electronic components.
The dimensions for the base frame is 4'' x 10''
- Create a simple hollow box that is 4'' by 10'' in length which has a thickness on each edge of about 0.5''. This will create the box like structure.
- Create 3 holes on one of the side walls of the 4'' side which is where the flaps will attach to.
- To house the electronics you will have to create a split off section that can be seen in the picture with a rectangular hole facing outward of the vent which will house the DHT 22 temperature sensor. The DHT22 sensor, excluding pins, measures approximately 0.61 inches in length and 0.47 inches in width.
- The wall that will separate the electronics and the flaps should also consist of the same exact holes that were cut out from the walls in the same position about 2 inches from the left side of the vent.
Creating the Vent Flaps


- Create a sketch on the side walls of the base frame and construct a sketch similar and with the dimensions in the image below.
- The sketch for the flaps should be positioned 0.75'' from the ground and 0.667'' from the edge of the wall.
- Create one profile with dimensions shown in the image and rectangularly pattern it symmetrically with a quantity of 3. Make sure these align with the holes that you have created for these flaps
- Then extrude all 3 of them a length of 8 inches.
Create Rotating Arms


Create a sketch on the side of the vent flaps.
- Create a 2 vertically constrained circles on top of each other.
- Then connect these two circles from the sides with tangent lines.
- Extrude the sketch away from the flaps 0.4 inches.
Note:
** You have to also extrude inside the body which will hold the mg 90 servo motor hand which will rotate.**
Extrude inside this body the length and the size of the motor that you have available.
In the case of the MG90 Servo Motor I had to extrude its rotating mechanism inside about 0.2 inches.
The Connecting Bar and End Caps


As shown in the image above, you want to create 0.01'' circles on each of the rotating mechanisms.
Connect those mechanisms with these lines.
Extrude those circles away so it cuts out a piece so that the rotating mechanism will fit into the 3 arms perfectly.
End Caps:
- Create end caps that fit on to the edge of the flaps from the right side wall. Make them fit the squares from the arms that you created earlier.
Complete CAD Design

After all the steps are completed, this is how the final fusion design looks like.
3d Printing + Files


Print Settings:
- Layer height: 0.2 mm
- Infill: 20–30%
- Supports: NONE
- Material: PLA or PETG
- Instructions: Download and Import STL files into your slicer from the following github link: Orient parts so there's no supports needed
- Slice and print with the settings above.
Github Link with STL Files consisting of: https://github.com/gatik-g/SmartVent
- The instructions provided above were of a general 4'' x 10'' but you can customize them and print it however you would like.
File names:
- Flap x 3
- Shell Arm (servo) x1
- Arm regular x2
- Connecting bar x1
- End Cap x 3
Electronics

Electronics Assembly for SmartVent
- Prepare the Components
- Gather all electronic parts:
- ESP32 Development Board (Wi-Fi enabled)
- Micro Servo Motor (MG90S or SG90)
- Temperature Sensor (DS18B20 or DHT22)
- 5V, 2A Micro USB Power Adapter
- Jumper wires, breadboard, and resistors (4.7kΩ for DS18B20)
- Connect the Temperature Sensor to the ESP32 (PIN 2)
- If using DS18B20 (temperature only):
- Connect VCC to 3.3V on ESP32.
- Connect GND to GND on ESP32.
- Connect Data Pin to GPIO 4 and add a 4.7kΩ pull-up resistor between VCC and Data.
- If using DHT22 (temperature + humidity):
- Connect VCC to 3.3V, GND to GND, and Data to GPIO 4 (no resistor needed).
- Wire the Servo Motor to the ESP32 (PIN 4)
- Signal wire (Yellow/White) → GPIO 5.
- Power wire (Red) → 5V.
- Ground wire (Black/Brown) → GND.
- Ensure the servo power supply can handle load spikes (some servos may cause voltage dips).
- Powering the ESP32 and Circuit
- Use a 5V, 2A Micro USB adapter to power the ESP32.
- If needed, add decoupling capacitors (10µF or more) across the ESP32’s power rails to stabilize voltage.
- Write and Upload Firmware
- Install Arduino IDE
- Install required libraries
Software

All Code can be downloaded here: https://github.com/gatik-g/SmartVent
- Flash each ESP 32 with the code provided on the GitHub, replace the WIFI SSID with your own WIFI SSID and the Password with your own password.
- Install the website and host it locally on either an ESP 32, a laptop, or a raspberry pi.
- The model training folder contains files to train your own model, but a pretrained model is already added to the website folder.
Using the website you can configure schedules, naming, grouping, and personal preferences.
How the AI Model Works?
- Data Collection: Gather temperature, humidity, and forecasted conditions from online weather APIs and indoor sensors.
- Neural Network Prediction: A trained deep learning model processes this data to determine the optimal vent position (e.g., 0° for closed, 90° for fully open).
- Real-Time Adjustment: The servo motor dynamically adjusts the vent angle based on AI predictions, ensuring efficient airflow regulation.
- Feedback Loop: The system continuously learns from room temperature changes and user adjustments, refining predictions over time for better accuracy.