Monday, 30 December 2024

Toll Gate Management System

We have implemented a Toll-Gate management system with Arduino. If a car comes in front of the gate (which is detected by ultrasonic sensor), the LED glows and the buzzer sounds. On listening the buzzer sound, the security guard opens the gate using remote control. The motor rotates by 90 degrees, the gate opens and the car passes through. When the car passes through and is no more detected by ultrasonic sensor, the buzzer stops ringing and the gate closes.



A high level diagram for the Toll Gate Management System is given below.


As shown in the diagram above, the Toll Gate Management System consists of following components:

  • Arduino Microcontroller
  • Ultrasonic Sensor
  • Infrared Sensor Receiver
  • Buzzer
  • IR Remote Control
  • Stepper Motor

Let me explain each of the components to you in detail below.

Arduino UNO Microcontroller: We write a CPP program using Arduino IDE and upload it onto the microcontroller. Throughout the entire experiment, the Arduino Microcontroller is connected to the laptop and derives power out of it. We have shown a picture of Arduino UNO microcontroller below, as a reference.


Ultrasonic Sensor (HC-SR04): A reference image of an ultrasonic sensor, which is compatible with Arduino Uno is shown below. You might have to refer to the pin diagram of the ultrasonic sensor in the online manuals. However, for our experiment we have connected the Vcc pin to the Vcc of Arduino Uno. The GND pin is connected to the GND of Arduino Uno. The Echo pin is connected to digital-pin-11 of the Arduino Uno and the Trigger pin is connected to the digital-pin-12 of Arduino Uno.


Passive Buzzer: A reference image of the passive buzzer, which is compatible with Arduino Uno is shown below. The pin diagram of the passive buzzer is available online. However, for our experiment, we have connected the "+" pin of the buzzer to digital-pin-7 of Arduino and the "-" pin of buzzer goes to the GND of Arduino.



Infrared Sensor Receiver (IR Receiver): A reference image of infrared sensor receiver compatible with Arduino Uno is shown below. The pin diagram of the passive buzzer is available online. For our experiment, we have connected the signal pin of the IR receiver to digital-pin-6 of Arduino. The Vcc and GND pin of IR receiver go to the Vcc and GND of Arduino UNO respectively. 

IR Remote Control: A reference image of IR Remote Control compatible with Arduino Uno is shown below. The IR Receiver module shown above, continuously monitor for any signals sent by the remote control. 


Stepper Motor: A reference image of stepper motor compatible with Arduino Uno is shown below. The pin diagram of the stepper motor is available online. For our experiment, the signal pin of the stepper motor is connected to digital-pin-9 of Arduino Uno. 



Here we have explained the way our CPP program works, once all the connections are established and the circuit is complete. The program begins by importing the required header files for stepper motor, ultrasonic sensor, IR receiver and buzzer to function. Then it defines the Arduino Uno pins required for these components to function. The setup and loop functions are the standard functions which we need to implement for our circuit to function based on our requirements. The setup function initializes the servo motor, buzzer and IR receiver. The loop function continuously checks if there is any object in front of the ultrasonic sensor. It also decodes the code sent by remote control. If the code sent by the remote control is 0xFFE01F, the servo motor moves from 25 degrees to 135 degrees, which corresponds to opening of gate for the car. And if the code sent by the remote control is 0xFF906F, the servo motor moves from 135 degrees to 25 degrees which corresponds to closing of the gate after the car passes through. The buzzer starts ringing when the car (the object) is within 30 cm range of the ultrasonic sensor.

The code for the above project can be found at the below location https://gist.github.com/MindstormFan/c7873d6e690a5970fb6cb3e15c1a3ed3



No comments:

Post a Comment