14 Dec 2005 psychlotron   » (Master)

I recently added distance sensing ability to a Yost Engineering BugBrain that I built a few years ago. I wanted it to have some sort of vision capability so I added a Sharp GP2Y0A21YK ir distance sensor. It was pretty easy to add, just six solder points. All you have to do is connect power, ground, and and I/O pin which I connected to the expansion connector. I used the built in BasicX getADC() function to find the voltage output by the detector. The ir detector outputs a voltage between around 0.5-2.5V which corresponds to distances between 10cm and 80cm. I used the graph from the data sheet to make a look-up table which I use to compare the voltage and find the distance. This works pretty well and now my BugBrain walks around, "sees" objects, and avoids them. I've got some pics but I'm a noob to posting here (although I've been reading for quite a while) so I can't post the project yet. I've got a really sweet project coming up that I'd like to post. It's my Senior Project for school (Shawnee State University) but I'll post more on that later.

Latest blog entries     Older blog entries

X
Share this page