🚦 Traffic Monitoring System Circuit Diagram

πŸ“‹ Complete Wiring Table

Component Component Pin NodeMCU Pin GPIO Wire Color
DHT11 Sensor VCC 3V3 - Red
DHT11 Sensor GND GND - Black
DHT11 Sensor DATA D7 GPIO13 Yellow
Buzzer Positive D4 GPIO2 Orange
Buzzer Negative GND - Black
Gas Sensor VCC 3V3 - Red
Gas Sensor GND GND - Black
Gas Sensor DOUT D6 GPIO12 Green
Sound Sensor VCC 3V3 - Red
Sound Sensor GND GND - Black
Sound Sensor DOUT D5 GPIO14 Blue
Red LED Anode (+) D0 GPIO16 Red
Red LED Cathode (-) GND (via 220Ξ©) - Black
Yellow LED Anode (+) D1 GPIO5 Yellow
Yellow LED Cathode (-) GND (via 220Ξ©) - Black
Green LED Anode (+) D2 GPIO4 Green
Green LED Cathode (-) GND (via 220Ξ©) - Black

πŸ”Œ ASCII Circuit Diagram

NodeMCU ESP8266 Breadboard Layout β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”Œβ”€β”€β”€β”€β”€β” β”‚ β”‚ + + + + + + + + + + + β”‚ β”‚ β”‚ USB β”‚ β”‚ β”‚ - - - - - - - - - - - β”‚ β”‚ β””β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β” β”Œβ”€β”€β”€β” β”‚ β”‚ 3V3 ●───────────┼─────────────────┼───DHTβ”œβ”€β”€β”€β”€β”€β”€GASβ”œβ”€β”€β”€β”€β”€β”€β”€β”€ β”‚ GND β—β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β””β”€β”€β”€β”˜ β””β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ D0 ●───────────┼─────────────────┼──[220Ξ©]───>β”œβ”€β”€(RED) β”‚ β”‚ D1 ●───────────┼─────────────────┼──[220Ξ©]───>β”œβ”€β”€(YEL) β”‚ β”‚ D2 ●───────────┼─────────────────┼──[220Ξ©]───>β”œβ”€β”€(GRN) β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ D4 ●───────────┼─────────────────┼──β™ͺ BUZZER β”‚ β”‚ D5 β—β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”Œβ”€β”€β”€β”€β”€β” β”‚ β”‚ D6 ●───────────┼─────────────────┼───SOUNDβ”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ D7 β—β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β””β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Power Distribution: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ 3V3 Rail (Red) β”‚ β”‚ β”œβ”€β”€ DHT11 VCC β”‚ β”‚ β”œβ”€β”€ Gas Sensor VCC β”‚ β”‚ └── Sound Sensor VCC β”‚ β”‚ β”‚ β”‚ GND Rail (Black) β”‚ β”‚ β”œβ”€β”€ DHT11 GND β”‚ β”‚ β”œβ”€β”€ Gas Sensor GND β”‚ β”‚ β”œβ”€β”€ Sound Sensor GND β”‚ β”‚ β”œβ”€β”€ Buzzer GND β”‚ β”‚ β”œβ”€β”€ Red LED Cathode (via 220Ξ© resistor) β”‚ β”‚ β”œβ”€β”€ Yellow LED Cathode (via 220Ξ© resistor) β”‚ β”‚ └── Green LED Cathode (via 220Ξ© resistor) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎨 Breadboard Layout Guide

Power Rails Setup: β€’ Connect NodeMCU 3V3 to positive power rail (red stripe) β€’ Connect NodeMCU GND to negative power rail (blue/black stripe) Component Placement (Left to Right): Row 1-5: DHT11 Temperature & Humidity Sensor Row 10-15: MQ-2 Gas Sensor Row 20-25: Sound Detection Sensor Row 30-35: Traffic Light LEDs (Red, Yellow, Green) Row 40-45: Buzzer Row 50-55: Current Limiting Resistors (220Ξ© x 3)

⚑ Pin Configuration Summary

Input Sensors

D7 (GPIO13) - DHT11 Data Pin

D6 (GPIO12) - Gas Sensor Digital Out

D5 (GPIO14) - Sound Sensor Digital Out

Output Devices

D0 (GPIO16) - Red LED

D1 (GPIO5) - Yellow LED

D2 (GPIO4) - Green LED

D4 (GPIO2) - Buzzer

⚠️ Important Notes:
β€’ Use 220Ξ© resistors for each LED to prevent burnout
β€’ Ensure proper polarity for LEDs (longer leg = positive)
β€’ DHT11 may need a 10kΞ© pull-up resistor on data line
β€’ Double-check all connections before powering on
β€’ Gas sensor needs 24-48 hours warm-up time for accurate readings

πŸ”§ Assembly Steps

  1. Power Setup: Connect 3V3 and GND rails on breadboard
  2. Sensors: Place DHT11, Gas sensor, and Sound sensor
  3. LEDs: Insert LEDs with 220Ξ© resistors in series
  4. Buzzer: Connect buzzer with proper polarity
  5. Wiring: Use jumper wires as per the table above
  6. Testing: Upload code and test each component individually