Jump to content


Photo

Ammunition Counter for a LongStrike

Some flashy electronics meant for LARPing

18 replies to this topic

#1 Shuzz

Shuzz

    Member

  • Members
  • 5 posts

Posted 14 February 2012 - 05:01 PM

Hey guys,

long time lurker, first time poster on this forum.

I'm a bit nervous, hope the banhammer doesn't hit me immediately. :D

As I regularly run into situations in NERF wars where I got my opponent directly in front of me and then the blaster produces nothing but that ugly sound of dry firing, it was time to put an ammunition counter into that gun.

So no long talk, here's a video of the whole thing in action:

http://www.youtube.com/watch?v=o8-s1d_Aohg

The stock cocking indicator of the longshot had to go to make room for the six yellow LEDs. A red LED was added to indicate the state of the gun.
Posted Image
The circuit uses a cheap Atmel ATTiny13 microcontroller for controlling the whole sequence. I'm actually still working on the software side of things a bit more so the blaster can be safely stored with a magazine inserted without draining the batteries.

Circuit is controlled by two microswitches in the LS shell:
- One is sitting in the magwell, it cuts the power to the circuit when the magazine is removed, essentially resetting the circuit when a new mag is inserted as well as preserving the batteries when the gun is not in use for longer periods of time.
- Second one sits in the rear end, being triggered by the plunger once it is in its cocked position. This switch does two things, first it is wired to the controller and signal when the gun is fired, second it will turn on the red priming indicator LED when the blaster is cocked.
All cabling is run through the top grip to the front and held in place by hot-glue.
Posted Image

The switches were put in place using a two-component epoxy putty. Of course I used too much of that stuff which resulted in lots of scraping and cursing (as well as cutting a few millimeters of the back of the sled assembly) in order to make the LS mechanism work again.
Here's close-up of the rear switch with a second, identical switch added for getting an idea of its size. I put a small nail through one of the holes in the switch in hopes of making the whole assembly more stable and durable - I could have just left it out. The epoxy putty sticks to the shell and switch so well it wouldn't have been necessary.
Posted Image

The circuit is powered by three AAA LEDs soldered in series and hot-glued directly to the shell below the faux barrel in the front. Yes, that will make changing batteries a bit of a hassle, but since power consumption is very low at about 30 milli-amps when all LEDs are lit, the batteries should last for quite a while.
The circuit itself if just a small piece of circuit board simply hot-glued to the empty space to the left of the magwell.

Edit: Here's the pictures of the assembled internals, as promised.
Posted Image
In the lower left, next to the magwell, is the (rather small) circuit board. All resistors and capacitors are SMD parts and therefore sit on the bottom of the board, between the pins, so they're not visible anymore.
The board could have been made even smaller by not including the pin header for programming, but I like to be able to do tweaks to the firmware later without having to take the controller out of its socket.

I gutted an old CAT5 network cable for the wiring. I actually like using those in most of my projects - they're flexible, easy to stuff in most nooks and crannies and still have sufficient diameter to carry enough current even for high-powered LEDs.

Two more detailed shots of the controller board and how the LEDs were mounted (just lots of hot glue really):
Posted Image
Posted Image


