I made a 3d sonar

I used two servos and ultrasonic sensor. Ngl its kinda bad for the reasons ill get into. Sound is bouncing off the barriers and the measures are a mess. Also it has a precision of +-1cm which means it cant really measure distances super precisely. But it is what it is. I didnt want to buy a lidar. If i ever do buy it ill redo this project. I might post code if anyones interested.
No description
No description
No description
No description
No description
No description
No description
40 Replies
M_cosine
M_cosineOP2y ago
also i forgot to add its fucking abysmally slow i dont know if its a firmata issue or someting but it does cca 11 angles per second that is time=thetha*phi/11 s if you want to do 90 x 90 deg for example it will take you 12 fukking minutes 😿
PenPengu
PenPengu2y ago
Very nice! Interesting to see the results 😄
M_cosine
M_cosineOP2y ago
tnx 🐧
PenPengu
PenPengu2y ago
maybe you're interested in this but please don't blame me if you waste a bunch of time 😆: I was wondering if it's possible to do some kind of 3D triangulation with one ultrasonic sensor as sender and multiple as receivers. I don't know enough about audio and how it bounces to say if that's even remotely realistic
M_cosine
M_cosineOP2y ago
update: thanks to @Maderdash its no longer abysmally slow
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
its (pitch (measured from the z axis), azimuth (measured from x) and the distance mesured then you also take in the acount that the sonar itself isnt the stabile part but its located on some x0 y0 and you do the math if you want ill send u papers w calc i realy dont think i made a math mistake yes i think so but the recievers would have to catch that specific frequency
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
also using servos you only have a 1deg of precision so you might not aim for the reciever always also again if its an enclosed space you never know where the sound is bouncing so yea idk its kinda a "wide" quesion like i maybe could figure someting out if i were given very precis description yea i mean
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
its 3 seperate axis so
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
you just need to find the formulas
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
you know about eigenvectors? and seperate independant coordinates
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
mind you the thing that i measuring distance is moving really? so i can move it for lets say 15.5 deg?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
Spherical coordinates - Math Insight
Illustration of spherical coordinates with interactive graphics.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
Vector fields in cylindrical and spherical coordinates
Note: This page uses common physics notation for spherical coordinates, in which


θ

{\displaystyle \theta } is the angle between the z axis and the radius vector connecting the origin to the point in question, while


ϕ

{\displaystyle \phi } is the angle between t...
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
yea but only +- 1 deg no? i dont get this?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
im confused now
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
its servo.write(degrees) no? i mean full description i dont someting with pulses yadayada idk :((
MaderDash
MaderDash2y ago
Ill take this to #general
M_cosine
M_cosineOP2y ago
my bad mr mod man
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
Thanks I might post it on github But if you can use lidar like tf luna if you plan on replicating it You will achieve much greater precision
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP2y ago
I'ma try that
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
ZochtKocht
ZochtKocht11mo ago
port it to vr and make one of these lidar horror game irl
M_cosine
M_cosineOP11mo ago
That's a cool idea for the future
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
MaderDash
MaderDash11mo ago
You do know the user is useing Ultrasonics. I mean it should be even better if you use lidar, but just a note.
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
M_cosine
M_cosineOP11mo ago
No man I didn't touch Arduino in quite sometime now Also yea lidar would work way better As maderdash said I guess I could attempt to build the robot that maps space around it or something

Did you find this page helpful?