Pinpointing an angle using 2 components

Hello, I currently have a project that uses an Ultrasonic sensor, Laser Diode, and 2 Servo motors with the goal of pinpointing towards the direction of an object with a laser diode to which the ultrasonic sensor's detection is acquired, both sensor and laser are attached on a servo and are in parallel with each other.

my current issue right now is if this project is feasible to program by only using trigonometry.

Can You post datasheet links to the peripheral components?
What is the laser diode supposed to do? The ultrasonic sensor will hardly detect detect laser light.

Quite uncommon, can you post more details about this approach..

sorry if my wording confused you, but the laser diode is only meant to be pointed to the direction of where the sensor has detected something which in my case is <50cm.

That raises even more questions and requirement for additional sensors.

I.e.... so you point a laser at the direction of the sonic sensor angle, what then.....????

that is all that i am trying to do as of now due to my tight schedule, my only goal for this project is to create a simplistic "tracking" system with the help of a laser to show if the data that is processed is accurate.

Sorry but that's bad words here. Chasing the clock doesn't help us nor the time to solve the issue.
What gives the data, where to aim?

Back to the question, project is feasible.....
It comes down to what precision You need, what response time.

How much is tested and working?

oh okay, i'll be trying to answer to the best of myability.

the ultrasonic sensor will be giving the data towards the arduino and that i will be using trigonometry in the IDE to calculate what angle to set the servo that the Laser diode is attached to so that if the laser is hitting a hypothetical object that the sensor is sensing, it'll be somewhat accurate and is a proof of a working programm

as of now i still havent tested it yet and it is all theoretical as i am unsure if the precision i can get is enough to provide good data due to my terrible servo code, my goal for the sonar's servo is to let it rotate fast enough that if the object ever changed locations, the system will be able to keep pointing towards it

I would love to explore on that alternative but i cant seem to figure out how to program a tracking sensor without the use of more than 1 sensor, which is why i am using 2 separate servos for tracking and searching.

as for the object, i am looking for nothing in particular unless it gets near enough the sensor to be labeled as a variable, this project is simply for experemintation of a basic tracking system with currently no purpose apart from that.

My guess...

You have one servo with an ultrasonic sensor sweeping 180 degrees and storing the angle.

You have a second servo with a LASER attached, also sweeping 180 degrees and storing the angle.

Using the SIDE-SIDE-SIDE postulate (cos(A) = (b2 + c2 − a2) / 2bc ... b measured with the LASER, c measured with the ultrasonic sensor, a measured on your vehicle) you find the angle to turn toward the apex.

The cone of the ultrasonic sensor is wide (30 degrees), so inaccurate. Have you considered two LASER sensors?

But they are NOT parallel to each other. Most, if not all ultrasonic sensors have a CONE OF SENSING and most laser sensors have a dot. Your ultrasonic will detect an echo and report back anything in that cone of coverage.

thank you for responding, i havent thought about using SSS as i've planned on using different methods of acquiring the angle that is needed for the laser to turn towards, mainly using calculations on acute,right, and obtuse triangles.

thank you aswell for pointing out that the sensor has a 30° cone of detecting, i will try to figure out a way to make the system more accurate even if i have to reduce its range.

I will try to send an image on how all of i've mentioned will work later to provide further clarification.

If you must use the HC-SR04, you can approximate the target angle from the SR04 by taking the angle of first detection in both sweep directions. The mid-point of those two angles should be close to the true angle to the target. If all goes well, the difference between one first-detection to the other first detection will be 30 degrees.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.