The Idea
Hello!
This project is based on some car parkings, which is, an indication if the local is free or occupied, so for the simulation, I'm going to use two ultrasonic sensors, simulating two parking spots, two RGB LEDs, indicating if is occupied or not, and an I2C LCD display to show informations with images.
Thinking on that, I want to make a simple project to show this simulation and I hope I'm helping someone who was trying to do, but wasn't with any idea of how to.
Currently, the problem of finding parking in shopping malls or large parking structures is a headache for all drivers. This project was thus developed to simulate a Smart Parking System that provides real-time updates on parking space availability.
In this simulation kit, I chose to use two Ultrasonic Sensors to detect objects in each parking spot. Status is displayed via an RGB LED (green/red), and a summary is shown on an LCD screen connected via the I2C protocol for aesthetic appeal and ease of use. This approach can be practically applied in Smart City systems or modern parking facilities.
Engineering Solutions
The first idea is to make a small, simple and functional project, so I'm not going to use too much wires, components, etc. Instead of using two red LEDs and two green LEDs, I'm going to use only two RGB LEDs, using only red and green lights from it. Here I'm using I2C LCD Display to show the images, because it just need four wires and doesn't use any digital port.
The core of this project is "Simplicity with Efficiency," featuring the following interesting engineering details:
- GPIO Management and Display: Instead of using a parallel LCD that requires many wires, I opted for an I2C LCD Display, which uses only two signal wires (SDA and SCL). This significantly saves Digital Port pins on the Arduino board and results in cleaner wire management.
- Status Indicator Light Selection: Instead of using four separate red and green LEDs, I chose to use only two RGB LEDs, controlling color mixing to display only red (when a car is parked) and green (when a spot is free). This method reduces circuit board space and gives the device a more modern look.
- Custom UI: To allow users to immediately understand the status, I designed Custom Characters (special characters) to display simulated status images on the LCD screen. This was done using a design tool like Custom Character Generator, which makes the interface look more professional than using ordinary English characters.
- Sensor and Distance Processing: I opted for a specialized Library like Ultrasonic.h to manage the Echo and Trigger signals. This makes writing code for distance measurement more accurate and stable.
System Logic Analysis
The system's operation is structured as a continuous loop (Continuous Polling) that constantly checks status. The operational steps are as follows:
- Threshold Sensing: The program sends out sound waves and measures the time for the echo to return to calculate the distance (in centimeters). A threshold is set (e.g., if the distance is less than 10-20 cm, it's considered occupied).
- Decision Making:
- Case: Occupied: When the sensor detects an object within the defined range, the system instructs the pin connected to the Red Component of the RGB LED to light up. It also sends a command to the LCD screen to display a "car" icon or the text "OCCUPIED" in that parking spot's position.
- Case: Free: If no object is detected, the system instructs the Green Component of the RGB LED to light up and changes the display on the screen to an empty symbol or the word "FREE".
- Display Refresh: The system rapidly loops through checking both parking spots alternately, making the display on the screen and the LED lights respond to changes almost instantaneously (Real-time update).
Project Working
Here is the video of the project working:
From testing, the system accurately distinguishes between free and occupied parking spots. The RGB LED changes color correctly according to the conditions, and the I2C LCD clearly displays summary information, even with only a few wires.
I hope this project serves as a useful idea and guideline for those beginning to learn Arduino or looking for a simple Smart Parking system prototype to build upon!