Does anyone know if its possible, and where, to get a replacement pusher belt for a Hyperfire?
Kind of accidentally slipped with a scalpel while doing some work on mine... oops.
Jump to content
There have been 133 items by Kingbob (Search limited from 17-July 93)
Well the blaster is finished. All the counting, battery measuring, dart firing detection, mag size detection, single/triple/auto firing all working. Turns off the motors (via relay) when out of ammo to save battery, and all working properly.
And i dont like it
The electronics i've put in all work fine, the problem is the belt dart feeding mechanism, its too imprecise. What i mean is, if i have it in single or triple shot mode, the motors get turned off after a single round, or three rounds. Then get turned back on once I release the trigger ready for the next shot. That all works, but the position of the belt and the nubs that grab a dart are too unpredictable. It can push another dart in before it turns off, or it half pushes a dart that enters the flywheel cage but doesnt shoot, but then when i fire next, i get 2 rounds or similar. I just cant think of a way around it.
In a Rapidstrike or something with a more controllable pusher mechanism it'd work fine, but this hyperfire belt drive mechanism just doesnt lend itself to controllable firing.
Moved the IR sensor, but still a bust. They 2 sensors are just too close and the darts are moving too fast.
At 5cm apart they register with zero millisecond difference. Would work on a longer barrel but at such a short distance theres just no difference in time to measure
Got it all assembled today and started debugging. For the most part everything is working fine.
Have 2 issues:
I had set it up to measure the current draw of the whole system, but have discovered that sensor is only good up to about a 3A limit. I'm pretty sure the stock motors will exceed that even on alkalines, certainly when i put in a LiPo. I think i can rework it to be good up to 30A though, but need some components from ebay to do it so thats disabled for the moment.
Secondly, i had set it up to measure the speed of the dart. Had 2 IR sensors, one at the entry to the flywheel cage, other close to the tip of the barrel, with about 11cm between them. But ive found because of the rate of fire, it only works if i fire a single dart. Firing more than one results in the second dart triggering sensor 1, just before, or at the same time as, the first dart exits the barrel. This was messing up the calculations, either getting 0 speed, negative speed, or stupid speeds like 50m/s.
I might be able to get it to work by moving the first sensor to the exit of the flywheel cage, but it will reduce the distance and time between sensors, so may mean the result is less accurate, but will give it a go..
OK so i had some wiring issues with how it was installed, was having nightmares with the screen, and getting the IR/RPM sensors working, so i ripped the whole thing apart and re-assembled it properly. Much neater now and no issues.
On the left side of the shell there is the 1.8" screen, joystick, reset button, mag insertion switch, mag size sensors, buzzer, level converter, and of course the arduino.
On the right side, are relay, voltage sensor, dart IR sensor, RPM IR sensor, and power supply. For now its running off standard alkalines, but have replaced all the wiring so it will be getting a LiPo shortly.
The code is about 85% done. At the moment its tweaking things like checking the mag size sensors are set to select properly, make sure all the magazine insertion stuff is in the right order, and that the screen updates properly when things happen. All the code is there, mostly just the order things happen.
There are 2 IR sensors in the barrel, one at the dart insertion point, one at the exit. By measuring the time it takes to get between them, it should give an approximate dart velocity. However when only measured across 10cm, it may not be wholly accurate, but it looks cool
The RPM sensor is also working properly now. On alkalines with stock motors it gets around 11-12k rpm. However i'm measuring every 250ms and multiplying it out, so again its not 100% accurate, but pretty close.
The gear going in the left side:
And the right side installed. The flywheel enclosure and flywheel got a quick spray of black paint to minimise any IR reflections.
I'm using using millis to get the 4x/second calculation so when its working it will update the display 4x/second. Nothing to be gained by using micros.
I'm using an IR LED, which is matched to the IR transistor. (same manufacturer, same frequency etc). Too difficult to fit a laser diode in where I want it.
According to the datasheet for the transistor it has nice small trigger times as well, and even assuming a max speed of 30,000rpm, thats only 500/s, which both the transistor and microcontroller should be perfectly capable of handling. I made the hole in the flywheel longer so it has a greater period to detect the high of the LED per revolution, but that made no difference.
In theory, and by all the numbers, it SHOULD work! Thats why its so frustrating.
I'm going to go and buy a bunch of different IR transistors today from my local electronics shop, and try others. Maybe one will work.
Yeah i considered the code as well, which is why i stripped it back to a test sketch that does nothing but count the interrupts.
I'm only bothering to count 1 motor since they have the same power supply and are subject to the same braking from darts etc.
The M0 controller runs at 48Mhz, so shouldnt have any dramas, even assuming a high rpm count.
Well the RPM counter is giving me grief.
I'm using an IR LED/transistor pair attached to either side of a small hole in a flywheel, and at low RPM it does work, but as soon as it gets up to full speed it stops counting. I thought using a faster micro controller would solve it but no change.
I can think of 2 reasons why:
1: The output on the IR transistor cant change state fast enough to keep up with the pulses its getting.
2: At full speed the time that IR light is let through the hole in the flywheel is too small for the transistor to register it.
I have some different IR transistors i'll test to see if any of them work better to solve option 1.
Only solution to option 2 i can think of is to elongate the hole in the flywheel so the IR light gets longer per RPM to register.
But i dont want to unbalance the flywheel by removing too much plastic.
Anyone have any other suggestions?
Have installed most things on the left of the shell. The connector you see on the right is so it can plug into the other side of the blaster. Makes it easier when being assembled/disassembled all the time.
On this side are the mag size sensors, LCD screen, joystick, button, mag insertion switch, buzzer, and micro controller.
Bit hard to make out, but the white overlay lines up with panel lines on the shell so it looks at least sort of part of it. The large round black bit is the joystick, and little black button above it.
You got the code for that?
I kinda undestand C.
Not quite finished yet, still getting it how i want it, but its based on the version i used in my stampede, follow the link at the top to find that.
So far have changed the screen layout a bit, doesnt use the same motor drive and firing detection code though.
Will post the code once its done, but the Stampede version will show you most of it.
I have a bunch of lipos in my parts box. Probably use a 2s 4000mAh 20C pack, had it spare for a while. At the moment the motors are stock so no real issue there.
Havent decided whether i'll end up putting in some rhinos or go brushless.
Will run it all off the same motor, have a small 5V regulated power supply that i'll use to run the electronics. Wont draw much anyway.
You're right in that the 3 resistors on the buttons aren't really necessary. The ATMEGA328 has internal pullup resistors, so when you set the pinmode in software, if you set it as pinMode(pin#, INPUT_PULLUP) to use the internal pullup instead.
Save a few cents! lol
I've modded a Rapidstrike and im working on a Hyperfire, so of the 2 i'd go the Hyperfire for the amount of stuff you want to cram into it. It has a good amount of empty space in the orange section at the front, and if you cut out the insides of the battery box, you'll get a huge chunk of room in the rear too.
Theres not a lot of empty space in a Rapidstrike at all.
Wow, yeah i'd never thought of using outrunners!
Impressive engineering work, but not quite my style. I like my blasters to appear minimally modified, the electronics should look like they're part of it, not quite so added on. But thats my personal preference.
Now i'm off to look at outrunners
I've tweaked the design a bit. I've added in a pot read into an analog input which will determine the color of the screen. Can set it to preferred color without adjusting code that way.
Had to add in a level shifter, the buzzer is a 5V device, but the Arduino M0 board i'm using runs at 3.3V so cant drive the buzzer by itself.
I was previously going to leave the firing mechanism alone, not arduino connected but changed my mind. So have added a switch in for the trigger, which will close a relay to drive the firing belt motor. Will let me stop it from running when out of ammo that way.
I have one single IO pin left, cant think of anything else to add, suggestions?
(btw i obviously havent drawn in the +V and GND connections in the diagram. CBF lol)
Since I already have code from the previous versions, i basically just have to adapt it to a new board with some different options.
So far, have the following working on the breadboard:
- LCD screen
- Hall effect sensors for magazine size detection
- Magazine insertion detection switch
- A new "mode" switch for something else i might add
For now i wont add in a "safety" switch. Had one on the Stampede but thats because there was a switch built into the gun for it. Probably wont add a jam door switch detection mechanism either.
I've soldered up an IR LED/transistor pair, just need to code them up to work as the counting mechanism when a dart passes by.
I've started prototyping it on breadboard, and poking around the guns insides to decide what will go where etc.
There is so much space in the front end of this gun its ridiculous. I could fit a lipo in the front and cut off the whole rear end!
I think shot detection in this one will have to be IR based since its full auto, obviously counting trigger pulls wont work.
So right after the flywheel unit i'll look at putting in an IR LED/Transistor pair to detect a dart passing by. If i can fit an IR pair at each end of the barrel tube, i might be able to do a dart speed calculation.
I've settled on using a Feather M0 Basic board from Adafruit. Ordered a couple a while back but hadnt gotten around to using them yet.
Megas have been outclassed for a while now. Look at the arduino zero, zero pro, M0, M0 Pro etc. Half of them have built in wifi or bluetooth now. The new Primo even has NFC built in, and the new Star Otto has several times the grunt of a Mega.
Could even use an ESP8266, they have 4MB flash and run at 80Mhz and built in wifi, but are a bit low on gpio ports unless i add an i2c expander.
I have a few Raspberry Pi Zero's too, thats got 512MB of RAM and a 1Ghz processor in a board not much bigger than an arduino nano. But my python skills are way rusty, and a nerf blaster that runs linux seems to be overkill
I might be able to add a muzzle velocity measurement as well. Use an IR sensor at each end of the barrel, and just measure the time between them breaking as the dart goes through.
Its a short barrel though, so may not be hugely accurate.
I'm also going to have another go at measuring the flywheel speed. I think the reason i had problems last time was simply the speed of the processor not being able to keep up with the interrupts from the sensor. The arduino nano i used has an atmega328 processor which runs at 16Mhz which isnt exactly zippy. This time i'm using a board with an ATSAMD21G18 ARM cortex M0 processor, which runs at 48Mhz. Hopefully this can keep up with the sensor. Also has an onboard JST power connector for a LiPo, and built in LiPo charger circuit if connected to USB.
And has way more flash and RAM which solves the graphics library issue i had previously.
I could add an ultrasonic sensor to the front, maybe tie it to a second screen on the top of the gun, do an Aliens style motion detector
I saw how you did that in the other thread and it was pretty clever. You could potentially accomplish the same thing with reed switches if you find that constant mechanical interfacing with those switches wears them out, or you can't make the assembly small enough.
You can mount small magnets between the ridges on your magazines that trip certain combinations of reed switches to denote magazine size.
Actually if you read all the way through, i got rid of the switches and used hall effect sensors with magnets.
Remember the runaway problems you had when powering on the blaster on the mk3? I just thought of something to help avoid thathe and may be easier then a pull down. You could try using a mag lock that let's everything power on but prevents pusher motor operation without a mag inserted, kinda like they normally work but it would still allow for motor rev without the mag.
I solved that, it was just that one of the switches had come loose from its mount and wasnt registering a press properly. Couple of drops of superglue and all good.
Occurred to me i never posted a pic of what my Rapidstrike ended up like. I ended up adding nerf sights, and made a suppressor out of some pvc pipe from a hardware store.
Put a 9 LED flashlight on the right hand side, which just has a rear mounted pushbutton switch.
Put a laser on the left hand side, which has a momentary switch on the grip in just the right spot for the thumb. (Its the red dot behind the motor switch).
So have been stupid busy the last few months and havent done much nerf work, but I scored a cheap Hyperfire on the weekend, so thats inspired me to do some more modding!
First was my basic MkI Arduino controlled Stryfe and Rapidstrike: http://nerfhaven.com...nd-rapidstrike/
Then my MkII with an OLED and extras: http://nerfhaven.com...hot-counter-v2/
And then the MkIII with a fully reworked Stampede: http://nerfhaven.com...controller-mk3/
Now its time to see what else I can add in to a MkIV !
I've already removed some of the locks and put in better wiring to the Hyperfire, but electronically it's still stock.
The obvious things i added in the previous guns will be there:
- Mag size detection
- Round counting
- Voltage display
- Current draw display
- Jam door open detection
- Safety switch
- Single shot, three shot, full auto shot selection
- Stopping shooting at 00 rounds
- Buzzer for safety/no ammo notification
I'll use a 1.8" colour LCD, so i might add a way to change the colour using a trimpot.
Any other suggestions for things to add in? The Hyperfire has a stack of room in the front end so I can fit all sorts of things in.
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!
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)
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
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.
The left side of the shell, has the safety switch, and 2x hall effect sensors for magazine size detection. There is an 8pin connector to disconnect it from the other side, makes it easier to work on.
The right side of the shell. You can see all the various bits and pieces. In hindsight i'd have used a nano extension board and put it in the battery bay, would have made hooking everything up easier. The joystick isnt visible as its under the magazine release mechanism, and the voltage/current sensor is mounted flat on the bottom of the battery bay so cant really be seen.
The magazine insertion switch, and jam door switch are the existing switches in the blaster, just re-purposed.
The paint needs finishing and detailing (and stripping in the case of the trigger), but here you can see the screen and joystick. The joystick can be reached by the trigger finger.