Arduino to Airsoft Gun interface Critique

Thread Starter

Bbrown81

Joined Apr 15, 2018
7
Hi all, I am working on a game/simulator using an Airsoft gun. My goal is to use an Arduino to detect and control the signal from the trigger to the gate of the MOSFET in the gun. I need the ability to count shots fired, and cut the signal to MOSFET to simulate an empty magazine. The Arduino will use a separate power supply either USB or a small battery, and I would like the gun and Arduino to isolated from each other. I also would like the gun to function as normal when the Arduino is off, so I can use it as a normal AEG. My idea is to use an optocoupler to detect the trigger presses, and a form B SSR (Normally closed so i can turn off the arduino and use as normal) to cut off the signal to the guns MOSFET gate. I do not have a lot experience with circuit design so I was wondering if you could take a look at the circuit i have come up with and let me know if it will work, or offer any suggestions for a better solution. Thanks in advance for any help.Screenshot from 2021-02-22 18-27-00.png
 

Attachments

Thread Starter

Bbrown81

Joined Apr 15, 2018
7
Thank you for taking a look. I am having trouble fitting a battery in the space I have, so I am thinking I may have to use the Airsoft guns battery to power the Arduino. From what I have read these motors draw upwards of 30 amps with lots of rapid starts and stops, so I am concerned with voltage spikes from the motor to Arduino if i do this. Do you think the builtin protection on an Arduino nano's Vin are enough for this, or should I add something to help protect it?

Here is the new schematic I am thinking about going with.
Screenshot from 2021-02-25 17-27-55.png
 

Attachments

Thread Starter

Bbrown81

Joined Apr 15, 2018
7
sorry there is a mistake in that schematic. pin 1 of the switch in the airsoft gun should be going to the + side of the battery.
 

Thread Starter

Bbrown81

Joined Apr 15, 2018
7
Thanks for the quick reply. D1 is integrated into the controller for the gun so there is not much I can do to move that, but I think I will add your suggested protection just to be safe.
 
Top