Automatic Zebra Crossing Using Raspberry PI
Automatic Zebra Crossing Using Raspberry PI
S. T. Chaus3
Associate Professor
Department of Telecommunication
Engineering College, NMCOE, Peth, India
LEDs, or light-emitting diodes, are semiconductor light The Raspberry PI Raspberry Pi (/paɪ/) is a series of
sources that shine when current flows through them. They small single-board computers (SBCs) developed in
hold numerous advantages over traditional incandescent light the United Kingdom by the Raspberry Pi Foundation in
sources: they consume less power, last longer, are more association with Broadcom. A Raspberry Pi Zero with
durable, smaller in size, and switch faster. In this project, we smaller size and reduced input/output (I/O) and general-
employ LEDs as traffic signals for drivers and pedestrians purpose input/output (GPIO) capabilities was released in
alike. Red LEDs command a stop, while green LED. The November 2015 for $5 USD.
emitted light color depends on the energy electrons need to
traverse the semiconductor's band gap. To create white light, LCD
we can use multiple semiconductors or a phosphor layer on
the semiconductor device.
BO Motor
A. Methodology
Creating an automatic zebra crossing project using
Raspberry PIand time display involves building a system that
detects traffic signals, controls the opening and closing of
gates, and implements an automatic mechanism to guide
pedestrians safely across the road. Below is a general
methodology to get you started:
Components Needed :-
Raspberry PI board
Traffic signal module (to detect the red light)
Servo motors (to control the gates)
Fig 7 Motor Diver LED display module (for time display)
Breadboard and jumper wires
Motor drivers serve a vital function in many motor- Power supply (battery or adapter)
related projects. They amplify control and power, ensuring Step-by-Step Methodology:
effective motor movement control. Acting as a bridge
between the microcontroller or control system and the motor, Setup Hardware:
they transform low-power signals into high-power outputs. Connect the Raspberry PI to your computer and install
Motor drivers come with speed and direction control, current the Raspberry software. Assemble the hardware components
sensing, and protection features such as overcurrent and on the breadboard and connect them to the Raspberry PI
overtemperature. They vary in type, including brushed DC, according to their specifications and pin configurations.
brushless DC, and stepper motor drivers, each crafted for
specific motor needs. Robotics, automation, and automotive Traffic Signal Detection:
industries rely on motor drivers for their high precision in Interface the traffic signal module with the Raspberry PI
motor control and energy efficiency, which are essential for to detect the red light. Use digital inputs to read the state of
the success of their projects. the traffic signal (e.g., red light).
Adapter 12 V Control Gates with Servo Motors:
Connect servo motors to the gates on both sides of the
zebra crossing. Write code to control the servo motors to open
and close the gates.
Assign Pins for the Servo Motors and Sensors. For Step 9: Open the Gates
example:
Deactivate the servo motors to open the gates and allow
Gate 1 servo: Pin 2 pedestrians to cross.
Gate 2 servo: Pin 3 Set the positions of the servo motors to open the gates.
Traffic signal sensor: Pin 4
Pedestrian presence sensor: Pin 5 Step 10: Wait for Pedestrian Clearance
Step 3: Initialize Libraries Continue monitoring the input from the pedestrian
Include the necessary libraries for servo motor control presence sensor.
and sensor input/output. If no pedestrians are detected, proceed to the next step.
Otherwise, continue looping.
Step 4: Set Up the Initial Configuration
Step 11: Close the Gates Again
Set the initial positions of the servo motors to keep the
gates open. Activate the servo motors to close the gates and prevent
Configure the sensor inputs and outputs. more pedestrians from crossing.
Set the positions of the servo motors to close the gates.
Step 5: Implement the Loop
In the main loop of your Raspberry PI code, Step 12: Repeat the Process
continuously check the status of the traffic signal and the
presence of pedestrians.
Return to Step 6 and continue the loop to monitor the
traffic signal and pedestrian presence.
Step 6: Check Traffic Signal Status
Block Diagram
Read the input from the traffic signal sensor.
Future Enhancement
Fig 11 LCD Indicating Time to Stop Pedestrian Fig 14 LCD show Time Remaining for
Pedestrian to Cross Road.
V. CONCLUSION
REFERENCES