In this project, we will explain how to use GreenPAK™ SLG46140V to open and close an automatic door. We used a passive infrared (PIR) HC SR 501 sensor to detect the presence of humans near the boundary/surroundings of a door and then used the GreenPAK to control L298N motor drivers. The proposed design has wide applications in industry, offices, universities, shopping centers, etc.
Below we described steps needed to understand how the solution has been programmed to design the automatic door system. However, if you just want to get the result of programming, download GreenPAK software to view the already completed GreenPAK Design File. Plug the GreenPAK Development Kit to your computer and hit the program to design the solution.
ExplanationIn this design, the PIR sensor detects the presence of a person based on the infrared levels emitted. The output of the PIR sensor is used as an analog input to the GreenPAK, which processes the input and manages signal timing. When the PIR sensor outputs HIGH, the GreenPAK will open the door via the L298N motor driver circuit. If the PIR outputs LOW for more than six seconds, the door is then closed.
A PIR sensor measures the infrared levels radiating from objects in its field of view. The sensor used in this project has a range of about six meters. PIR sensors are able to sense motion and are often used to detect whether a human has moved into or out of the sensor’s range. They are small, inexpensive, low-power, easy to use, and resilient. They are commonly found in appliances and gadgets used in homes and businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR motion" sensors. All objects with a temperature above absolute zero emit heat in the form of radiation that is invisible to human beings because it is in the infrared region. The hotter the object is the more infrared radiation is emitted. The passive term in passive infra-red sensor refers to the fact that PIR sensors don’t generate or radiate any energy for detection purposes. They work by detecting energy given off by other objects.
When a human passes in front of a PIR sensor, it converts their body heat into an output voltage change and this triggers the detection. When an object is detected, the output pin of the PIR sensor has a voltage level of 3.3v. If no object is present it outputs approximately 0v. The PIR sensor is shown in Figure 2.
It has three terminals to connect it with the GreenPAK. The detailed description of each terminal is shown in Table 1.
L298N Motor Driver Module
This dual bidirectional motor driver module multiwatt15 package is based on the very popular L298 Dual H-Bridge Motor Driver IC. This module allows the user to easily and independently control two motors of up to 2A each in both directions. It has a high operating voltage that can be up to 40v. It can drive a two-phase stepper motor, a four-phase stepper motor, or two-phase DC motors. It has a high-capacity filter capacitor and a freewheeling diode that protects devices in the circuit from being damaged by the reverse current of an inductive load, enhancing reliability. It can drive 5v-35v, and its logic level is 5v.
The function that the motor driver performs is shown in Table 2.
The block diagram showing the connections among PIR sensor, the GreenPAK, and the L198N motor driver is shown below.
Clockwise Motor Control
When the PIR sensor senses an object in its range, it outputs HIGH on its OUT pin, which is connected to Pin10 of the GreenPAK. When the voltage on Pin10 rises above 1v, DFF4 is clocked, which passes POR (power-on reset) through to Pin4, which is connected to the clockwise motor that causes the door to open.
The two-second rising edge delay on CNT1/DLY1 and the inverter 2-L0 create a one-shot pulse which resets DFF4 when 2 seconds have elapsed.
Counterclockwise Motor Control
A six-second falling edge delay on the ACMP output is created by CNT0/DLY0. When the output of that delay block falls, the Falling Edge Detector in the P DLY block clocks DFF5, which is connected to another two-second one-shot pulse circuit.
2-bit LUT2 is connected to Pin13 and is used to ensure that both motors are not attempting to operate in opposite directions at the same time. This LUT makes sure that the counterclockwise motor can only run when the clockwise motor is not attempting to run.
Conclusion
In this project, we designed a Passive Infrared Automat Door Control system using the SLG46140V GreenPAK IC as the control unit. The small IC proved capable of performing this task properly and accurately. The GreenPAK was able to implement this solution with several component blocks left unused, which means a designer could add additional functionality to the GreenPAK design if necessary.
Applications
The proposed design can be used for the following applications:
1. In hospitals and scientific labs, automatic doors can be used to secure an area by ensuring that the doors remain shut while reducing the risk of cross-contamination since people won’t need to handle the doors to pass through them.
2. For people in wheelchairs and people with other physical disabilities, automatic doors are a necessity since conventional doors can be difficult to open for people with physical disabilities.
3. Automatic doors can be used in warehouses and other facilities where people frequently have their hands full, contributing to safety and efficiency by making it easier for people to get around.
Hardware Pictures
Comments