Auto turret help

hi im new to this forum so bear with me
i am making a Nerf gun motion tracking turret and im done building everything but im stuck how to make the electric gun fire remotely
these are my two thoughts
1.use the battery on the gun and make a switch that a vex motor presses
2.hard wire the switch in the gun to the vex micro controller so it can be turned on by that remotely through programming
(the gun uses 3 AA batteries so 4.5 volts but i don’t know how much the vex micro controller puts out? and if it is compatible how would i wire that, maybe with a modified pwm cable?)

(which one is more practical?)
if anyone is wanting to know which sensors I’m using it’s this sensor http://www.radioshack.com/product/index.jsp?productId=2906724

Decent questions - The are hobbyists who use this forum who are better able to answer them than I, so I’ll hold off on them, and instead raise my own question.

That sensor doesn’t appear to tell you anything about the direction of motions (IR level changes) it detects. I’ll be surprised if you are able to use it in a simple device that points a Nerf turret. Am I overlooking something? Does it actually track IR sources already?

Blake

I’ve had a team do that, and it worked OK. They used a motor turning a drum to pull a string tied to the trigger. It was a bit tricky to get it adjusted just right, and you could hear the motor turn for a second or so before it generated enough pull to trigger the gun. This particular nerf gun was fully mechanical, so hardwiring was not an option.

That is what I would do if it were me. 4.5V seems about right if you use a transistor driven by a digital output port. See this drawing for a schematic that might work for you to hard-wire it.

I’ve used this sensor with Vex to trigger haunted house props. ([thread)
It woks fine with Vex, but be aware that your robot cannot move while the sensor is being used, because it will “see” the world moving. In other words, it does not know that the robot is moving, so it just registers its entire field of view moving.

Cheers,

It can’t really be used for tracking. It will register if an IR source moves across its field of view, but it won’t tell you where in its field of view, or the speed or direction of motion. I don’t think it will help with aiming. It’d be fine for monitoring a hallway where the target has to be in a confined area.

Cheers,

  • Dean

The IR sensor can be used for tracking just use more than one with a shield of some sort between them. In days gone by simple LDRs were used in pairs to track a light in the same way. Just turn the ‘eyes’ until they register the same light level. If you use 4 then you can track up/down and left to right.

That won’t work with these. They do not report analog light levels - they simply pulse when they see movement of an IR emitter in their field of view. If you move them as a scan head typically would, they will pretty much always register movement.

I’ve spent some time playing with these particular PIR detectors and I don’t think you could make a reliable tracking device with these, even with a fairly large array of them. They just aren’t that precise.

Cheers,

  • Dean

I’ve used this sensor with Vex to trigger haunted house props. (thread)
It woks fine with Vex, but be aware that your robot cannot move while the sensor is being used, because it will “see” the world moving. In other words, it does not know that the robot is moving, so it just registers its entire field of view moving.

Cheers,

  • Dean
    the robot will be stationary

So what kind of sensor would you recommend and how would i get it/use it

ok what i ended up doing was i took my pwm cable cut it in half:( and wired the white wire to the switch in the gun (the original switch was two, little metal tabs, one connected to the + of the battery pack and the other was wired to the + of the motor. they were pushed together when the trigger was pulled) and the black wire to the battery back wires the i plugged the male end of the pwm cable to a bumper switch witch is triggered by a servo pressing it.

the gun now runs on its own battery power now :slight_smile:
( i will post pic of the wiring soon)
i did mount the gun on the stationary robot, it moves the gun left/right up/down and then i hooked it up to my vex controller. so it is not anonymous YET and i shot my uncle with it repeatedly he he

The PIR sensor would be OK to monitor a fixed location like a doorway, where you can pre-aim the nerf gun and just fire whenever the sensor sees motion.

If you need to actually aim the gun at the source of motion, you are going to need something more sophisticated. I’ve seen robots use video trackers that could do this - compare successive frames of video and identify motion in some particular area. Perhaps CMUcam? I don’t have any personal experience with such technology, though.

Cheers,

  • Dean