Authenticated as: Anonymous (Change Credentials / Create Account)

B-Trigger: Homebrew Trigger Board for Paintball Markers

Note: We have restarted our development from scratch, moving from PIC microcontrollers to the TI MSP430 platform. We've archived the old PIC-based information.

The aim of this project is simple: to build an Open Source replacement trigger board for electronically operated paintball guns (at this stage we're only really supporting blowback-operated markers, but with some imagination one could support 'cockers et cetera) with features comparable to expensive upgrade boards.

The Platform

Spyder e-markers seem to come with a PIC-based trigger board, and we began our development using the PIC platform too. However, the project stalled when I couldn't manage to procure a working PIC programmer. Testing in simulators will only get you so far.

A while back, OrganizedChaos bought me an MSP evaluation kit, and we began sharing ideas and code for various problems. This morning I decided today was the day I would either get a working MSP trigger board, or kill my Flash e-trigger in the process. I managed to do the former.

B-Trigger v0.1

The following C code is all it takes to get a working quot;proof of conceptquot; trigger board that is Full-auto with a speed dependent entirely on the clock of your particular MSP. We jumpered our MSP target board to the spyder PCB, severed one track to cut off power to the PIC, uploaded the software and that's that.

/* ** B-Trigger: Bovine Trigger for Paintball Markers ** http://www.hungryhacker.com/projects/b_trigger ** (C) 2005-2007 Hungry Hacker Industries */ #include "msp430x20x1.h" #define IO_LED 0x01 #define IO_TRIGGER 0x02 #define IO_SOLENOID 0x04 #define DEL_SOLON 5 #define DEL_SOLOFF 20 void sleep(int cycles) { volatile unsigned int i, j; i = cycles; // err, cycles / 10k anyway while (i) { j = 1000; while (j) j--; i--; } } int main(void ) { /* ** stop watchdog timer */ WDTCTL = WDTPW + WDTHOLD; /* ** setup pins */ P1DIR = 0xFF; // all pins output P1DIR ^= 0x02; // pin 2 input P1OUT = 0; for (;;) { if (!(P1IN amp; IO_TRIGGER)) // is trigger pin low { P1OUT |= IO_SOLENOID; P1OUT |= IO_LED; sleep(DEL_SOLON); P1OUT amp;= ~IO_SOLENOID; P1OUT amp;= ~IO_LED; sleep(DEL_SOLOFF); } } /* ** NOT REACHED */ return 0; }

Once we get the kinks ironed out, I plan on rewriting the entire thing in ASM to optimize it (mostly as an exercise for myself, not so much because it'll need it - even the bottom barrel MSPs have more than ample processing power to handle this job even if it were coded in something like COBOL).

On our prototype, the stock board's LED glows very dim at all times. The LED on the MSP board (it's tiny) glows when the solenoid is energized, mostly as a debugging measure for when we start looking at reducing the duration that the solenoid is hot.

Figure #1

Figure #1

Above, you can see the MSP module jumpered with four wires to the stock board in my Spyder Flash. I decided against photographing the track I cut to disable the onboard PIC, lest someone do it wrong and bugger up their board, blaming me.

What's next?

From here I plan on spending a day or two hacking up the other features - firing modes, shot speed, etc, then I'll look at better integrating the two boards. I will probably desolder the PIC and put it someplace safe (I still don't know how reliability is going to go), and try to figure out a way to make it all fit inside the frame.

I plan on mounting another socket, perhaps a miniature earphone socket, which will allow me to program the MSP while it's still in the frame. Then we'll move on to testing reliability, fine tuning the settings, then we'll rewrite all the documentation in such a way that other tinkerers can do the same thing.

Updates

Today, I got the PIC off the PCB successfully, and attached the MSP target board in a more reliable manner. I also modified the PCB to allow me to remove the jumper (seen next to the DIP switches) when I want to connect the MSP target board to the programmer. Failing to do this means that the trigger board soaks up too much power from the programmer and it fails to operate.

Figure #2

Figure #2

Figure #3

Figure #3

I implemented fire modes, as well as played a bit with the delays. You can see the version 0.4 code which includes Semi-Auto, 3 and 6 Round Burst, and Full-Auto. Simply connect Pin #5 of the MSP target board via a momentary button to the 5vdc rail to toggle modes. I haven't managed to successfully test this version, because my 9v battery went flat. :(

I've managed to find a duration for DEL_SOLON which is much too short to trip the sear properly. If you build one of these, you'll need to experiment to find the optimal value.

Links