Skip to content

Carbot Knows the Distance

December 31, 2013

Ping Sensor for 20 cmImage

I know from earlier experiments that the 1802 can easily take measurements from the parallax ping sensor but I’m going to start from the ground up anyway.  The logic analyzer fragment above shows the olduino pulsing the ping sensor’s signal line for 10us. 460uS later the sensor raises the signal again and keeps it high for 1,124uS(which is how long it took to see an echo).  I once worked out that distance= flight-time-in-uS / 29 / 2.  The 29 is sound travelling 1 cm in 29 uS and the divide by 2 is because the sensor is reporting round trip time.

So for this case that’s 1124/29/2=19.37 cm which is close enough to my intended 20 cm (so yay physics).

I also see that I need to start looking for a response in under 500 uS


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: