PIR Sensor and LCD Interface to Arduino

About: I am an electronic hobbyist on Arduino, Photon, Raspberry Pi and common electronics.A passionate cook.Any assistance in electronics and web development feel free to contact me at appytechie.at@gmail.com.

Hello!!I'm Sridhar Janardhan.LCD has been used in many electronics circuit which has been more user-friendly after the installation of I2C.In today's I ibles, I am going to print characters on the LCD depending on the values thrown by the PIR sensor.PIR sensor is one of its kind that helps to find if there is any motion in it's given boundary.This is achieved by the variation in its internal temperature if there is any change in the motion.

let's now gather components required for the competition.

Step 1: Components Required

Components required for making this projects are:

  • Breadboard
  • Arduino Uno
  • LCD
  • PIR sensor
  • Jumper wire

Step 2: Adding PIR Sensor

Passive infrared radiation sensor 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

Share

    Recommendations

    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Backyard Contest

      Backyard Contest
    • Classroom Science Contest

      Classroom Science Contest

    Discussions