Jump to content

Kingbob's Content

There have been 133 items by Kingbob (Search limited from 10-June 93)

By content type

See this member's

Sort by                Order  

#348861 TR-27 GRYPHON - CR-18 Rapidstrike Mod

Posted by Kingbob on 27 September 2015 - 04:55 AM in Modifications

I am planning on duplicating your mod in my own rapidstrike within the next month or so. If you want/need a beta tester, your kit would save me a lot of time. I am extremely tech savy, and have a friend who is arduino experienced and a very good coder who is willing to help me with the project. I would be very interested in buying a kit from you, even if it's in an alpha or beta state.

If you want to add smartphone control, you can do it the easy way over bluetooth. If you add a bluetooth UART from Adafruit you can use their existing Android/IOS app to send data back and forth.

Love your build. Started doing the same thing to mine as well. Built mine on a single board like this:
Posted Image

But once installed so the displays are on the right side of the gun, i found it was slightly too thick and was interfering with the magazine.
Posted Image

So ive since made a far smaller version:
Posted Image

My magazine detection is using switches to detect the ridges on the sides of the magazines. With a couple of notches its quite simple.

If you're running out of pins on the pro mini, and dont want to use a larger arduino, you could always use an i2c multiplexer/extender to let you use more devices.

#348863 TR-27 GRYPHON - CR-18 Rapidstrike Mod

Posted by Kingbob on 27 September 2015 - 11:47 AM in Modifications

Very nice work there! What are you doing to control your motors? And have you had any communications issues from it? My main problem in times past has been communications between the arduino and the controller chip for the display.

Again, good work!
- Gimmick

At the moment mine is just a counter and magazine detection. I havent yet done any motor or wiring upgrades, but that is on my list to do.
I hadnt considered using the arduino to run the motors at all, just didnt see the need. I was thinking about using a 1-2" OLED display for more info, ie: counter, inserted clip size, batt voltage, maybe motor RPM, but i'm specifically going for an Aliens pulse rifle look on this one.

I assume you're using a MAX7219? The very first one i used on my breadboarded circuit i did have some troubles. I had to almost power cycle it a bunch of times, try driving characters repeatedly before it would be stable. And then the next day, it would misbehave again. But the subsequent ones i tried didnt have that problem.

I also found I could get rid of the 2 recommended capacitors with no ill effects. But then i am using short and minimal wiring, so maybe less need.

My build here: http://nerfhaven.com...showtopic=26360

#352413 Arduino gun controller mk3

Posted by Kingbob on 24 March 2016 - 11:07 PM in Modifications

Yeah the battery i'm using is rated to 20C continuous, which is why i chose it. I used to competitively race RC cars so know all about batteries, but i didnt know the specs of the motor. The h-bridge i'm using is rated to 4A, and seems to be holding up fine atm.


Will have a look and see if i can find a higher rated one.

#352396 Arduino gun controller mk3

Posted by Kingbob on 24 March 2016 - 08:40 AM in Modifications

Since all the parts are in and working, its basically just software now. Should be finished by the end of the weekend!

#352416 Arduino gun controller mk3

Posted by Kingbob on 24 March 2016 - 11:41 PM in Modifications

Did a bit of research, the H-Bridge i'm using is based on an L298N driver, which will do 4A and seems to be holding up so far, though the max ive run it at is 60% power.


If (or when) it cooks, i'll replace it with one based on the BTS7960B which can handle 43A. Though I'm guessing thats combined both channels, but its still 21.5A per side.


Checked ebay and they can be bought for $10-12US:




#352338 Arduino gun controller mk3

Posted by Kingbob on 21 March 2016 - 07:06 AM in Modifications

Nah i wasnt happy with having the tray going in and out with all the parts in a decent way. So ended up removing the rear of the tray from the main part and just used the bay instead.


Yes that is a switch, just a dpst, but only using one side.


That wire on the spring isnt fully fitted yet, was just laid on top for sizing by length. It will go underneath the spring and be glued down out of the way.

#352269 Arduino gun controller mk3

Posted by Kingbob on 19 March 2016 - 10:02 AM in Modifications

Its lucky i had a bunch of nano's in my parts box. Down to just 4 spares now! Though theres no reason i couldnt use a pro mini, a Uno or even a Mega would fit in the battery compartment of the Stampede.


