scale model of the concept
The logic behind this project concept is fairly simple but it'll require a bit of work to make it completely fail safe and reliable.
Check out this video link to get the gist of the project:
Keep in Mind
Here are few essential things which were considered and kept in mind while designing and implementing this concept.
- An override button which could be used in case the sensor fails or when falsely triggered.
- In actual application an array of PIR (3 in this case) can be used, which could be arranged in a vertical strip such as to cover the average height of an human being. So whenever a person stands in front of the sensor's post, his presence is only accounted when all these three PIR sensors are in their HIGH state. This is done in order to prevent any accidental triggering (since PIR sensor could be triggered even by animals and sunlight which are sources of IR radiation).
- Even if all these sensors are in their HIGH state, human presence is only accounted whenever the sensor remains HIGH for a said period of time (30 seconds in this case).
- Once the Microcontroller detects the presence of a person, it acknowledges the presence with an LED light and a buzzer beep (for blind people). This is done so that the person knows that the sensors are working and have picked up his presence. In case the sensor fails, the person can simply push a button placed upon the console which also responds with LED and buzzer sound.
- After the availability of people is detected, the signal across the road will turn RED only after a small period of time (45 s in here, but can range from few minutes for the real world application). This is to counter the situation that may arise In case there is an ever present flow of pedestrian, the sensor will continuously be triggered, but the road signal can't always be maintained to RED. The delay period allows the smooth passage of the vehicles at the same time will prioritize the pedestrians.
- When the road signal turns RED (wait 5 s) the pedestrian side turns GREEN (with a continuous beeping sound indicating its safe to cross), and a countdown is initiated, which is displayed across a DUAL 7-seg display. After the countdown stops it waits for few seconds (5 s) and turns the pedestrian signal to RED (long beep sound), and again after a very small delay (2 s) the road signal turns to GREEN. This whole process is kept inside a loop where the sensor is reset after every complete execution. The small delay periods in between are included as a safety feature.
- The whole system could be converted to an IoT system, where the real time traffic status and working conditions of the system could be accessed or even a secure server could be added for remote override.
To Make a Prototype
For making a small scale prototype like I have, you'll need to get familiar with terminologies like Deboucing of Button, multiplexing of 7 seg, and on how to delay PIR sensor module output.
Cover the PIR sensor with a small PVC for minimizing and concentrating the field of sensor, paint it in black to absorb radiation and reduce noise.
Here I've only implemented one sensor to work with, but you can use the 3 sensor configuration by using an 7411 TRIPLE 3-Input AND GATE IC.
Tinker around with the assigned Delay period in the Code as per your desire.
Since the Arduino expects for a continuous movement, even if the sensor is HIGH it will be turned to LOW if the source IR signature remains ideal, in this case wave your hand over the sensor for about 30 seconds (this is to further eliminates noises from sunlight and other sources).
The circuitry for each components is available on the net. PFA Arduino Code.