Airsoft Canada
https://www.replicaairguns.ca/airsoft

Go Back   Airsoft Canada > Discussion > Upgrades & Modifications
Home Forums Register Gallery FAQ Calendar
Retailers Community News/Info International Retailers IRC Today's Posts

Arduino inside airsoft gun?

:

Upgrades & Modifications

Reply
 
Thread Tools
Old April 24th, 2016, 16:37   #1
devbro
 
Join Date: Feb 2016
Location: Thornhill, ON, Canada, North America, Earth
Arduino inside airsoft gun?

I know, I know, i am over engineering, it has no place in there, why do you even wanna do this?

The basic answer is I want to see how far I can take this idea:
To create a Smart Gun. A gun that is able to manage itself using a mini computer.

I have a few ideas that I want to implement:
1. shot counter
2. mosfet
3. flashlight
4. bluetooth
5. eye sight digital display

Before I start with hard wiring and taking one of my guns apart, I want to know if others have tried this before or not? What level of success you had? Did you run into any particular problem?

and above all:
What other ideas can you think of for me to put on the board?

Last edited by devbro; April 27th, 2016 at 12:37..
devbro is offline   Reply With Quote
Old April 24th, 2016, 16:41   #2
lurkingknight
"bb bukakke" KING!
 
Join Date: Jul 2011
Location: Ottawa
there was someone on airsoftmechanics a couple years ago building an advanced fet using arduino, he had an oled screen in an eotech and was messing around with a ton of interesting stuff. he disappared though. He had built a number of beta units for testing by people as a base firecontroller with rof controll, braking, precocking, etc. The add on modules were something he was playing with for later like the hud in the eotech, he also did preliminary work on gps tracking, wireless access, shot counter, elevation assist.
__________________
I futz with V2s, V3s and V6s. I could be wrong... but probably, most likely not, as far as I know.
lurkingknight is offline   Reply With Quote
Old April 24th, 2016, 16:43   #3
Drakker
Official ASC Geomorphologist
 
Drakker's Avatar
 
Join Date: Sep 2009
Location: Montr?al south shore, Qc
It's already available. This guy makes AVR based computerized mosfets.

http://extreme-fire.com/

The AVR processors he uses are the same you will find in Arduinos. It doesn't work exactly like an Arduino, but its close enough.

If you ask him for the Trigger Master software (made by a guy on this forum that used to sell computerized mosfets like 10 years ago) you'll have an already working shot counter. Most of his stuff is open, so you could make your own if you want. He has diagrams on his site and will share the code.

If you buy one of his computerized FETs and want to toy around with it, make sure you get one that can be re-flashed.
__________________
Keep quiet. Sound travels faster than BBs.

Québec province's master age verification representative.
Drakker is offline   Reply With Quote
Old April 24th, 2016, 16:47   #4
lurkingknight
"bb bukakke" KING!
 
Join Date: Jul 2011
Location: Ottawa
pretty sure the TM cheetah 2n doesn't have a shot counter. The arduino based unit is the lion.
Any computerized fet could be considered a 'smart gun' as they all have voltage measuring, lipo cutoff, poly fuses, cycle completion sensing at the very least. Some have automatic cycle completion.

schematics and component lists for both cheetah 2n and lion are available on extreme-fire if you want to build your own and play with developing the actual modules. BTC spectre and chimera are based off the lion design.
__________________
I futz with V2s, V3s and V6s. I could be wrong... but probably, most likely not, as far as I know.
lurkingknight is offline   Reply With Quote
Old April 24th, 2016, 16:59   #5
devbro
 
Join Date: Feb 2016
Location: Thornhill, ON, Canada, North America, Earth
Quote:
Originally Posted by lurkingknight View Post
pretty sure the TM cheetah 2n doesn't have a shot counter. The arduino based unit is the lion.
Any computerized fet could be considered a 'smart gun' as they all have voltage measuring, lipo cutoff, poly fuses, cycle completion sensing at the very least. Some have automatic cycle completion.
These are all ideas for under the hood. How to make the internals work better together. As long as I can shoot my gun without breaking it then I am happy. I want to add things that make it more fun.

