Skip to product information
1 of 1

Blue PCB Electronics

1E400 AM312 Sensor Mini IR Pyroelectric Infrared PIR Motion Human Sensor Automatic Detector Module Board

1E400 AM312 Sensor Mini IR Pyroelectric Infrared PIR Motion Human Sensor Automatic Detector Module Board

Regular price Dhs. 25.00
Regular price Dhs. 15.00 Sale price Dhs. 25.00
Sale Sold out
View full details

Description

the AM312 PIR Motion Sensor is a cutting-edge and compact passive infrared (PIR) motion sensor specifically designed to enhance security and efficiency in a wide array of applications, including burglar alarms and automated lighting systems. Harnessing the power of advanced technology, this remarkable sensor boasts an exceptional capability to effortlessly interface with microcontrollers such as the ESP8266 or ESP32, accepting a direct supply of 3.3 volts. Embodying precision and reliability, the AM312 PIR Motion Sensor stands as a beacon of innovation, empowering your projects with heightened responsiveness and accuracy to detect even the subtlest movements in their surroundings. Unleash the potential of your security setups and automation endeavors with this state-of-the-art sensor, making safety and convenience an ever-accessible reality.

 Datasheet

Package Includes:

  • 1 x PIR Motion Sensor Module AM312


Features:

  • Wide operating voltage range from 2.7V to 12V: This sensor offers great flexibility in power supply options, allowing it to be used with a wide range of voltage sources, making it suitable for various applications.
  • Low power consumption in Static mode is 0.1mA: The AM312 is designed to be energy-efficient, consuming an impressively low amount of power in Static mode, which ensures prolonged operation and helps conserve energy.
  • High reliability: Known for its robust construction and precise motion detection capabilities, the AM312 instills confidence in users, ensuring consistent and dependable performance.
  • Output time delay of 2s: The sensor features a 2-second output time delay, which means it will hold its output signal for 2 seconds after detecting motion, allowing for ample time to trigger appropriate actions or responses in your projects.
  • Can be used separately without any additional microcontroller or platform like Arduino or Raspberry Pi, etc. But you can use them to enhance your project: The AM312 can function as a standalone motion sensor, simplifying integration into projects without the need for additional microcontrollers. However, it remains versatile enough to be seamlessly integrated with popular platforms like Arduino, Raspberry Pi, and other microcontrollers to further enhance project capabilities.
  • Low cost: As an affordable option, the AM312 offers a cost-effective solution for motion detection needs, without compromising on quality or performance.
  • 100-degree detection angle: With an impressive detection angle of 100 degrees, the sensor can efficiently cover a wide area, maximizing its motion-sensing capabilities.
  • 3 to 5 meters detection range: The AM312 is capable of detecting motion within a range of 3 to 5 meters, making it suitable for applications requiring medium-range motion sensing.
  • Easy to connect with any platform like Arduino or Raspberry Pi and all microcontrollers: The sensor's straightforward interface allows for easy integration with various platforms, including popular ones like Arduino and Raspberry Pi, as well as other microcontrollers, streamlining the development process.
  • Easy to connect with analog circuits: Apart from digital platforms, the AM312 can be effortlessly integrated into analog circuits, expanding its versatility and usability in different electronic setups.


Description:

the AM312 PIR Motion Sensor is a compact and powerful solution for precise motion detection in various applications. With its wide operating voltage range of 2.7V to 12V, it offers flexible power options, while its low static mode power consumption of 0.1mA ensures energy efficiency. Boasting high reliability, this sensor guarantees consistent and accurate motion sensing, complemented by a 2-second output time delay, providing ample response time for triggered actions. It offers the versatility of stand-alone operation or seamless integration with popular microcontrollers such as Arduino and Raspberry Pi, opening doors to endless project possibilities. Remarkably affordable yet uncompromising on quality, the AM312 features a broad 100-degree detection angle and an impressive detection range of 3 to 5 meters, making it ideal for applications requiring wide area coverage. Its user-friendly design facilitates easy connections to various platforms, including analog circuits, simplifying installation and enhancing compatibility for diverse electronic setups. Welcome the AM312 into your projects and experience motion sensing excellence like never before.


Principle of Work:

the AM312 PIR Motion Sensor works based on passive infrared technology. It consists of a pyroelectric sensor that detects changes in infrared radiation emitted by objects in its detection range. When a warm body, such as a person or an animal, moves within the sensor's field of view, the sensor detects the infrared radiation emitted by the body and generates a signal. The sensor has two sensing elements that detect infrared radiation. These elements are designed in such a way that when a warm object moves across the sensor's field of view, one element detects an increase in radiation while the other detects a decrease. This difference in radiation levels is detected and amplified, generating an output signal that represents motion. The MCU can be programmed to read the output signal from the sensor's OUT pin at regular intervals. If the MCU detects a change in the signal from LOW to HIGH or vice versa, it indicates that motion has been detected by the sensor. The MCU can then take appropriate actions based on this motion detection, such as triggering an alarm, activating lights, or performing any other programmed tasks.


Pinout of the Module:

Amazon.com: DaFuRui AM312 PIR Sensor,10Pack PIR Motion Sensor Outdoor Mini  Pyroelectric Infrared PIR Human IR Sensor Module Body Manual Motion Sensor  Detector Modules : Electronics

Pin on the PCB

Description
VIN Positive DC power supply between 2.7-12V
Out Digital output (HIGH: 3.3V or LOW: 0V)
GND  Ground

 

