Membuat Kipas Angin Otomatis Arduino

Idrus Project
15 May 202006:21

Summary

TLDRThis tutorial walks through the process of setting up an Arduino-based system using a DHT11 sensor, relay module, LCD display, and fan to monitor and control temperature. The guide covers wiring the components, connecting the sensor and display to the Arduino, and programming the system to trigger the fan when the temperature exceeds a set threshold. Detailed steps are given for both hardware setup and coding, ensuring users can easily replicate the project to create an automated temperature-controlled fan system.

Takeaways

  • 😀 The setup involves using an Arduino Uno, DHT11 sensor, 16x2 LCD, relay module, and a 12V fan to create a temperature-based fan control system.
  • 😀 The DHT11 sensor is connected to the Arduino to monitor temperature and humidity, with a 10k resistor on the VCC line.
  • 😀 The LCD display is used to show the temperature and humidity readings, connected via 4 pins to the Arduino.
  • 😀 A relay module is used to control the fan, which turns on when the temperature exceeds a certain threshold (29°C).
  • 😀 Connections are made using a breadboard, with separate power and ground lines for each component to ensure proper power distribution.
  • 😀 The relay is connected to the Arduino’s digital pin 3 and the fan is powered by a 12V adapter through the relay module.
  • 😀 The DHT11 sensor's data is read in the code, and the temperature is displayed on the LCD as a real-time reading.
  • 😀 An 'if' condition in the code checks if the temperature is above 29°C, and if so, triggers the relay to turn on the fan.
  • 😀 The fan is powered through the relay, with a separate 12V power source and controlled by the relay module's switch.
  • 😀 The entire system is powered by an Arduino board connected to a laptop via USB for programming and monitoring.

Q & A

  • What is the role of the DHT11 sensor in this Arduino project?

    -The DHT11 sensor is used to measure temperature and humidity in the environment. It provides data that is read by the Arduino to control other components, such as the fan, based on the temperature readings.

  • How is the DHT11 sensor connected to the Arduino?

    -The DHT11 sensor is connected to the Arduino by wiring its VCC and GND pins to the 5V and ground lines on the breadboard, respectively. The data pin of the DHT11 is connected to the Arduino's digital pin 2.

  • What is the purpose of the 10k resistor in this circuit?

    -The 10k resistor is used as a pull-up resistor for the data pin of the DHT11 sensor. It ensures stable communication between the sensor and the Arduino by pulling the data line high when the sensor is not actively transmitting data.

  • How is the relay module used in this project?

    -The relay module is used to control the 12V fan. It acts as a switch, turning the fan on or off depending on the temperature readings from the DHT11 sensor. The relay is triggered by sending a signal from the Arduino's digital pin 3.

  • What does the LCD display show in this project?

    -The LCD display shows the current temperature and humidity readings obtained from the DHT11 sensor. It also shows the status of the system, such as whether the fan is turned on or off based on the temperature conditions.

  • Why is the fan turned on when the temperature exceeds 29°C?

    -The fan is turned on when the temperature exceeds 29°C as a cooling measure. This is achieved through a conditional statement in the Arduino code that triggers the relay to turn on the fan when the temperature surpasses the set threshold.

  • What is the role of the 12V power supply in this project?

    -The 12V power supply is used to power the fan, which requires a higher voltage than the Arduino's 5V output. The relay is used to switch the 12V fan on and off based on the temperature readings from the sensor.

  • How is the LCD connected to the Arduino in this setup?

    -The LCD is connected to the Arduino using four pins for communication: VCC and GND for power, and SCL and SDA for the I2C data bus. The SCL and SDA pins are connected to the Arduino's A4 and A5 pins, respectively.

  • What is the purpose of the `if` condition checking if the temperature is above 29°C?

    -The `if` condition checks if the temperature exceeds 29°C and triggers the fan to turn on. This logic is used to automatically control the fan's operation based on the environmental temperature, providing cooling when necessary.

  • How do you upload the code to the Arduino?

    -To upload the code to the Arduino, first ensure the correct port is selected in the Arduino IDE. After that, click the 'Upload' button to transfer the program to the Arduino, allowing it to control the connected components based on the input from the sensors.

Outlines

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Mindmap

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Keywords

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Highlights

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Transcripts

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now
Rate This

5.0 / 5 (0 votes)

Related Tags
ArduinoTemperature ControlDIY ProjectFan ControlDHT11 SensorLCD DisplayRelay ModuleElectronicsTech TutorialHome AutomationTemperature Monitoring