Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

Building a Monitoring System with Arduino

Importance and Utility of Monitoring Systems

Monitoring systems play a crucial role in various fields, including home automation, industrial processes, and environmental monitoring. These systems allow us to remotely monitor and control different parameters, ensuring efficiency, safety, and data collection. By using Arduino, we can easily build a cost-effective and customizable monitoring system tailored to our specific needs.

Project: Creating a Temperature and Humidity Monitoring System

In this project, we will build a temperature and humidity monitoring system using Arduino. The objective is to measure and display real-time temperature and humidity readings on an LCD screen. Additionally, we will set up threshold limits and trigger an alarm if these limits are exceeded.

List of Components:

  1. Arduino Uno - 1x [Link to purchase: https://www.arduino.cc/en/Main/ArduinoBoardUno]

  2. DHT11 Temperature and Humidity Sensor - 1x [Link to purchase: https://www.sparkfun.com/products/10167]

  3. LCD Screen (16x2) - 1x [Link to purchase: https://www.sparkfun.com/products/709]

  4. Breadboard - 1x [Link to purchase: https://www.sparkfun.com/products/12615]

  5. Jumper Wires - As required [Link to purchase: https://www.sparkfun.com/products/12794]

  6. Potentiometer - 1x [Link to purchase: https://www.sparkfun.com/products/9939]

Examples:

  1. Example 1: Reading Temperature and Humidity Values
#include <DHT.h>

#define DHTPIN 2
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  dht.begin();
}

void loop() {
  float temperature = dht.readTemperature();
  float humidity = dht.readHumidity();

  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.print(" °C");

  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.print(" %");

  delay(2000);
}

Explanation: This code uses the DHT library to read temperature and humidity values from the DHT11 sensor connected to pin 2 of the Arduino. The values are then displayed on the serial monitor.

  1. Example 2: Displaying Temperature and Humidity on an LCD Screen
#include <LiquidCrystal.h>
#include <DHT.h>

#define DHTPIN 2
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  dht.begin();
}

void loop() {
  float temperature = dht.readTemperature();
  float humidity = dht.readHumidity();

  lcd.setCursor(0, 0);
  lcd.print("Temp: ");
  lcd.print(temperature);
  lcd.print(" C");

  lcd.setCursor(0, 1);
  lcd.print("Humidity: ");
  lcd.print(humidity);
  lcd.print(" %");

  delay(2000);
}

Explanation: This code uses the LiquidCrystal library to display temperature and humidity values on a 16x2 LCD screen. The DHT11 sensor is connected to pin 2 of the Arduino, and the LCD screen is connected to pins 12, 11, 5, 4, 3, and 2.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.