- Sat Jan 14, 2012 2:02 pm
#138225
I'm trying to build an airsoft gun shot counter.
The first step was getting an Arduino to control the motor. Airsoft motors draw high loads from 6v-18v batteries (I want to use an 11.1v LiPo). I picked up a Sparkfun MOSFET breakout board http://www.sparkfun.com/products/10256 to make my life easier (I'm not an electrical engineer, not even close) during the prototyping phase. I swapped out their MOSFET for a higher rated MOSFET. I know the circuit limitations are probably on the circuit board traces, not the MOSFET, but I'm only prototyping this on a bench right now. Eventually I'm going to have to tackle the problem of massive electrical traces (again, I'm trying to go in small, easy steps).
I rigged everything together today on my workbench. I was stunned when everything worked. I push the button, and the gearbox fires. I let go of the button, and it stops.
I'm trying to figure out how to actually count the number of shots. Before I even tried to trigger the gun with a microprocessor, I tried to measure the number of shots with a photo-interrupter attached to the barrel.... I had issues with that. Eventually I want to get back to that, but right now I'm trying to approach it from a different angle.
An airsoft motor works cyclically. It's an electric motor (similar to the brushed motors in RC cars). However, it fires the airsoft pellet by compressing and then releasing a spring. It has periods where it has to work (very hard) to compress the spring, and then "free periods" where the spring has been released.
Is there a way to measure those periods using the Arduino's analog inputs? Can I measure the amps drawn by the motor? I'm thinking that this would allow me to monitor the electrical situation of the airsoft gun.
Where would I measure it from? How do I protect the Arduino from electrical spikes inherent to this project?
I'm trying to build an airsoft gun shot counter.
The first step was getting an Arduino to control the motor. Airsoft motors draw high loads from 6v-18v batteries (I want to use an 11.1v LiPo). I picked up a Sparkfun MOSFET breakout board http://www.sparkfun.com/products/10256 to make my life easier (I'm not an electrical engineer, not even close) during the prototyping phase. I swapped out their MOSFET for a higher rated MOSFET. I know the circuit limitations are probably on the circuit board traces, not the MOSFET, but I'm only prototyping this on a bench right now. Eventually I'm going to have to tackle the problem of massive electrical traces (again, I'm trying to go in small, easy steps).
I rigged everything together today on my workbench. I was stunned when everything worked. I push the button, and the gearbox fires. I let go of the button, and it stops.
I'm trying to figure out how to actually count the number of shots. Before I even tried to trigger the gun with a microprocessor, I tried to measure the number of shots with a photo-interrupter attached to the barrel.... I had issues with that. Eventually I want to get back to that, but right now I'm trying to approach it from a different angle.
An airsoft motor works cyclically. It's an electric motor (similar to the brushed motors in RC cars). However, it fires the airsoft pellet by compressing and then releasing a spring. It has periods where it has to work (very hard) to compress the spring, and then "free periods" where the spring has been released.
Is there a way to measure those periods using the Arduino's analog inputs? Can I measure the amps drawn by the motor? I'm thinking that this would allow me to monitor the electrical situation of the airsoft gun.
Where would I measure it from? How do I protect the Arduino from electrical spikes inherent to this project?
Last edited by StaticDet5 on Tue Feb 14, 2012 10:04 am, edited 1 time in total.
Static