Approach on automated shooting targets

Hi, I'm looking to build a short range (100yd) version of the McQueen target and automate it.

Essentially this type of shooting has a "castle" with 5 windows. When the sequence starts a target is presented in one of the 5 windows for 5 seconds, then is dropped. There is a 5-15 second gap (randomised from shot to shot) to reload and then another 5-second exposure in a random window. Rinse and repeat for 5/10/15 exposures.

The simple way to do this would be with off the shelf RC aircraft/car hardware and simply have the Range Officer standing at the back with a stop watch firing off random targets. However, being awkward I'd quite like to build an automated controller to run the sequence without any human intervention once I press the "Go" button.

My thought is that I would build a fairly dumb target with servos and Rx hardware, and then a "smart" remote with an Arduino, Tx and the go button, a means of switching between a couple of different sequences (potentiometer?) or offer manual control.

My reasoning behind building a smart controller is that I can load up multiple programmes and use it for several target sets. We've got an indoor air pistol turning target set that needs overhauling (it uses a hard wire back to a busted control box, pretty easy to fix but it'd be nice to upgrade at the same time), and I'm guessing it would be cheaper to use dumb hardware on the targets and build one awesome controller rather than having to fit an arduino to every new target and having a simple 4-channel key fob to say "Run sequence 1/2/3/4".

Also, by keeping the gubbins of the targets simple, if I move away and leave the club, and the controller dies (as it will eventually) and there is no one with the know how to replace it, the targets themselves will be mostly electrical rather than electronic and could be easily modified to run off a hard-line or a simpler off the shelf Tx unit for manual control. I'd rather that than leaving them with say 3 or 4 targets with Arduino/Xbee modules embedded in that no one can figure out how to fix. I'm the only person there who could build such a system so I'm inclined to build it such that it doesn't need me about to maintain.

I've never used Arduino before or played with RF hardware and haven't done much electronics for a few years although I was a reasonably dab hand with a soldering iron at one point.

So:

  1. Is there any fatal flaw with my approach or should I put the brains in the targets for some reason? Ardupilot for example puts the brains on the air frame and listens for commands from a conventional remote control unit (although you can also establish a downlink and whatnot besides)

  2. What type of automation should I use? I'm very new to all of this. The targets need to be snappy - they're only exposed for 5 seconds so if they take an extra 2 seconds to raise/lower that's not much good! The shooter will have about 9 seconds to attempt a shot! Am I looking at servos/linear actuators/stepper motors/solenoids?

  3. Can anyone recommend a UK supplier for suitable Tx/Rx (and suitable componentry), and indeed the automation hardware.

  4. Which Arduino board? I guess it's going to need 5 out-lines for the 5 RF channels to control the targets, a couple of in-lines for the Go button, a programme selector (could I use a potentiometer for that? Different voltages correspond to different sequences?), and target selector (another potentiometer when the sequencer is set to Manual, or 5 separate push buttons).

Thanks!

Sounds like fun!

  • the arduino can generate random sequences of targets but you could also have build in practice sequences. As you only use the numbers 1..5 you can store one target in one byte (in fact you can compress and store 3 in one byte)

  • I expect it can even register how long it took to shoot a target.

  • If someone is shooting good and fast it can decrease the time from 5 seconds to 4 to 3 to ....

  • it can store high score in EEPROM

Could not resist to dump some code to get you started, still leaves a lot todo

void setup()
{
  Serial.begin(9600);
  Serial.println("Shooting game 0.01");
}

void loop()
{
  displayMenu();
  char choice = getChoice();

  switch(choice)
  {
  case 'h' : displayHighScore(); break;
  case 'n' : playGame(true, 10); break;
  case 'e' : playGame(false, 25); break;
  }
}

void displayMenu()
{
  Serial.println("h : highscore");
  Serial.println("n : newgame");
  Serial.println("e : exercise");
  Serial.println("Enter your choice>");
}

char getChoice()
{
  while(Serial.available() == 0);
  return (char) Serial.read();
}


void playGame(bool forReal, int targets)
{
  unsigned long timeused = millis();
  int hits = 0;
  for (int i =0; i< targets; i++) 
  {
    setRandomTarget();
    unsigned long start = millis();    // wait max 5 seconds or target shot
    while (millis() - start < 5000)
    {
       if (targetHit() == true) 
       {
       hits++; 
       break;
       }
    }
  }
  timeused = millis() - timeused;
  
  Serial.print("Score: ");
  Serial.print(hits );
  Serial.print(" in ");
  Serial.print(timeused/1000.0, 2);
  Serial.println("Seconds ");

  if (forReal) 
  {
    HighScore(timeused, hits);
  }
}

void setRandomTarget()
{
  Serial.println("not yet implemented");
}

bool targetHit()
{
  Serial.println("not yet implemented");
}

void displayHighScore()
{
  Serial.println("not yet implemented => 0");
}

void HighScore(unsigned long time, int hits)
{
  Serial.println("not yet implemented");
}

4 ) get started with an UNO

This is an idea i've been toying with for a while, just needed an excuse to get off my backside and do it, I have no excuse really cuz I work in the RC hobby industry.
It would be easy to set up some servo's to turn targets, I considered metal plate targets with piezo elements attached to detect a hit and iluminate a lamp and controlling it all from my Nintendo DS over wifi or maybe use a pair of nRF2401's

incidently for awkward or long range data transfer i've started using these TL-PA211 | AV200 Mini Multi-Streaming Powerline Adapter | TP-Link
allthe benefits of wired ethernet but without trailing wires

robtillaart:
Sounds like fun!

  • the arduino can generate random sequences of targets but you could also have build in practice sequences. As you only use the numbers 1..5 you can store one target in one byte (in fact you can compress and store 3 in one byte)

  • I expect it can even register how long it took to shoot a target.

  • If someone is shooting good and fast it can decrease the time from 5 seconds to 4 to 3 to ....

  • it can store high score in EEPROM

Could not resist to dump some code to get you started, still leaves a lot todo

...

4 ) get started with an UNO

Awesome, thanks for that :slight_smile: As I said in my post, I'm inclined to make the targets as dumb and electrical as possible. I'd been planning on using card targets in a lightweight frame (lighter for the servos to snap up), but if you had a smart target unit with an arduino at the pointy end of the range (or pinged back data to the control box) you could totally do steel plates with a rotation sensor to detect shots and modify the sequence on the fly if someone was doing rather too well!
You could do a speed test like those infernal bleep tests in gym where you have to run 20-metre lengths in shorter and shorter periods, but giving shorter and shorter exposures till the shooter fails to hit three targets in a row or something.

If you want to make sure you leave a legacy that is maintainable, then it seems to me that the most easily re-used solution would be to have the hardware basically emulate a solenoid i.e. go to one of two positions based on whether an input is high or low. Anything involving driving a model RC servo directly would require a PWM interface which I think would be quite hard to drive for somebody without electronics experience to deal with. Is it possible to simply use a solenoid per target? Then your Arduino would have a transistor per solenoid and activate each output from your sketch. When the Arduino dies and you aren't around to fix it, they simply replace it with a bank of switches to trigger each solenoid. (This is also a handy fallback if the bells and whistles solution goes tits up at a crucial moment.)