Jump to content


Galorin's Content

There have been 4 items by Galorin (Search limited from 03-December 96)


By content type

See this member's

Sort by                Order  

#350329 New modder, partially working RapidStrike Electronics, no photos (yet)

Posted by Galorin on 30 December 2015 - 08:26 PM in Modifications

I promise to add photos later, but I was inspired by the TR-27 Gryphon to do my own take on it.

 

My key points

 

* dart ready detection

* variable flywheel and pusher speeds, in software.

* multi-mode select

 

I got a 128/64 LCD screen and the MOSFETs a couple days ago, no silly 7 segment displays, and they really are compact when used with an Arduino Nano.  Putting my code as-is here for reference. Will either keep it updated or make a link to Github.
 
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,
 
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 blinking works if I change a bool.
 
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.
 
-----------------------------------------
 
#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);  
}
 
-----------------------------------------



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

Posted by Galorin on 21 December 2015 - 07:14 AM in Modifications

 

Awesome contribution to this thread. My question is, what do you mean by the "Toruk Test"?

 

Thank you again for your assistance!!

 

Basically, the Toruk Test is... If the Arduino fails, will the blaster still function as if it were stock, or close to?

 

 

Thats cool, I had no idea that the arduino could do that.  But if I'm not mistaken, it will only show you the 5v or 3.3v rail that the Atmega328 is running on.  If you are using an S3 (3 Cell) LiPo battery, then full voltage will be 11.1v.  If you run off of any of fewer cells though, you'll still only get as close as 7.4v, or 3.4v.  I suppose you could run the MCU off of a single cell of the lipo, but there are a few things you need to keep in mind.

 

1. A fully charged lipo cell runs at 4.2v, and at maximum safe discharge, it will go to down to 3v.  4.2v may be more than a 3.3v MCU can handle.  And 3v may be less than a 5v can handle.

 

2. Discharging a lipo unevenly (more load on some cells than others) is bad for your lipo.  And if you are only measuring one or two cells to determine the battery's overall power level, then you'll be estimating the unmeasured cell's power level.  (i.e. if cell one is at half discharge, then I'm assuming cells 2 and 3 are as well.)  And while that may work at first, because of the uneven load distribution, you will eventually get faulty readings as the cells deteriorate.

 

As far as I know, you'll have to regulate the power down from 11.1v to 5v or 3.3v, but if it is regulated, you won't know if the battery is loosing power or not based on the power to the MCU.

 

If I'm not understanding what you're saying, please let me know because my current understanding says I need to know the voltage of each cell of the lipo individually, in order to properly protect the battery from over discharge.  Hence the circuitry to measure the battery's power.

 

The rest of your project sounds great though.  Will you be making a project post on Nerf Haven?

 

Once all my bits arrive, I'll make a build post both here and on the Britnerf forums.  I have already done some stuff using a 3S LiPo to power an Arduino, and I power using full voltage off the JST plug, so I don't severely unbalance the LiPo.  I have considered wiring in my LiPo charge meter in parallel so I just have a low voltage alarm, if not a full volt reading.  Not sure if it will work.

 

Already going to be using lots of the analogue pins, I2C display, flywheel and pusher MOSFETs, may use a variable resistor or rotary encoder for changing settings, then digital pins for microswitches and navigation... Might have to lose features if I want per-cell health, knocks out 3 analogue pins right away, maybe just one if I can get a clock to toggle between the three cells once per second or so... I really need to get a sketch of the hardware finalized.

 

I may just re-use that Lipo and current-limit using the MOSFET to keep the max voltage supplied to the motors at or around 6 volts.  Heck, I may make that a programmable feature, along with the dart pusher rate of fire.  Got software control, might as well make the most of it.

 

For my use, powering off the unregulated supply, I will have to see what happens.  Those particular pins regulate from 6-20V down to the internal required 5V for my board.  This internal regulator will probably stop the function of the on-board voltmeter, as I don't think I can get the pre-regulated voltage using this method.




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

Posted by Galorin on 18 December 2015 - 05:10 AM in Modifications

 

1. I'll have to check on the MOSFETs, but I don't recall them being anything particularly special.

2. Runtime on the LiPo has been super.  I think it is realistic to count on a full day of nerf on one battery.  But I havn't yet tested that.  I did do a half day with no issues though.

3. This is a huge question.  One that I'm in the process of answering for myself, but I'll try to condence it and give you something usable.

I should have had a better overall plan and goal.  Because I didn't yet know what I wanted, I tried a lot of things that didn't pan out well.  For instance, I should have skipped right over the 7-seg displays and gone straight for OLED.  Another major issue I wish I had seen in advance is EMI from the Motors and main power lines.

 

I have already purchased MOFSETs as per advice from the britnerf forums, from the Managing Director of Blastersmiths UK, the IRFZ44N.

 

I have also ordered a well-supported OLED right off the bat, no mucking about with the bulky segmented display and driver chips.  I'm going to be doing the SMG mod to shorten the barrel and have a relocated battery box, but I will be either putting in a pair of 130 or keeping the stock motors, just with 18AWG wiring for power supply systems.  I am not doing anything to make sure it passes the Toruk test, as I am not a competitive Nerfer.  

 

Here's an enhancement for you - https://code.google....SecretVoltmeterIf you use the right Atmega chip, then you can find out what the internal voltage is, and from that, you can work out what the current charge state of your LiPo is, without needing additional circuitry.  Personally, I will be powering my nano from the JST balance plug, full voltage, onto the unregulated power pin.

 

Thanks for mentioning the EMI.  I will make sure to put a ferrite ring around the Arduino power supply. Sure, I'll be feeding it from the unregulated supply pins, 

 

I suspect that once I get this all prototyped and working on the Nano, I will do the same, and do my own PCB, and use the correct Atmega SMD to get the pack size down.




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

Posted by Galorin on 10 December 2015 - 09:36 AM in Modifications

I am relatively new to this whole Nerf modding thing but am a programmer by trade, with an electronics hobby on the side.  I am currently pulling together the pieces I need.  Once I get down to Brass Tacks, I will be sure to do my own mod post, but thought I'd ask a few questions.So far, I have 

 

3 Arduino Nanos - a bit bigger than the Pro, but looking at the shell, so long as I solder and clip pins I can get it to fit.

1x SSD1306 128x64 SPI/I2C OLED screen

Lots of wires of various gauges

 

Oh... I also have all the source code from this thread.  Not sure if you have made any more modifications to it but I will probably just be drawing inspiration rather than wholesale copying.  Might even put mine on Github.  If I include yours, how do you want attribution?

 

Here are my hardware questions for you, or anyone else for that matter.

 

What is the manufacturer and part number of the MOSFET you used? Alternatively, what are the specifications so I can find an equivalent?

How much runtime do you get off the LiPo?

If you could start all over again, what would you do differently?