Automated Underground Parking
by GeromeVerzele in Circuits > Raspberry Pi
255 Views, 2 Favorites, 0 Comments
Automated Underground Parking
Hello everyone I'm Gerome Verzele and I go to school at Howest in Kortrijk where I study MCT. For my final project I made a Smart underground parking system. I have had my drivers license for a year now and I already encountered a lot of trouble finding a parking spot when I went out.
For my project I chose to make a car park for exclusive cars where you only get in when you pay a monthly subscription. For my project I used 4 sensors and 1 actuator where I will tell you more about it later on in the story.
Matrials
Here I will list all the components i used to execute my project
Raspberry pi 4 B 4GB + power supply:
I use my raspberry as a web server a database and to capture my data from my sensors and put it in my database
Round Force Sensor (FSR402);
I use the pressure sensor to determine if there is a car parked in a parking spot. When there is a certain pressure on the sensor the sensor puts out a analog value from that i see if there is something there or not
MCP3008:
Is a low cost 8-channel 10-bit analog to digital converter. With 8 channels you can read quite a few analog signals from the Pi.
3 Greend LED 5mm:
The green LED shows if a spot is available or not. When the green LED is turned on the parking spot is free.
3 Red LED 5mm:
The red LED shows if a spot is available or not. When the redLED is turned on the parking spot is not free.
5V 4-Phase Stepper Step Motor 28BYJ-48
this little motor I use to raise or lower my barrier to give access to the car that wants to park.
Infrared Beam Detector - 5mm LEDs
The IR is used to raise the barrier when a car leaves the garage.
RFID-RC522 NFC Kit MFRC522
Radio Frequency Identification (RFID) is the wireless non-contact use of radio frequency waves to transfer data. Tagging items with RFID tags allows users to automatically and uniquely identify and track inventory and assets. This gives me the possibility to check if the car is in our database and is able to enter the garage or not.
4 MDF board 50x60x0.6mm
I chose to make my project out of MDF because it’s easy to process and not that heavy to transport.
I2C 16x2 Arduino LCD display module
A LCD to display my IP for my site and my to show if you are allowed into the parking or not
Schematics
The first thing I did was make a schematic of my build to see how I had to connect everything to make it work. I used a program called frizting for that. This gave me a really good start so I didn't have to look up all the different data sheets of every component so I really recommend doing this before starting your project.
Setup Raspberry Pi
For this project you’ll have to prepare your raspberry pi from certain software and programmes i will help you through these steps
installing the raspberry pi OS
https://www.raspberrypi.org/software/operating-sys...
Here you will chose the Raspberry Pi OS with desktop and recommended software this will download in a zip when it is done downloading unzip it and write it to your SD card to put into your raspberry pi this will take 20-30 min
Pairing RasPi
Boot your RasPi. Connect the RasPi to your computer by means of a network cable and make an SSH connection in Putty for the user pi with the password Raspberry.
expand file system
After logging in, type sudo raspi-config.
In the menu, choose (6) Advanced > (1) Expand Filesystem ⚠ REBOOT the Raspi
WIFI connection
sudo -i to get administrator rights
wpa_passphrase >> /etc/wpa_supplicant/wpa_supplicant.conf Replace here with the name of your home network and with the corresponding password.
wpa_cli -i wlan0 reconfigure to reload your wireless network card in the RasPi.
wget www.google.com to see if the wireless internet is working.
apache
install apt install apache2 -y to download apache as webserver
MariaDB Install
apt install mariadb-server mariadb-client -y to install MariaDB, the fork of MySQL
MariaDB Create user
After this we configure the user student with password password on the MariaDB server
mysql -u root -p to access the MariaDB server
grant all on *.* to 'student'@'localhost' identified by 'password'; grant grant option on *.* to 'student'@'localhost';
Creates a new user student with password password that gets rights to all databases.
flush privileges Reloads the privileges
exit Leave the MariaDB server
Turn on interfaces
type in putty sudo raspi-config there you will get to a option called interface options turn on
- SPI
- I2C
Database
As a car garage we have to keep a lot of data so my first step was to make a ERD of it. I use MySQL but run it on MariaDB on my raspberry pi
Frontend and Backend Website
Backend
my code is written in Python and I used Socketio for realtime communication.
I used two threads one to read and send the data of my sensors to my database and frontend and one to display my information on my LCD
frontend
My Frontend is based on HTML CSS and Javascript
Building My Caseing
Step one: shopping
For my build i bought:
- 3 250x60x0.6 mdf plate
- 4 hinges
- hobby glue
- douglas wooden pole
Step two: saw
I had to saw a lot of wood in order to have the right size this took a lot of time.
step three: building it
this took a lot of time to put everything together I made a box of 60x50x17.5 i made two peaces one of 7.2 cm for al my cables and raspberry pi. then a storage of 10 cm for my cars to park