Pages: [1]   Go Down
Author Topic: Ultrasonic Sensor to Arduino to Servo..  (Read 1534 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 19
self study!!.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was wondering if anyone would be able to point me in the right direction/ help me out.
Is it possible to program in arduino, to follow a moving object throught the use of ultrasonic sensor?
« Last Edit: March 08, 2012, 02:14:04 am by jenfer » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25833
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Most u/s sensors have a wide beam angle, so resolving the object may be difficult.
I guess the answer as usual is "it depends" - on
1) size of object
2) direction of object relative to sensor
3) speed of object.
4) reflectivity of object to ultrasound.
etc

You need to tell us what you want to do.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 19
self study!!.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good day sir!..
I have here an ultrasonic distance sensor(attached in a servo, moving left to right). It only calculates the distance perpendicular to it. I want the sensor to identify a moving object and follow it as it moves(servo).

please give me an idea on how to do it smiley
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25833
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It only calculates the distance perpendicular to it
Unfortunately, because of beam-spread, that probably isn't strictly true.

You still haven't answered to the question about how fast the object is moving - remember you're going to be limited by the servo sweep rate and the maximum sample rate of the rangefinder - usually only up to about 20Hz.

Quote
(attached in a servo, moving left to right).
At some point, you'll probably need to figure out the "moving right to left" bit.
« Last Edit: March 08, 2012, 04:38:04 am by AWOL » Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 158
Posts: 2891
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As AWOL mentioned, not super easy to do with only 1 sonar. The usual method for tracking
is to do some sort of "differential" measurement using 2 pickup sensors.

Typical U/S sonars have beams from about 40deg wide [Parallax Ping, Maxbotix EZ0] down to
about 20deg wide [Maxbotix EZ4]. They will sense objects anywhere in the beam, not just
perpendicular to the direction it's pointing.

If I wanted to do this, I might try using 2 sonars on the panning servo, with the beams aimed
so there is a few degrees of overlap. Have to experiment to get the angle, based on the beam
widths. Then, if the servo is not moving and an object moves into one of the beams, that sonar
will fire and the other will not.

Then you can pan the servo over so both sonars are firing the same. Then as the object keeps
moving, one sonar will stop firing, and you know which direction the object is moving, and
you can pan the servo to follow it. This should work if the object isn't too far away and not
moving too fast, as it will take roughly 200-msec to sample both sonars.

Something like that.

Logged

Pages: [1]   Go Up
Jump to: