กลับไปหน้ารวมไฟล์
bluetooth-traffic-signal-24219e-en.md

Interactive Logistics: Bluetooth-Controlled Traffic Management

Modern city infrastructure is becoming increasingly "smart," allowing for real-time traffic adjustments through remote control. This project shrinks that concept down to a tabletop model, using the Arduino Uno and the HC-05 Bluetooth Module to allow a user to manually control a three-stage traffic signal from their smartphone.

The HC-05 Serial Link: Hardware Logic

The HC-05 acts as a "Serial Bridge" between your phone and the Arduino:

  1. Pairing and Pairing: The module operates on the Bluetooth SPP (Serial Port Profile). Once paired with an Android device, any data sent from the mobile app is received by the HC-05 and passed to the Arduino's RX (Receive) pin.
  2. Logic Level Conversions: While the HC-05 typically requires 5V for power, its logic pins (TX/RX) are sensitive. This project demonstrates the wiring necessary to ensure stable communication between the 5V Arduino and the module.
  3. App Integration: Using the ARDUINO CAR app, the user can map specific buttons (like Forward, Backward, or Custom buttons) to send specific ASCII characters (e.g., 'R', 'G', 'Y') to the board.

Decoding Control Signals in Real-Time

The Arduino code runs a non-blocking serialEvent() or Serial.available() check in the main loop:

  • Red Stage ('R'): When the Arduino receives the character 'R', it sets Pin 13 to HIGH and pins 12/11 to LOW.
  • Yellow Stage ('Y'): The 'Y' character triggers Pin 12, signaling for a "slow down" or "prepare" phase.
  • Green Stage ('G'): Sending 'G' opens the traffic flow by activating Pin 11.
  • Safety Override: The code is designed to ensure that no two lights can be on at the same time, preventing "illegal signal" states that would cause confusion in a real-world scenario.

Educational Modeling and Future Upgrades

This project is a perfect entry point for learning about IoT (Internet of Things) and wireless communication. It can be easily expanded by adding realistic plastic signal housings or integrating multiple signals that communicate with each other to automate a complex four-way intersection.

HELLO EVERYONE.THIS IS A BLUETOOTH CONTROLLED TRAFFIC SIGNAL.IT HAS AN HC O5 BLUETOOTH MODULE AND A GREEN, RED, YELLOW LED.IT IS CONTROLLED BY A BLUETOOTH CAR APP KNOWN AS ARDUINO CAR.YOU CAN DOWNLOAD IT ON PLAY STORE.I JUST CHANGED THE RECOGNITION CODE OF THE BUTTONS ACCORDING TO MY ARDUINO CODE.I HAVE MADE IT ON A BREADBORD. RED LED POSITIVE TO PIN 13 OF UNO, AND YELLOW LED POSITIVE TO PIN 12 AND GREEN LED POSITIVE TO PIN 11. HC O5 TX RX TO TX RX OF UNO.HC O5 POSITIVE TO 5 V PIN AND GND TO GND PIN OF UNO.

YOU CAN DOWNLOAD ARDUINO CAR HERE. IF YOU HAVE SEEN MY LAST PROJECT AT THIS LINK THEN YOU ALREADY KNOW HOW TO DOWNLOAD ARDUINO IDE.

ข้อมูล Frontmatter ดั้งเดิม

title: "Bluetooth traffic signal"
description: "Control cars with a touch of your finger"
author: "HINDOLROY"
category: ""
tags:
  - "lights"
  - "bt"
  - "leds and lighting"
  - "remote control"
  - "internet of things"
views: 1710
likes: 1
price: 1120
difficulty: "Intermediate"
components:
  - "1x 5 mm LED: Green"
  - "1x 5 mm LED: Red"
  - "1x HC-05 Bluetooth Module"
  - "1x Android device"
  - "1x 5 mm LED: Yellow"
  - "1x Jumper wires (generic)"
  - "1x Arduino UNO"
  - "1x Breadboard (generic)"
tools: []
apps:
  - "1x ARDUINO CAR"
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "c219b7dc054927d15628640eb8571b8911f30627476eeffd29fd44d689987fcc"
encryptedPayload: "U2FsdGVkX19+nXV7cb1ZAC7U2LW8Bio+CRs1JSeTB94vxWWA0eANv/TiIGFuiX2JLATFDJ1fAFeKKLRs0pgvxfVdiLw/t3lk/t17Bsh73p2GQlV4vvGivt1mH6sOtVXE"
seoDescription: "Build a Bluetooth traffic signal project to control cars with a touch. Simple Arduino tutorial for beginners."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/bluetooth-traffic-signal-24219e_cover.jpg"
lang: "en"