Wrapping One's Brain Around the Arduino, Part 1

In this blog we start by considering some examples of Arduino and Arduino-compatible development boards.

As you may recall from my blog It's Crunch Time for Me to Learn the Arduino, I'm currently on a quest to learn the Arduino. There are a number of reasons for this, including the fact that I typically have several hobby projects on the go that could benefit from the addition of a microcontroller.

I've actually been meaning to learn the Arduino for some time, but there's always so much to do and so little time to do it all in. The reason I was spurred to action is that I recently purchased a do-it-yourself 3D tri-color LED Cube kit that is powered by an Arduino-compatible controller.

As an FYI, I finished building this little scamp a few days ago and it worked first time (this resulted in my performing my "Happy Dance," as you can well imagine). I'm now having a great time creating programs for this little beauty. I'll be talking about this in more detail in a future blog.

Another reason for my wanting to learn that Arduino is that I sponsored a Kickstarter project for a fast and easy-to-use machine vision system called the Pixy, which can be connected directly to an Arduino. And yet another reason is that I also sponsored a Kickstarter project for a little hexacopter drone that you can fly using your smartphone or tablet computer. Guess what? This little rascal is also powered by an Arduino-compatible controller.

Just what is an Arduino?
Now, you may know all this, in which case you can simply ignore this next bit. The thing is that a lot of folks are a little fuzzy about some of this stuff, so it's worth our time to take a few moments to ensure that we're all tap-dancing to the same drum beat.

The term Arduino refers to an open-source, microcontroller-based platform that's based on easy-to-use hardware and software. These platforms come in all sorts of shapes and sizes. A very common system is called an Arduino Uno, which features an 8-bit microcontroller and which can be powered by a USB cable, a battery, or an external power supply.

You can pick up an Arduino Uno for only $13.99 from Amazon (click here). If you do purchase this stand-alone unit, then I would also recommend purchasing an external power supply for $5.98 (click here) along with a USB-A to USB-B cable for $5.09 (click here).

Note: Buying standalone Arduinos is great if you already know what you are doing and you simply want to build them into your projects. If you are a complete beginner, however, you might want to consider purchasing a kit that includes an Arduino plus a bunch of other stuff. We will be talking about these kits in more detail in the not-so-distant future.

Creating programs is really rather easy. You use the free Arduino IDE (integrated development environment) running on your main computer to capture your program, which you then download over the USB cable into your Arduino (we'll be talking more about all of this shortly). Your program is stored in Flash memory on the Arduino. This means that, once you've downloaded the program, you can disconnect the USB cable if you wish. And, even if you remove power from the Arduino, the next time you power it back up again, it will remember -- and run -- the last program you loaded into it.

Observe the two 16-pin connecters -- one on either side of the Arduino Uno board -- pointing upwards in the image above. These provide inputs and outputs that allow the Arduino to "talk" to the outside world. Devices called sensors can be used to observe what is going on in the physical world (temperature, pressure, light, sound...). They translate this information into electrical signals that can be used by an Arduino so it knows what's happening around it. Meanwhile, devices called actuators can take electrical signals and translate them into actions in the real world, like activating a switch or a motor.

One really cool Arduino-related concept is the fact that anyone can build a daughter board -- called a "Shield -- that plugs into the connectors on the main Arduino board. These Shields can carry all sorts of sensors and/or actuators. In many cases it's possible to stack multiple Shields on top of each other. You can purchase off-the-shelf shields for things like Ethernet, Wi-Fi, Wireless, Motor Controllers, and so forth. You can also purchase special Prototyping Shields that facilitate you building your own projects.

There are all sorts of Arduino-compatible devices and Arduino clones powered by anything from 8-bit to 32-bit processors and boasting all sorts of capabilities. For example, Intel has just announced the Galileo, which -- at the time of this writing -- is the highest-performance Arduino-compatible development board currently available.

In fact, it seems like Arduino-related articles and projects are popping up all over the place these days. For example, I just saw a Kickstarter project for something called a Microduino. This is a small, stackable Arduino-compatible board -- accompanied by a suite of Shields -- that's about the size of a quarter. The following image shows a Microduino next to a quarter, both of which are presented next to an Arduino Uno:

Meanwhile, the image below shows a close-up of a Microduino stacked on top of one of its Shields (you have to admit that this is rather tasty):

OK, I think that's enough for today. In my next column I'll be talking about some of the resources available to help one learn how to create programs for, and how to use, the Arduino, including books, kits, and online resources. In the meantime, how are you finding this mini-series thus far? Do you think it's interesting? Are you learning anything (please say "Yes")?

@antedeluvian: In a previous e-converstaion we had, you had said the programming language was "C-like". How like? C is not a particularily easy language for even for technical people (or at least me) to start using.

I'm going to "punt" my answer to this question to my follow-up blog (I just didn't want you to think that I was ignoring you :-)

@Max: "In the case of someone who works with microcontrollers all the time, the Arduino is a bit simplistic"

The first time I heard about Arduino, I took a look to the programming language and IDE and I thought that it was cool for non-EE guys, but not for me...

Now, the huge number of compatible shields available had changed my mind. If you are a MCU hacker, you can purchase a bunch of interesting and cheap hardware an build a project without using the Arduino language -- i.e. if you are an AVR lover as I'm, you can squeeze all the power of the Arduino Uno by using AVR Studio ;-)

The original intent of the Arduino was to create a learning platform. Seems to have worked, lots of folks learning about MCU development with it. But it is the support ecosystem that grew up around the original Arduino that has captured the professional's attention. With the Arduino-compatible 32-bit, professional-grade development boards now coming out from MCU vendors, that support base is increasingly tempting for creating prototypes and proof of concept designs for commercial applications.

THe Arduino itself may be for amateurs (or students) but Arduino compatibles are finding their way into the professional's toolkit.

There are some dynomite kits for the Arduino that do let the beginner get up and running quickly. I got my son one of the mid range kits an he was making LEDs blick and playing notes on a speaker in just a few minutes! No soldering required either!

AD - The structure for an Arduino program is a bit wierd, but the syntax is mostly like C. It has looser typing and doesn't require any kind of garbage collection. One of the biggest values to beginners is that it has a very thorough set of libraries. It also takes care of pretty much all of the chip configuration.

Seriously I was told that in any engineering organization 10% of the engineers carry the rest of the engineers. This might be a topic for a blog that will attract many responses, but you may have to check the post for suspicious packages, so i am not about to write it.