So here’s the start of the design section of the project. I’m releasing this project and related information under the BSD license. I’m not into the viral type of Open Source licenses, but if you make a buck let me know about it cuz I’d l0ve to hear about it. And maybe you can buy me some draft root beer … and if it’s a lot of money, maybe a Tesla …
I thought I’d put one of the many logos I made for it here. Amazing what a guy with a hamster wheel in place of right brain functionality can do with a few GiMP filters… Well, maybe not as amazing as I think, considering I am the one with the hamster wheel brain.
Before I dive in too deeply, lemme run over the development cycle that will ensue now that I’ve got my spec:
- Draw up a schematic
- Lay out a circuit board (e.g., place drawings of the parts on a printed circuit board document and draw metal wires between all of the parts that need to be there).
- Break piggy bank.
- Send the circuit board to a “board house” to get it fabricated.
- Purchase parts needed from online electronic component suppliers like DigiKey, SparkFun, and Mouser.
- Assemble the parts.
- Write the code.
- Field test the result at various steps along the way.
I’m definitely a bottom-up developer, meaning I take the skills and parts I know well and attack the given problem with those first, and only add in new skills/parts as my existing skills/parts set prove unsatisfactory. I’ve tried to break this habit, but it gets really cool results really fast and it’s hard to part with that (at the expense of a most likely higher quality project that might be achieved using a top-down approach).
I’ll hit you with a brief overview on the parts that I picked, and then I’ll show the schematic at the bottom:
- ATMega128 from Atmel
- 128KB Flash program space, 4KB RAM
- 54 I/O pins
- 8 ADC channels, for power monitoring and microphone reading
- Clocked at 8MHz and powered at 3.3V (because all cool components run at 3.3V ;)
- It’s one of the easiest microcontrollers to use these days, and ridiculously capable.
- Programmed in BASCOM-AVR. More on that later …
- EM-406 GPS module from SparkFun.
- 20 channel (e.g., can track up to 20 satellites simultaneously)
- 5m accuracy
- Small and works pretty standalone
- Connects through a UART to the Mega128
- Color LCD Nokia Knock-Off from SparkFun.
- 128×128 Pixels
- 4096 possible colors, but only 256 at a time in the palette
- Not that great, but it does the job about as good as an old cell phone LCD display would
- Digi XBee Pro, also available from SparkFun among many other vendors
- 1 mile line of sight range, 300yd urban range
- Easy as pie. And like Jack Handy says, “If you get the chance to choose between regular heaven and pie heaven, choose pie heaven. It might be a joke, but if not, mmm boy!” Mmm, XBee!
- Flexible addressing and self-healing mesh networking capabilities
- FM24C64 chip from Ramtron. I’ve only found it from Mouser.
- 64KB of high-speed, non-volatile RAM.
- Cheap (~$3.50)
- Used to store field and game information, along with user settings
- Every project with small non-volatile needs should use one of these. They’re fantastic.
- 1100 mAh Lithium Polymer battery from SparkFun.
- MAX1555 Li-Ion battery charger.
- This is a pretty good and easy to use combination, and I’ve had great luck with the crazy easy to use charging circuit in the MAX1555 datasheet.
Those are at least the main parts that drive all the primary functionality of the system. Drum roll ….
Schematic time! I use EagleCAD from CadSoft (http://www.cadsoftusa.com) for drawing schematics and laying out PCBs. They have a free version for non-commercial use, which is great for open source and hobby stuff. SparkFun releases EagleCAD libraries for almost all the parts they sell, which kicks development speed up to .5 past lightspeed. Eagle is also cross-platform compatible, for all you fellow penguins out there.
Sorry for the under-impressive image on this page. Click through to zoom in for readability. You’ll notice I organize my schematics by net names rather than running crazy lines all over the page. Please don’t ever make schematics like that. Every time you make a rats nest out of nets running all over the page, a devil gets his horns. Just don’t do it.
Instead, label the crap out of EVERYTHING. It’s best to not leave any nets with a default net name (e.g, N$42). You’ll notice that it’s usually fairly easy to follow the document this way, especially when you’re using a printout, PDF, or some lame JPEG on a blog instead of Eagle to view the schematic.
Rant time’s up. Anyways, I know I messed a few things up. I’ll make an errata list if I can remember what they are … Also, it’s OK if you don’t have a clue what’s going on. I’ll explain most of the connections in later posts, especially once I start talking about the software (because that’s where the pin functionalities and inter-IC signals really get defined).
Also, you may have noticed I like SparkFun (woot!). They’ve got some great stuff that hobbyists normally can’t source, like the GPS module, LCD display, and lithium ion batteries. They also have a lot of great tutorials for beginners, for everything from Arduino to basic soldering. Shameless plug: buy stuff from them. Every time you place an order, a devil gets his horns removed. (No, I don’t work for them … that’s a pipe dream …)
Next time, on Brad’s Projects: Board Layout! Yay!
To my wife’s great chagrin, I like playing video games on occasion. She equates it to the worst form of self-indulgence there is, and a complete waste of time, but it’s relaxing and I rarely (read: less often than not) let it interfere with things I’ve got to get done. All said and done, I go through spurts where I’ll play for a few hours for a couple days in a row maybe once a month.
My favorite game is Battlefront. Yes, the original – Upper management won’t approve expenditures on new video games so the ones I get are usually pretty old. Woot to the stormtrooper. Enough digression – One day I was playing and thought, “Wouldn’t it be cool to have the enemy radar in real life?” To which I responded casually to myself, “Heck yes, it would.”
So I made one. Loosely based off of Halo and Battlefront radar, I designed one for the only acceptable (upper management required non-lethal) recreational war I could think of: Paintball!
I toyed around with the thought of actually making a product out of it for a while. I didn’t because paintballers I talked with just weren’t willing to part with $200 for what they considered a gimmick. But it did give me a reason to blow several hundred dollars on something my wife would marginally approve of. It’s all about working the system (erm, I mean, I love you honey!).
So I came up with a fancy project name, ZephyrEye, drew up a quick concept screen, and wrote up some project specs.
- Color LCD screen
- Should be able to monitor ammo levels by detecting shots fired using a microphone
- Must be hardened to survive a direct blow
- Uses GPS for localization
- Uses ZigBee mesh networking modules for up to 1 mile transmissions
- Must be reprogrammable via wireless bootloader.
- Must use an AVR processor.
- Battery must last at least an hour.
- Both friendly and opposing players can be identified by color and/or symbol.
- Visibility of friendly/opposing players can be user selected per game.
- “The Walking Dead” can be identified by color/symbol (so they don’t get shot again ;)
- Players can be “respawned” by waiting in a neutral “base” zone for a timeout period after being shot.
- Can keep score of different styles of games: Capture the Flag, Elimination, King of the Hill, etc.
- Players can report being hit, which removes them from play and shows others their location as they withdraw.
- Field objects (such as bunkers, bases, field boundaries, etc.) can be programmed in, saved, and restored.
I’m sure I’m forgetting something, but that’s more or less what I set out to create. Here’s what I came up with using a cross-platform compatible and open source 3D rendering software called Blender, with a few post-processing effects using GiMP. I’m really not an artist, but I think it gets the point across. I’ve never actually integrated a ZephyrEye into a hopper, but I thought it would be cool.
I should also note that while I’ve really enjoyed my paintballing experiences (heck, I went paintballing for prom one year ;), I don’t own any equipment and I don’t go very often. So, like almost all of my inventions, it’s a solution looking for a problem (bad Brad!). But even Sir Mix-A-Lot can’t deny the coolness factor. It’s there, baby.
Next: Schematics and design files. Hopefully by the third or fourth post on this topic, I’ll have some videos of the functioning prototypes (cause I still don’t have any that look decent…).