GCode: open source paintball gun board/software
I'll try to keep this first post updated with important info to help people get started if they want to try it out.
Edit: Code is live here: https://github.com/sumorai/GCode/
Edit 2: Here's the post with the current schematic and parts list for what I'm using for testing.
Original Post follows:
I've been wanting to write my own board software for years now. I tried to get into it using PICmicro systems about 5 years ago, but found the experience to be frustrating and expensive. Fast forward a few years and Arduino comes along and it's perfect. I got some Arduino products for my birthday and started playing around with those in general. After playing with a few of their examples (involving blinking LEDs, buttons and debounce) I realized I could use this to finally write my own board code for a paintball gun. I spent some time over the next week and was able to get a preliminary version of my code working. I'm developing it using the Arduino Nano. I now have the Nano running with a microswitch and eyes from a Viking on a breadboard such that I can test the code. So far it just has semi-auto, uncapped for a firing mode. It has a programming mode similar to Tadao with a blinking multi-color LED (you hold the trigger down when it starts up to enter programming mode). It currently has programmable settings for debounce, mech debounce, dwell, loader/ball in place delay & fsdo/anti-bolt stick delay
Currently I'm calling it GCode. (My name is Gabe, it's my code, and it's also a play on the use of a G code/count in paintball). I'll be posting the code on github (most likely) in a few weeks after I've gotten a board to work in my Viking and have play-tested it. The board I'm intending to use for that is the Femtoduino (with USB). I have one on the way.
Here's the version history so far, so you can see where I'm at:
// Version History
// v0.0 - started 4/22/13
//
// v0.1 - full trigger & debounce logic
// - programmable debounce & dwell
// - semi-auto, uncapped only
// - complete 4/28/13
//
// v0.2 - Rewrote debug code to use ifdefs
// - added basic breakbeam eye input
// - complete 4/29/13
//
// v0.3 - Added Mech Debounce
// - Added Loader Delay
// - Added FSDO Dwell
// - complete 4/29/13
//
// v0.4 - Add ability to hold trigger to force a shot after 1/2 second
// - Add ability to turn off eyes after holding trigger for 2 seconds
// - Add code to check eye malfunctions
// - complete 4/30/13
v0.5, which I'm currently working on, will have full auto and ramping modes added. I'm in the process of redesigning the main operational loop that handles firing.
The other things I intend to add in later versions are:
- Configurable ROF caps (eyes on/off)
- Auto-shutoff after a configurable amount of time
- Dual solenoid support (for Excals)
- A couple other little tweaks like blinking the LED when it's on instead of a solid light (like Tadao does) and blinking the eye LED instead of a solid light (until the trigger is held down) like the Droid board I have does
- I need to spend some time playing around with how hardware interrupts on the Arduino boards work and see if I can make use of that
- LCD support
Threads without pictures suck, so here's some pics of the board:
First time I played with it using the Blink example:
http://fbcdn-sphotos-f-a.akamaihd.ne...99700255_n.jpg
Expanding to using a button:
http://sphotos-a.xx.fbcdn.net/hphoto...52019432_n.jpg
It's current state:
http://fbcdn-sphotos-e-a.akamaihd.ne...68206576_n.jpg