So I started playing paintball last year when a friend of mine had a bunch of people over to play. Someone brought a spare marker and mask, so I borrowed it and joined in. Needless to say, I got killed pretty quick, but it sure was fun! So I went out a few weeks later and picked up a PMI Piranha EForce kit, and some paint. I've only played once since then, mainly since that friend is now in the Navy. But that's not gonna stop me from modding my marker!

Last Updated - 4/10/2005 3:04PM EDT

I started making plans to build a shot counter, to tell me how much shot is left in the hopper. I designed a 8051 microcontroller based shot counter. That way I'm not locked into one method of counting, or hard coded number of shot. If I get a larger/smaller hopper, or bigger reload cansiters, I can just reprogram the micro for the new numbers. Here's the schematic for the counter, in multiple formats: (png) (postscript) (gschem).

Once I had the circuit designed I breadboarded it to perfect it, and give me a place to test while I wrote the code for the micro (This was my first project using a microcontroller, Every other electronics project was simple analog circuits, nothing digital.

Here's the circuit in the breadboard, on one of the first successful test runs.

Breadboarded circuit

So once I had the circuit fine tuned, and the micro controller programmed correctly, I started designing the PCB for it. I used a GPLed PCB design tool call PCB. It worked great for my purposes, and does a lot more than I needed that's for sure. All the data files for the PCBs are in this format, but I've also uploaded the postscript files generated by it, incase you don't run Linux, or don't feel like setting it up.

I split the circuit into three parts in order to fit it inside the plastic casing I wanted to use for this project. One board has the Microcontroller and it's supporting circuitry. The second board has the LED Decoder chips. The third board has the 7 segment LEDs. The micro and decoders boards are connected through a 9 pin through board header. And the decoder board and display board are connect using ribbon cables.

Once I had the PCBs designed, and everything all planned out, I started etching the PCBs, I found a cheap and easy way to make single layer PCBs from a webpage online. This method posted by Thomas P. Gootee, used to create PCB masks for PCB etching using a laser printer. This method works really well, as long as you iron the board well enough, and your laser printer dosn't suck. I got his recommeneded Staples brand photo paper, and it worked Great. Much easier than drawing your circuit on with a Sharpie!

So anyway, Here's a few shots of making the PCBs:
PCBs in water disolving paper - The PCBs sitting in water disolving away paper after ironing.
One of the PCBs with the paper removed, and just the mask reaining. - This is the decoder board after the paper was removed fully.
Two of the PCBs after Etching. - This the the Decoder and Controller boards after etching.
The Decoder and Controller boards being testfit. - This the the Decoder and Controller boards being testfit together.
The whole device assembled laying outside the case. - This is the whole thing, ready to be put in the case.

So that's all the pictures I have so far, I need to take one of the finally assembled device, and the mounting bracket I made to attach it to the marker. But you'll have to wait for those, as a few finishing touches have to go into them first.

Updated: 4/3/2005 11:15PM EST - I got everything assembled and did a few test fireing rounds. It turns out the recoil from the marker is causing the reload button to be false triggered. I made a software change to require that you press the button down for about a second before it registers. Worked like a charm. Also, while test fireing it, I found that I couldn't see the LEDs at all, the sun was drowning them out. So I attached a canopy to the main case, which should block the sunlight when the sun is overhead.

Also it turns out my hopper only holds 180 shot, instead of 200 like I thought it did, so I had to adjust that as well. The reload canisters do hold 100 though (sometimes 103) So that part is good. The hopper size is a one line change, so it's pretty easy.

Updated: 4/10/2005 3:04PM EDT - I finally got everything done and painted. For now I've secured it to the marker with electrical tape, until I get the tap I need to put the set screw in the bracket. I also still need to figure out a method to batteries to the marker, without using tape. All that is left now is getting my logo silk screened on the sides, and putting in a good set screw to hold the mounting bracket in place on the rail.

The counter mounted on the marker, and all hooked up. - Here's a picture of it all in place and assembled with tape.

If you look at the casing on the counter, you'll notice the back section around the LEDs that isn't in the pictures above. I added that by cutting out the correct size of plastic from another scrap project box I had, and then used my soldering iron and some more extra plastic from that same project box to "weld" the plastic together. Basically I slightly melted the plastic on the parts to be joined with my iron, then melted some donor plastic into the gap between the parts. Once I had the gap filled in, I filed and then sanded down the joined sections. It sanded exactly like wood. After that, I fine sanded it, and painted it using Kyrlon Fusion spray paint, it will adhear to plastic, without flaking off.

I'm also looking at re-designing the board using a full size 8051 micro rather than the 20 pin version I'm using. It has enough outputs on it to directly drive the segments on the LEDs. If I can get it layed out on the board correctly, I will be able to eliminate the decoder board, and make this project a lot smaller. I'm also looking at redesigning using surface mount components, to further reduce the size, but that will be a little more work to get ready. The bonus would be that I would be able to fit the batteries in with the circuits, eliminating the ugly battery box strapped to the side of my marker.

Here's where I'm gonna put the Circuit designs for the different boards, as well as the BOM and other data. But it's not here yet. For now, feel free to peruse The content directory for this post

    And here's a few of the places I got parts/software to do this project:
  • DigiKey - Most all of electronic parts
  • Radio Shack - A few other parts, like the plastic case, and battery holders.
  • Drill Bit City - They carried the small drill bits I needed to drill the holes for the conponents leads.
  • SDCC - The compiler I used to compile the code for the micro.
  • PCB - The software I used to design the PCB's circuit paths.
  • Gschem - The program I used to do the schematic.
  • PCB Etching Method - The page decribing the method I used to transfer the etching mask to the PCBs