Arduino Radar (with Modifications) FE

by ankitc in Circuits > Arduino

43 Views, 0 Favorites, 0 Comments

Arduino Radar (with Modifications) FE

Screenshot 2025-01-21 185200.png
Description

I have decided to make an Arduino radar without the screen to process the data. In place of the screen, I used other components to demonstrate my knowledge. The servo motor is used to continuously move the distance sensor around back and forth so it can detect any movements. If the distance sensor detects an object closer than an inch the RGB LED will turn green, if the object is further than an inch away, it will turn red. The 7-segment display displays in inches how far away an object is from the distance sensor.


Why

I decided to make the Arduino radar after watching videos online. However, I thought adding the processing screen would be too complicated, so I made my own changes.


(The PDF attached below is the circuit schematic)

Supplies

IMG_8204.jpg

Wiring

IMG_8205.jpg
Screenshot 2025-01-21 192421.png
Screenshot 2025-01-21 193002.png
7 Segment Display
  1. Connect 7 segment display and wire each segment to a pin on the Arduino (pins 13 - 7)
  2. Make sure to keep these pins constant, making it easier to code.
  3. Connect the resistors to the power rail.
RGB LED
  1. Connect the common anode to the power rail using a resistor
  2. Connect the remaining pins R, G, and B to pins on the Arduino (pins 6 - 4)
  3. Look at the diagram to see which pin affects which segment of the 7-segment display
Servo Motor
  1. Connect the red wire to the power rail
  2. Connect the brown wire to the ground
  3. Connect the orange wire to a pin on the Arduino (pin 3)
Distance Sensor
  1. Connect the VCC pin to the power rail
  2. Connect the GND pin to the ground rail
  3. Connect both the Trig and Echo pins to pins on the Arduino (trig 2) (echo 1)

Coding

  1. First start off the coding by listing your variables and inputs/outputs
  2. For example, this code in void setup declares all pins of the 7-segment display as an output:
  3. for (int i =7; i<14; i++)
  4. pinMode( i,OUTPUT);
  5. Make sure to make the variables "distance" and "inches" global by adding this line:
  6. long duration, inches;
  7. The majority of the code is simple and is used in previous projects. Implementing them won't be hard, and you can copy and paste most of it and add slight modifications.


(File named servo_motor.ino is only for the servo motor)

(File named Final_Evaluation.ino is for the rest of the code)

Troubleshooting

  1. While making this Arduino radar project, I encountered many difficulties that changed the course of my actions.
  2. For example, I couldn't get the Servo Motor to work alongside the distance sensor.
  3. To counteract this dilemma, I have decided to use two Arduino's. One is solely for the Servo motor, and the other one is for the distance sensor and other stuff.
  4. There are probably more efficient ways to fix this issue, but this is one of the options that worked for me.

Final Video

Final Video
  1. In this video, you can see the final product of my Arduino radar.
  2. Because of the difficulties in troubleshooting the distance sensor isn't attached to the servo motor, but this can be done easily with tape or hot glue.
  3. Additionally, you can also see the two Arduino's used to run the circuit, once again due to the problems in troubleshooting.