CorticalCafe Arduino Projects



Arduino Projects


Arduino Projects:


Having played with the Picaxe microcontroller, it was time to expand my realm.  The Arduino is an inexpensive open source microcontroller system.  This is a natural transition from the Revolution Education Picaxe devices.  While I didn't relish having to learn a new toolset, the more substantial capabilities of the Arduino were enticing enough to warrant the change.  But before you think that the Arduino will get you to microcontroller nirvana, here are some advantages and disadvantages of each system.  The bottom line is that both systems are very appropriate for certain tasks, and not so for others.


Parameter
Arduino
Picaxe
Education
Like any most open source projects, much information is available, but it can be a bit overwhelming for the novice to know where to start.  A few good tutorials are at:  ladyada.com and arduino.cc.
Revolution Education provides three very consistent and well written manuals.  These are a wonderful source of organized knowledge for those just getting into the field.
Cost
A base AtMega328 costs about $6.  If you purchase this with a printed circuit board, header, and minimum components for easy in-circuit programming, it will run you about $12.  Good sources for purchasing are:  wulfden.org, moderndevice.com, ladyada.com, and arduino.cc among others.  You will still have to have a supply of strip-board or perf board to build on.
A Picaxe 08M cost about $3.  If you purchase this with a proto-board, headers, and if you required components for easy in-circuit programming, it will run you about $11.  Good sources for purchasing are:  phanderson.com, and wulfden.org
Required soldering skills
Soldering an Arduino board is usually moderate difficulty due to the number of pins and compact design.  Some of the kits even have a surface mount device to be attached which is definitely advanced material.
Peter Anderson's boards are very easy to solder and leave plenty of space for prototyping simple circuits.
Computing capabilities
The Arduino has great processing ability.  Because it runs compiled code at 16 MHz, instructions can be executed in hundreds of nanoseconds.  It runs floating-point code, and has plenty of RAM (2 kB) and ROM (32 kB of FLASH and EEPROM).  You could make everything from a neat flashlight to a self balancing robot with this chip.
The Picaxe is rather limited. It runs interpreted code at 4 MHz, resulting in timings on the order of microseconds.  There is no floating-point ability, and as I add features to my devices, I almost always end up rewriting code to scrounge a few extra bytes.  The fact that the manufacture squeezes an entire BASIC interpreter into the PIC bootloader still amazes me, though it does put this chip at a disadvantage for performance.
Programming interface
The Arduino is programmed in pretty standard C using a programmer's editor.  The integrated development environment (IDE) helps compile and download the code to your device with just a few mouse clicks.  In my experience, the error messages are pretty primitive and not always accurate.  I can't wait for this IDE to evolve into something as slick as NetBeans someday (or maybe, for someone to build a Wiring module for Netbeans or Eclipse)... but for now this simple IDE does allow you to get the job done.
The IDE can be programmed in a text editor, or using an included graphical interface which allows you to draw flowcharts.  This is helpful for kids or novices just learning to program.  The IDE also includes a simulator which allows you to test your code without having any hardware attached.  Variables are restricted to a predetermined number of byte and short integer types in the Picaxe IDE, which can crimp your style if you are an experienced programmer.  The IDE makes device dedication, and program download very easy, and even identifies the attached Picaxe chip if you're not sure what it is.  Error messages are not always accurate in the IDE. 
Power requirements
My one real pet peeve with the Arduino is that it doesn't have good power saving features available yet.  The price for faster processing is higher power consumption.  It seems to draw about 9 mA during normal operation without a load.  Supply voltage is between 2.5 and 5.5 V. This isn't much, but since I build a lot of solar projects, it is an order of magnitude more than I would have hoped.  Changing the crystal oscillator should help, but I don't even see commands to cut power consumption built into the library.  9 mA is still pretty small and a typical battery powerpack might provide a weeks worth of power if you don't waste it in the linear voltage regulator.  If you are not building solar projects, and don't mind a conventional on-off switch, then this issue may not matter. 
The Picaxe excels at low power applications.  I usually don't put an on-off switch on my projects, because the chip can easily be placed in a low power mode which draws less than 1 mA.  Supply voltage is between 2.5 and 5.5 V.  The programming library allows you to reduce the clock frequency in software, as well as disabling the brownout fuse, and placing the chip in standby mode for timed intervals.  Again, unless you want to power your device with a small solar cell or intended a small battery to last for months, you may not be as concerned with power as I am.

This comparison was performed in 2009.  Send me an email when it gets embarrassingly out of date; especially if you have some relevant updates!


Useful External Links:


Read or write a comment on the hardware projects