Monday, April 29, 2013

Stampede dart counter tutorial

Email questions/comments to munerfmods@gmail.com

Video here:

 
 
Sparkfun (is bestfun) parts list: http://sfe.io/w62306

Diagram (click to enlarge) This is non-interrupt reset pin model.




Code here:  (Note, you need to download the new soft serial library for this counter)  Also, this code hasn't been changed to the interrupt on the reset pin.  I've coded that but need to test it, so here the reset button is not an interrupt.

I will be working to better document this code so it's more clear.



#include <SoftwareSerial.h>
SoftwareSerial RpSerial(11, 10); // RX, TX
const int threshold = 10;   // minimum reading of the sensors that generates a note
//We use an array here because of how the serial display work.  You can't do int based math on them
int ammoarray1[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3};
int ammoarray2[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7};
int countarray = 36;  //default dart counter number (I have this changed to 18 below, but you can change it here
int inPinReset = 6;  //the reset button pin 
int state = 0;      // the current state of the output pin
int reading;           // the current reading from the input pin
int previous = LOW;    // the previous reading from the input pin
int stateReset = HIGH;      // the current state of the output pin
int readingReset;           // the current reading from the input pin
int previousReset = LOW;    // the previous reading from the input pin
int totalCount = 0;  // Total Shots made while on
static unsigned long last_interrupt_time = 0;
int runonce = 1;

long time = 0;         // the last time the output pin was toggled
long debounce = 150;   // the debounce time, increase if the output flickers
long timeReset = 0;         // the last time the output pin was toggled
long debounceReset = 300;   // the debounce time, increase if the output flickers

void setup()
{
  pinMode(10,OUTPUT);  //this sets pin 10 for output for serial communication to the display
  RpSerial.begin(9600);
  pinMode(2, INPUT);  //light input pin //sets pin 2 and an interrupt pin (dart counter)
  attachInterrupt(0, CheckIfDartShot, RISING);  //delcares pin 2 as a interrupt pin on rising voltage (the normal step down resistor method
 
}

void loop()

   if (runonce == 1)  //runs this just when the gun startsup
   { 
   
delay(200);
    //this stuff sets the sparkfun LCD base settings (including brightness)
     RpSerial.print("v");
     RpSerial.print("w");
     RpSerial.write((byte)1110000);
     RpSerial.print("z");
     RpSerial.write((byte)00000001);    
     delay(1000);
     RpSerial.print("----");
   
    
  

    countarray = 18;  //static mag size
    myprint();  //myprint updates the display  We want the display to say 18
   
     runonce = 0;
    }
   
   
    CheckForReset();//checks to see if the reset switch was pressed
    Blink2(); //cool sounds while at different levels of darts
    Blink();  //the oh crap you're out of ammo blink.
  
}
void myprint()  //my print just updates the displays on our neat array
{      
  RpSerial.print("-");
  RpSerial.print("-");
  RpSerial.print(ammoarray1[countarray]);
  RpSerial.print(ammoarray2[countarray]); 
}
   
void CheckIfDartShot(){ 
  //this subroutine is called when our interrupt pin is hit.

  unsigned long interrupt_time = millis();  //debounce crap
 
  
  
   if (interrupt_time - last_interrupt_time > debounce){
  
    if (countarray >= 1){ //if we're not at 0 darts, take the dart count, and remove one
     
        countarray = countarray -1;
        myprint();  //call my print to update the display to relfect our new dart count
    }
    
           
     last_interrupt_time = interrupt_time;  //more debounce crap
}   
   
}


// Checks if the reset button has been pressed
void CheckForReset()
{
     readingReset = digitalRead(inPinReset);
    
      if (readingReset == HIGH && previousReset == LOW && millis() - timeReset > debounceReset)
      {
        timeReset = millis();
    
    
          
        if (readingReset == HIGH)
        tone(3, 440, 90);
        //Serial.println("reset is high");
        { 
          resetcount = resetcount + 1;
          if (resetcount == 2) // Drum
          {
            countarray = 18;  //set this to a different number of you want two presses of the reset button to change to a different size, like 1 press for 18, 2 presses for 35.  Right now have both set to 18
            resetcount = 0; 
           
          }
          else
          {
            countarray = 18;
          }
        }
        myprint();
      } // End of if statement that checks for button press.
      previousReset = readingReset;
     
   

  }


void Blink()  //you're out of ammo.  We do fun display stuff here.
{
  int temp = 0;
 
  while(countarray <= 0)
  {   
   
    if (temp == 0)
    {
      RpSerial.print("-");
      RpSerial.print("-");
      RpSerial.print("-");
      RpSerial.print("-");
     
      temp = 1;
    }
    else
    {
      RpSerial.print(1);
      RpSerial.print(1);
      RpSerial.print(1);
      RpSerial.print(1);
     
      temp = 0;
    }
   
    tone(3, 440, 90);
      
    delay(100);
    CheckForReset();
  
  
  }  // End of While
}
void Blink2()//sounds that play when you have specfici dart levels. 
{

 //tone format is tone (PIN, FREQ, DURRATION)

 if (countarray <= 13){
        if (countarray <= 3){
           tone(3, 410, 140);  //under 3
           delay(200);
        }else{
        if (countarray <= 6){
           tone(3, 390, 140);  //under 6
           delay(300);
        }else{
          if (countarray <= 10){
           tone(3,360,160);  //if under 10
           delay(500);
         
        }else{
           tone(3,300,200);  //if under 13 darts, play this
           delay(800);
        }
     }    
 }
}
}

