Simulating an air defense system

Hi, i'm an undergrad mech engineering student and i'd like to make a mini project about air defense system like this video Model unit air defense using Arduino - YouTube

i just can't figure out how the laser turret move to specified location according to the ultrasonic sensor reading. anybody can help me with the code? thank you

vector1549:
Hi, i'm an undergrad mech engineering student and i'd like to make a mini project about air defense system like this video https://www.youtube.com/watch?v=S87Nu1eTjB4

i just can't figure out how the laser turret move to specified location according to the ultrasonic sensor reading. anybody can help me with the code? thank you

Watch the video again. The ultrasonic sensors are there just for display. They don't actually do anything. Same with all the rest of the stuff.

Search the forum for "gimbal" or "gimbals" and see what others have done using servos. Notice how far the devices turn. None go 360 degrees.

Paul

i just can't figure out how the laser turret move to specified location according to the ultrasonic sensor reading.

Ultrasonic sensors can determine only the distance to a nearby object, not its location. So, such a sensor cannot be used to orient a laser turret.

jremington:
Ultrasonic sensors can determine only the distance to a nearby object, not its location. So, such a sensor cannot be used to orient a laser turret.

And if they could, your high school geometry class would have the answers.

Paul

The HC-SR04 ultrasonic sensors have a modestly narrow beamwidth, nominally about 15 degrees. Assuming the project is functional, and I have no reason to doubt that it is, at any point in the rotation array, each of the sensors could in succession do ranging in the normal way. Spinning around the axis of rotation would give ranging information at each azimuth position where the sensor is fired. The azimuth position is a function of the requested servo angle at the time the sensor fires.

The three HC-SR04s look to be aimed at different elevation angles, so the three sensors would give ranging at their nominal respective elevation. Thus the system can get a rather crude 3 dimensional image of whatever's within its range mapped to servo angle and the elevation angle of the sensor array elements.
scanningSonar.png
A complication is that there are things other than the target of interest in the field of view (i.e. walls), so such a system would have to map the environment without the balloons as a reference first and then look for changes.

As for aiming the laser, it's servos are probably just aimed at the azimuth and elevation corresponding to that of the sensor servo and array elevation.

There's are various tutorials on the web for 2D version like this one: Arduino Radar Project using Processing, Ultrasonic Sensor, Servo

scanningSonar.png