Controlling traffic today becomes a major problem due to the rapid increase of cars and also due to the large delays in the time between traffic lights. The main heart of this traffic system is the microcontroller. The infrared sensors are connected to the PORT C (PC0, PC1, PC2 and PC3) of the microcontroller and the traffic lights are connected to PORT B and PORT D. If there is traffic on the road, that particular output of the sensor becomes logic 0 otherwise logic 1. When receiving these IR sensor outputs, we must write the program to control the traffic system.
If you receive logic 0 from any of these sensors, we must give the green signal to that particular route and give a red signal to all other paths. Here we continually have to monitor IR sensors to verify traffic.
Circuit diagram of the traffic signal system based on density:
This circuit consists of 4 IR sensors, atmega8 microcontroller, 4 traffic lights. The IR transmitter looks like an LED. This IR transmitter always emits IR rays from it. The operating voltage of this IR transmitter is 2 to 3v. These IR (infrared) rays are invisible to the human eye. But we can see these infrared rays through the camera.
The IR receiver receives IR rays that are transmitted by the IR transmitter. Usually, the IR receiver has a high resistance in the order of megohms, when it receives IR rays, the resistance is very low. The operating voltage of the IR receiver is also 2 to 3V.