The original idea that I have is primarily based on shot counter. I do not want to spoil the details until I create a working concept gun. I was also thinking of a display but not sure how useful it can be or what kind of info I can show on it.
devbro is offline   Reply With Quote
Old April 24th, 2016, 18:11   #6
CBC_North
 
Join Date: Nov 2006
Location: Ottawa, ON
A small form factor arduino would be fine for a shot counter. You could go with just a raw microprocessor (such as the one that's on the arduino board) which would save some space, but the arduino will be MUCH easier to program if you're not used to dealing with this kind of stuff.

Attach a sensor to record when a shot is fired and a small LCD or OLED to display the info to the player and it's just programming from there. Lots of arduino compatible sensors and displays on ebay.

Hardest part would probably be getting the sensor to accurately trigger on each shot. There are multiple ways to do this. I would look around at how some of the existing solutions work (mock suppressors that flash every time a shot is fired is a good example).
CBC_North is offline   Reply With Quote
Old April 24th, 2016, 19:21   #7
Drakker
Official ASC Geomorphologist
 
Drakker's Avatar
 
Join Date: Sep 2009
Location: Montr?al south shore, Qc
Quote:
Originally Posted by lurkingknight View Post
pretty sure the TM cheetah 2n doesn't have a shot counter.
The cheetah can take the Trigger Master software, which includes the shot counter, but it uses all flash code space, so if you want to add features, you have to remove other features that are part of the TM software.

Not sure if the cheetah is re-flashable though. There used to be a comparison table with all that information on the site but its not there anymore. You better ask Terry (the extreme-fire guy, he's very helpful and answers really fast).

You can count shots mostly-accurately by monitoring voltage, there's a spike when the motor works the hardest at the end of the spring compression. If you sample the voltage often enough, you can spot these spikes and effectively count shots. Of course an actual external sensor would do a better job, but then again its more work. :)
__________________
Keep quiet. Sound travels faster than BBs.

Québec province's master age verification representative.
Drakker is offline   Reply With Quote
Old April 24th, 2016, 19:52   #8
devbro
 
Join Date: Feb 2016
Location: Thornhill, ON, Canada, North America, Earth
Quote:
Originally Posted by Drakker View Post
You can count shots mostly-accurately by monitoring voltage, there's a spike when the motor works the hardest at the end of the spring compression. If you sample the voltage often enough, you can spot these spikes and effectively count shots. Of course an actual external sensor would do a better job, but then again its more work.
I have seen the demonstrations of this on youtube and there was a guy from toronto that shows how to do it.

I am working on a sensor that counts the actual number of bbs that are shot not the voltage. Maybe I opt for both and see what I can do with both of them.

Assuming I get all the parts in the next few fews weeks, I should be able to create a demo by end of may.
devbro is offline   Reply With Quote
Old April 24th, 2016, 20:29   #9
CBC_North
 
Join Date: Nov 2006
Location: Ottawa, ON
That's interesting Drakker. I guess it makes sense that the trigger master can count shots because it has the burst fire mode.

All the trigger master code is open source as well so you should be able to see how the voltage monitoring is done:
http://unconventional-airsoft.com/20...rigger-master/
CBC_North is offline   Reply With Quote
Old April 24th, 2016, 21:20   #10
Drakker
Official ASC Geomorphologist
 
Drakker's Avatar
 
Join Date: Sep 2009
Location: Montr?al south shore, Qc
Quote:
Originally Posted by devbro View Post
I have seen the demonstrations of this on youtube and there was a guy from toronto that shows how to do it.

I am working on a sensor that counts the actual number of bbs that are shot not the voltage. Maybe I opt for both and see what I can do with both of them.

Assuming I get all the parts in the next few fews weeks, I should be able to create a demo by end of may.
Keep us up to date on your sensor choice. I might want to get one too. I have an SW-Lion that's been sitting on my desk and collecting dust for the last two years because of lack of free time. I was planning to add switches in the magwell and behind the bolt release and have the gun stop firing after 30 rounds through software, and force a reload by detecting that the mag was removed. Won't fire until a mag is inserted and the bolt release has been pushed. You can guess that I play only real ammo capacity games.
__________________
Keep quiet. Sound travels faster than BBs.

Québec province's master age verification representative.
Drakker is offline   Reply With Quote
Old April 27th, 2016, 10:25   #11
ccyg8774
 
ccyg8774's Avatar
 
Join Date: Jun 2012
Location: Brampton, ON
Was thinking about an Arduino based MOSFET last year, but didn't really start the project.
Recently working on something similar to this with a copy 552 sight:
http://www.thefirearmblog.com/blog/2...rduino-inside/
__________________
ccyg8774 is offline   Reply With Quote
Old April 27th, 2016, 10:53   #12
devbro
 
Join Date: Feb 2016
Location: Thornhill, ON, Canada, North America, Earth
Quote:
Originally Posted by ccyg8774 View Post
Was thinking about an Arduino based MOSFET last year, but didn't really start the project.
Recently working on something similar to this with a copy 552 sight:
http://www.thefirearmblog.com/blog/2...rduino-inside/
I really like this I shall add it to my TODO list. Thank you.
devbro is offline   Reply With Quote
Old April 27th, 2016, 14:49   #13
dmitril
 
Join Date: Aug 2014
Location: GTA
Send a message via Skype™ to dmitril
I've done something similar to add precocking and hair trigger to my aeg. The problematic part was dealing with a rather powerful motor and sensing piston position. Initially I tried using hall effect sensor that turned out to be sensitive to motor starting/braking and the final solution was too complicated for my liking. As final solution I drilled out a slot at the end of the gearbox and placed a micro-switch inside which has been working reliably.

A problem in general with microswitches tends to be the need to debounce though I've done that on the cheap with SW solution. To note, I've done this with Steyr Aug and got rid of the stock trigger in favour of microswitches and microcontroller controlled ab mosfet.

If you aren't looking for a custom bullpup solution you are way better off buying a ready made item. Materials for this project came down to about ~$30+shipping, I needed at least 20hrs of engineering to get all the bugs ironed out though.

P.S. I've also got a bb detect functionality that has not been properly tested. This was surprisingly one of the easier things to implement as all I needed was stick a microswitch in the bb feed path(dremel out space for it) and on any change I know a bb has been fed.

Last edited by dmitril; April 27th, 2016 at 14:55..
dmitril is offline   Reply With Quote
Old April 27th, 2016, 15:28   #14
devbro
 
Join Date: Feb 2016
Location: Thornhill, ON, Canada, North America, Earth
Quote:
Originally Posted by dmitril View Post
P.S. I've also got a bb detect functionality that has not been properly tested. This was surprisingly one of the easier things to implement as all I needed was stick a microswitch in the bb feed path(dremel out space for it) and on any change I know a bb has been fed.
I guess I shall share my current idea as it is close to what you have done. I have made a hole on the hopup unit. the hole is between the bbs before getting to the air nozzle. As bbs are pushed forward they will be forced to push a basic push button switch (http://cooking-hacks.com/wp/wp-conte.../10/switch.png) 6mm one. The problem I have run into is the thickness of hopup. I have ordered special buttons that are longer (http://www.ebay.ca/itm/331839596209) they should arrive in a week or so. From there I will be attaching it to arduino and transmit the info to my phone.

Did you have any reason to pick a microswitch instead of the basic push button?
devbro is offline   Reply With Quote
Old April 28th, 2016, 15:37   #15
dmitril
 
Join Date: Aug 2014
Location: GTA
Send a message via Skype™ to dmitril
Size and low force required to trigger the switch. Due to the location of the switch it takes an appreciable amount of force to feed the bbs through. In fact, I had feeding issues until I dremeled the microswitch smoother.
dmitril is offline   Reply With Quote
ReplyTop


Go Back   Airsoft Canada > Discussion > Upgrades & Modifications

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Airsoft Canada
https://www.replicaairguns.ca/airsoft

All times are GMT -4. The time now is 17:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.