Applications:

  • Security Systems: PIR sensors are commonly used in security systems for intruder detection. When the sensor detects motion, it can trigger an alarm, activate cameras, or turn on lights to deter potential intruders.
  • Lighting Control: The PIR sensor can be used to control lighting systems in homes, offices, and public places. When motion is detected, the lights are automatically switched on, and they turn off after a set period of inactivity, saving energy.
  • Home Automation: PIR sensors are essential components of smart home automation systems. They can be integrated with other devices, such as smart thermostats or smart plugs, to create more efficient and convenient systems.
  • Occupancy Sensing: In commercial buildings, PIR sensors are used to detect occupancy in rooms and areas. This information can be used to control heating, cooling, and lighting systems, optimizing energy usage and enhancing comfort.
  • Automatic Doors: PIR sensors are often used in automatic doors to detect the presence of individuals approaching the door. This allows the door to open automatically, providing a hands-free and convenient entry.
  • Wildlife Monitoring: PIR sensors are employed in wildlife monitoring and research to detect the presence of animals in specific areas. This helps researchers study animal behavior and patterns.
  • Home Security Cameras: PIR sensors can be integrated with home security cameras to trigger recording when motion is detected, ensuring that important events are captured.
  • Robotics: PIR sensors are used in robotics to provide a simple and effective method for detecting the presence of objects or obstacles in the robot's surroundings.
  • Home Appliances: PIR sensors can be utilized in various home appliances to add a level of automation and energy efficiency. For example, the sensor can turn on a fan when it detects someone in the room or turn off appliances when no one is present.
  • Lighting in Public Spaces: PIR sensors are used in public spaces, such as restrooms, to control lighting and reduce energy waste when the area is unoccupied.


Circuit:

motion

Library:

The module does not need a Library to function with Arduino


Code:

The LED will turn on when motion is detected, and it will turn off when motion stops. The "Motion detected!" and "Motion stopped!" messages will be printed only once when the state changes, rather than continuously printing the messages while motion is detected.

int led = 13;                // the pin that the LED is atteched to
int sensor = 2;              // the pin that the sensor is atteched to
int state = LOW;             // by default, no motion detected
int val = 0;                 // variable to store the sensor status (value)

void setup() {
  pinMode(led, OUTPUT);      // initalize LED as an output
  pinMode(sensor, INPUT);    // initialize sensor as an input
  Serial.begin(9600);        // initialize serial
}

void loop(){
  val = digitalRead(sensor);   // read sensor value
  if (val == HIGH) {           // check if the sensor is HIGH
    digitalWrite(led, HIGH);   // turn LED ON
    delay(500);                // delay 100 milliseconds 
    
    if (state == LOW) {
      Serial.println("Motion detected!"); 
      state = HIGH;       // update variable state to HIGH
    }
  } 
  else {
      digitalWrite(led, LOW); // turn LED OFF
      delay(500);             // delay 200 milliseconds 
      
      if (state == HIGH){
        Serial.println("Motion stopped!");
        state = LOW;       // update variable state to LOW
    }
  }
}  

  1. const int ledPin = 13; and const int sensorPin = 2;: These lines declare constants ledPin and sensorPin, which represent the pin numbers for the LED and the PIR motion sensor, respectively. The constants are used to make the code more readable and maintainable. In this code, the LED is connected to pin 13, and the PIR motion sensor is connected to pin 2.

  2. bool motionDetected = false;: This line initializes a boolean variable motionDetected and sets it to false. This variable will be used to keep track of the current state of motion detection.

  3. void setup() {...}: The setup() function runs only once when the Arduino board is powered on or reset. In this function, we do the following:

    • pinMode(ledPin, OUTPUT);: Configures the LED pin (pin 13) as an output, indicating that we will use it to send signals to the LED.

    • pinMode(sensorPin, INPUT);: Configures the sensor pin (pin 2) as an input, indicating that we will read signals from the PIR motion sensor.

    • Serial.begin(9600);: Initializes the serial communication at a baud rate of 9600, allowing us to communicate with a computer through the serial monitor for debugging and displaying messages.

  4. void loop() {...}: The loop() function runs repeatedly after the setup() function is executed. In this function, we do the following:

    • bool currentMotion = digitalRead(sensorPin);: Reads the current value of the PIR motion sensor (HIGH or LOW) and stores it in the currentMotion variable.

    • if (currentMotion != motionDetected) {...}: Checks if the current value of the PIR motion sensor is different from the previous value stored in the motionDetected variable. If there is a change, it means motion is detected or stopped.

    • If there is a change in motion detection status, the code inside the if statement will execute:

      • If motionDetected is false, and currentMotion is true, it means motion has been detected. The code will turn on the LED (by setting digitalWrite(ledPin, HIGH);) to indicate the motion detection and print "Motion detected!" to the serial monitor.

      • If motionDetected is true, and currentMotion is false, it means motion has stopped. The code will turn off the LED (by setting digitalWrite(ledPin, LOW);) to indicate that motion has stopped and print "Motion stopped!" to the serial monitor.

    • After handling the change in motion detection status, the code adds a delay of 500 milliseconds (delay(500);). This delay helps prevent rapid flickering of the LED and excessive messages in the serial monitor.


Technical Details:

Voltage 2.7V – 12 V
Static Current: < 0.1mA
Logic output 3.3 V / 0 V
Delay time 2s
Lock time 2s (default)
Sensing range <100 °, within 5m
Temperature -20 °C to + 60 °C
Dimension 31.5 x 24 mm

screw-screw 28 mm, M2