Finally, here's the circuit diagram, for those of you who might be interested in building this thing yourself:
(Please PM me if you are interested in the firmware, I'll send you the sourcecode then.)
Posted Image

Other than the electronics, only basic modding has been done so far: AR was removed and another spring added.
I'm planning on putting a PVC breach on that thing and then give it to a friend of mine for a paintjob.
(Brass breach is out of the question, unfortunately, because I live in Germany and it's impossible (or rather: impossibly expensive) to get the required brass tubing here.)

And because the question came up several times in the thread below: The counter will only count from six shots down to zero.
Yes, that means it will only "work" with six shot magazines, no drums, no 18 shot mags.
This is not a problem for me, as this blaster is meant for LARPing and not for NERF wars, so I don't need to use anything other than 6 shot mags in it.

If you want to count more shots you'll need to put some 7-segment digits in place of the LEDs, but that requires a lot more wires (at least eight) to the controller than the current solution (three wires for LEDs) which might prove difficult to put into the grip handle on top of the Longshot.
I'll maybe do something like that to a friend's Stampede (when he finally lets me mod it) and then also add support for different mag sizes.


So, that's all for now. Hope you like it...

Best regards,

Shuzz

Edited by Shuzz, 18 February 2012 - 03:12 PM.

  • 0

#2 KaptainKrazy

KaptainKrazy

    Member

  • Members
  • 79 posts

Posted 14 February 2012 - 05:26 PM

Isn't that a longshot?
  • 0

the only mod you can have is the range extetder mod.


#3 Shuzz

Shuzz

    Member

  • Members
  • 5 posts

Posted 14 February 2012 - 05:54 PM

Ummm, yes it is. -.-

Great, first typo in the title.
I suppose changing the thread title is not possible, right?
Sorry! Can a mod help me out here please? :)

Edited by Shuzz, 14 February 2012 - 05:56 PM.

  • 0

#4 VelveetaAvenger

VelveetaAvenger

    Member

  • Members
  • 630 posts

Posted 14 February 2012 - 05:58 PM

I love the "power-up" flash. Very cool.
  • 0
"I never saw Beastmaster, I just wanted to be cool..."

#5 ACE11

ACE11

    Member

  • Members
  • 47 posts

Posted 14 February 2012 - 06:12 PM

What if you're using an eighteen round mag or drum? I assume it counts the first six shots only?
  • 0
Forsakenangel: Wow, 7 posts and only 2 of them have to do with the topic.
Go Nerfhaven!
Langley: I'm sorry we went off topic in your thread about exploding Easter bunnies. We'll try to do better next time.

#6 Shuzz

Shuzz

    Member

  • Members
  • 5 posts

Posted 14 February 2012 - 06:23 PM

What if you're using an eighteen round mag or drum? I assume it counts the first six shots only?


Correct. I don't see it as a big problem, though, because when LARPing I typically only use six round magazines. Drums mostly don't fit the setting, bigger mags are somewhat unwieldy to carry around.

Recognizing different types of magazines would require modding the mags, for example by fitting a resistor on the part of the magazine that's inserted into the blaster.
Also, I didn't have any 7-segment digits at hand that are small enough to fit inside the shell of the blaster.

However, it's definitely something that is planned for v2 of this. ;)
  • 0

#7 magnum

magnum

    Member

  • Banned
  • 24 posts

Posted 14 February 2012 - 07:42 PM

wait but then you could only use a six round clip then right?

#8 Exo

Exo

    Member

  • Members
  • 391 posts

Posted 14 February 2012 - 07:42 PM

I did this, and it didn't get much in the way of positive response from non-FNG's, but it's nice to see that other people have the balls to do electronics work.Always glad to plug my own work!The code's all there, you should be able to plug and play, but I may not have the language version and chip version stamps up at the top. Mine is set up so that you turn a dial to put in preset ammounts. The video shows 9 shots to one shot, but only because I only had one display unit.

May I suggest a PicAxe chip? They are psychotically cheap, and they use BASIC-esque language, and come in a nice variety of pin ammounts. If you are willing to do a bit of shell cutting, you could probably fit the ### LED display in where the LEDs are now, but you'd need two display units to get double digit numbers.
  • 0

#9 roboman

roboman

    Member

  • Members
  • 489 posts

Posted 14 February 2012 - 11:31 PM

Actually, I like it, if only because I happen to like Atmel microcontrollers quite a bit. This LCD display looks like it could be quite useful for this project. You will need around 11 I/O pins, though, so you'll obviously need a larger microcontroller.

May I suggest a PicAxe chip? They are psychotically cheap, and they use BASIC-esque language, and come in a nice variety of pin ammounts. If you are willing to do a bit of shell cutting, you could probably fit the ### LED display in where the LEDs are now, but you'd need two display units to get double digit numbers.


ATTinys and the rest of the AVR series is generally less expensive and more powerful than a PICAxe, and they also come in many sizes. C is not hard to learn (as I'm sure the OP knows), and is a much more useful programming language than BASIC.
  • 0

Youtube

LS and Retaliator boltsleds are currently available at https://www.facebook.com/RoboM8/


#10 lech

lech

    Member

  • Members
  • 128 posts

Posted 15 February 2012 - 12:22 AM

I did this, and it didn't get much in the way of positive response from non-FNG's, but it's nice to see that other people have the balls to do electronics work.Always glad to plug my own work!


Videos gone in your thread mate.
  • 0

#11 Hammy

Hammy

    Member

  • Members
  • 104 posts

Posted 15 February 2012 - 06:10 AM

A nice mod for the LS.

Can you indicate where you got the microcontroller board from (is it Conrad)?

And would you email, upon request, the bit-file that is downloaded to the microcontroller, so we have no need to design the software ourselves

And maybe you could use a switch to set the different mag sizes, so no need to auto detect the mag.
  • 0

#12 TagMaster247

TagMaster247

    Member

  • Banned
  • 103 posts

Posted 15 February 2012 - 09:41 AM

Actually, one thing you might be able to do is when the LEDs are going off when you are using an 18-dart magazine, you could take the mag out, re-insert it (Which will reset the lights if I'm correct), and just keep a note in your head that you've done this one time (It'll take 3 times to empty an 18-dart mag.). Something you could try out if you're in a big Nerf war where you might need the extra darts.

#13 Ambience 327

Ambience 327

    Member

  • Members
  • 561 posts

Posted 15 February 2012 - 10:40 AM

Ummm, yes it is. -.-

Great, first typo in the title.
I suppose changing the thread title is not possible, right?
Sorry! Can a mod help me out here please? :)



If you edit your original post, you should be able to edit the title as well. (You can't use the "quick editor", you have to click the "Use Full Editor" button below the box that appears when you click "Edit" (at the bottom of your first post). You can then edit both your Topic Title and Topic Description fields.

On-topic, that is pretty snazzy, and I could actually see limited practical use for it in a Nerf war, especially if you got it working for different clip sizes. Assuming you only ever inserted fully-loaded clips, it would always let you know when you are about to run dry. That is never a bad thing to know!
  • 0
Foam in the Fort IV
The fourth exciting Nerf War in Fort Wayne, IN.

#14 Exo

Exo

    Member

  • Members
  • 391 posts

Posted 15 February 2012 - 02:55 PM

Videos gone in your thread mate.

That sucks.
Posted Image
Well, this is about as far as I got, as all I've really got is the prototyping board. But in the final version there is a dial you can turn, so that the starting ammo amount changes, i just don't have a pic of that.

Robo's right, as usual. There are tons of chips, and while BASIC worked for what I needed it to do, the BS2 is a rather expensive, pathetic series. I would love to learn some other languages, and I would personally recommend that everyone learn as many as they can. It's not like learning another language, more like learning another dialect.

Actually, one thing you might be able to do is when the LEDs are going off when you are using an 18-dart magazine, you could take the mag out, re-insert it (Which will reset the lights if I'm correct), and just keep a note in your head that you've done this one time (It'll take 3 times to empty an 18-dart mag.). Something you could try out if you're in a big Nerf war where you might need the extra darts.

Technically, the 18 and 35 round drums are clear in the back, so there's not much point in that. So that leaves 18 and 6 clips, and I personally don't like 18 clips, so it's kind of only good for 6rd clips in my opinion, and the "new" 25 drums and 12 clips are already clear. Now, if you were using a homemeade clip system, you would have a better reason to use this, but so many people would just prefer using a clear hopper. It doesn't have much war application, especially if you're very reload happy.

Edited by Exo, 15 February 2012 - 03:03 PM.

  • 0

#15 Shuzz

Shuzz

    Member

  • Members
  • 5 posts

Posted 18 February 2012 - 03:16 PM

Hi guys,

thanks for your kind replies. It's been a busy week for me, sorry for replying so late.

I added some shots of the finished internals to the first post so you can see how the cables were routed, where everything was placed and so on.

If you edit your original post, you should be able to edit the title as well. (You can't use the "quick editor", you have to click the "Use Full Editor" button below the box that appears when you click "Edit" (at the bottom of your first post). You can then edit both your Topic Title and Topic Description fields.

Thanks for the tip, however, it doesn't work for me.
I cannot edit the thread's title...
Should I report my own post so a mod can do it?

Actually, I like it, if only because I happen to like Atmel microcontrollers quite a bit. This LCD display looks like it could be quite useful for this project. You will need around 11 I/O pins, though, so you'll obviously need a larger microcontroller.

ATTinys and the rest of the AVR series is generally less expensive and more powerful than a PICAxe, and they also come in many sizes. C is not hard to learn (as I'm sure the OP knows), and is a much more useful programming language than BASIC.

You're right: ATTinys are dirt cheap. PICAxe boards afaik are comparable to an Arduino, as in having their own programming language and being more expensive than "naked" PIC chips.
However, the LCD would not be my choice for something like this ammo counter. First, they're sensible to low temperatures and generally more fragile than LEDs. Second, they tend to be quite large compared to LED displays (I'm not sure that the one you linked would fit inside a LS shell, even though it surely is one of the smaller LCD displays I've seen.) Third, most of them require loads of I/O pins on the controller to interface them. Those that don't usually require more complicated firmware and cannot be updated as quickly.

Can you indicate where you got the microcontroller board from (is it Conrad)?

And would you email, upon request, the bit-file that is downloaded to the microcontroller, so we have no need to design the software ourselves

And maybe you could use a switch to set the different mag sizes, so no need to auto detect the mag.

The board has been homemade, it's just a simple piece of PCB. Components were hand-soldered. The schematic doesn't show the added pin-header used for programming the device.
I can email you the binary file, but it might not work out as you expect. Reason is I probably screwed up while wiring up the LEDs (e.g. switching two wires by accident) and simply fixed that while writing the software.
So, depending on how you wire up the LEDs, they might not light up in order and you'd have to do some try-and-error'ing until it works properly. If you still want the .hex-file, PM me. You can also have the source code, there's nothing secret in there...

As for the switch: Sure, I could do that. Using a dial switch (or a variable resistor) connected to the last free pin on the controller is simple enough and would work.
But it doesn't make sense when you only have six LEDs as a display, therefore I didn't do it. (I could let them count in binary, but that wouldn't be user-friendly either...)


Actually, one thing you might be able to do is when the LEDs are going off when you are using an 18-dart magazine, you could take the mag out, re-insert it (Which will reset the lights if I'm correct), and just keep a note in your head that you've done this one time (It'll take 3 times to empty an 18-dart mag.). Something you could try out if you're in a big Nerf war where you might need the extra darts.

Yes, you could definitely do that. However, in a war situation you probably wouldn't...

One general thing: This mod was not done for NERF wars, as you would only rarely use six round mags in a war when you have bigger mags (or drums) available.
It was done for LARPing, especially futuristic LARPing where guns with flashy light shows fit in.
  • 0

#16 oatmeal

oatmeal

    Member

  • Members
  • 12 posts

Posted 18 February 2012 - 07:57 PM

so would an arduino work?
  • 0

'Tis but a scratch!


#17 Exo

Exo

    Member

  • Members
  • 391 posts

Posted 18 February 2012 - 11:26 PM

so would an arduino work?

Mine used the BASICStamp2, and Arduino is more sophisticated, so yes, it would work. There are many MC's out there that would probably be up to the job. You can even do this with a calculator.
  • 0

#18 Shuzz

Shuzz

    Member

  • Members
  • 5 posts

Posted 19 February 2012 - 04:43 AM

so would an arduino work?


Technically yes, but there are a few things that make an Arduino a rather bad choice for this:
- You may have a hard time putting an Arduino board into the LS shell.
- They need at least a 6V supply due to their onboard voltage regulator, that means you'd have to use at least 5xAA batteries in order to keep the current above the required threshold once the batteries begin to drain (and therefore their voltage drops below 1.5V)
- An Arduino would be overkill for "only" lighting up a few LEDs.
- Arduino boards are far more expensive. (About five to six times more than what I used for the controller board)

But if you don't care about the cost and can fit the board into the shell you can use an Arduino.
  • 0

#19 Exo

Exo

    Member

  • Members
  • 391 posts

Posted 19 February 2012 - 03:23 PM

Technically yes, but there are a few things that make an Arduino a rather bad choice for this:
- You may have a hard time putting an Arduino board into the LS shell.
- They need at least a 6V supply due to their onboard voltage regulator, that means you'd have to use at least 5xAA batteries in order to keep the current above the required threshold once the batteries begin to drain (and therefore their voltage drops below 1.5V)
- An Arduino would be overkill for "only" lighting up a few LEDs.
- Arduino boards are far more expensive. (About five to six times more than what I used for the controller board)

But if you don't care about the cost and can fit the board into the shell you can use an Arduino.

Well, on the voltage problem, you could just go with a 9V battery. And yes, Arduino boards are a bit large. Now, if you wanted to make a select-firing, ammo-counting swarmfire, then Arduino would work well, as SF's have the shell space to acommodate something that size.

Edited by Exo, 19 February 2012 - 03:23 PM.

  • 0


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users