Saturday, April 27, 2013

Stampede LED dart counter with sound.

I'm working on a video and standard guide for this mod.  Parts used are ~$23.

So we ran a full game of HvZ and believe we found most of the problems you'll encounter, and I also updated the counter to use an interrupt based system instead of a poll, which gives the ability to use time delayed sound events which are very helpful. 

Here's another preview, check out the sound, it's the best part.




Tuesday, April 16, 2013

Nerf Stampede LCD ammo counter

It's working like a champ. All parts are under $30 and some minor solder skills are required. Check out the prototype video.

 

Wednesday, March 16, 2011

Stampede Mod: Parts Needed

The required parts fall into two major categories:
1.) Springs/pads for pushing more air
2.) A strong battery to pull back the stronger spring

You can go with lighter springs that will give you more power, or just simply remove your air restrictor, but if you want the full effect you'll want to do both.


First off: Springs!


The part you want from this wall is the replacement for the reload
spring.This can be acquired at Ace Hardware for $0.89. The
particular Ace Hardware we went to is located at 1900 Business 
Loop 70 E, Columbia, MO. There phone number is (573) 449-7277.

On this particular board the spring you are looking for is the #1 spring.

The next spring you need to purchase can be found at Home Depot.
The price tag above it reads (11/16"X1.25" 2 7/8"X4" COMP). Most
important is the 11.2 kg spring that is being pointed at which will
replace the plunger spring to give it the crazy power/distance. You
can use another spring from somewhere else but try not to go much 
past the 11.2 kg or you could end up breaking the gun.

Also at Home Depot you will find felt pads. These ensure that when
the plunger spring extends after firing it doesn't crack the plastic 
casing.Both the plunger spring and felt pads were purchased at the 
3215 Clark Lane, Home Depot and can be found in aisle 9
labeled "Hardware". The store number is (573) 814-1900.

This is the bad ass lipo battery that will be used to pull
back the replacement plunger spring.  This battery can be bought in any number of voltage, will last for 1000's of rounds, and has a high discharge rate.  We like this one here.  It's 2200 mAh for$11.  I've run a 800 mAh with no problems as well.

 You will also need to purchase special clips (or just make your own)  that will be soldered to the battery terminals. More information and pictures on that coming soon.

To fill up the new battery you will also need to purchase a lipo battery charger. More will be explained about this charger soon.  They run from $10-$20.  We also have a few and would be more than willing to change your batteries for you (it will last the entire game and some)

Tuesday, March 15, 2011

How To Mod a Nerf Stampede

Click on the pictures for high resolution!  Email us at munerfmods@gmail.com if you have any trouble or have a correction!

We're starting out with your baisc Nerf Stampede.  We purchased this one from Amazon for $41.00.  Also, look at that guys face, he's ready for some zombie hunting action.

For those of you who think this guide is just for men, take a look at how excited this girl is to mod her stampede!

Tools required:
Hammer
Plier/Wire cutter
Screwdrivers
Parts required

You'll want to take out the basic gun and don't worry about all the extra crap like the blast shield.  You're killing Zombies; Zombies don't have guns (well expect for the sweet ones). There are a total of 37 screws on the outside case of this gun. 22 large, 11 medium, and 4 small. Prepare yourself for some blisters.

When you take apart your gun be careful not to break this wire!

 You'll see the covers that hold the action in place shown here.

Remove the covers by taking off the screws pictured here.  Note the sizes

Here's the Spring clip fully removed

You can now remove the action completely so we can remove the air restrictor

Remove the return spring by rotating it.  We're not replacing this spring.

Remove the two screws on the left and right to release the cover attached to the plunger case.

Once the cover is removed, pull out the spring.

This is the spring we're removing.

Once the spring is out replace it with the newly purchase 11.2 kg spring shown. It is slightly smaller than the original but will work just fine.

Attach a felt pad to the end of the plunger. We actually used 4 felt pads stacked on top of each other. This helps soften the blow of the plunger on the end of the camber since we're going to remove the air restictor.

Remove the two pieces so we have just the main tube

Looking down the tube you can see the air restrictor.  We want to open this this up to allow the most air to push your dart out.


Use a hammer + long screwdriver or any long object and punch out the plastic.  It's pretty rought, but don't hit it to hard.  The more you remove, the better.


When finished it should look something like this.

Re-assemble, make sure the white hook is facing the correct direction.  If you have some silicon lube, go ahead and put some on the moving parts (not required).

Now we need to mod the return spring (or else you gun will jam and ghost fire)  This isn't 100% required but is highly recommended.  A jammed nerf gun with your stupid teammate alerting the horde is not a good thing.
Remove the following screws to get to the spring.

Take the parts out and you'll see the small return spring.

Replace with the bigger return spring and re-install.