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!