Radar setup

Arduino Speed Radar


In this period of lock down I had some time left for developing some skills. I decided to take advantage of the situation by doing a project I wanted to do for a while. My final aim is to make a Baseball Radar Sensor that record pitch speed accurately.  Before going any further let’s go through some basics and start with a simple ultrasound system to track speed.

 

 

Let’s start the project 

First let’s buy the devices we need for the project. I bought on Amazon the basic starter kit from UNIROI .  It’s a very good kit with all basics modules you need to start with Arduino at affordable price (around 30€). You can do this project to train yourself but it is also a good way to initiate kids to electronics in a funny way.

Required Components

Devices

Arduino Uno

LCD Screen 1602A

Radar HC-SR04

B10K Potentiometer

Cables

USB Cable

Huge amount of wire 

resistance

Radar HC-SR04

Breadboard + 2 Led

Record Distance

First let’s create the system to make our sensor work and record distance!

Take your Arduino, bring a breadboard and of course our sensor. Then follow the figure below to connect Arduino and the HC-SR04. 

scheme_hc-sr04

Be careful , it’s not easy, you have to focus and be sure you connected your wire well.

  • Connect VCC to 5V (blue wire)
  • Trig to pin 9 (red wire)
  • Echo to pin 10 (green wire)
  • Sensor GND to Arduino GND  (yellow wire)

 

code_basic

Afterward connect your Arduino to your computer.

Download the Arduino IDE to easily put instructions into the system.

When it’s done let’s open the IDE and Copy Paste the following  code  in your environment.

Save it then compile it and upload instructions to our Arduino!

Once launched you see orange lights shinning on your Arduino. That means the code is currently being send to your Arduino.

You can now wonder why is there any change. Where are my results?

You have to go back to your Arduino IDE and go on your upper dashboard: Tools -> Serial Monitor .

When you open it you should see your result display on a terminal like that.

Distance_shell

Now you can play with some objects and look at the distance of it. You’ve made your own electronic ruler!

But would you prefer to have it on a LCD Display instead of on your computer. It would be better so let’s make it.

LCD Display

It’s seems easy to “just” add a LCD display to look over the result but you will be surprise by how hard it is on the hardware part.

Follow below instructions to make it work. I recommend you to put directly Dupont wire on the pin of your screen.

LCD Arduino Scheme

Take the LCD screen, the screen should be in front of you. Now start from the left part. You will see upper the screen some indications. Those are the pins that you need to link to the Arduino as below:

  • Connect a GND (the one next to pin 12) to minus on breadboard. (orange wire)
  • VSS to – (GND) (orange wire)
  • VDD to + (5V) (blue wire)

Put Your Potentiometer on your Breadboard.

  • Connect the left branch to – (orange wire)
  • Middle one to VO on your LCD screen (green wire)
  • Right one to + (blue wire)

For the next pin:

  • RS to pin 12 (brown wire)
  • RW to GND (orange wire)
  • E to pin 11 (yellow wire)

Pass the four next pin. Then put:

  • D4 on pin 5 (yellow wire)
  • D5 on pin 4 (red wire)
  • D6 on pin 3 (green wire)
  • D7 on pin 2 (purple wire)

Then we have our last two pin:

  • Anode on 5V (blue wire) 
  • Cathode on GND after putting a resistance 220 Ohm on it (grey wire)

It was hard but we finally have our LCD Screen on!

What about adding some LED to know when the process will start and when it stops now.

LED

For this one it will be easier. If you’ve done it all so far it will be done quickly.

Take two LED on green and one red to make the start and stop. Then build as below:

Final Radar Board

The steps will be the same for both LED (cyan wire):

  • Put the little needle on the GND
  • Add a resistance

For green led link it on pin 7 & red led on pin 8.

I also want to enable back light on my LCD screen to make it shine, so I change the wire from resistance to GND to pin 1 (grey wire).

Now that we have everything let’s build the code!

You can find the code  here . Don’t hesitate to send a message if you have any question about it.

Their is comments to make you understand how it works. You can have a look to understand otherwise let’s play with it!

Radar

As you see in this video we have a fully functional Arduino Speed Radar right now!

You must turn around the potentiometer to find the right lightning of your LCD Screen.

Reach out if you have any questions about the Arduino speed radar project. It will be a pleasure to respond.

If you are interested to do more stay tunes I will come back with other Arduino articles to finish this Baseball Radar Project.

Next step we will look how we can see our data directly in a smartphone app.

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments