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.
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.