Skip to content

janKonicek/parking-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smart Parking System with Ultrasonic Sensors

Team Members

  • Jan Koníček - Responsible for programming sensor.vhd, display.vhd, top_level.vhd
  • Marek Klvaňa - Responsible for programming distance.vhd
  • Martin Koplík - Responsible for programming led.vhd, and helped with video recording.
  • Vojtěch Larva - Responsible for readme, and helped with programming

Theoretical Description and Explanation

A Smart Parking System is designed to identify the presence or absence of an object in a designated space, simulating a parking slot. It uses an ultrasonic sensor to measure the distance between the sensor and the object. The sensor sends out an ultrasonic wave, which bounces back when it hits an object. By measuring the time it takes for the wave to return, the sensor can calculate the distance to the object.

The Nexys A7 50T FPGA board is used to process the signal from the sensor and determine whether a space is occupied. If the measured distance is less than a certain threshold, the system determines that an object is present. This information can then be displayed on a 7-segment display, which is controlled by the display.vhd component.

The Arduino Uno board is used to supply the 5V power needed by the HC-SR04 ultrasonic sensors, as the Nexys A7 50T FPGA board typically operates at a lower voltage level (around 3.3V).

Hardware Description of Demo Application

This project is implemented using the following hardware components:

  1. Nexys A7 50T FPGA Board: This is a complete, ready-to-use digital circuit development platform based on the latest Artix-7™ Field Programmable Gate Array (FPGA) from Xilinx. This board typically operates at a voltage level of around 3.3V. image

  2. HC-SR04 Ultrasonic Sensor: This is a commonly used sensor for distance measurement. It provides 2cm - 400cm non-contact measurement functionality with an accuracy of up to 3mm. The sensor includes an ultrasonic transmitter, a receiver, and a control circuit.

image image

The Nexys A7 board is used to implement the VHDL code for the Smart Parking System, and the HC-SR04 sensor is used to measure the distance to the nearest object, which is used to determine whether a parking space is occupied.

  1. Arduino Uno: This is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, and a power jack. It contains everything needed to support the microcontroller. It can be easily connected to a computer with a USB cable or powered by an AC-to-DC adapter or battery. In this project, the Arduino Uno is used to supply the 5V power needed by the HC-SR04 ultrasonic sensors.

image

Software Description

The software for this project is written in VHDL and consists of several components. Here is a brief description of the main components:

  • bin2seg.vhd: This component decodes binary input into a 7-segment display output for a Common Anode configuration.
  • clock_enable.vhd: This component is a clock divider that generates a pulse every PERIOD clock cycle.
  • display.vhd: This component displays the measured distances from both sensors on a two 4 digit 7-segment display.
  • distance.vhd: This component reads the distance from connected ultrasonic sensor.
  • led.vhd: This component is responsible for assigning the obtained distance to the correct LED.
  • sensor.vhd: This component is responsible for creating trigger signal for ultrasonic sensors.
  • top_level.vhd: This is the top-level component that integrates all the other components.

Schematic

image

Component(s) Simulation

The testbenches for the components are:

  • tb_display.vhd image This simulation shows displaying distance 1 on both 4 digit displays.

  • tb_distance.vhd image This simulation shows decoded signal from sensor.

  • tb_led.vhd image This simulation shows which LED is lit up by the obtained distance.

  • tb_sensor.vhd image This simulation shows 10us trigger.

Instructions

IMG_20240412_102940~2
The Smart Parking System is easy to use, it works when plugged in, and two switches are used to freeze each sensor's measurement.

Video

Video.1.mp4

References

Vivado Design Suite

Nexys A7 reference manual

Ultrasonic sensor datasheet

BPC-DE1 VHDL Course

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •