A little late to the party: My work in progress Rapidstrike
So I had been waiting on some arduino minis from Sparkfun to replace the one I burned out a few months ago, attempting this ammo counter mod for the Rapidstike. These arduinos took about a month to ship, which is really bizarre since the tracking showed the package sitting in a local post office for several weeks in a row.
Anyhow, the package came in a few days ago and I got my rapidstrike mostly up and running. Here's a picture of how it's looking thus far. The display is actually flush with the angled surface of the blaster there, but I haven't peeled off the protective plastic film yet.
Firing full auto is working well; it fires at ~500RPM with an 18 rnd magazine and at ~470 RPM with a 25 rnd magazine.
However, it's got a couple problems that I can't figure out.
The first of the problems: Some of the inputs seem to behave almost randomly when I am revving the flywheels. The magazine cycle button flips out and registers several presses per second (even though I'm not touching it), and the magazine sensor will occasionally read that it is depressed even when a magazine is inserted (maybe one time every second).
These two inputs are just spst switches that are hooked up to ground and the input pin, and I have the pullup resistor for the inputs enabled in the code.
I considered that maybe the batteries are struggling to put out enough power to the motors, and maybe that's screwing with the Arduino. However, I ruled that out because the Arduino is not turning off or resetting, and it's fully responsive to the inputs even after the inputs glitch and after the flywheels stop spinning. I am using 3x TEnergy 18650 Li-Ion cells in this blaster, if it matters.
I have no idea what could be causing this problem, and while it doesn't interfere with the operation of the blaster in full-auto, it fucks with the ammo readout while firing. I haven't encountered this problem in the previous 4 ammo counters I have built (3 of them were in flywheel blasters too, which makes this problem doubly bizarre).
The second of the problems: One of the goals for this mod is selective fire; I want to be able to switch between semiautomatic, 3-round-burst, and full-automatic firing modes. I implemented this in my Stampede mod by switching the motor using a spdt relay, and it worked perfectly. However, it's proving to be a pain to implement in the Rapidstrike. Switching the dart pusher motor using an N-Channel MOSFET is working fine, but when power to the dart pusher motor is cut, the dart pusher motor slows down gradually rather than slowing down quickly or stopping immediately. This means that anytime I release the trigger, the blaster will still fire ~3 more darts. I knew that this would happen, but I didn't think that it would be this severe.
How do I make the motor slow down faster, without using a motor controller board? I can't find any documentation on braking a DC motor anywhere. :/
tl;dr: I am having electronic problems with my Rapidstrike ammo counter mod. One is random input behaviors when the flywheels are spinning, and the other is the blaster shoots too damn fast and doesn't stop shooting immediately when I release the trigger. I would like help :)
Posted Sep 9, 2013, 5:21 AM UTC · edited
If I remember correctly, you brake a DC motor by shorting its terminals together
Since I'm currently using a N-Channel MOSFET as an spst switch to close the motor circuit to ground, does this mean I should find a spdt solution instead, to switch between ground and the other motor terminal?
My motor circuit currently looks similar to this: http://www.nerdkits.com/videos/motors_and_microcontrollers_101/finalcircuit.png
What about using a second MOSFET? Use a PMOS. Then it would be like a half H bridge.
[deleted]
This is the solution used in airsoft. N-channel plus P-channel = MOSFET pack with active braking. You still only need one control lead and there is no need to have a SPDT switch on the trigger to get braking.
Yerp, just tie the gates together. Didn't know that about airsoft, haha. Makes sense.
I was considering a nonlatching SPDT relay to replace the current N-Channel MOSFET, actually. I'll look into using a P-Channel MOSFET.
[EDIT]: It's looking like I would need another element that can supply a high enough voltage to the gate. Otherwise, 5v from the Arduino won't be able to desaturate the P-Channel MOSFET, since the source would be +11.1v. Is this true?
Arduino stuff is a little out of my depth, but I know the motor braking switch on the jam door of the Stryfe is SPDT, it seems like that'd be best
[deleted]