In-line motor control

Hi.

I am looking at building a micro-controlled motor circuit that will turn on for a given amount of time once the Arduino senses that the circuit has been completed. That is, once a momentary switch is triggered, the Arduino senses the completed circuit, and only allows the electricity to flow for, say 3 seconds, then the circuit is closed until the trigger is pulled again. The idea is to make a "burst chip" for an airsoft gun so that when the trigger is pulled, only 3 (more or less) shots are fired. I figure that if I know how long the gun's motor must turn to pop out 3 shots, the Arduino can be programmed to only keep the motor on for that amount of time once it senses the trigger has been pulled (circuit has been completed). The Arduino must be connected in-line with the battery since the case cannot be modified; only the battery connector can. The battery is 8.4v, 1500mAh.

This should be relatively simple but I am somewhat new with Arduino programming so any help is much appreciated.

Do you have a complete idea of what is inside the gun case? Just a trigger, battery and motor, simple like a flash light? Or there's more to it?

You are saying the gun case can't be modified so without modifying the case, can you access the motor connection at all?

The circuit is extremely simple in auto mode: pull the momentary trigger and the motor spins.

In the past I've seen an airsoft gun on a bot controlled via a MOSFET and a simple connector setup like below in the battery compartment so the gun did not need to be modified.

MOFSET looks smaller and easier, but they're pretty spendy (~$85). I'll look into it a bit further. Great suggestion.

MOFSET looks smaller and easier, but they're pretty spendy (~$85).

How about $.95?

http://www.sparkfun.com/products/10213

I found some pretty nice prefab mofset controllers here: http://extreme-fire.com/SW-CHEETAH-2N.html All are spendy. Any idea how to replicate that with an arduino?

All are spendy. Any idea how to replicate that with an arduino?

Search the board for "motor" and "relay" to find the type control setup you need.

Will do. Thank you.