Introduction: Radar Gun

This instructable will show you the steps needed to make a radar gun to detect the speed of an object. This is a fun project that can be used many ways in real life. This is a typical arduino project and it is expected that you know how to run and upload sketches to an arduino, as well as be able to read a schematic and build the circuit from the schematic. This project does use soldering but experience is not necessary for doing this project. This project will take 30 minutes to a couple of hours, depending upon how fast you can solder and build the circuit, but it is well worth the build, which you can use to impress friends and family.

Step 1: Materials

  • Arduino Microcontroller
    • The A B USB cable to attach to computer
  • 2 seven segment led displays
    • I am using LTS-4802BJR-H1 seven segment displays
  • HC-SR04 Ultra sonic sensor
  • Solder
  • Soldering iron
  • Printed board to solder to
  • Wires
  • Resistors
    • 2 resistors between 330 ohm and 1000 ohm. I will be using 560 ohm.

Step 2: The Circuit Design

I recommend to make the circuit first on a bread board so as to test and make sure your equipment works.

1. Plug the HC-SR04 sensor into a bread board and make sure that the pins are not in the same column.

2. Put in your seven segment displays and pay attention to the orientation that is required so that each pin has its own column.

3. Add one of the resistor sides into the common anode with the other side in an unused column.

4. Wire the unused column of the resistor to the 5V line.

5. Repeat steps 2, 3, and 4 for the second seven segment display.

Here is a data sheet on the seven segment displays http://media.digikey.com/pdf/Data%20Sheets/Lite-On...

The seven segment display is a common anode display. Therefore, most of the logic for turning an LED on will be backwards; meaning that setting the pin to high voltage will turn it off and setting it to low will turn the LED on. Also this means that you must have the 5V from the arduino go into the common anode.

Caution: Do not forget to include a current limiting resistor or you will burn out your seven segment display.

Step 3: Soldering to a Printed Board

Warning: the soldering iron is very hot and holding onto a wire for a long time in contact with the iron will still burn you, even if you do not touch the iron or the solder.

Caution: When soldering the seven segment displays, be very careful with the heat exposure from the iron. If too much heat is applied to a pin for too long, you will burn and render useless the seven segment display.

I recommend using flux if possible when soldering as it makes the process much faster and easier. To use flux just apply it to the connections.

1. Put solder on the printed board where connections will be made.

  • Doing this before actually soldering in the wires and parts makes it easier to make sure your connections are going to be made and allows you to lay out the circuit on the board before you start adding in the components.
  • This also will allow you to get practice at globbing and getting used to how the solder will react with the iron.
  • This strategy may not work the best with the seven segment displays as they have a lot of pins that all need to go in at the same time. In this case, just solder only one pin to hold the seven segment display and then solder the rest.

2. Add in the wires

  • Do this by holding the wire into the hold with some pressure. Then, while holding it there, heat up the solder you already placed on the board and the wire will go through; then pull away the iron.
  • I added in a line in the order of the connections for the seven segment displays at the back of the board so that I would not have a hard time reading the seven segment displays. This also makes hooking it up to the arduino easier as you just have to go down the line you already soldered in the order. This is not necessary to do.

Step 4: Hook Up to the Arduino

1. Plug in the pins to their respective spot based on the hookup picture.

  • HC-SR04 Sensor plug ins
    • Digital pin 2 which is the input of the Trig
    • Digital pin 4 is the echo input
    • 5V to the VCC
    • GND to GND
  • Seven Segment Display
    • 1st seven segment display (ones place) pins 30 through 36
      • Skip pin 7 on the seven segment display as it is the decimal point and not used
    • 2nd seven segment display (tens place) pins 37 through 43
      • Skip pin 7 on the seven segment display as it is the decimal point and not used

Step 5: Program

1. Create a folder in your arduino sketch location to hold the sketch for this project.

  • Mine is located in my documents folder which I believe is the default location.

2. Download the sketch.

3. Rename the sketch in downloads folder.

4. Cut and paste the sketch into the folder you created in step one.

5. Open the arduino program.

6. Open the sketch by file->open.

7. Plug in arduino into computer.

8. Upload the sketch.

Step 6: Future/Upgrades

If you want to add more seven segment displays or plug in your arduino into the computer, you can open up the serial monitor and you will see the ultrasonic sensor giving the distances measured as well as the speeds calculated. If you were adding in extra LEDs for higher speeds or to also output the distances it would be simple to copy and paste in my code to get these extra features working.