Thursday, October 8, 2009

It began with an Arduino

Summary of things I learned
  • Hackaday.com 
    • A blog that posts writeups of various projects everyday.
  • The Arduino
The Details

Hackaday.com

A few years ago a coworker sent me a link to the writeup of an interesting hardware project on a blog called hackaday.com. This blog consisted of a writeup and link to one interesting hardware hack everyday.

Reading through some of the posted projects, it was obvious that I did not possess the skills necessary to reproduce most of them. Occasionally there would be a post about a software project that I knew I could do. I added the rss feed to the blogs that I follow and over the years I read about many interesting projects that seemed impossibly out of my reach.

I highly recommend taking a look at this blog to get a feel for the kind of things that are possible for hobbyists and to get good ideas.

Reading about other people's projects increased my interest in electronics in general. Many of the projects were centered around something called an Arduino.

Arduino

I want to learn how to write software that could interact with real life. I have a temperature sensor and a computer. How do I connect the two so that my software can use it?

The breakthrough that launched me into this hobby happened in a conversation with another coworker, Charles, who showed me an arduino that he had purchased and explained what it was.

What is an Arduino?

An Arduino, according to their web site, is:
"an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments."
The Arduino, developed by a team in Italy, consists of a fairly simple microcontroller board and the development environment to program it.

The hardware is centered around an Atmel microcontroller. Different versions of the Arduino use different microcontrollers. The mc has a number of Analog inputs that measure voltage, and digital inputs and outputs that input or output high or low voltage meaning 1 or 0. the rest of the board is simply components to support the mc such as, voltage regulators, a clock, a reset switch, capacitors, and a status LED. I will talk about the mc and the board more in future posts.

The true beauty of the Arduino is the software. The Arduino software is open source and free to download. It is written in Java and runs on many platforms- including Linux where I use it. It includes a very simple IDE and the avr compiler that produces binaries for Atmel microcontrollers. The IDE also comes with several libraries to do more advanced tasks such as networking. The Arduino community is very active and various libraries, and examples can be found on their forums.

Most importantly- to me as a software guy- the mc on the Arduino is preprogrammed with a boot loader. Microcontrollers require special hardware to copy the code to the chip. These programmers can be very expensive and represent a significant barrier to entry to novices such as myself. The Atmel microcontrollers used on Arduino boards are programmed with a simple boot loader that allows code to be copied to the mc over the built in serial interface. The end result is that you can write your program in the Arduino IDE and press a button and the code is compiled and uploaded automatically.

The Arduino elimates all the obstacles that have to be solved before software can be run: choosing a microcontroller, obtaining a programmer for it, designing a board that can support it, and getting the right compiler that runs in your OS.


Where can you get an Arduino?

The Arduino web site (http://arduino.cc/en/Main/Buy) lists many resellers in several countries that sell the hardware. The software is available for download. (http://arduino.cc/en/Main/Software)

As of the writing of this post, you should expect to pay around $30 for the newest version of the board. You can find older editions for less but they won't be as powerful.

I did some reading and shopping and found a few places that made their own board that is built around the same Atmel microcontrollers. They have different form factors but the software will work identically. I ended up buying my Arduinos from moderndevice.com. This board is designed to be used with breadboards for easy prototyping. It is also a little less expensive.

I bought 4 kits and a TTL serial to USB converter for about $60. Not bad.

In the next post I will go into more detail about assembling the kits and what I learned from it.

No comments:

Post a Comment