Tuesday, June 29, 2010

Arduino

Parallax’s Basic Stamp is the mainstay for hobbyists wanting to add intelligence to everyday devices. A new system called Arduino provides the benefits of the Basic Stamp at a greatly reduced cost, increased speed, and is entirely open-source.

A Little Background

Tiny computers surround your life. In your coffee maker, remote control, vacuum cleaner, telephone, and clock radio, these little computers (aka microcontrollers) are getting smarter and cheaper and becoming more pervasive every day. They can be had for less than a dollar. And you can program them as easy as you can write a web page.
To program microcontrollers in the old days (i.e. a few decades ago), the requirements were an expensive development environment costing thousands of dollars and a professional electrical engineer. In the early 1990s, Parallax had the idea of embedding a simple BASIC interpreter on a microcontroller, mounting it on an stamp-sized module, and providing lots of add-on devices, excellent documentation, and example circuits and code. The friendly Basic Stamp created a whole new market of hobbyist-oriented microcontroller devices and the standard by which other such devices are judged.
The reasons why the Basic Stamp was a hit are obvious in retrospect. BASIC is an easy computer language to pick up. People without knowledge of computer programming can pick it up quickly. Parallax’s wonderful examples showed how with just a handful of extra parts and a few lines of code you could create all manner of smart objects. In an afternoon you could create your own robots, games, data collectors and toys. In the process you’d learn about microcontroller techniques.

Basic Stamp Issues

The Basic Stamp does have a few downsides:
  • Expensive — The Stamp itself is $50 and to program it you really need a development board for another $70. Even without the dev board, a $50 part makes you reluctant to use one for every room of the house, let alone for every appliance in your house.
  • Slow — The Basic Stamp re-interprets your BASIC program each time it’s run, placing a limit on the fastest it can do things. Time-critical are beyond its capability.
  • Low Memory — There’s not much room in a Basic Stamp for anything but simple programs.
  • Closed — If you want to modify the BASIC interpreter in the Stamp to add new commands or remove the ones you don’t use, or even learn how it works, you’re out of luck. It’s closed nature meant for the longest time only Windows PCs could program Basic Stamps.

Enter Arduino

Arduino solves most of the above issues with the Basic Stamp. The most noticable is cost:


Getting to the “Hello World” of microcontroller projects, the blinking LED, on Arduino costs $32 compared to the $119 for a Basic Stamp. This is perhaps a little unfair because the Basic Stamp board contains a full bread-boarding space. A similar setup for Arduino would cost about $60, still a 2x savings (and can made cheaper if you want). A more telling cost comparison is the “consumable” cost. If you accidentially blow out the chip on each board how much does it cost to replace it:
The standard Atmel AVR ATmega8 chip used on the Arduino board can be obtained for less than $4. The Basic Stamp must be obtained from Parallax and costs $50.
This order-of-magnitude cost reduction opens up entirely new avenues for embedding intelligence. Where before it would be economically infeasible to have a 100-Basic Stamp project, with Arduino and an AVR programmer like the $34 AVR-ISP, you can program as many ATmega8 chips to work with Arduino as you like.

What is Arduino

Arduino is two things:
Like the Basic Stamp, Arduino solves in a simple, elegant way the usual difficult problems of microcontroller programming (setting up a working board, talking to the board, making compilable code) With a Arduino board, doing a blinky light “hello world” takes less than 5 minutes. For example, below is the same functioning code for Basic Stamp and Arduino.

The differences are minimal. However unlike the Basic Stamp, with Arduino you can use real GCC C code to implement your algorithms and access all the hardware of the AVR chip.

Go Forth and Hackify

Try out Arduino. Go to SparkFun.com and buy an Arduino board, then download the software and start playing. Check out the many examples or visit the playground to see how people are hooking up their Arduinos to the world.


No comments:

Post a Comment