Advertisement

Friday, October 23, 2026

 Here is your complete, step-by-step physical assembly and exact wire connection guide to build your smart parking and toll gate system using the components you have.

Phase 1: Power & Breadboard Preparation

Before wiring individual modules, set up your power rails on the breadboard:

 * Run a jumper wire from the Arduino 5V pin to the Red (+) power rail on your breadboard.

 * Run a jumper wire from the Arduino GND pin to the Blue/Black (-) ground rail on your breadboard.

Phase 2: Exact Pin-by-Pin Wiring Guide

Connect each component using your jumper wires following this exact table:

| Component & Pin Name | Wire Color Suggestion | Connects To (Arduino Pin / Rail) |

|---|---|---|

| 1. IR Obstacle Sensor | | |

| • VCC | Red | Breadboard 5V (+) Rail |

| • GND | Black/Blue | Breadboard GND (-) Rail |

| • OUT (Digital Out) | Yellow | Arduino Digital Pin 2 |

| 2. SG90 Servo Motor | | |

| • VCC (Center / Red) | Red | Breadboard 5V (+) Rail |

| • GND (Brown / Black) | Black | Breadboard GND (-) Rail |

| • PWM (Orange / Yellow) | Orange | Arduino Digital Pin 6 |

| 3. 16x2 I2C LCD Display | | |

| • VCC | Red | Breadboard 5V (+) Rail |

| • GND | Black | Breadboard GND (-) Rail |

| • SDA | Blue | Arduino Analog Pin A4 |

| • SCL | White | Arduino Analog Pin A5 |

| 4. Active Buzzer | | |

| • Long Pin / + | Purple | Arduino Digital Pin 8 |

| • Short Pin / - | Black | Breadboard GND (-) Rail |

| 5. Status LEDs (Red & Green) | | |

| • Green LED Anode (+ / Long leg) | Green | Arduino Digital Pin 4 (via 220Ω resistor) |

| • Green LED Cathode (- / Short leg) | Black | Breadboard GND (-) Rail |

| • Red LED Anode (+ / Long leg) | Red | Arduino Digital Pin 5 (via 220Ω resistor) |

| • Red LED Cathode (- / Short leg) | Black | Breadboard GND (-) Rail |

| 6. Manual Override Switch | | |

| • Terminal 1 | White | Arduino Digital Pin 3 |

| • Terminal 2 | Black | Breadboard GND (-) Rail |

Phase 3: Physical Structure & Mechanical Assembly

 * The Baseplate Road:

   * Take a piece of black foam board or stiff cardboard (approx. A3 or A4 size).

   * Use white electrical tape to mark out a road lane, a parking bay, and a designated toll booth island.

 * Mounting the Servo Gate (Boom Barrier):

   * Glue your SG90 Servo Motor upright right beside the road using your hot glue gun.

   * Attach a plastic servo horn arm to the motor, and hot-glue a lightweight popsicle stick or wooden coffee stirrer to it to serve as the long barrier gate arm.

   * Position it so that when the servo rotates 90 degrees, the barrier lifts vertically out of the road path.

 * Placing the IR Obstacle Sensor:

   * Mount the IR sensor on a small cardboard pillar right before the barrier gate (about 3–5 cm away). Point the sensor head so it detects oncoming toy cars stopping at the gate.

 * Mounting the Display & Lights:

   * Cut a neat square window in a small cardboard toll house structure to mount your 16x2 I2C LCD display.

   * Mount your Red and Green LEDs on top of the toll house roof or control box to act as traffic signals (Red = Gate Closed, Green = Gate Open).

   * Mount your Push Switch on the side of the toll booth for manual gate control.

Phase 4: Final Testing & Code Upload

 * Double-check all power and ground connections to ensure nothing is short-circuited.

 * Connect your Arduino to your computer via USB.

 * Open the Arduino IDE, paste the Arduino C code provided in the previous step, select your Arduino board and COM port, and click Upload.

 * Test the system by placing a toy car in front of the IR sensor—your LCD should display "Car Detected", the buzzer should beep, the green LED should light up, and the ser

vo motor should swing the barrier open!

No comments:

Test code

 #include <Servo.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> // Initialize I2C LCD (Try 0x3F if 0x27 doesn't w...