using the Zilog Z8 encore for the ultrasonic distance calculation.

Hi,

I am working on a mobile robot. I am using ultrasonic sensors with the Zilog Z8 Encore board. Can anybody who has worked with the Zilog Z8 give me inputs of how to calculate the distance of the reflected wave of the ultrasonic sensor using the zilog Z8 encore. Is there any mode of the timer that I should use?

My task is to start the timer when the ultrasonic wave is transmitted, and when a reflected wave is received stop the timer and hence find time of the echo.

any help will be appreciable as I have just started working on the Zilog Z8.

Thanks,

-Priti

Reply to
amr
Loading thread data ...

research speed of ultrasonic wave. figure out what resolution you want in your distance measurement. research the accuracy of the ultrasonic transducer you have.

use the formulas gained in your research to calculate the minimum period you want to count. Set your timer to this period.

reset timer pulse sonar start timer

wait 4 echo when echo is received, stop timer.

you need to scale time to distance, and then you know how far away the echo came from.

it is more "complicated" than this, but not difficult to understand. When you get an echo, it could have come from any spot on a 45degree circle segment. The degree it came from may vary with the transducer you use.

because sonar spreads out as it travels, the farther away the echo came from, the wider area it could have come from.

in your code your need to take this into account if you want to be able to do anything useful with the sonar data (in my experience)

Rich

Reply to
jboothbee

Thank you Rich for all the inputs...its definitely a great encouragement for the beginners like me.

-Priti

Reply to
amr

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.