Fascinating! (can't wait to really dig into this after work)
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:
Expanding to using a button:
It's current state:
![]()
Last edited by sumorai; 07-15-2013 at 10:03 AM.
Fascinating! (can't wait to really dig into this after work)
I have a couple Teensys here i'm doing pb related things with - I'd be happy to help
That's awesome, reminds of of how I started too.
What environment you writing it in? It's a 12 pin microcontroller?
I wish that my programming knowledge was better. Things like this are so cool. The size of that arduino board is ridiculous too.
Team Akkadian Paintball Squad
B.S. Mechanical Engineering UW-Platteville 2012
Originally Posted by neftaly
The IDE is free, that's cool. Do they have a simulator at all - if we didn't happen to have a Nano board?
There's simuino, but I haven't tried it at all.
I've got some Molex connectors ordered so I can hook up the Viking components easily for testing.
Also, my Femtoduino board arrived yesterday. I haven't gotten a chance to use it yet because I cannot for the life of me find a micro usb cable. Gonna have to pick one of those up so I can try this thing out. It is tiny! Here's a pic comparing it. From left to right: Tadao Viking board, MacDev Droid board, Femtoduino, Arduino Nano:
![]()