Contents
System Overview
Smart bus stops improve public transport experience by providing real-time information and reducing perceived wait times.
Features:
- Real-time bus arrival times
- Route information display
- Passenger count monitoring
- Emergency button
- USB charging ports
- WiFi hotspot
- Digital advertising
Hardware Components
- Raspberry Pi 4: Main controller
- E-Ink Display (7.8"): Low-power display
- 4G/LTE Module: Internet connectivity
- PIR Sensor: Passenger detection
- Camera (optional): People counting
- Solar Panel: 50W with battery
Display System
# Display bus arrivals
from waveshare_epd import epd7in8_HD
epd = epd7in8_HD.EPD()
epd.init()
# Fetch arrival data
arrivals = get_bus_arrivals(stop_id="STOP_001")
# Render display
epd.display(epd.getbuffer(arrivals_image))
def get_bus_arrivals(stop_id):
response = requests.get(
f"https://api.transit.com/arrivals?stop={stop_id}"
)
return response.json()
Bus Tracking
Integration with transit APIs:
- GTFS-Realtime: Standard transit feed
- NextBus API: Common in North America
- TfL API: London transport
- Custom MQTT: Private fleet tracking
Passenger Counting
# People counting with PIR
import RPi.GPIO as GPIO
PIR_PIN = 17
passenger_count = 0
GPIO.setup(PIR_PIN, GPIO.IN)
def count_passengers():
global passenger_count
if GPIO.input(PIR_PIN):
passenger_count += 1
publish_count(passenger_count)
# Publish to cloud
def publish_count(count):
mqtt_client.publish("busstop/passengers", count)
Mobile Integration
Mobile app features:
- Real-time arrivals at saved stops
- Service alerts & delays
- Crowding information
- Trip planning
- Report issues at stop
Power Options:
- Grid Power: Most reliable
- Solar: Remote locations
- Battery Backup: 24-48 hours
- Low Power Mode: Night dimming
Next Steps
- Add interactive touch screen
- Implement voice announcements
- Add air quality monitoring
- Integrate with ride-sharing
Related: Smart Traffic | Smart Parking