Archive for BRIT NERF Home of the British NERF Community
 


       BRIT NERF Forum Index -> Modifications
galorin

Starting RS modding. Comments/criticism of ideas welcome

OK, so I picked up a Rapidstrike off eBay for modding.  I will be only doing household wars with my kids with it.  I've done some cursory examination already, and it looks like the flywheels in this one aren't terrible, so score!

Here are my basic plans for this mod.

Switch to 20C 7.4v 2S Lipo (Capacity undecided)
Rewire with proper wiring
Keep stock motors
Shorten barrel but keep extension mounting hardware

That much I think I can handle, but there are more... involved mods that I want to do.  You've all seen the TR-27 Gryphon, right?  While I like the project, and will be thieving some stuff, I am taking a different programming tact.  This is where I could use criticism.

I am using an Arduino Nano instead of the micro pro, as it is what I have on hand.  Will still solder to pins and trim unused.

I am not doing ammo counting.  Not enough magazines in the house and too much scrounging in household games to make it reliable for me.  Might add in later.

I am not using the 7 segment display. No ammo counter, dislike the placement.  Instead I am using an OLED screen embedded in the stock.  It will still display info, just not ammo count.

Various changes to programming, no "empty the gun" mode.

Trigger and rev switches take power from Arduino supply.  Arduino signals MOSFET for flywheels and pusher based on variables and pins connected to switches going HIGH.  This means, no routing high currents through the switches.  Alternatively, just use a relay instead of a MOSFET and rely on analog controls for speed/ darts per second.  Will this work?

Dials for adjusting stuff like max flywheel speed and darts per second.  Not sure if read by Arduino or directly interdicting power supplied to motors. Contingent on above idea.

I am sure I will have more questions, but to start with...

MOSFET part numbers? I can't be the first to do this, and the Gryphon mod didn't specify part numbers.

Impedance of stock RS motors, or a datasheet/part number?

Front reduction, how best to maintain ability to attach barrel extensions?

Anything else I should watch out for?

Don't worry, I will post code, photos, etc. as it progresses.
Boff

IRF44ZN MOSFETs are your best bet for a general all round FET in your Nerf applications (barring Zeus applications, that needs something else entirely). It's rated to 49A continuous and >100A avalanche and has a response time in the ns range. Don't forget your 10k pull up/down resistors, too. Smile FETs are better than relays because they can be switched much faster, cost less and generally last longer. The system you're building will be great for power control. You can use the Pulse Width Modulation feature on your Arduino to control the duty cycle of the flywheels which can alter the output power for you. The PWM system can link up to the ADC inputs from your dials to produce the sort of control you're after.

Grab a 2200mAh LiPo from HobbyKing, they're great for 2S applications. Good luck getting datasheets on Hasbro's stock motors, however.

The only consideration you've got to bear in mind, and it's one that probably doesn't apply to you, is that if your Arduino fries, you lose the blaster. Those of us who use our blasters competitively (which I understand you're not planning to) have what we call the Toruk Test: a blaster under micro-controller control must revert to normal firing mode in the event the board smokes. It's something to bear in mind but isn't essential for your application. Smile
galorin

Boff wrote:
IRF44ZN MOSFETs are your best bet for a general all round FET in your Nerf applications


Bought the FET from ebay, need to look in my parts bin and see if I have 10K resistors that are rated for the current that will be going through them.  Got plenty of the titchy ones, not sure about stodgier ones.

I need to do a Hobbyking shop anyways, might as well just throw in another Lipo to the order.

Toruk test, probably not going to tackle that, at least not with this iteration.

I also need to put in a BSUK order.  I keep putting it off, a sling, some Picatinny rails for this and my Retaliator, maybe the Rapid Pistol kit, though I don't want the stock mounting block.  I like the RS stock.
OldNoob

I would ditch the stock motors, you are going to enough trouble already, put something decent in there. The 10k resistors don't take the full current, they are on the low current side of the FET. I just use normal larger sized 10k ones from Bright Components.
Boff

What OldNoob said, the 10k resistors are on the gate of the FET so will only be handling switching currents and not full motor currents.

If you can get the BSUK order done by the end of today and want the parts in black or orange, I can have it out before our Christmas closure since I have most of those parts on hand (yay for customer returns!)

I'm going to put together an RS SMG kit in the new year because this is the 3rd time today people have said they want it. Very Happy
galorin

