GOUTAM CEP Microcnotroller
GOUTAM CEP Microcnotroller
GOUTAM CEP Microcnotroller
Page 1
Microcontroller and embedded system
2 INTRODUCTION
3 COMPONENTS REQUIREMENT
COMPONENTS LIST
COMPONENTS DESCRIPTION
4 SYSTEM IMPLEMENTATION
WORKING PRINCIPLE
SOFTWARE USED
Page 2
CODE
CIRCUIT DIAGRAM
5 CONCLUSION
APPLICATIONS
6 REFERENCES
OBJECTIVE
Design a traffic light signal containing Interfacing and operation of
seven segment display (down counter) starting from 15 seconds to
allow and forbid the flow of traffic through an 8051 microcontroller.
INTRODUCTION
Traffic lights are essential components of any modern transportation
system, enabling the safe and efficient flow of vehicular and
pedestrian traffic. A traffic signal typically uses a combination of
Page 3
Microcontroller and embedded system
The traffic light signal consists of three lights, namely red, yellow,
and green. Each light is connected to a relay, which is controlled by
the microcontroller. The red light is turned on when the countdown
reaches 0, indicating that traffic should stop. The yellow light is
turned on for a few seconds, indicating that traffic should prepare to
stop. Finally, the green light is turned on, indicating that traffic can
proceed.
Page 4
Overall, the design of a traffic light signal using a down counter and
seven-segment display involves the integration of several
components, including an 8051 microcontroller, relays, and LEDs.
Proper interfacing and operation of these components are critical to
ensure the safe and efficient flow of traffic through an intersection.
COMPONENTS REQUIREMENT
8051 microcontroller
LEDs
9v battery
Ground wire
Page 5
Microcontroller and embedded system
COMPONENTS DESCRIPTION
1) 8051 microcontroller:
3) LEDs:
Red led:
The red light is turned on when the countdown reaches 0, indicating that
traffic should stop.
Yellow led:
The yellow light is turned on for a few seconds, indicating that traffic
should prepare to stop.
Green led:
The green light is turned on, indicating that traffic can proceed.
Page 6
4) 9v battery:
5) Ground wire:
Working principle:
The working principle of the traffic light signal involves the use of a
down counter to count down the time for each signal, a seven-
segment display to display the countdown time, and an 8051
microcontroller to interface with both the down counter and the
seven-segment display. The microcontroller receives input from the
down counter and changes the signal by switching on/off the
appropriate lights at the appropriate times.
Software used:
Proteus:
Page 7
Microcontroller and embedded system
AVR:
CODE:
Page 8
delay(12000); // Delay for 12 seconds
red_signal = 0; // Turn off red signal
}
}
// Function to create a delay
void delay(unsigned int count) {
unsigned int i, j;
for(i=0; i<count; i++)
for(j=0; j<100; j++);
}
Circuit diagram:
Page 9
Microcontroller and embedded system
CONCLUSION
Applications:
Intersection control:
Traffic lights are used at intersections to control the flow of traffic, allowing
vehicles to pass through the intersection safely and efficiently. The signals
indicate when it is safe for vehicles to proceed, and when they should stop.
Page 10
Pedestrian safety: Traffic lights are also used to provide safe crossings for
pedestrians. They help to regulate pedestrian traffic, allowing them to cross
busy roads without endangering their lives.
Emergency vehicle management:
Traffic lights are used to control the flow of emergency vehicles, such as
ambulances, fire trucks, and police cars, through intersections. They ensure
that emergency vehicles can reach their destination quickly and safely.
Transit priority:
Traffic lights can be programmed to give priority to buses or other forms of
public transportation, ensuring that they can travel quickly and efficiently
through busy areas.
References:
https://www.electronics-tutorials.ws/blog/7-segment-display-tutorial.html
https://chat.openai.com/chat/0cbfbcb5-63a5-4c9d-8548-d74a4c2a33b8
https://www.circuitstoday.com/interfacing-seven-segment-display-to-8051
Page 11
Microcontroller and embedded system
Page 12