Shop OBEX P1 Docs P2 Docs Learn Events
head tracking for remote paintball gun — Parallax Forums

head tracking for remote paintball gun

zed of zardozzed of zardoz Posts: 20
edited 2014-03-24 03:26 in Robotics
Hey yall,
I'm in the beginning stages of making a paintball tank and I have hit a problem. I want to make it a one man tank with a gun on top. I can always control it with a joystick, but I thought maybe I could use head tracking to minimize cluttering up the tank insides. Perhaps with the sensor attached to the inside or top of the paintball helmet.

I was thinking of using the "Memsic 2125 Dual-axis Accelerometer" to measure pan and tilt.
http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/93/Default.aspx?txtSearch=Memsic+2125+Accelerometer

My question is how would I do this with a board of education if possible. Yes it would basically be the same as the shoulder gun the predator has. Just bigger.

thanks

Comments

  • ercoerco Posts: 20,255
    edited 2012-05-16 15:46
    Sounds interesting. Are you riding inside this tank?
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-05-16 20:26
    yes i will be.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-16 20:46
    I was thinking of using the "Memsic 2125 Dual-axis Accelerometer" to measure pan and tilt.
    http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/93/Default.aspx?txtSearch=Memsic+2125+Accelerometer

    My question is how would I do this with a board of education if possible.

    The accelerometer could tell how much your head is tilted but it wouldn't be able to read how much it is turned side to side (pan). You could use the side to side tilting of your head as a pan command but it wouldn't be able to follow your natural head movements. You'd also need to incorporate a gyro if you wanted to sense the "pan" motion of your head.

    "how would I do this with a board of education?" is a is pretty broad question. Do you have a BOE? Can you control a servo (or two) with it?

    You'd need to read the sensors, perform the necessary calculation and control the servos.

    I suppose this might all be possible with a BS2, but I'm not sure.
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-05-16 20:54
    awesome. thanks
  • ercoerco Posts: 20,255
    edited 2012-05-17 06:02
    If it's somewhat shielded from sunlight inside, you could simply wear a headband with an IR LED shining forward, and track that with several IR sensors inside the turret. Or go purely mechanical: wear an analog joystick on your shoulder, handle linked to a headband. Could sense head rotation and tilt for XY positioning. A BoE can easily RCtime the analog joystick pots.
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-05-17 08:29
    I dont think the ir idea would be feasable as i would be driving the tank and need windows to see out as a remote cabera could be rendered useless by a single paintball or heavy rain.(which happens more often than not.) I dont think the joystick would work either as I would be sticking my head out a turret hatch to drive around when not on the field.

    I'm going to order the Memsic 2125 and the parallax LISY300 Gyroscope Module and go from there as I'm trying to keep it compact.by having the sensors in a helmet and the board nearby connected via jumper wire.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-17 08:38
    I'm going to order the Memsic 2125 and the parallax LISY300 Gyroscope Module and go from there as I'm trying to keep it compact.by having the sensors in a helmet and the board nearby connected via jumper wire.

    I'm pretty sure the Memsic 2125 doesn't work up side down or at other extreme angles. I think a 3-axis gyro would be more versatile. It also costs less.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-17 08:41
    For an even less expensive 3-axis accelerometer, use the guts of a Nunchuck.
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-05-17 08:47
    Duane Degn wrote: »
    I'm pretty sure the Memsic 2125 doesn't work up side down or at other extreme angles. I think a 3-axis gyro would be more versatile. It also costs less.

    I don't intend on my head being more than 90 degrees off level in any direction while using the setup. If im upside down in the tank ive got bigger problems than if the sensor works.
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-05-22 22:33
    i received the lisy300 and got it running. but being as i didnt order the memsic 2125 i need to wait for that to arrive. For the robot arm i have come into posession of a microbot alpha 2 without a controller. Being as each pin controls a different channel im thinking of rigging up the output from the lisy300 and memsic2125 to control the alpha 2. does this sound crazy or is what im thinking of possible? I can get pics of the arm in the next day or so.
  • xanaduxanadu Posts: 3,347
    edited 2012-05-22 23:09
    Zed,

    If you're going to track a remote head you need a Kinect. If you want to track your own head, Duane hath spoken, check out the wii nunchuck. A good reason to use a nunchuck is other people have and you'll be on your way quickly. It would also be cool to see a Nintendo sticker on a tank, just a thought.

    Don't drive your tank down a public road to the paint ball game though mkay?
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-05-22 23:39
    youre saying to use the nunchuck simply because it has a miniature joystick in it, correct? that and it has 2 triggers.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-23 08:30
    youre saying to use the nunchuck simply because it has a miniature joystick in it, correct? that and it has 2 triggers.

    Actually, you might want to remove the joystick.

    A Nunchuck has a 3-axis accelerometer and is relatively easy to interface a Nunchuck to a microcontroller. It's the accelerometer that you'd be after. Besides being easy to use, Nunchucks are relatively inexpensive.

    Here are some pictures of the PCB inside a generic Nunchuck before I removed the joystick.

    I used a couple of resistors in place of the joystick since I'm not sure it will work without some resistance where the joystick had been (based on a post by Cluso99).

    I personally no longer buy generic game controllers. I've found many generic game controllers don't have the precision as the original controllers.

    I believe the generic Nunchuck's accelerometer has fewer bits of precision than the original Wii Nunchuck.

    A generic PS2 controller I've used, only has 5-bits precision on its joysticks while a Sony controller has 8-bits of precision.
    670 x 395 - 674K
    721 x 372 - 649K
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-05-23 08:39
    awesome. so im off to get me a nunchuck then.
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-05-25 05:43
    Duane Degn wrote: »
    A generic PS2 controller I've used, only has 5-bits precision on its joysticks while a Sony controller has 8-bits of precision.

    How would I tell if its a real nunchuck in that case, instead of a 5-bit copy if im looking to buy it online? I.e. ebay.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-25 12:22
    It might be hard to tell if a Nunchuck is a clone or not on eBay.

    There are lots of stores that should be selling the real thing. I think Amazon would be a good place to purchase a Nunchuck, or Gadget Gangster (theirs looks like the real thing anyway).

    You local retailers should be selling real Wii Nunchucks if they are clearly marked as such.
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-05-25 13:54
    okey dokey then. off to the local stores.
  • tobdectobdec Posts: 267
    edited 2012-06-07 11:03
    Im really interested as to how this pans out. A buddy and I are working on a head tracking solution as well. When do you think you will have a working model? As far as the helmet goes anyway...not the whole tank.
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-06-07 11:21
    im gonna try to get a used nunchuck this week so I can get back to this project.

    @tobdec:do you and your friend have a thread on your attempt?
  • tobdectobdec Posts: 267
    edited 2012-06-07 11:30
    No this was a drunken idea come to rational thinking just this week. Basically our project will be a lightweight virtual reality in a dark closed room so we have the luxury of lasers and IR tracking as well as gyros and accelerometers. Im just curious how yours turns out as to if we will end up adding accelo's as well as IR tracking and lasers. Ours hasn't even became a solid yes were gona do this yet. Basically we have a much much larger project this wil be a small part of and we're researching how feasable it is before we even annouce it. As far as used nun'chucks go...try a flea market bud, someone is bound to be selling on outa the trunk or junk pile for ooo say 2 bucks? Craigslist? This is how I would go about finding a used one easily and cheap.
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-11-14 20:22
    I've applied a hacksaw to a nunchuck and come out with the guts. Any suggested order of operations in removing the joystick?
    2012-11-14_21-51-47_909.jpg
    1024 x 575 - 83K
  • neverfinishedneverfinished Posts: 7
    edited 2012-11-15 18:48
    Excuse me if this is off topic but i'd love a write up on how you built your tank and where you got your components.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-11-15 19:34
    I've applied a hacksaw to a nunchuck and come out with the guts. Any suggested order of operations in removing the joystick?

    If you don't want to save the joystick and you can get to the pins, the easiest way to remove it would be to cut it off (a X-acto knife might be able to fit between board and the joystick).

    If you want to save the joystick then the easiest way would be to use Chipquik. A heat gun might also work. (I bet it would be a lot easier to just cut the joystick off. Joysticks that size are not very expensive.)

    Once you get the joystick off, you might need to add some resistors so it looks like there is a joystick to the microcontroller in the Nunchuck. I used four 5K resistors but I bet resistors between 3K and 10K would work. solder the resistors between the first and middle holes left by joystick. You'll also need resistors between the third and middle holes.
  • zed of zardozzed of zardoz Posts: 20
    edited 2012-11-16 06:13
    @neverfinished I'm still in the design phase of the tank and dont really have anything to show for it. Recently I've been leaning towards the ft17 from ww1 but thats a whole different thread on a different board. Which doesn't exist.

    @Duane Is there anything sensitive under the joystick? I'll try the chipquik or equivalent product.

    UPDATE: Joystick removed with extreme prejudice.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-11-18 09:30
    UPDATE: Joystick removed with extreme prejudice.

    Good to hear.

    I just saw your update after refreshing this thread. I was about to upload some "before" and "after" photos of my Nunchuck's PCB. I found it yesterday and took some pictures.

    I'll just upload the "after" pictures now.

    This is the side that had the joystick.

    attachment.php?attachmentid=97120&d=1353259480

    It also has a small crystal. I wanted this side of the PCB to be bare (to make easier to attach to things) so I moved the crystal to the other side of the PCB.

    Cluso99 had once said something about needing to replace the joystick with resistors so I added some 5.1K resistors to the other side.

    attachment.php?attachmentid=97119&d=1353259448

    I hope you keep us updated on your progress.
    785 x 434 - 174K
    732 x 328 - 109K
  • alisajacquelinealisajacqueline Posts: 1
    edited 2014-03-24 03:26
    Would be interested to see how this turned out...always interested in remote paintball gun projects.
Sign In or Register to comment.