Skip to main content
Version: FILS English

Smart Dual-Barrier Parking System with NFC and Coin Detection

A smart parking barrier system designed to simulate a realistic automated parking management

Author: Mira Mehdi Bark
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-MiraB8421

:::

Description

This project demonstrates a smart parking barrier system built using the STM32 NUCLEO-U545RE microcontroller. When a vehicle arrives at the entrance, an ultrasonic sensor detects it and opens the entry barrier while registering the vehicle as unpaid.Moreover, at the payment station the driver must scan an NFC tag and insert a coin that is detected by an IR sensor to confirm payment, after which the system updates the vehicle status. At the exit barrier, the NFC tag is scanned again and the system verifies payment if the payment is confirmed, the barrier opens with a green LED and confirmation message on the LCD shows, otherwise the barrier stays closed and a red LED appears, buzzer alerts, and payment is denied.

Motivation

The motivation of this project is to show how a real life parking control works to improve efficiency, security, and automation in everyday services.Also, It provides practical experience in working with hardware components, system integration, and verification logic, making it a valuable learning platform for modern intelligent transportation and smart city applications.

Architecture

This system is built using STM32 NUCLEO-U545RE-Q which coordinates all functions:

  • Vehicle Detection Module: Detects the arrival of a car at the entry gate and sends a signal to the control unit to open the entry barrier that the car is registered as NOT PAID.
  • Payment Processing Module: Manages NFC identification and coin confirmation together before sending payment data to the controller and verifies the two payment methods to change the status in the system as PAID.
  • Exit Verification Module: Checks the vehicle’s payment status using the second NFC scan at the exit gate and if the payment is confirmed or denied.
  • User Notification Module: Displays messages and activates visual and audio alerts depending on payment status.

Schematic diagram

Log

Week 2

  • Worked on the word documentation to be able to implement the idea of the project.

Week 4 - 5

  • Ordered the hardware components for the project

Week 7

  • Started to connect components

Hardware

The system is built around the STM32 NUCLEO-U545RE microcontroller, which acts as the main controller responsible for processing data and coordinating all modules. Two NFC readers are used to scan the vehicle’s NFC tag at the payment and exit stations for verification. Two SG90 servo motors control the opening and closing of the entry and exit barriers, while a LCD display shows system messages such as payment status. A green LED indicates successful payment and access approval, whereas a red LED with a buzzer signals payment denied. An ultrasonic sensor detects vehicle presence at the entrance to open the berrier, and an IR sensor detects coin insertion at the payment station. However, all the coennections are on the breadboard and using jumper wires.

Schematics

Bill of Materials

DeviceUsagePrice
STM32 NUCLEO-U545RE-QThe main microcontroller125 RON
Set of two NFC ReaderCard/User authentication84 RON
Servo MotorBarrier Movement56 RON
LCDDisplay Status Message24 RON
LED KitAccess indicator25 RON
BuzzerWarning sound output19 RON
Jumper WiresComponents connections10 RON
Ultrasonic distance sensorSensor detection37 RON
BreadboardCircuit Prototyping10 RON
IR sensorCoin detection19 RON

Software

LibraryDescriptionUsage
embassy-executorAwait executor optimized for embedded systemsWithout an operating system it runs asynchronous
embassy-embedded-halAsync hardware interface for embedded-halUsed for control of SPI communication like sensors and peripherals
embassy-timeTimekeeping, delays, and timeoutsUsed for timers,delays and timeouts
embassy-syncno-std, no synchronization primitives with async support.Used to create safe communication between tasks
embassy-defmtDebug logging systemUsed for printing debug message fromthe microcontroller
embassy-futuresAsync help utilitiesUsed to mange tasks and futures embedded programs
  1. NFC implementation
  2. Inspriation