Edit/Update 1: current circuit diagram here http://members.iinet...rf/circuit2.jpg
Please read this post about the 2 bits circled in red, they're optional: http://nerfhaven.com...trike/?p=349981
Edit/Update 2: Arduino sketches can be downloaded here:
Rapidstrike: https://drive.google...iew?usp=sharing
Stryfe: https://drive.google...iew?usp=sharing
Read this post for details: http://nerfhaven.com...e-2#entry351112
Hi all, a noob here.
After recently getting hold of a Rapidstrike, i decided i'd add a shot counter, in preperation for a repaint to look vaguely like an Aliens assault rifle. Figured while i was at it i'd make 2 and add one to my Stryfe as well!
I'm good with electronics, and decided an arduino would be the way to go, ordered everything on ebay and finally put it together over the last few days.
Breadboarded it first, used an Arduino pro mini since theyre small and cheap, added a 7 segment driver, couple of discrete components and the displays and voila! There are 4 switches on the breadboard, the 2 lever switches are for power, and triggering. The idea of the power one is it will only turn the circuit on when a magazine is inserted. And 2 small pushbuttons which will be used for magazine size detection. More on that in a bit.
Since theres loads of room in a Rapidstrike to the right of the magazine, i wired it all up on a single board that fits nicely. The leads are long but will shorten them when i actually install it. This has red digits.
I wire wrapped the back instead of soldering, far simpler when prototyping.
But that whole board is too big for a Stryfe, so i made a smaller version with the displays seperated. The little red/black wires you see disconnected go to the trigger switch and will be soldered at installation time. This has blue digits.
To save space, after soldering in headers to the Arduino to use for wire wrapping, i use double sided tape to stick the 7 segment drive underneath the arduino. Makes it nice and compact.
Decided to install in the Stryfe first, so cut out a hole for the displays and glued in the trigger microswitch. You can see here how the trigger mechanism presses against it.
I left the jam door switch connected, but bypassed the magazine insertion switch, and instead wired that up to turn the arduino on whenever a magazine is inserted. Wont drain battery that way, and acts to reset the counter when a mag is inserted.
Theres a space in the top of the gun above where i installed the trigger switch which is perfect for the arduino board, and obviously i sized the length of the cables to reach where the display sits. The display isnt fixed in place yet, just sitting there in the pic.
All assembled. The lighting makes the displays look superbright, but they're not, the brightness is controlled by the arduino and is actually turned right down. Just a camera lighting trick making them look super bright.
At the moment the Stryfe counter doesnt have magazine size detection, since i was going to try and make the placement of the switches the same in the Rapidstrike and Stryfe so i dont need to do much to the mags. Where i planned to put them in the Rapidstrike at the front of the mag wont work in the Stryfe. But i have now worked out how to do it, they'll be mounted on the left side of the gun near the top of the magazine.
Basically, all the magazines have molded ridges on them, like this:
So i'll just add a couple of notches to those ridges (where circled) to encode the magazine size. With 2 switches, i can set 4 sizes.
ie:
Pressed/Pressed = 18
Pressed/Not Pressed = 12
Not Pressed/Pressed = 6
Not Pressed/Not Pressed = 35 drum
And its just a matter of adding a notch (or not) on the appropriate ridge. Pressed means there is no notch and the ridge presses the switch. That way i dont need to do anything to my mags which are mostly 18's. And the 12 and 6's i have each only need 1 notch on the correct ridge, so minimal effort. The only one left out is a 25 drum, but that could be done by adding another switch. The arduino can do it, i just havent bothered since i dont have a 25 drum.
Not including wire/tools/time, the common parts cost (in US$) was:
Arduino Pro Mini with headers $2.92 each
7 segment driver $0.54 each
7 segment displays $0.79 each
Lever microswitch $0.65 each
Tactile switches $0.10 each
The larger one also has:
PCB $0.30
Wirewrap IC sockets $0.95 each, used 4
10k resistor $0.24 each
10uf 16V electrolytic capacitor $0.30
100n ceramic capacitor $0.32
(the 2 capacitors arent strictly necessary)
So total cost for the big one: $10.85
Small one: $6.13
Plus a few hours assembling and coding.
Edited by Kingbob, 25 January 2016 - 11:51 PM.