Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO-Based Automated Toll Booth with RFID and GSM Notification

View and Edit Project In Cirkit DesignerImage of Arduino UNO-Based Automated Toll Booth with RFID and GSM Notification

Circuit Documentation

Summary

This circuit is designed to function as a toll booth system. It utilizes an Arduino UNO as the main microcontroller to manage various sensors and actuators, including an RFID reader, ultrasonic sensor, IR sensor, servo motor, LCD display, and a GSM module for communication. The system detects vehicles, reads RFID cards for toll payment, and sends SMS notifications upon successful transactions.

Component List

  1. Arduino UNO

    • Description: Main microcontroller for the circuit.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. HC-SR04 Ultrasonic Sensor

    • Description: Used to detect the presence of a vehicle.
    • Pins: VCC, TRIG, ECHO, GND
  3. IR Sensor

    • Description: Used to detect the presence of a vehicle at the gate.
    • Pins: out, gnd, vcc
  4. Micro Servo 9G

    • Description: Controls the gate mechanism.
    • Pins: GND, +5V, PWM
  5. 16X2 LCD

    • Description: Displays messages to the user.
    • Pins: VSS, VDD, V0, RS, RW, E, D1, D0, D2, D3, D4, D6, D5, D7, A, K
  6. I2C Module

    • Description: Interface for the LCD display.
    • Pins: SCL, SDA, VCC, GND
  7. SIM900A

    • Description: GSM module for sending SMS notifications.
    • Pins: GND, DB9-3 (RXD), DB9-2 (TXD), 5V, 3VR, 5VR, 3VT, 5VT, VCC, Ring, RESTART, RESET, STATUS
  8. Electrolytic Capacitor

    • Description: Provides power stabilization.
    • Pins: -, +
    • Properties: Capacitance: 0.000001 Farads
  9. RFID-RC522

    • Description: RFID reader for card detection.
    • Pins: VCC (3.3V), RST, GND, IRQ, MISO, MOSI, SCK, SDA
  10. 5V Battery

    • Description: Power source for the circuit.
    • Pins: positive, negative
  11. Pushbutton

    • Description: Used to confirm payment.
    • Pins: Pin 2, Pin 1, Pin 3, Pin 4
  12. Resistor

    • Description: Used for current limiting.
    • Pins: pin1, pin2
    • Properties: Resistance: 200 Ohms

Wiring Details

Arduino UNO

HC-SR04 Ultrasonic Sensor

IR Sensor

Micro Servo 9G

I2C Module

SIM900A

Electrolytic Capacitor

RFID-RC522

5V Battery

Pushbutton

Resistor

Documented Code

Main Arduino UNO Code

#include <SPI.h>
#include <MFRC522.h>
#include <Servo.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>

#define RST_PIN 9
#define SS_PIN 10
#define TRIG_PIN 6
#define ECHO_PIN 7
#define IR_PIN 4
#define SERVO_PIN 5
#define BUTTON_PIN 2
#define GSM_TX 3
#define GSM_RX 2

MFRC522 mfrc522(SS_PIN, RST_PIN);
Servo gateServo;
LiquidCrystal_I2C lcd(0x27, 16, 2);
SoftwareSerial gsm(GSM_RX, GSM_TX);

SoftwareSerial serialComm(3, 4);  // RX, TX for communication with second Arduino

// Predefined RFID Cards and Balances
struct RFIDCard {
  String uid;
  int balance;
};

RFIDCard rfidCards[] = {
  {"F3E45216", 200},
  {"A1B2C3D4", 100}
};
const int tollFee = 50;

void setup() {
  Serial.begin(9600);
  SPI.begin();
  mfrc522.PCD_Init();

  lcd.init();
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("Toll Booth Ready");

  pinMode(TRIG_PIN, OUTPUT);
  pinMode(ECHO_PIN, INPUT);
  pinMode(IR_PIN, INPUT);
  pinMode(BUTTON_PIN, INPUT_PULLUP);

  gateServo.attach(SERVO_PIN);
  gateServo.write(0);

  gsm.begin(115200);
  serialComm.begin(9600);