Use fan, DHT11 sensor and ESP32 card for cooling

ESP32 27-11-24
36 0

Tutorial plan

1- What is a cooling system ?

2- How does the cooling system controlled by the ESP32 board work ?

3- Components Needed

4- System wiring Diagram

5- Micropython for the Cooling System

 

 

What is a cooling system ?

A cooling system is a mechanism designed to remove heat from a space, object, or substance to maintain it at a desired temperature. Cooling systems are used in a variety of applications to prevent overheating, maintain optimal operating conditions, and ensure efficiency and safety.

Types of Cooling Systems

Automotive Cooling System:

Used in vehicles to cool the engine and prevent it from overheating. This typically includes a radiator, water pump, coolant, and fans to dissipate heat.

HVAC (Heating, Ventilation, and Air Conditioning) Systems:

Used in buildings to regulate indoor temperature, particularly for cooling during hot weather. These systems use refrigerants and compressors to remove heat from the air.

Electronics Cooling Systems:

Used in computers, phones, and other electronics to cool components like processors and graphics cards. Common methods include fans, heat sinks, and liquid cooling systems.

Industrial Cooling Systems:

Used in manufacturing processes where machinery generates substantial heat, which can interfere with production or cause damage.

Refrigeration and Freezing Systems:

Used to cool and preserve food, chemicals, and other perishable items by lowering their temperature to extend shelf life or enable safe transport.

Key Components of Cooling Systems

Coolant (like water, air, or refrigerants): Transfers heat away from the source.

Radiator/Heat Exchanger: Disperses absorbed heat into the environment.

Fans or Blowers: Increase airflow to accelerate heat dissipation.

Thermostats and Sensors: Regulate and monitor temperature.

Pumps and Compressors: Facilitate the movement of coolant or refrigerant in the system.
Cooling systems are critical in various fields, from automotive engineering and electronics to climate control in buildings, ensuring functionality and safety across a wide range of applications.

 

How does the cooling system controlled by the ESP32 board work ?

To create a cooling system using an ESP32, a DHT11 sensor, and a 5V fan, you’ll set up the ESP32 to read temperature and humidity from the DHT11 sensor. Based on this temperature reading, the ESP32 will control the fan, turning it on when the temperature exceeds a set threshold and off when it cools down.
Temperature Monitoring: TheESP32 reads the temperature from the DHT11.

Fan Activation: When the temperature exceeds the defined threshold, the ESP32 turns on the fan by sending a signal to the relay or transistor, which completes the fan circuit.

Fan Deactivation: When the temperature falls back below the threshold, the ESP32 turns the fan off, conserving power and cooling only when necessary.
This cooling system provides simple, automated temperature control, making it ideal for projects that require temperature regulation, such as small electronics enclosures or DIY climate control setups.

 

Components Needed

ESP32:

ESP32 card

The main controller.

DHT11 Sensor:

the sensor Measures ambient temperature.

5V Fan:

The fan Provides cooling when activated.

Relay Module :

The module serves as an electronic switch to control the 5V fan

SSD1306 display:

it displays temperature reading.

Jumper Wires

Jumper wires

Jumper wires will be used to make connections between the components.

Breadboard:

Breadboard

A breadboard can be used to create a temporary circuit for testing and prototyping.

Power supply

It is used to power the fan.

System wiring Diagram


DHT11 Sensor:

Connect the VCC pin of the DHT11 to the 3.3V pin on the ESP32.

Connect the GND pin of the DHT11 to GND on the ESP32.

Connect the DATA pin of the DHT11 to a digital pin on the ESP32 (e.g., GPIO23).

Fan Control with Relay Module:

Connect the control (S) pin of the relay module to a digital pin on the ESP32 (e.g., D18).

Connect VCC and GND of the relay module to 3V3V and GND on the ESP32.

Connect one terminal of the fan to the normally open (NO) terminal of the relay, and the other terminal to the GND. The COM terminal of the relay should go to the 6V power supply.

SSD1306 Display:

Connect the SDA pin to the GPIO21 pin on the ESP32.

Connect the SCL pin to the GPIO22 pin on the ESP32.

Connect VCC to the 5V pin on the ESP32 and GND to GND.

 

Micropython program for the Cooling System

This code will read data from the DHT11 sensor, display temperature and humidity on the LCD, and control the fan based on the temperature threshold.

How It Works this code

Initialization:

The ESP32 initializes the DHT11 sensor, relay, and OLED display.

A splash screen appears on the OLED during startup.

Sensor Reading:

The ESP32 reads temperature and humidity values from the DHT11 sensor every 2 seconds.
Fan Control:

If the temperature exceeds the TEMP_THRESHOLD, the relay activates the fan.

If the temperature drops below the threshold, the relay turns the fan off.

Display Update:

The OLED shows the current temperature.

0 comment

Leave a comment

Veuillez noter s'il vous plaît*

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Purpose of this website

Educational robotics refers to the use of robots and robotics technology to promote learning in educational settings. It involves the integration of technology, engineering, and computer science into the classroom, allowing students to engage in hands-on, project-based learning experiences.
In this context, our website represents an excellent resource for parents, teachers and children who wish to discover robotics.

Contact details

Zaouiet Kontech-Jemmel-Monastir-Tunisia

+216 92 886 231

medaliprof@gmail.com

Pictures of the articles

Robotic site created by MedAli-Teacher info