Results 1 to 15 of 78

Thread: Automatic Target Project

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2005
    Location
    Grantham
    Posts
    1,384

    Automatic Target Project

    Hi,

    After seeing some self resetting falling plate type targets on the internet.

    Like these :- http://www.doublealpha.biz/airsoft-i...setting-popper


    We are attempting to do something similar.

    I have now found an even better PCB board to control the Model Servos with.

    Here http://www.pololu.com/catalog/product/1350

    It is a self contained PCB with a USB interface for programming.

    It will control up to 6 servos and you can use the servo outputs as micro switch inputs as well.

    I think you could control three servos with three microswitches from one board.

    The best bit is the whole board is only about £22

    You then just need the servo £10 and a microswitch £0.50 and a 4.8V NiMh battery pack (I have loads from my model flying days)

    Then I have to write some script routines to make it all work

    I'll keep you posted. (Update to follow below)

    Thanks

    Mark

  2. #2
    Join Date
    Apr 2005
    Location
    Grantham
    Posts
    1,384
    The other advantage of this servo controller is that is can be loaded with a script which can then run on it's own without a PC connected to it.


    This was my thoughts on getting it to work a popper type target above and the sequence that would be needed.


    The sequence we need to generate on the servo will be something like follows.

    1.) Power On
    2.) Move Servo to the home (At rest Position) Controller will do this at power on.
    3.) Check Limit Switch
    4.) If limit switch is not made then wait
    5.) If limit switch is made then delay by 4 seconds (Adjustable in software)
    6.) After 4 second delay move servo to the reset position
    7.) Wait for move to reset position then move back to home position
    8.) Return to start of program

  3. #3
    Join Date
    Apr 2005
    Location
    Grantham
    Posts
    1,384
    I got all the parts for my initial Target Reset Project today.

    This is how it looks so far.

    http://i699.photobucket.com/albums/v...ct004Large.jpg

    http://i699.photobucket.com/albums/v...ct007Large.jpg

    I just needed to solder one resistor on the back as shown above to make the micro switch input work, plus solder the red power link so it would work as a stand alone unit without the USB cable connected.

    It has loads of potential for clever target designs. Several can also be connected to a master micro controller to form a fully automated system. I imagine with some thought you could make a system that adds up the total target falls over a preset time period or starts and stops a timing board display.


    This is the Youtube video of it in operation.

    http://www.youtube.com/watch?v=t-IM87imTGY

    The code was reasonably simple in the end.
    Just a modification of some of the worked examples supplied in the online user guide.






    Here is the code to make it work. Just cut and paste it into the free Maestro control centre software and you are up and running.

    # Automatic falling plate target reset control
    # Wait for target plate to fall on to microswitch
    # After a preset delay then move servo arm forwards to reset the plate
    # Then return reset arm back to the home position
    # Return to the start of the sequence

    # Servo Connected to Output 0
    # Microswitch connected to Input 1 via pull up resistor
    # Onboard Red LED signals Microswitch activation and delay timer
    # Servo speed reduced while lifting target plate to avoid bounce

    # Uses WAIT_FOR_BUTTON_PRESS to allow a user to trigger a sequence
    # of position events on servo 0.
    begin
    frame
    repeat

    sub frame
    wait_for_button_press
    led_on
    4000 Delay
    50 0 speed
    4000 0 servo
    moving_wait
    led_off
    0 0 speed
    8000 0 servo
    return


    sub moving_wait
    begin
    get_moving_state
    while
    # wait until it is no longer moving
    repeat
    return




    # Returns 1 if the button is pressed, 0 otherwise.
    sub button
    1 get_position 500 less_than
    return



    # Waits for a button press, with debouncing.
    # (Requires the BUTTON subroutine.)
    sub wait_for_button_press
    wait_for_button_open_10ms
    wait_for_button_closed_10ms
    return

    # wait for the button to be NOT pressed for at least 10 ms
    sub wait_for_button_open_10ms
    get_ms # put the current time on the stack
    begin
    # reset the time on the stack if it is pressed
    button
    if
    drop get_ms
    else
    get_ms over minus 10 greater_than
    if drop return endif
    endif
    repeat

    # wait for the button to be pressed for at least 10 ms
    sub wait_for_button_closed_10ms
    get_ms
    begin
    # reset the time on the stack if it is pressed
    button
    if
    get_ms over minus 10 greater_than
    if drop return endif
    else
    drop get_ms
    endif
    repeat

    I hope that gives people some ideas?

    Thanks

    Mark

  4. #4
    sol1821 is offline I'm back from resting, and I have the Jaffacakes!!
    Join Date
    Mar 2008
    Location
    newport
    Posts
    3,752
    i thought if i left the sales section alone id be free from temptation, but no.

    I've had to add this to my list
    Particle physics gives me a hadron.
    Sliced bread.
    The best thing since ripped up bread.

  5. #5
    Join Date
    Apr 2005
    Location
    Grantham
    Posts
    1,384
    Quote Originally Posted by sol1821 View Post
    i thought if i left the sales section alone id be free from temptation, but no.

    I've had to add this to my list
    My work here is done.

    Hopefully you can now come up with some target ideas?

    I think I may struggle to get three systems from one controller as it cannot do simultaneous branching for my subroutines. Although I could perhaps queue them in sequence.

    I don't normally program in scripting language. I'm more used to relay logic that is used on the industrial controllers or PLCs that I program for a living.

    Thanks

    Mark

  6. #6
    Join Date
    Apr 2009
    Location
    Northampton
    Posts
    1,412
    That is bloody clever and makes me want some
    He who dies with the most toys wins. Flying, shooting, fishing and sports cars, what more could a man want.

  7. #7
    Join Date
    May 2011
    Location
    leeds
    Posts
    30

    Any updates?

    Quote Originally Posted by Cones View Post
    I got all the parts for my initial Target Reset Project today.

    This is how it looks so far.

    http://i699.photobucket.com/albums/v...ct004Large.jpg

    http://i699.photobucket.com/albums/v...ct007Large.jpg

    I just needed to solder one resistor on the back as shown above to make the micro switch input work, plus solder the red power link so it would work as a stand alone unit without the USB cable connected.

    It has loads of potential for clever target designs. Several can also be connected to a master micro controller to form a fully automated system. I imagine with some thought you could make a system that adds up the total target falls over a preset time period or starts and stops a timing board display.


    This is the Youtube video of it in operation.

    http://www.youtube.com/watch?v=t-IM87imTGY

    The code was reasonably simple in the end.
    Just a modification of some of the worked examples supplied in the online user guide.






    Here is the code to make it work. Just cut and paste it into the free Maestro control centre software and you are up and running.

    # Automatic falling plate target reset control
    # Wait for target plate to fall on to microswitch
    # After a preset delay then move servo arm forwards to reset the plate
    # Then return reset arm back to the home position
    # Return to the start of the sequence

    # Servo Connected to Output 0
    # Microswitch connected to Input 1 via pull up resistor
    # Onboard Red LED signals Microswitch activation and delay timer
    # Servo speed reduced while lifting target plate to avoid bounce

    # Uses WAIT_FOR_BUTTON_PRESS to allow a user to trigger a sequence
    # of position events on servo 0.
    begin
    frame
    repeat

    sub frame
    wait_for_button_press
    led_on
    4000 Delay
    50 0 speed
    4000 0 servo
    moving_wait
    led_off
    0 0 speed
    8000 0 servo
    return


    sub moving_wait
    begin
    get_moving_state
    while
    # wait until it is no longer moving
    repeat
    return




    # Returns 1 if the button is pressed, 0 otherwise.
    sub button
    1 get_position 500 less_than
    return



    # Waits for a button press, with debouncing.
    # (Requires the BUTTON subroutine.)
    sub wait_for_button_press
    wait_for_button_open_10ms
    wait_for_button_closed_10ms
    return

    # wait for the button to be NOT pressed for at least 10 ms
    sub wait_for_button_open_10ms
    get_ms # put the current time on the stack
    begin
    # reset the time on the stack if it is pressed
    button
    if
    drop get_ms
    else
    get_ms over minus 10 greater_than
    if drop return endif
    endif
    repeat

    # wait for the button to be pressed for at least 10 ms
    sub wait_for_button_closed_10ms
    get_ms
    begin
    # reset the time on the stack if it is pressed
    button
    if
    get_ms over minus 10 greater_than
    if drop return endif
    else
    drop get_ms
    endif
    repeat

    I hope that gives people some ideas?

    Thanks

    Mark
    any updates/developments after using your system? i'm starting down the same path!! any advice really appreciated.
    Thanks

  8. #8
    Join Date
    Apr 2005
    Location
    Grantham
    Posts
    1,384
    Hi,

    After we completed this initial project we moved on to the 5 turning target system you will see later on in this thread.

    Both systems work well and are in use at Lincs HFT club. I suspect with more time and a little more development that a bidirectional falling plate system could be produced with a scoring system incorporated into the controller.

    The Arduino based controllers and xbee radio units used in the second project could be adapted for this.

    I will be looking at it in the future, but am just enjoying my pistol shooting at the moment.

    Thanks

    Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •