Alireza Karkon
Published © CC BY

360 Radar (that encodes data onto an image)

This is a 360 radar using an ultrasonic sensor that saves data and encodes them onto an image.

AdvancedFull instructions provided10 hours4,981
360 Radar (that encodes data onto an image)

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
RobotGeek 180 Degree Robot Servo
RobotGeek 180 Degree Robot Servo
×2
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Visual Studio 2015
Microsoft Visual Studio 2015

Hand tools and fabrication machines

pipe
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Custom parts and enclosures

EXE File

Download the EXE file from here

Schematics

Circuit Diagram

Radar bb 7lhwgt0c86

Circuit Diagram

Radar pcb xzelmr8iaj

Circuit Diagram

Radar schem achq4xoes5

Code

Servo Control

C/C++
This code on C++ is for control the servo and should be upload to Arduino
#include <Servo.h>

Servo Down;
Servo Up;
const int trigPin = 9;
const int echoPin = 10;

long duration;
int pos = 0;
int pos2 = 0;
int distance;
int _degrees;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT); 
 Down.attach(2);
 Up.attach(3);
Serial.begin(9600); 
}
void loop() {
  Down.write(0);  
  Up.write(0);  
   for (pos = 0; pos <= 180; pos += 1) {
    Down.write(pos);
    _degrees = pos;
    dis();              
    delay(50);                       
    if (pos == 180){
         for (pos2 = 0; pos2 <= 180; pos2 += 1) {
    Up.write(pos2);
    _degrees = pos + pos2;
    dis();            
    delay(50);                       
      }
  }
   }
  for (pos = 180; pos >= 0; pos -= 1) { 
    Down.write(pos);
    Up.write(pos);
    delay(5);                      
  }
}
void dis(){
  digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance= duration*0.034/2;
Serial.print(distance);
Serial.print(",");
Serial.println(_degrees);
  }

Credits

Alireza Karkon

Alireza Karkon

6 projects • 19 followers
Hey guys! I'm Alireza. I'm a student (Bachelor of Technology)-Computer EngrgTech. I'm C# / C++ / Unity programmer and familiar to Front-End.
Contact

Comments