A H bridge basically is a regulator. Just takes the pwm signal and outputs the proportional voltage to match. The stampede runs on 6x D cells so the motor should run on ~9V anyway, so 11.1V shouldnt be a stretch. I'm guessing the motor controller i was using was designed for an analog signal input instead of a PWM input. Basically fried the FET's input.

#352193 Arduino gun controller mk3

Posted by Kingbob on 14 March 2016 - 06:28 AM in Modifications

Assuming theres space to fit one. Wouldnt want to try and fit one in a Stryfe or a Rayven.

#352265 Arduino gun controller mk3

Posted by Kingbob on 19 March 2016 - 04:20 AM in Modifications

Right, so i got another nano wired in, tested and the screen wouldnt work. Swapped wires around and all sorts, just refused. Tested the screen on a MEGA, worked fine. Can only conclude one of the pins it uses on the nano wasnt working. So scratch that nano.


Grabbed the next one out of my parts box, decide i'll test the screen on it before hooking it up. Plugged it in to usb to load the sketch, wouldnt even power on. Dead as a door nail.


Grabbed ANOTHER nano from the box, plug it to test, and hurrah! powered on! Hooked up the screen, and works! yay! So thats 3 nanos down (those 2 plus the one i blew up). 


Hooked it all up, and all the switches, sensors, screen, and all that work! yay! Next step, hook up the motor and driver. As soon as i turned it on it went to full power. Did some testing and its looked like the FET had failed closed, so just sent the whole battery voltage straight to the motor. Went and got a replacement (luckily only $7 locally), tested it and seemed ok. Wired it in, and slowly started to power it up, and all of a sudden, it went straight to full power as well! Checked the FET and it was red hot! Tested and lo and behold, failed closed again. Its rated to 5A 24V, and i'm only using a 1500mAh 11.1V battery yet it cooked.


I'm going to order a couple of decent H bridges to use instead, so until they arrive the actual motor drive is on hold.


The wiring and software are there for it though, so until they get here, i'll concentrate on getting all the rest of it put together, functional, and tweaking the software to how i want it. Then just have to add the bridge when it arrives.

#352417 Arduino gun controller mk3

Posted by Kingbob on 25 March 2016 - 03:30 AM in Modifications

Good progress on it today! Firing all works now, everything as intended.

Only issue ive discovered is that when the arduino is first turned on, the control pin to the h bridge goes high while it boots. Which means it fires about 5 times when turned on.


Only way i can think of around it so far is to route that signal pin through the safety switch, so wont fire with the safety on. But means i have to remember to turn the safety on every time. 



Edit: occurred to me i might be able to just put a pull down resistor on it, might do the trick.


Edit 2: Yup, pull down resistor does the trick!

#352300 Arduino gun controller mk3

Posted by Kingbob on 20 March 2016 - 07:55 AM in Modifications

Updated version of the schematic.



#352438 Arduino gun controller mk3

Posted by Kingbob on 26 March 2016 - 02:40 AM in Modifications

Made great progress today, had to do some switching around of what is connected to which arduino pin since i had used all the pwm pins for non-pwm functions.


The firing mechanism and detection is all done. Got the jam door open detection and firing prevention working (decided that was necessary after it tried to eat my finger during testing). Got the single/triple/full auto firing working, and stops at 0 ammo. And buzzes to let you know you're out.


Would you believe my biggest problem now is working out where to mount the joystick???

#352475 Arduino gun controller mk3

Posted by Kingbob on 28 March 2016 - 03:36 AM in Modifications

A couple of clips, showing the mag size detection working, the safety switch indicator, and the jam door indicator. The screen is a bit hard to read hence the better pic below. Can see the shooting mode joystick change the mode, and the relative shooting. Regardless of shooting mode it stops at 00. Also buzzes if you pull the trigger with no ammo or if the jam door is open. Note that its not shooting at full speed, it can go faster but i'm trying not to cook the underpowered h-bridge until the new high power one arrives.



A closer view of the screen, sorry bit hard to read on the camera. The flicker is also from the camera, not the screen.






The screen layout:

- The mag number at the top shows the size of the loaded magazine regardless of the number of rounds left. Works the same as my others, uses hall effect sensors to detect a small magnet on the magazine

- "LOADED" says "INSERT" when theres no mag, or flashes "RELOAD" when its run out.

