Log in

View Full Version : Can you use this?


Mars
22-01-2008, 11:06
Some of my friends and I want to know if you can use this.

http://www.radioshack.com/product/index.jsp?parentPage=search&summary=summary&cp=&productId=2909789&accessories=accessories&kw=ultrasonic&techSpecs=techSpecs&currentTab=summary&custRatings=custRatings&sr=1&features=features&origkw=ultrasonic&support=support&tab=features

Its an Ultra-Sonic Range Finder.

-Thanks

MrForbes
22-01-2008, 11:13
I can't think of any reason why you could not, it's a COTS sensor.

Although it would be helpful for you to read the manual (http://www.usfirst.org/community/frc/content.aspx?id=452), specifically the Robot Rules, and see if you can figure out for yourself if it is OK.

whytheheckme
22-01-2008, 13:24
Yes. We've used ultrasonics on our bot before.

The ones we used were analog sensors. The "ultrasonic" block in easyC, if that's what you're using, calls for a digital input plus an interrupt. I would say that most ultrasonic sensors (correct if wrong) have an analog output, and you simply need to use an analog input block.

Of course if you are using MPLAB or similar, you don't even need to worry about this confusion.

Ultrasonics have worked GREAT for us in the past. I'll see if I can dig up a link for the model we used (I remember the cost was similar (about 35 dollars), but it only had one sensor onboard. It was accurate to about an inch up to 30 feet.

Jacob

lukevanoort
22-01-2008, 13:47
Most ultrasonic sensors need an interrupt and a timer to measure the time the sound pulse takes to travel from the sensor to the object and back. That's why the Maxbotix sensor is so nice; it does this with its onboard electronics.

whytheheckme
22-01-2008, 13:52
Most ultrasonic sensors need an interrupt and a timer to measure the time the sound pulse takes to travel from the sensor to the object and back. That's why the Maxbotix sensor is so nice; it does this with its onboard electronics.

I guess the reason that the one we used was so expensive (for just one) is that it had an onboard (microprocessor I'm assuming... perhaps it was just a CPLD or something) that converted it to a readable analog signal.... no interrupts required. It could just be read in by the processor whenever it needs it.

Makes coding simpler. Dunno how common those are though.

Jacob

wt200999
22-01-2008, 14:15
You can also get that same sensor straight from www.parallax.com
you just need to make sure they have it in stock and can get it to you. There is a good example of how to read the input somewhere on these boards and the datasheet from parallax helps as well, but yeah, that sensor requires the use of a timer and interrupts.

Steve_Alaniz
23-01-2008, 02:48
You can indeed use that sensor... but let me also suggest

http://www.maxbotix.com/uploads/LV-MaxSonar-EZ0-Datasheet.pdf

I've ordered one of these to test but it appears the analog output can be applied directly to an analog input. No interrupt routine. At least that's how I read the Datasheet. I'll verify this in a day or two.

Best wishes

Steve

whytheheckme
23-01-2008, 08:24
You can indeed use that sensor... but let me also suggest

http://www.maxbotix.com/uploads/LV-MaxSonar-EZ0-Datasheet.pdf

I've ordered one of these to test but it appears the analog output can be applied directly to an analog input. No interrupt routine. At least that's how I read the Datasheet. I'll verify this in a day or two.

Best wishes

Steve

INDEED!!!

This is the exact model in which we used last year. I clicked on your link and was SO surprised to see a picture of what we used staring at me.

Indeed, you simply need to apply power, ground, and you can use the AN pin directly to the analog input on the RC. Simply get the analog input in your program, and you have a number (0-255 I believe, but I think its more like 12-220 or something.)

Ironically, I just tested ours out last night (we have 2 currently, perhaps we will be ordering more.

Jacob