Pages: [1]   Go Down
Author Topic: Ultra-Sonic Waves, Human Following Robot  (Read 1416 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm using a transmitter to transmit 40k square sound waves to 2 receivers on a robot. I want the robot to know which direction the transmitter is and adjust to it (to later drive to it) .

So I'm in the first stages of figuring this out but confused and need help.(correct me if I'm wrong on anything)

To calculate the direction of the transmitter, I will have to know the phase difference between the waves of receiver 1 and 2, so I will be able to calculate which arrives first(but is it based on direction of which came first or strength?). But how do I calculate this phase difference? through hardware or software and how?

Moreover, how do I output the calculations of the phase difference (through micro-controller hardware or software)?

Please advise me if I'm in the right direction and if you have an idea or different approach.

Thank you

I'm using this kit for transmitter and receiver.
http://www.engineeringshock.com/40khz-ultrasonic-transducer-receiver-kit.html
« Last Edit: November 22, 2012, 01:25:42 am by husein06 » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8695
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Send pulses of 40 kHz instead of continuous.  Then you can measure the arrival times.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

The problem with phase measurements is that the wavelength of 40 Khz sound is very small, so even
small angles off 90-deg [head-on to the target] cannot be determined correctly.

http://en.wikipedia.org/wiki/Wavelength

wavelength = v/f = (1100 ft/sec * 12"/ft)/40000 hz = 0.33", which is why the 40 Khz transducers are
the small size they are.

Quote
Send pulses of 40 kHz instead of continuous.  Then you can measure the arrival times.

John is on to something here, except he means the "difference" of arrival times. The difference will be
zero when the target is head-on. Note also that, measuring difference of arrival times is a digital
measurement, and much easier to do than any sort of analog phase measurements.
« Last Edit: November 22, 2012, 03:54:27 pm by oric_dan(333) » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8695
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want both direction and DISTANCE you need a way to know when the pulses are sent.  You could trigger the pulses with a radio signal.  If you expect line-of-sight you could use an IR sender to trigger the pulse.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great Idea, can you elaborate more?

So i was thinking.

I understand It's not phase so much as timing. So lets say the Robot sends out a pulse request, then begins timing(how?). The receiver you wear gets the request and sends out a pulse.

The robot will have 2 sonar sensors. (It times which sensor gets the signal first, difference between, and uses this to calculate direction.) How?

My main question is how to do the timing portion and what exactly is the calculation how do you configure that to the robots driving?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8695
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My main question is how to do the timing portion and what exactly is the calculation how do you configure that to the robots driving?

To time a signal you would typically use a loop:
Code:
    SendPingRequest();
    int leftDistanceCount = -1;
    noInterrupts();
    for (int i=0; i<10000, i++) {
        if (digitalInput(leftSensorPin)) {
             leftDistanceCount = i;
             break;
        }
    }
    SendPingRequest();
    int rightDistanceCount = -1;
    for (int i=0; i<10000, i++) {
        if (digitalInput(rightSensorPin)) {
             rightDistanceCount = i;
             break;
        }
    }
    interrupts();

Do some experiments to determine the base count and counts per unit distance.

From there it's simple trig.  You know the distance between the receivers and you know the distance from each to the sender.  That gives you three sides of a triangle from which you can determine all the angles.
   
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all the help.
I'm deciding to use PING)) sensors for the ultrasonic waves and distance measurements. And xbee for the wireless (To tell the transmitter to send a pulse. Do you think this is a good approach? I have never used them, but im guessing ping is straight forward, i think? and xbee still no clue.

Since the PING)) comes as a transicevier distance measure.. How do I adjust them to turn them into just a receiver and or just a transmitter? Do I physically remove them from the board?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8695
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do I adjust them to turn them into just a receiver and or just a transmitter? Do I physically remove them from the board?

Yes.  That's how Ben Heckendorn did it when he made his robotic luggage.

http://revision3.com/tbhs/robotluggage
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes I heard about it! Nice find! Just finished watching it, very similar to what I was thinking!

Do you know how the xbee is being used, I have never used xbee or wireless before, is it simple serial communication? sending a carrier with eight 1, is he sad? how exactly is that done?
Logged

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

I don't think you need anything as expensive as an XBee, do you?
A cheap 418MHz (or similar) Tx/Rx should do the trick (watch out for false triggers from door bells!)

Some of the Devantech serial/I2C ultrasonic devices allow a "listen-only" mode, so don't require any surgery.

A problem I think you may encounter is the relatively narrow acceptance angle of some ultrasound receivers - off-axis reception may not be very sensitive.
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.

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8695
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd go poking around on the ultrasonic transmitter to see if it provides a TTL (5V) version of the 40 transmit signal.  If so, I'd hook that up to a cheap OOK (On/Off Keying) transmitter to send a 40 kHz burst of RF pulses.  Then the RF receiver and a driver can drive the one ultrasonic transmitter.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd go poking around on the ultrasonic transmitter to see if it provides a TTL (5V) version of the 40 transmit signal.  If so, I'd hook that up to a cheap OOK (On/Off Keying) transmitter to send a 40 kHz burst of RF pulses.  Then the RF receiver and a driver can drive the one ultrasonic transmitter.

Thank you for your response, I'm new to a big project like this, I have done very small projects, So hopefully you can bare with my rookie questions. There's a beggining to everything.

I'm not exactly sure what you ment. Researched what a OOK transmitter is and understand it, but in what portion will I include it in? so your suggesting the xbee wireless would send to the xbee wireless on the transmitter and that voltage will trigger the OOK transmitter to send a 40KHz burst becuase its "1"'s?

I don't think you need anything as expensive as an XBee, do you?
A cheap 418MHz (or similar) Tx/Rx should do the trick (watch out for false triggers from door bells!)

Some of the Devantech serial/I2C ultrasonic devices allow a "listen-only" mode, so don't require any surgery.

A problem I think you may encounter is the relatively narrow acceptance angle of some ultrasound receivers - off-axis reception may not be very sensitive.

Thank you for your response.
Now what do you mean I don't need something like an xbee, i researched and seen its a preferred way and easy to use? a cheaper 418MHz would be just cheaper cost wise right? nthn with making the project better or easier?

But If I remove the transmitter portion of the Ping)) it would just act as a receiver(or would I have to modify more?) or is the Devantech ultrasonic better to use because they use I2C ?
Again all I'm using the ultrasonic waves is to know the pulses so I can trigger the time.


Thank you Both very much!

Logged

Pages: [1]   Go Up
Jump to: