Shooterbot

Discussion specific to projects ideas and support.
Post Reply
leigh11
Posts: 1
Joined: 08 Aug 2013, 02:24

Shooterbot

Post by leigh11 »

Hi, I am trying to hold a shooterbot competition and step it up a notch. Instead of just shooting at a target using the ultrasonic sensors I want to use a double ping to only fire at moving targets. Any ideas on how I can use datablocks to accomplish this?
Thanks
circuitmage
Posts: 68
Joined: 14 Dec 2012, 17:56
Location: Austin, TX

Re: Shooterbot

Post by circuitmage »

Sound interesting.

Before more experience people chime in, here are my thoughts;

1) What do you mean by "double ping"? Do you have two US sensorsors, or one that you will attempt to ping twice? I assume you will be using two, since the latter option would introduce more complication.

2) What do you mean by "moving targets"? Will you have pre-set speeds, direction and distance? These are important factors.

If you have relatively slow moving objects (say less than 1 fps), a pre determined direction (so you kinda know where to "ping" first) AND a set distance (important when it comes to muzzle velocity and things like that), then you should have little problem using some trig functions to hit your target.

Even then, depending on the stability and design of your set-up, I suspect even a well calculated shot may miss every now and then. But, that would be part of the fun!

Please post your solutions and set-up! Sounds like fun.
circuitmage
Posts: 68
Joined: 14 Dec 2012, 17:56
Location: Austin, TX

Re: Shooterbot

Post by circuitmage »

more thoughts...

An US sensor will give you limited range. They are really only good for less than 2 or 3 feet.

One option would be to have the set up as follows;
target moving ->.........US1..........US2.............Shooter
0........................... oo...........oo................../\
======track========================================

When the target passes US1 and US2, a timing calculation could be made at which point the shot is taken down the track. This would simplify things, and you could replace the US sensors with light sensors or maybe even touch sensors.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Shooterbot

Post by HaWe »

I have to disagree:
The Lego USS is very good for distances from 10cm up to 250cm, but of course the upper range depends on the size and the shape of the target.
circuitmage
Posts: 68
Joined: 14 Dec 2012, 17:56
Location: Austin, TX

Re: Shooterbot

Post by circuitmage »

Really? 250cm....From my few times experimenting and comparing it with the old Hitechnic US sensor, they were about the same at about 1m.

Also, some other reference information that appears to match these results;

http://cs.brown.edu/~tld/courses/cs148/02/sonar.html

I will take a look at it again...if I can get 250cms from it....will be great.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Shooterbot

Post by HaWe »

I don't know anything about a HT US sensor, and the referenced link shows something for the RCX, I can't see that it is for the Lego NXT USS.
The NXT USS has a upper limit up to 255, each unit corresponds to 1cm.
The first 6~8cm are too short to be reliably detected, but then e.g. the range to 254 cm distant walls is trustworthy.
255 stands for "255 up to infinity", and often values of distances below 6cm also show 255 (that can be eliminated by a minimum filter, while values equal to 255 should be dropped for evaluation).
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Shooterbot

Post by mattallen37 »

The Ultrasonic sensor returns 255 if the measurement wasn't successful. This could be because the object was too close, too far, not reflective enough, at the wring angle, etc.

In my testing 8-100 cm seems fairly reliable, < 8 isn't usually any good, and > 100 will sometimes return 255 (unsuccessful measurement). The higher the supply voltage, the longer the range. The Ultrasonic sensor supply voltage is on pin 1, which is pulled up to the battery voltage (almost). The fresher the batteries, the stronger the ultrasonic signal, and the longer the range.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests