SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By tim.vrakas
#116066
Hello everyone!

This is my project:
I recently made an air powered spud gun. What I'm looking to do is make it so that the gun is on a turret (got that) and is aimed by servos (got that). The servos would be controlled by a Micro controller (sfe) reading data from sensors. There would be a CMOS camera (sfe) with a MAX7456 on-screen display that would overlay cross hairs on a small TV. Then you would move a joystick to orient the camera. Attached to the camera there would be a long range Ultrasonic sensor. the micro controller would use the camera vrertical orientation and the ultrasonic distance to calculate the correct firing angle (using pre-programed ratios) so that the potato would land on the target exactly.


Below are some example firing examples.
Image
Image
Image




My problem so far is finding the ultrasonic sensor. I need a range of about 50' to 100' with an accuracy of 12" to 18"

If anyone knows where to find such a sensor please reply!!!
By Cannibal
#116071
Hi Tim,

I'm not aware of ultrasonic sensors that can get the sort of range/resolution you are looking for - you might be better off looking into laser range finders. There's one built into my vacuum (neato XV11) that I understand can get at least 30' (I think) with a very good accuracy that isn't too too expensive.

As an additional complicating factor the potato is a fairly low velocity projectile so I think the wind would probably need to be taken into account to hit the targets reliably, especially when firing over object like in your third illustration.

Speaking of illustrations, your artwork is better than what I can do on my best days, but still you might want to give google sketchup a shot - it's free and lets you do some pretty good 3d sketching. I've taken to using it to plan out enclosures for my projects.

Best of luck.
By tim.vrakas
#116082
Thanks for the response! I didn't think anyone would be on the forums during the holidays.

I'll look at laser range finders. I just hope there not to expensive!
I also get what you mean about wind interference. Perhaps a V2 could have weather detection capabilities.

I do use Google Skechup! I just didn't have time to make a detailed model. (It was 11:30 and I'm only 12)
By angelsix
#116671
I've played quite a lot with ultrasonic sensors a while back and am just about to start trying to improve a previous project, but from my trials the best by far for overall distance is going to be an open can type (so not waterproof) and 47kHz instead of 40kHz. Less spread but more distance, then driving them to around 200V!

At that voltage you can actually hear the ultrasound pressure wave like a loud ticking, and I managed to get with a pretty sketchy amplifier circuit over 15 meters, but never tested past that (no room). So I would say although unlikely to get such a range, it _may_ just be worth a try.
By stevech
#116677
If you know the dimensions of the target object, and orientation, and if the target's size is perhaps 1/3 or more of the video raster, it seems that you can take this and the camera's optical characteristics (focal length of lens, pixel density) and estimate range. The user could click on the edges of the object and input the distance between those points, say, the width or length of the target (a car?).

Another scheme is to measure the sun shadow length cast by the object and given the sun's position and the camera's focal length and pointing angle, do the math.

Photogrammetry is the suite of math used.

Ultrasonic would be nice, but small reflector and more than a few ft. doesn't work.

(Potato striking car = $$$ body repair)