Introduction: ARDUINO WITH PIR(Passive Infrared Sensor)

As a beginner i am learning to Operate Arduino Microcontroller and pair it with Arduino Compatible Sensory Units on Simulation(Tinkercad) as well as Practical.

The Circuit connection on simulation and practical are two different approach of pairing up of sinput/Output devices and the Arduino Microcontroller.

Both of the approaches are good to learn the basics of arduino but as the arduino is type of Hardware Microcontroller Electronic Device that has Physical Output Signals in terms of electrical signal to move the Motors or sound a buzzer as well as to lit up a led.

You can explore my blog to learn about the basics pairing up of Arduino with PIR Sensor.

Supplies

1. Arduino UNO

I learned that Hardware and Controlling it through using Arduino IDE Software are Separate parts in a Single Electronic Device that consists of a programable ATMEGA328p chip,

Hardware Consists of a Arduino Board which Particularly has Some Digital and Analog (Input/Output)It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header and a reset button.

and a USB type data transmitter and Reciever connecting jack.

let's get into the actual transmission and recieving of data which is done through the input of signal through the programme code which has been programed in the chip.

The Board has been built-up in such a way that it passes the (HIGH) Signal to the pin mentioned in the program as an input at the pin of 5 volts means for the program the pin is in ON State

So thus,The pins sends the message to output device using electrical signal of 5 volts in this way a data is transfered and recieved at the board output.

This is just the basic analogy of Transmission and Recieving of the data in form of Electrical Signal which is doing the actual work of communicating with the sensors,motors,devices connected on the Board.


2.Connecting Wires

3.LED

4.PIR(Passive Infrrared) Sensor

5.Breadboard

6.Arduino IDE

Step 1: PIR(Passive Infrared Sensor)

PIR (passive infrared) sensors utilise the detection of infrared that is radiated from all objects that emit heat. This type of emission is not visible to the human eye, but sensors that operate using infrared wavelengths can detect such activity. They are sometimes referred to as ‘motion-based detectors’, as they sense the presence of people, animals and objects through the movement of their infrared wavelengths.

They are referred to as “passive” due to the fact that no heat or energy is emitted by the sensor itself. It is also important to remember that PIR sensors detect the emission of infrared radiation, and not heat.

While performing practical we have to set the Sensitivity and Timing of the PIR Sensor using a screw moving towards the left of given two screws(which are for the Sensitivity and Timing) which sets the limit for the least setting of time and more detection of movement.

https://cdn-learn.adafruit.com/downloads/pdf/pir-passive-infrared-proximity-motion-sensor.pdf

Step 2: SIMULATION

Tinkercad is an OpenSource, online 3D modeling and Circuits Simulation program that runs in a web browser.Since it became available in 2011 it has become a popular platform for creating 3D Modelling, Electronic circuits and online simulation of circuits as well as an entry-level introduction to constructive solid geometry,.

Now, in this miniproject i have paired PIR sensor with the Arduino Microcontroller with reference from the Tinkercad Pairing with the Arduino , while on simulation i have connected the circuit as it was about to make me learn on how to connect the jumper wires on the online simulation , the circuit is has also been shared in the attachments, where i connected the circuit carefully ,The programme was also there in the simulation online, from which i got to learn about the importance of pinning it with the exact number of pin; whilst the importance of active mention of pin on the programme as everything has done in a proper chronological order i was successfully able to run the simulations Screenshot of implementation is also attached there in the attachment the programme for this simulation is below in the blog, you can open heartedly use it.


Step 3: Programme

int sensorState = 0;


void setup()

{

 pinMode(2, INPUT);

 pinMode(LED_BUILTIN, OUTPUT);

 Serial.begin(9600);

}


void loop()

{

 // read the state of the sensor/digital input

 sensorState = digitalRead(2);

 // check if sensor pin is HIGH. if it is, set the

 // LED on.

 if (sensorState == HIGH) {

  digitalWrite(LED_BUILTIN, HIGH);

  Serial.println("Sensor activated!");

 } else {

  digitalWrite(LED_BUILTIN, LOW);

 }

 delay(1000); // Delay a little bit to improve simulation performance

Step 4: Hardware Connection

While Working on the Arduino Hardware part of PIR sensor my actual approach was like a layman towards the PIR Sensor in which i connected(female to male)connecting wires to the respective terminals i.e Vcc,Output,Ground and waited for the actual output that it will sense the movement and the led will start blinking, but fortunately it was not blinking due to my layman approach,then my mentor told me to read about the sensor,watch tutorials and programme of that sensor then i got to know that;We have to set the Sensitivity and Timing of the PIR Sensor using a screw moving towards the left of given two screws(which are for the Sensitivity and Timing) which sets the limit for the least setting of time and more detection of movement.

As a Result to this Simulation and Practical of miniproject i got to learn about the PIR Sensor, and how to pair it with the Arduino in Simulation as well as in Practical.