|
Hi
I think that the longest distance your able to measure is about 2.7m. The
counter is 16 bit long and has no sign. But the integer is has a sign, so you
can only use 15 bits, which is 32768. The counter increases each 0.5ns (pink
book). Sound travels at approximatly 340m/s.
32768*0.0000005*340/2=2.78m
If you need longer distances, you need do handle with the overflow bit. I
wasn't successful until no. The next few month i will not have the time to get
one with that. So if you find a solution, please let me know.
Bye
Martin
In lugnet.robotics.handyboard, Adam Oliver writes:
> Has anyone managed to work out some code which checks the overflow bit =
> for the counter used in the polaroid sonar code? At the moment mine =
> distance readings seem to be maxing out around 1.5m or so, and I'm not =
> sure if it's the timer running out or if it's my circuit not having =
> enough gain to receive a signal from further than that.
>
> I've had two conflicting answers with regards to the maximum time that =
> can be measured - one which says about 1.5m and another which says =
> somewhere closer to 8-10m.
|
|
Message is in Reply To:
| | sonar and overflow
|
| Greetings all, Has anyone managed to work out some code which checks the overflow bit for the counter used in the polaroid sonar code? At the moment mine distance readings seem to be maxing out around 1.5m or so, and I'm not sure if it's the timer (...) (24 years ago, 30-Jun-00, to lugnet.robotics.handyboard)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|