- Jam door open, obviously only displays when the jam door is open. It also prevents firing while open so I dont chop my fingers off.

- The round counter, self explanatory

- The battery voltage updates every second. ( i need to tweak the redraw slightly, the 4th digit is a bit messed)

- The current draw as mentioned above has been disabled, but i havent removed it from the screen yet

- The mode 1 3 Auto sets the firing rate. This changes to "Safety" if the safety switch is thrown, and prevents shooting. Controlled by a small joy stick.

- Pulling the trigger when the safety is on, or it has no ammo makes a buzzer sound twice.


(the screen looks better than this IRL, remember its only 1.8" diagonal)



#352477 Arduino gun controller mk3

Posted by Kingbob on 28 March 2016 - 06:03 AM in Modifications

Yeah i wish mine was still on one board like it was to begin with, before i zapped it. In hindsight i really would have used one of those nano expansion boards, has a 5V regulator onboard too.


Feel free to use my code, might give you some ideas, though i dont claim its perfect!

#352489 Arduino gun controller mk3

Posted by Kingbob on 28 March 2016 - 09:31 PM in Modifications

oh my god the little beep beep, I love it.


hahaha, well i figured it should have something to tell you its out of ammo or locked or whatever in case you're not looking at the screen.

#352474 Arduino gun controller mk3

Posted by Kingbob on 27 March 2016 - 10:10 PM in Modifications

Here is a copy of the current arduino sketch




You'll also need the following libraries:

Adafruit INA219 voltage/current monitor https://github.com/a...Adafruit_INA219

Adafruit GFX library for LCD's https://github.com/a...uit-GFX-Library

Adafruit ST7735 LCD driver https://github.com/a...-ST7735-Library

#352473 Arduino gun controller mk3

Posted by Kingbob on 27 March 2016 - 10:01 PM in Modifications

I'll have a video up later today.


The current monitor isnt currently connected. I double checked the specs after jwasko mentioned the motor current draw, and it wont handle that much. Plus there are warnings about using it for inductive loads like motors that have rapid starts/stops. So for now its just doing the voltage.


I also need to tweak the position of the firing detection switch. When i tested it unassembled i didnt know that part of the jam door stops the plunger. I'm only out by about 1mm though, so easy fix. Might be able to get away with just bending the lever on the switch a bit.

#352454 Arduino gun controller mk3

Posted by Kingbob on 26 March 2016 - 10:44 PM in Modifications

I actually managed to mount it just above the magazine release switch. That way it can be reached by the trigger finger without having to change grip at all.


And, with that, mechanically and electronically its finished!


The software is 95% done, everything works, but i'm just making some tweaks to the screen layout and getting it all working just how i want it.

#352455 Arduino gun controller mk3

Posted by Kingbob on 27 March 2016 - 12:35 AM in Modifications

Here is a parts list. The ebay links are just examples of the types i used. 


Arduino Nano - $3+
from ebay
1.8" colour tft ST7735S based display - $9
Regulated Power supply - $4
INA219 DC/current monitor - $10
2 UGN3505 Hall effect sensors - $3
PSP1000 joystick - $3.50
Buzzer $1+
220ohm resistor - $0.05
your parts box or local electronics shop
micro lever switch - $1
ebay or your local electronics shop
LM298N H bridge motor driver - $3
Note this is rated to 4A. According to jwasko the 360 size motor in the stampede can draw up to 13A, so will likely die. I'll be replacing it with:
BTS760B 43A H bridge - $11
In hindsight to make assembly easier i'd have used one of these nano expansion boards:
Arduino Nano expansion board - $3+
Along with which i'd have used a bunch of these:
Male servo connectors - $5
Battery, i had a couple of Lipo's so didnt need to buy one. But i'm using a 3S 11.1V 2500mAh pack capable of 20c discharge. I already had a spare connector for it too
Wire, heatshrink, and cable ties
It cost me around $37 in electronics, not including wiring, battery, and parts i blew up!

#352456 Arduino gun controller mk3

Posted by Kingbob on 27 March 2016 - 02:10 AM in Modifications

Current working complete circuit diagram.



#352190 Arduino gun controller mk3

Posted by Kingbob on 14 March 2016 - 03:35 AM in Modifications

These look interesting for a nano. The size is about the same as a Uno, but the good part is that where each pin is broken out to the headers, they also have a +V and GND for each pin.


Handy when you want to connect multiple extras.



#352150 Arduino gun controller mk3

Posted by Kingbob on 12 March 2016 - 09:13 AM in Modifications

Except I'd soldered the Nano onto it.

#351879 Arduino gun controller mk3

Posted by Kingbob on 28 February 2016 - 10:38 PM in Modifications

I couldnt see any particular reason for it to be there other than being part of all the various safety mechanisms. Most of which i'll be ripping out or disconnecting.

#351989 Arduino gun controller mk3

Posted by Kingbob on 04 March 2016 - 06:39 AM in Modifications

Well, ive started!


Ripped out the existing wiring from the Stampede, removed a few bits of un-needed plastic, and soldered in new wires for the motor, trigger switch, safety switch, and magazine sensor switch. Just waiting for my 11.1V LiPo to charge so i can do some testing on the motor.


Decided to use the existing motor mechanism for now, wired in a h-bridge so the Arduino can control it. Need to do some testing to make sure i can properly control single/triple/full auto shooting.


If i blow it up, or cant get the timing right, then i'll look at using a stepper or servo instead.

#352005 Arduino gun controller mk3

Posted by Kingbob on 05 March 2016 - 12:00 AM in Modifications

So im trying to decide where to mount the screen. It will be on the side of the magazine slot since thats a nice big flat area, but i cant decide whether to put it on the left or right.

Nor can i decide whether to mount it internally, or externally and make a plastic case for it. 

Or to go whole hog and make it fold out.




Atm i'm leaning towards internally on the left.

#351874 Arduino gun controller mk3

Posted by Kingbob on 28 February 2016 - 09:37 PM in Modifications

Yeah i was planning to remove the various bits of plastic in the tray and drop it all in there. I could even fit a MEGA in there if i need to, but i have spare UNO's and Leonardos. Once theres a wiring loom taking the various switches, sensors etc back to the tray will just make it easier to work on.


I've had a look at where to put the IR sensor for firing, i'll probably remove that little door flap where the dart inserts, and use the existing opening with just a hole for the LED.


Once this Stampede is done i'll probably re-visit my rapidstrike and add in a stepper or servo to control the pusher.

#351854 Arduino gun controller mk3

Posted by Kingbob on 28 February 2016 - 09:04 AM in Modifications

This particular design doesnt actually interact with flywheel motors. But, since brushless speed controllers work like a servo with a PWM signal, then yes it would be relatively simple to add in. Would still need a brushless speed controller though.

#351845 Arduino gun controller mk3

Posted by Kingbob on 27 February 2016 - 11:34 PM in Modifications

Edit: Parts list: http://nerfhaven.com...e-3#entry352455

Edit: Circuit: http://nerfhaven.com...e-3#entry352456

Edit: Arduino code: http://nerfhaven.com...e-3#entry352474


So my first arduino in a nerf was a 7 segment based counter with magazine size detection for a Stryfe and Rapidstrike:



The mk2 added an OLED screen, and voltage monitoring in a Rayven:



Now comes the mk3 for a Stampede.


This one still has all the things from the others like round counting and magazine size detection etc, but adds a full colour 1.8" LCD screen, battery voltage and current draw display, safety switch, a joystick to select single shot, 3 shot burst, and full auto firing mode selection, and a buzzer to indicate when its out of ammo.


The mk1 and 2 were in flywheel blasters so the motor control wasn't done by the arduino. But the Stampede isn't flywheel, and will have its motor controlled by the arduino which lets me select the firing mode (1/3/auto).


At the moment its breadboarded while i code it, but will probably open up the stampede and start looking at installation this week.






More to come!

#351850 Arduino gun controller mk3

Posted by Kingbob on 28 February 2016 - 04:30 AM in Modifications

So far the design looks roughly like this.

Note that this is from memory, probably not the same as whats on my breadboard at the moment so might have errors. I'll update and correct it as I go.


I'm using a MEGA2560 Arduino at the moment simply because it has more flash and ram than the nano's i normally use. That way i dont have to worry about sketch size until its ready to go. Dont yet know what arduino i'll actually use. Whatever I use will be mounted in the battery tray so theres no shortage of space.


The servo may also get swapped for a stepper motor and controller.


#351852 Arduino gun controller mk3

Posted by Kingbob on 28 February 2016 - 08:42 AM in Modifications

Nothing major. I'll be using the servo/stepper to push/pull the loading/firing mechanism on the Stampede.

In a Rapidstrike, id use the servo in the pusher instead.

#352010 Arduino gun controller mk3

Posted by Kingbob on 05 March 2016 - 09:53 AM in Modifications

Detachable and swappable between sides? Hmmm

#352032 Arduino gun controller mk3

Posted by Kingbob on 06 March 2016 - 07:49 AM in Modifications

Board built, and installed in the battery tray with an 11.1V LiPo.








New wiring in to the relevant switches, screen, and other bits and pieces.



Need to trim the wiring to length and put the proper connectors on instead of the temporary ones i used while testing.


#352067 Arduino gun controller mk3

Posted by Kingbob on 08 March 2016 - 09:18 PM in Modifications

Pulse Width Modulation. Basically a digital square wave signal with a variable frequency. Feed that to a motor via a FET and lets you control the speed by controlling the voltage through the FET.

#352105 Arduino gun controller mk3

Posted by Kingbob on 09 March 2016 - 11:15 PM in Modifications

I've decided to wire in an extra switch, using the one that was the safety for the jam door.


Figured since the arduino will be controlling the firing, it will be possible for it to shoot 3 rounds, or full auto, with that access open. Could be hazardous to fingers, so going to add it back in as a safety, and add a box to the lcd display saying "Jam Door" or similar.

#352145 Arduino gun controller mk3

Posted by Kingbob on 12 March 2016 - 02:11 AM in Modifications



I zapped the arduino accidentally while hooking things up. Fried it :(


Rebuild time.

#352051 Arduino gun controller mk3

Posted by Kingbob on 07 March 2016 - 09:59 PM in Modifications

My local electronics store happens to have quite a few arduino bits they get from china.


Its identical to this:


#352043 Arduino gun controller mk3

Posted by Kingbob on 07 March 2016 - 04:19 AM in Modifications

Have also decided for practical wiring reasons to put the screen on the right, mounted internally but flush with the side of the mag slot.

#352036 Arduino gun controller mk3

Posted by Kingbob on 06 March 2016 - 08:25 AM in Modifications

On the left is the regulated power supply for the arduino etc. Takes the 11.1V from the battery and provides a nice 5V for everything.

The blue board at the top is an i2c voltmeter and ammeter.

The black board at the bottom is a buzzer, for indicating when out of ammo etc.

The nano is obvious.

Then theres a double row of headers on the right that will connect to the various switches, display etc etc in the gun.



#352042 Arduino gun controller mk3

Posted by Kingbob on 07 March 2016 - 04:13 AM in Modifications

Actually no, the nano can accept 7-12V because of its onboard regulator.


But its not recommended to draw more than 20mA per pin from the arduino, and after i had that IR problem in my Rayven i worked out the actual draw of the bits and pieces that I had connected to the +5V output. The hall effect sensors draw ~10mA each, the IR LED draws about 20mA, the IR transistor about 5mA, 5mA for the buzzer, and up to 10mA for the i2c current/voltage board. Thats 60mA already, then have to add in the 1.8" LCD. I couldn't find the exact specs for the lcd i'm using, but found one similar and it has a 150mA regulator onboard. So max could be looking at 210mA draw. 


Goes way over the per pin rating, and its recommended the whole arduino not exceed 200mA total!


So the regulated power supply runs all the bits and pieces so they don't draw through the arduino, but still get a nice stable 5V.


I was just going to use a 7805 5V regulator, which is $2 locally, plus a couple of $0.50 capacitors for smoothing, and a $2 small bread board to put it on. But when i went to the electronics shop, i saw that little pre made unit for $6. Only $1 more and saved me the hassle of building it, so figured why not?

#352187 Arduino gun controller mk3

Posted by Kingbob on 13 March 2016 - 08:40 PM in Modifications

Yeah i have a solder sucker and de-soldering braid as well, but of course i have to rip all the wiring off to get to it.


I've ended up just separating the boards out, makes working on it easier. I did accidentally fire it up briefly while testing the battery connection. I think it fed full voltage to the motor, must have been firing at at least 4 rounds/s. Scared the crap out of the dog!


Got sick of soldering/wiring though so put that aside and did some physical work cutting a hole in the shell to mount the screen etc.