BS2SX and Polaroid 6500 Sonar Module
I'm trying to use a BS2SX and a Polaroid 6500 Sonar Module with the
Instrument Grade Electrostatic Transducer. I've found many examples using
the BS2, but NOT using the BS2SX. Is anyone else using the BS2SX? I'm
trying to determine distance in inches and I cannot get the timings right.
I know sound travels at 0.9ms per foot. I know using RCTIME, the unit of
measurement on the BS2SX is 0.8us. I know the units are twice as many
because of the return trip. I know I need to add a constant to make up for
the 6500's 2.38ms blanking time. Right? Or is the "pause settletime" delay
supposed to account for that?
Maybe I'm just confused, but I can't get it right. Could someone please
help me fill in the blanks in the following line to determine inches to an
object?
distance = sonartime (??????????) + (?)
Below is a portion of the test code I'm using:
*********************************
'{$Stamp BS2SX}
sonartime var word 'Time of Flight
distance var word 'Object Distance
init con 8 'INIT Pin
echo con 9 'ECHO Received Pin
settletime con 1 'Wait for ringing to stop
cycledelay con 200 'Delay Before Next PING
DIRS = %0110111111101111
OUTS = %0000000000000000
SONAR:
high init
pause settletime 'wait for ringing to stop
rctime echo,0,sonartime
gosub SONAR_ECHO
low init
pause cycledelay
goto SONAR
SONAR_ECHO: 'Sonar Echo Received
distance = sonartime (??????????) + (?)
debug dec? distance, " inches",cr
return
*********************************
Thanks for any help.
- Brice
Instrument Grade Electrostatic Transducer. I've found many examples using
the BS2, but NOT using the BS2SX. Is anyone else using the BS2SX? I'm
trying to determine distance in inches and I cannot get the timings right.
I know sound travels at 0.9ms per foot. I know using RCTIME, the unit of
measurement on the BS2SX is 0.8us. I know the units are twice as many
because of the return trip. I know I need to add a constant to make up for
the 6500's 2.38ms blanking time. Right? Or is the "pause settletime" delay
supposed to account for that?
Maybe I'm just confused, but I can't get it right. Could someone please
help me fill in the blanks in the following line to determine inches to an
object?
distance = sonartime (??????????) + (?)
Below is a portion of the test code I'm using:
*********************************
'{$Stamp BS2SX}
sonartime var word 'Time of Flight
distance var word 'Object Distance
init con 8 'INIT Pin
echo con 9 'ECHO Received Pin
settletime con 1 'Wait for ringing to stop
cycledelay con 200 'Delay Before Next PING
DIRS = %0110111111101111
OUTS = %0000000000000000
SONAR:
high init
pause settletime 'wait for ringing to stop
rctime echo,0,sonartime
gosub SONAR_ECHO
low init
pause cycledelay
goto SONAR
SONAR_ECHO: 'Sonar Echo Received
distance = sonartime (??????????) + (?)
debug dec? distance, " inches",cr
return
*********************************
Thanks for any help.
- Brice
Comments
This is what I have so far:
distance = sonartime/92 +3 'sound travels 1 inch in 73.7us
I know the +3 is wrong. Please keep reading...
This is based on:
- sound traveles 1 inch in 73.7us (I know it's not a constant but that's
what I'm using.)
- timing unit is 0.8us (RCTIME unit on a BS2SX)
- 92.125 units per inch for the BS2SX (I think...)
Am I on the right track??? With the 2.38ms blanking time.. I should add
38.3 inches! But everyone else I've seen do it for the BS2 shows around 7
or 9 inches. Why? Do I have the units per inch correct? Is my calculation
way off? Do I have a decimal point in the wrong place?
ANY help would be appreciated. Does anyone use the Polaroid 6500 Sonar???
Does anyone have a PIC that will do the timing for me?
HELP,
- Brice
Original Message
From: Brice D. Hornback <bdh@c...>
To: <basicstamps@yahoogroups.com>
Sent: Saturday, February 10, 2001 12:24 AM
Subject: [noparse][[/noparse]basicstamps] BS2SX and Polaroid 6500 Sonar Module
I'm trying to use a BS2SX and a Polaroid 6500 Sonar Module with the
Instrument Grade Electrostatic Transducer. I've found many examples using
the BS2, but NOT using the BS2SX. Is anyone else using the BS2SX? I'm
trying to determine distance in inches and I cannot get the timings right.
I know sound travels at 0.9ms per foot. I know using RCTIME, the unit of
measurement on the BS2SX is 0.8us. I know the units are twice as many
because of the return trip. I know I need to add a constant to make up for
the 6500's 2.38ms blanking time. Right? Or is the "pause settletime" delay
supposed to account for that?
Maybe I'm just confused, but I can't get it right. Could someone please
help me fill in the blanks in the following line to determine inches to an
object?
distance = sonartime (??????????) + (?)
Below is a portion of the test code I'm using:
*********************************
'{$Stamp BS2SX}
sonartime var word 'Time of Flight
distance var word 'Object Distance
init con 8 'INIT Pin
echo con 9 'ECHO Received Pin
settletime con 1 'Wait for ringing to stop
cycledelay con 200 'Delay Before Next PING
DIRS = %0110111111101111
OUTS = %0000000000000000
SONAR:
high init
pause settletime 'wait for ringing to stop
rctime echo,0,sonartime
gosub SONAR_ECHO
low init
pause cycledelay
goto SONAR
SONAR_ECHO: 'Sonar Echo Received
distance = sonartime (??????????) + (?)
debug dec? distance, " inches",cr
return
*********************************
Thanks for any help.
- Brice
where did you see 8 or 9 inches?
for a round trip you have to divide by 2. (the signal go out and back so the
signal makes 2 trips).
for example the range on the polaroid system is listed at roughly 2 feet to 35
feet. which is pretty close to what you have (38/2 = 1.6 feet).
google gave me this
http://www.acroname.com/robotics/info/articles/sonar/sonar.html
good luck,
-pete
On Tue, 13 Feb 2001, Brice D. Hornback wrote:
> Can't anyone please help me?
>
> This is what I have so far:
> distance = sonartime/92 +3 'sound travels 1 inch in 73.7us
>
> I know the +3 is wrong. Please keep reading...
>
> This is based on:
> - sound traveles 1 inch in 73.7us (I know it's not a constant but that's
> what I'm using.)
> - timing unit is 0.8us (RCTIME unit on a BS2SX)
> - 92.125 units per inch for the BS2SX (I think...)
>
> Am I on the right track??? With the 2.38ms blanking time.. I should add
> 38.3 inches! But everyone else I've seen do it for the BS2 shows around 7
> or 9 inches. Why? Do I have the units per inch correct? Is my calculation
> way off? Do I have a decimal point in the wrong place?
>
> ANY help would be appreciated. Does anyone use the Polaroid 6500 Sonar???
>
> Does anyone have a PIC that will do the timing for me?
>
> HELP,
> - Brice
>
>
Original Message
> From: Brice D. Hornback <bdh@c...>
> To: <basicstamps@yahoogroups.com>
> Sent: Saturday, February 10, 2001 12:24 AM
> Subject: [noparse][[/noparse]basicstamps] BS2SX and Polaroid 6500 Sonar Module
>
>
> I'm trying to use a BS2SX and a Polaroid 6500 Sonar Module with the
> Instrument Grade Electrostatic Transducer. I've found many examples using
> the BS2, but NOT using the BS2SX. Is anyone else using the BS2SX? I'm
> trying to determine distance in inches and I cannot get the timings right.
>
> I know sound travels at 0.9ms per foot. I know using RCTIME, the unit of
> measurement on the BS2SX is 0.8us. I know the units are twice as many
> because of the return trip. I know I need to add a constant to make up for
> the 6500's 2.38ms blanking time. Right? Or is the "pause settletime" delay
> supposed to account for that?
>
> Maybe I'm just confused, but I can't get it right. Could someone please
> help me fill in the blanks in the following line to determine inches to an
> object?
>
> distance = sonartime (??????????) + (?)
>
> Below is a portion of the test code I'm using:
>
> *********************************
> '{$Stamp BS2SX}
>
> sonartime var word 'Time of Flight
> distance var word 'Object Distance
> init con 8 'INIT Pin
> echo con 9 'ECHO Received Pin
> settletime con 1 'Wait for ringing to stop
> cycledelay con 200 'Delay Before Next PING
>
> DIRS = %0110111111101111
> OUTS = %0000000000000000
>
> SONAR:
> high init
> pause settletime 'wait for ringing to stop
> rctime echo,0,sonartime
> gosub SONAR_ECHO
> low init
> pause cycledelay
> goto SONAR
>
> SONAR_ECHO: 'Sonar Echo Received
> distance = sonartime (??????????) + (?)
> debug dec? distance, " inches",cr
> return
> *********************************
>
> Thanks for any help.
>
> - Brice
http://www.hobbyrobot.com/sensors/docs/6500-BS2.pdf
"ARobot Mobile Robot Sonar Application Note" adds 9 inches.
http://www.robotics.com/arobot/sonar.pdf
Original Message
From: Peter William Green <peter-w-green@u...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, February 13, 2001 11:06 PM
Subject: Re: [noparse][[/noparse]basicstamps] BS2SX and Polaroid 6500 Sonar Module
i think this is pretty close to correct.
where did you see 8 or 9 inches?
for a round trip you have to divide by 2. (the signal go out and back so
the signal makes 2 trips).
for example the range on the polaroid system is listed at roughly 2 feet to
35 feet. which is pretty close to what you have (38/2 = 1.6 feet).
google gave me this
http://www.acroname.com/robotics/info/articles/sonar/sonar.html
good luck,
-pete
On Tue, 13 Feb 2001, Brice D. Hornback wrote:
> Can't anyone please help me?
>
> This is what I have so far:
> distance = sonartime/92 +3 'sound travels 1 inch in 73.7us
>
> I know the +3 is wrong. Please keep reading...
>
> This is based on:
> - sound traveles 1 inch in 73.7us (I know it's not a constant but that's
> what I'm using.)
> - timing unit is 0.8us (RCTIME unit on a BS2SX)
> - 92.125 units per inch for the BS2SX (I think...)
>
> Am I on the right track??? With the 2.38ms blanking time.. I should add
> 38.3 inches! But everyone else I've seen do it for the BS2 shows around 7
> or 9 inches. Why? Do I have the units per inch correct? Is my
calculation
> way off? Do I have a decimal point in the wrong place?
>
> ANY help would be appreciated. Does anyone use the Polaroid 6500 Sonar???
>
> Does anyone have a PIC that will do the timing for me?
>
> HELP,
> - Brice
>
>
Original Message
> From: Brice D. Hornback <bdh@c...>
> To: <basicstamps@yahoogroups.com>
> Sent: Saturday, February 10, 2001 12:24 AM
> Subject: [noparse][[/noparse]basicstamps] BS2SX and Polaroid 6500 Sonar Module
>
>
> I'm trying to use a BS2SX and a Polaroid 6500 Sonar Module with the
> Instrument Grade Electrostatic Transducer. I've found many examples using
> the BS2, but NOT using the BS2SX. Is anyone else using the BS2SX? I'm
> trying to determine distance in inches and I cannot get the timings right.
>
> I know sound travels at 0.9ms per foot. I know using RCTIME, the unit of
> measurement on the BS2SX is 0.8us. I know the units are twice as many
> because of the return trip. I know I need to add a constant to make up
for
> the 6500's 2.38ms blanking time. Right? Or is the "pause settletime"
delay
> supposed to account for that?
>
> Maybe I'm just confused, but I can't get it right. Could someone please
> help me fill in the blanks in the following line to determine inches to an
> object?
>
> distance = sonartime (??????????) + (?)
>
> Below is a portion of the test code I'm using:
>
> *********************************
> '{$Stamp BS2SX}
>
> sonartime var word 'Time of Flight
> distance var word 'Object Distance
> init con 8 'INIT Pin
> echo con 9 'ECHO Received Pin
> settletime con 1 'Wait for ringing to stop
> cycledelay con 200 'Delay Before Next PING
>
> DIRS = %0110111111101111
> OUTS = %0000000000000000
>
> SONAR:
> high init
> pause settletime 'wait for ringing to stop
> rctime echo,0,sonartime
> gosub SONAR_ECHO
> low init
> pause cycledelay
> goto SONAR
>
> SONAR_ECHO: 'Sonar Echo Received
> distance = sonartime (??????????) + (?)
> debug dec? distance, " inches",cr
> return
> *********************************
>
> Thanks for any help.
>
> - Brice
the measurements do not. Can anyone tell me why in the examples below the
distance to add was chosen?
Thanks,
Brice
Original Message
From: Brice D. Hornback <bdh@c...>
To: <basicstamps@yahoogroups.com>
Sent: Wednesday, February 14, 2001 7:38 PM
Subject: Re: [noparse][[/noparse]basicstamps] BS2SX and Polaroid 6500 Sonar Module
I've seen examples where 22cm is added to the distance.
http://www.hobbyrobot.com/sensors/docs/6500-BS2.pdf
"ARobot Mobile Robot Sonar Application Note" adds 9 inches.
http://www.robotics.com/arobot/sonar.pdf
Original Message
From: Peter William Green <peter-w-green@u...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, February 13, 2001 11:06 PM
Subject: Re: [noparse][[/noparse]basicstamps] BS2SX and Polaroid 6500 Sonar Module
i think this is pretty close to correct.
where did you see 8 or 9 inches?
for a round trip you have to divide by 2. (the signal go out and back so
the signal makes 2 trips).
for example the range on the polaroid system is listed at roughly 2 feet to
35 feet. which is pretty close to what you have (38/2 = 1.6 feet).
google gave me this
http://www.acroname.com/robotics/info/articles/sonar/sonar.html
good luck,
-pete
On Tue, 13 Feb 2001, Brice D. Hornback wrote:
> Can't anyone please help me?
>
> This is what I have so far:
> distance = sonartime/92 +3 'sound travels 1 inch in 73.7us
>
> I know the +3 is wrong. Please keep reading...
>
> This is based on:
> - sound traveles 1 inch in 73.7us (I know it's not a constant but that's
> what I'm using.)
> - timing unit is 0.8us (RCTIME unit on a BS2SX)
> - 92.125 units per inch for the BS2SX (I think...)
>
> Am I on the right track??? With the 2.38ms blanking time.. I should add
> 38.3 inches! But everyone else I've seen do it for the BS2 shows around 7
> or 9 inches. Why? Do I have the units per inch correct? Is my
calculation
> way off? Do I have a decimal point in the wrong place?
>
> ANY help would be appreciated. Does anyone use the Polaroid 6500 Sonar???
>
> Does anyone have a PIC that will do the timing for me?
>
> HELP,
> - Brice
>
>
Original Message
> From: Brice D. Hornback <bdh@c...>
> To: <basicstamps@yahoogroups.com>
> Sent: Saturday, February 10, 2001 12:24 AM
> Subject: [noparse][[/noparse]basicstamps] BS2SX and Polaroid 6500 Sonar Module
>
>
> I'm trying to use a BS2SX and a Polaroid 6500 Sonar Module with the
> Instrument Grade Electrostatic Transducer. I've found many examples using
> the BS2, but NOT using the BS2SX. Is anyone else using the BS2SX? I'm
> trying to determine distance in inches and I cannot get the timings right.
>
> I know sound travels at 0.9ms per foot. I know using RCTIME, the unit of
> measurement on the BS2SX is 0.8us. I know the units are twice as many
> because of the return trip. I know I need to add a constant to make up
for
> the 6500's 2.38ms blanking time. Right? Or is the "pause settletime"
delay
> supposed to account for that?
>
> Maybe I'm just confused, but I can't get it right. Could someone please
> help me fill in the blanks in the following line to determine inches to an
> object?
>
> distance = sonartime (??????????) + (?)
>
> Below is a portion of the test code I'm using:
>
> *********************************
> '{$Stamp BS2SX}
>
> sonartime var word 'Time of Flight
> distance var word 'Object Distance
> init con 8 'INIT Pin
> echo con 9 'ECHO Received Pin
> settletime con 1 'Wait for ringing to stop
> cycledelay con 200 'Delay Before Next PING
>
> DIRS = %0110111111101111
> OUTS = %0000000000000000
>
> SONAR:
> high init
> pause settletime 'wait for ringing to stop
> rctime echo,0,sonartime
> gosub SONAR_ECHO
> low init
> pause cycledelay
> goto SONAR
>
> SONAR_ECHO: 'Sonar Echo Received
> distance = sonartime (??????????) + (?)
> debug dec? distance, " inches",cr
> return
> *********************************
>
> Thanks for any help.
>
> - Brice
> > what I'm using.)
> > - timing unit is 0.8us (RCTIME unit on a BS2SX)
> > - 92.125 units per inch for the BS2SX (I think...)
> >
> > Am I on the right track??? With the 2.38ms blanking time.. I should add
> > 38.3 inches! But everyone else I've seen do it for the BS2 shows around 7
> > or 9 inches. Why? Do I have the units per inch correct? Is my
>calculation
> > way off? Do I have a decimal point in the wrong place?
The blanking time does not add or subtract from the transit time it
takes for the sound to travel to the target and back. The blanking
time is simply the sensor closing its ears so that it won't listen to
its own transmission.
The 7 or 8 inch offset is accounting for various delays that occur in
the circuitry. It is not something you can calculate from physical
pricilples.
The proof is in the pudding. You have to calibrate the sensor on a
close target and a far target and a few in between and see what
numbers you get. Then throw the 7 or 9 inch fudge factor into the
pudding.
-- Tracy Allen
electronically monitored ecosystems
http://www.emesystems.com
- Brice