Parking Range Sensor

by edPKIEEE in Circuits > Sensors

188 Views, 2 Favorites, 0 Comments

Parking Range Sensor

Project.jpg

This a simple project that will be easy to complete and require few materials.

The code is simple and can be adjusted as will be discussed.

In the prototype model shown in the photos you see two red LED's however in your project you can choose your colors. IEEE kits will come with a red and green LED.

Code is provided in the below steps

Supplies

Perforated board, two LED's, two 330ohm resistors, an HC-SR04 ultrasonic sensor, wires, an Arduino nano, power supply.

Step 1: Soldering Connections and Layout

soldering.png
layout.jpg

The photo shown above is the required connections that must be made between the parts on the on the perf board, however the way you choose to do that is up to you.

The following will only be a suggestion for laying out the parts and soldering them together, as long as all of the connections are soldered somehow the parts can be arranged differently based on preference.

In this example lay the Arduino Nano in the center of the board and set the range sensor on one side of the nano and the LED's on the other side. A 330 ohm resistor must be connected in series to each LED between the LED and Nano board.

Above is a photo of the connection that need to be made and an example part layout.

Step 2: Notes About Soldering

IMG_0797(1).jpg
layout.jpg

In general you only need to worry about making the right connections on the board with the exception of the LED's. Those have a polarity and need to be soldered a certain way.

The long end of the LED of the positive side and must be soldered to the resistor as shown, the negative or short lead of the LED must be soldered to ground.

In the above images is a sample of how all of the soldering connections could be made.

Step 3: Setting Up the Arduino IDE

error solution IEEE project.png
setup board.png

Once you've gotten the Arduino IDE installed on your computer you will need to change some option in the IDE so that the code will execute properly.

1) Set the board type in the IDE to the Arduino Nano, as shown in the above image

2) Because the Arduino is an old board you'll need to follow the instruction set 1 in the above left image to insure the code will execute and download to the board correctly.

Step 4: Programming the Board

code1.png
code2.png

Since empty space is important in the Arduino IDE its not wise to copy and paste code as unseen bugs could occur as a result. Therefore an image of the code is provided below, its important that it is typed out carefully exactly the same.

Project Overview and Function

redDemo.jpg
GreenDemo.jpg

The parking sensor is a project designed for students at the University of Nebraska at Omaha to complete easily.

There are just 7 components in the project, 1) Arduino UNO 2) Ultrasonic Range Sensor 3) A red LED and a Blue or Green LED 4) two 330 ohm resistors 5) Prototype perforated Board 6) power cord 7) power brick adapter

When the parking sensor is placed in your garage the red LED will light up when an object is too far away. You will know when your vehicle is parked close to the parking sensor when the green or blue LED lights up notifying you that your vehicle is 6 inches or closer to the parking sensor.

The above images demonstrate this.