SRF04 troubles2
Archiver
Posts: 46,084
I have an application in which I continiusly measure the distance of
my machine from ground (accuracy of 1cm) and try to keep it constant.
I am thinking of using a BS2 and one or two SRF04 ultrasonic sensors
for measuring distance. I have started experiments using one SRF04 but
I have some problems. The measurements have suddent peaks. I use
standard code from parallax site. Does anyone had similar problems who
can help?
Michael
my machine from ground (accuracy of 1cm) and try to keep it constant.
I am thinking of using a BS2 and one or two SRF04 ultrasonic sensors
for measuring distance. I have started experiments using one SRF04 but
I have some problems. The measurements have suddent peaks. I use
standard code from parallax site. Does anyone had similar problems who
can help?
Michael
Comments
>I have an application in which I continiusly measure the distance of
>my machine from ground (accuracy of 1cm) and try to keep it constant.
>I am thinking of using a BS2 and one or two SRF04 ultrasonic sensors
>for measuring distance. I have started experiments using one SRF04 but
>I have some problems. The measurements have suddent peaks. I use
>standard code from parallax site. Does anyone had similar problems who
>can help?
>Michael
Hi Michael -
Could you better define what you mean by "sudden peaks" ?
Are you using the Parallax code as is, and unmodified ? If not, how rapidly are
you firing off the trigger signal or how long are you waiting between trigger
pulses (same question posed two ways) ?
As I read the Devantech documentation, it appears there is a bare minimum wait
time of 10 ms between triggers. The actual, designed wait time may be longer
than that, but I haven't made that determination yet.
If you and Kerry both are using BS-2 Stamps, you may want to take a look at this
information from the Devantech web site:
http://www.robot-electronics.co.uk/htm/srf04tech.htm
Near the bottom of that web page they discuss the DO NOT CONNECT pin and how it
may be used to your advantage for slower processors like the BS-2. There is an
additional comment which will need some confirmation from Parallax, about the
higher numbered I/O pins taking longer to access.
In doing some research on the SRF04 tonight, I happened to notice that there is
some significant side-lobe sensitivity which may or may not cause problems. The
Polaroid 6500 Sonar modules didn't have nearly as much side sensitivity. What
one might glean from that probably has more to do with the specific application
and the environmental space than anything else. It's merely an observation of
one of the differences between the two sonar modules.
I hope that is helpful, and if I find more pertinent information I will post it
forthwith.
Regards,
Bruce Bates
>
> Could you better define what you mean by "sudden peaks" ?
>
> Are you using the Parallax code as is, and unmodified ? If not, how
rapidly are
> you firing off the trigger signal or how long are you waiting
between trigger pulses (same question posed two ways) ?
>
> As I read the Devantech documentation, it appears there is a bare
minimum wait time of 10 ms between triggers. The actual, designed wait
time may be longer
> than that, but I haven't made that determination yet.
>
> If you and Kerry both are using BS-2 Stamps, you may want to take a
look at this
> information from the Devantech web site:
> http://www.robot-electronics.co.uk/htm/srf04tech.htm
>
> Near the bottom of that web page they discuss the DO NOT CONNECT pin
and how it may be used to your advantage for slower processors like
the BS-2. There is an additional comment which will need some
confirmation from Parallax, about the higher numbered I/O pins taking
longer to access.
>
> In doing some research on the SRF04 tonight, I happened to notice
that there is some significant side-lobe sensitivity which may or may
not cause problems. The Polaroid 6500 Sonar modules didn't have nearly
as much side sensitivity. What one might glean from that probably has
more to do with the specific application and the environmental space
than anything else. It's merely an observation of one of the
differences between the two sonar modules.
>
> I hope that is helpful, and if I find more pertinent information I
will post it forthwith.
>
> Regards,
>
> Bruce Bates
I am using the Parallax code as is for testing. I use a moving target
(cubic paper box) that moves parallel with the sensor (closer or
further). I continiusly measure the distance between. The speed I use
for moving box is less than 1cm/sec.
When I have a diastance of 15cm and move the box towards the sensor, I
see measurments changing normaly (14.5...14.0...13.5....13....etc.)
but suddently I see a series of measurements like 13...
12.5.....40....45......40...25...14...12.5.....12.....11.5....) (That
is what I mean suddent peaks)
Michael
>> Hi Michael -
>>
>> Could you better define what you mean by "sudden peaks" ?
>>
>> Are you using the Parallax code as is, and unmodified ? If not, how rapidly
> are you firing off the trigger signal or how long are you waiting
>> between trigger pulses (same question posed two ways) ?
>>
>> As I read the Devantech documentation, it appears there is a bare
>> minimum wait time of 10 ms between triggers. The actual, designed wait
>> time may be longer than that, but I haven't made that determination yet.
>>
>> If you and Kerry both are using BS-2 Stamps, you may want to take a look at
> this information from the Devantech web site:
>> http://www.robot-electronics.co.uk/htm/srf04tech.htm
>>
><snipped for brevity>
>
>I am using the Parallax code as is for testing. I use a moving target
>(cubic paper box) that moves parallel with the sensor (closer or
>further). I continiusly measure the distance between. The speed I use
>for moving box is less than 1cm/sec.
I suspect you will have to stop the movement of the box before taking readings
if you want to avoid the "peaks" and get more accurate readings. This will cause
a "settling" of the ultrasonic signal. I suspect you are getting what's know as
multi-path echoing. Additionally, due to the movement of the box, the SFR04 can
only offer an average reading from multi-path signals at close proximity to the
transducer. Add this to the possibility of "ringing" (transmitter transducer
mechanically effecting the receiver transducer) and I'm surprised you're getting
the number of legitimate reading you seem to be getting.
>When I have a distance of 15cm and move the box towards the sensor, I
>see measurments changing normaly (14.5...14.0...13.5....13....etc.)
>but suddently I see a series of measurements like 13...
>12.5.....40....45......40...25...14...12.5.....12.....11.5....) (That
>is what I mean suddent peaks)
Since you seem to be in control of the movement of the box, and know which
direction it's travelling, it ought to be a simple matter to discard those
erroneous readings. Just by way of example if the box is "approaching" all
readings must sequentially descend. If the box is "departing" then all readings
must sequentially ascend.
Obviously, this range check and discarding of values must occur before the
averaging in the Stamp program. At least that's how I'd handle it.
>Michael
Regards,
Bruce Bates