Hey all I am making a project where I am using 4 ultrasonic sensors and a stepper motor. I am using the ultrasonic sensors to measure distance and am trying to convert that distance into polar coordinates. From there I will try to make the stepper motor move to an angle and hopefully at the right x and y coordinates. So far I have gotten the sensors to all display distance reading but I have no idea how to convert their readings into coordinates. If anyone could offer help that would be amazing.
A coordinate system has an origin and well defined axial directions. What would those be, in your project? How would those relate to the distances you are measuring?
Have a look at the "How to get the best out of this forum" post, linked at the head of very forum topic, which gives suggestions on what sorts of information you need to provide in order to get well-informed help.
Study the sensor documentation. Usually there is an entry describing the "cone of response", which means the width of the beam in degrees. Your distance can be ANYWHERE in that beam of response. Not very helpful in determining coordinates. Ultrasonics is NOT useful in your project!
Instead of doing that I have 2 ultrasonic sensors on 1 breadboard and having them on opposite ends. I can show you a picture of it in an hour or 2 if it helps.
This picture doesn’t have the stepper motor in it but the motor would go in between all the sensors so the sensors wouldn’t detect it. I have already tested this and they don’t detect it.
Hi,
Thanks for the pictures.
You will have to note and fix the positions of the ultrasonics, I see you have two side by side to give you "beam" width.
Have you got them all working and returning valid distance data?
I hope you have a delay between each ping to let the ping dissipate and not cause a miss trigger of the next sensor to ping.