Car Parking Monitoring System using Arduino and vb.net

(Last Updated On: July 17, 2019)

car parking

Description:

This tutorial is about the Car parking Slots monitoring system using a computer application designed in Visual Basic .net Which is also known as vb.net.  this project is based on the vb.net, Arduino and infrared sensors. Total of six IR sensors are used are used in this car parking project. This car parking area is divided into two parking areas, Parking1 and Parking 2. Each Parking slot has an infrared sensor, which is used for the car detection. Depending on the detection of the car the box next to the slot is checked or unchecked. If the box is checked it means the slot is occupied by a car.

This Tutorial covers

  1. Sensors installation
  2. Circuit diagram
  3. Interfacing
  4. Arduino programming
  5. Computer
  6. application designing and finally
  7. Testing


The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno: https://amzn.to/2tVz1vu
Mega 2560: https://amzn.to/2ze1kdu
Infrared sensor: https://amzn.to/2Cw8Z6x
12v 10A SPDT relay: https://amzn.to/2MThQBK
2n2222 npn transistors: https://amzn.to/2EmXsIb
10k Resistor: https://amzn.to/2KTd6OW
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
female DC power jack socket: https://amzn.to/2KEo1gt
470 uf capacitors: https://amzn.to/2xDCOzf
5×7 cm vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / strip board: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
wire cutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF

Circuit Diagram:

car parking

This is the Complete circuit diagram of the car parking monitoring system. The circuit diagram is designed in cadsoft eagle version 9.1.0. These are the six infrared sensors.  Each infrared sensor represents a Slot.

Vcc of all the infrared sensors are connected together and is connected with the Arduino’s 5v. Similarly, the ground pins of all the infrared sensors are connected together and are connected with the Arduino’s ground. While the out pins of the infrared sensors are connected with

 pin number 4

pin number 5

pin number 6

pin number 7

pin number 8 and

pin number 9


Arduino Programming:

First I started off by defining pins for the infrared sensors. Then I defined 6 variables of the type String with names sensor1 to sensor6. Finally I defined a variable cdata of the type String for storing the complete message.

activates the serial communication, 9600 is the buad rate.

Using the pinmode function set all infrared sensors as input. Pinmode function is a built in function and it takes two arguments as the input, the pin number or pin name and the status which can be input or output.

For monitoring each infrared sensor individually I created 6 functions. So these are the six calling functions.

Computer application Designing and Programming:

car parking

This is how the computer application looks like. In this application we are using only one serial port and only one timer. If you double click on the application form you will get access to the programming.

First I started off by importing the system.io and system.io.ports.

Then I defined  one variable of the type integer which is value1.


Double click on the form and add the code for the Serial port. currently the port name is com19 which is as per my laptop. You can check your Arduino’s port number from the device manager. Change com19 to the number as per your laptop or computer.

Defines a variable s of the type string.

the purpose of this line of code is to store the complete message in variable s. this is the message which is received from Arduino.

then these instructions are used to set the delimiter type which is comma in my case, with the help of comma the entire message will be split in six strings, then each string will be displayed in its corresponding text box, Each textbox represents the infrared sensor.

Data received function, I have used this function in so many projects, and I have already explained  this in very detail. the purpose of this function is to read the serial port and store the data in textbox1.


Watch Video Tutorial:

 

Other Related Project:

IOT based Car Parking System using Arduino and Nodemcu esp8266

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

2 Comments

  1. Hi, can i know what is the problem when the program run it only will loop 3 times after that it stop refreshing the sensor? Thank You.

    1. Once i run the vb program, the program will hang after refreshing few time of sensors, can i know what’s the problem? It can’t keep refresh again and again. It will stop and not running anymore. Thank You.

Leave a Reply