Shoot, car needs more work on its MOT than I thought.  Order will have to wait.  I will be sure to hit you up for seconds or the SMG kit after the holiday break.

Boff wrote:
What OldNoob said, the 10k resistors are on the gate of the FET so will only be handling switching currents and not full motor currents.

If you can get the BSUK order done by the end of today and want the parts in black or orange, I can have it out before our Christmas closure since I have most of those parts on hand (yay for customer returns!)

I'm going to put together an RS SMG kit in the new year because this is the 3rd time today people have said they want it. Very Happy
galorin

Well, I got the LCD screen and the MOSFETs a couple days ago.  Putting my code as-is here for reference.  Should I update first post instead/as well?

My camera is on the fritz, unfortunately, so I can't show you what it currently looks like or does... but there's a big breadboard... and I have no idea how to make that Fritzing software work to show my schematics.  Can't find my particular LCD screen, and I want to do it right

Suffices to say, I have one potentiometer hooked up to the Analog input, and a SSD1306-powered white-only OLED screen hooked up via Serial, using the Adafruit libraries.  I may have to strip the libs down for use later though.  Just not that much RAM on the Nano, and I'm not doing things like bitmaps, just letters, numbers and lines.

The code below has a few hooks for things I don't have the hardware for yet, like the dart detector. It basically will blink a warning when no dart is detected, but that's not hooked up to anything just yet.

The bit that works, reads the potentiometer, converts it to a percent, and I round it to the nearest 10 percent, then display the number on-screen.  I may do just a cell phone signal-type bar display if I want to go all fancy, this is just easier.

I will have two pots, one for pusher motor speed, and one for flywheel speed.  haven't got a way to actually measure those speeds yet, but it'll probably be something like 5v-9v ish through the MOSFET for each. As I'm powering from a 11.1V LIPO on stock motors (right now at least) I don't want to burn them out.

What I want to do down the line is a mode select, so I can do 3 dart burst per trigger pull, single dart per pull, and full auto.  First target though is full auto as it's the easiest to implement.

If anyone else has either suggestions for improving the below code or wants a more thorough explanation, please speak up.  It's not optimized yet and it's not bug-free... I just haven't found the bugs yet.

-----------------------------------------

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

// If using software SPI (the default case):
#define OLED_MOSI   9
#define OLED_CLK   10
#define OLED_DC    11
#define OLED_CS    12
#define OLED_RESET 13
Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);



#define PUSH_POT 0
bool blinkOn = true;
bool fDartSeen = true;

int flyPercent = 0;
int pushPercent = 0;

#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

void setup()   {                
 Serial.begin(9600);
 
 // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
 display.begin(SSD1306_SWITCHCAPVCC);
 // init done  
 display.clearDisplay();
}

void loop() {

 display.clearDisplay();
 
 display.fillRect(0, 0, display.width(), display.height(), WHITE);
 display.fillRect(2, 2, display.width()-4, display.height()-4, BLACK);
 display.drawLine(61, 0, 61, 40, WHITE);
 display.drawLine(62, 0, 62, 40, WHITE);
 display.drawLine(0,40,127,40,WHITE);

 display.drawLine(0,28,127,28,WHITE);

//display flywheel percent
 display.setCursor(7,8);
 display.setTextSize(2);
 display.print(flyPercent);
 display.println("%");  
 
 display.setCursor(7,31);
 display.setTextSize(1);
 display.setTextColor(WHITE);
 display.println("Flywheel");

// display pusher percent  
 display.setCursor(68,8);
 display.setTextSize(2);
 int percent = map(analogRead(PUSH_POT),0,1023,0,100);
 int newPer = round(percent / 10) * 10;
 display.print(newPer);
 display.println("%");

 display.setCursor(68,31);
 display.setTextSize(1);
 display.println("Pusher");

if (fDartSeen)
{
 display.setCursor(5,44);
 display.setTextSize(2);
 display.setTextColor(WHITE);
 display.println("DART READY");
}
else
{
 if (blinkOn)
 {
 display.setCursor(20,44);
 display.setTextSize(2);
 display.setTextColor(WHITE);
 display.println("NO DART");
 blinkOn = false;
 }
 else
 {
   blinkOn = true;
 }
}

 display.display();
 delay(50);  
}

-----------------------------------------

EDIT

Thanks for putting this up for people to see, in future please put code up on an online notepad like google docs or similar then post a link to the code as it keeps the post shorter and is easier for people to look at! ON


       BRIT NERF Forum Index -> Modifications
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum