Introduction: PIR Sensor and LCD Interface to Arduino

Liquified crystal display(LCD) has been used in many electronics circuit which has been more user-friendly after the installation of I2C.In today's ibles, I am going to display characters on the LCD depending on the values thrown by the PIR sensor.PIR sensor helps to detect if there is any motion in it's given boundary.This is achieved by the variation in its temperature emitted by the object.

Let's start building the circuit.

Step 1: Components Required

Step 2: PIR Connection

Passive infrared radiationsensor shortly known as PIR sensor measures the radiation of infrared from its boundary field.Usually, the object around us radiates infrared rays which are not visible to human but these sensors are designed for such purpose.when there is a change in the temperature around its boundary the sensor sends a signal.

PIR connection is as follows:

  • The VCC pin of the sensor is connected to the positive railing of the breadboard.
  • The GND pin is connected to the negative railing of the breadboard.
  • The signal pin is connected to the digital pin 2 of the Arduino board.

Step 3: LCD Connection

LCD has the I2C installed in it.I2C is a powerful tool and which is used to reduce the hectic of wires required to connect LCD to any microcontroller.After the installation of the I2C, the number of wire reduced to 4.

The connection of the Arduino is as follows:

  • The VCC pin of the LCD is connected to the positive railing of the breadboard.
  • The GND pin is connected to the negative railing of the breadboard.
  • The SDA or data line is connected to the A4 of the Arduino.
  • The SCL or clock line is connected to the A5 of the Arduino.

Step 4: Coding

#include "wire.h"
#include "dht.h"
#include "LiquidCrystal_I2C.h"
dht DHT;
#define DHT11_PIN 2;
void setup(){
lcd.begin();
Serial.begin(9600);
}
void loop(){
int chk = DHT.read11(DHT11_PIN);
Serial.print("Temperature = ");
Serial.println(DHT.temperature);
lcd.print("Temperature = ");
lcd.print(DHT.temperature);
Serial.print("Humidity = ");
lcd.println("Humidity = ");
Serial.println(DHT.humidity);
lcd.print(DHT.humidity);
delay(1000);
}

Step 5: Output

Comments

About This Instructable

215views

11favorites

License:

More by rammy2203:Crispy Corn ChatDIY Decorative Paper FlowersBread Bajji
Add instructable to: