Let's Make Robots!

LMR Review - Arduino Uno

An update to the Duemilanove

I started with the Propeller, but I've also used the PICaxe and played with AVR's and PIC's. With the release of the Arduino Uno, I thought it would be a good time to give the Arduino a try. In this review, I offer my perspective on the Arduino as someone familiar with electronics and microcontrollers but new to the Arduino. I'll also compare the Uno to the Duemilanove, the previous Arduino board.

Before I start, just a disclosure: I operate a website that sells development tools, although I don't sell the Arduino or anything else from the manufacturer, SmartProjects. 

Out of the Box

I ordered my Uno from Adafruit via 1st class mail. I also picked up a copy of 'Getting Started with Arduino' and read it while waiting for my order to arive. Most of the book was wasted on me because I'm already familiar with electronics. The Arduino website has a ton of info, too much in fact. After downloading the IDE, I found the types of tutorials I was looking for in the help menu. There are a TON of tutorials, guides, and howto's for the Arduino — they can be scattered, but there are plenty.

'Getting Started with Arduino' is fine for beginners, but more advanced users can probably skip it.  If you know what PWM means, you're better off skipping straight to the online resources.


What's In The Box

The Arduino is small — about the size of a pack of cigarettes.  In the box is a foldout insert (Thank you for supporting Arduino) and some stickers.  Adafruit also includes rubber feet, which is a nice touch.  The foldout insert doesn't say anything interesting, just a 'statement of origin and a copy of the warranty.

The Hardware

With the box open, what are you looking at?

The Arduino Uno is an Atmega328 with a bootloader on a modular footprint.The Uno has 20 I/O connected to female pin sockets so you can jumper them to a breadboard or add a shield on top. Considering the power and memory of the Arduino's microcontroller, 20 I/O is about right. The pin sockets let you stack other modules (shields) on top that can do all kinds of cool things. You can also design your own shield.

While I'm a huge fan of a modular system — remember that it's a compromise between flexibility and space. Your project will take up a bit more space because your circuit will go on a second circuit board. But it will be easier to troubleshoot, modify, or fix.

A grievance with Arduino's modular implementation is pin spacing. The two pin sockets on the top of the board are not an even .100" apart, meaning you can't drop a standard protoboard on top of your Arduino. This is a significant error, but it's difficult to address without breaking compatibility with existing shields.

A few more complaints;

  • Lack of a power switch makes the only way to turn it off by pulling the plug. In countries where a power switch is usually built into the outlet, this isn't a problem, but it's annoying everywhere else.
  • The USB type-B jack is huge, and the metal case can short connectors on shields. Type-B USB cables are less common, too.
  • 150mA @ 3.3v is meager, although it's an improvement from the Duemilanove's 50mA.
  • Linux might not like the new USB chip, I've read about issues although I can't verify them myself.

Nice things;

  • Auto-switching USB / external power makes it easy to re-program the board, then plug into your project without needing a second power adapter
  • Socketed DIP to program the DIP, pull out, and plop straight into your final project
  • A more powerful USB controller expands the possibilities of the Arduino, even if it's not easy to use (yet).

Considering the price & desire to maintain backwards compatibility, the hardware is well designed. I would like to see a power switch & higher output Voltage Regulators, but that's probably outside of their Bill of Materials budget. Not using a mini USB jack seems odd.

The IDE

The IDE (Integrated Development Environment) is the software you'll run on your computer to program the Arduino.  It's an 80mb download that unzips to over 200mb, but on a modern connection doesn't take more than a few minutes.  I do appreciate that the download includes all of the necessary programs.  For comparison, the PICaxe editor is about 60mb, and the Propeller Tool is 20mb.  MPLAB is a 100mb download.

ard_rev_1
The Arduino IDE

I found the IDE to be sluggish when mousing over the 'Tools' menu on the top bar.  I went through the FAQ to find the problem (possibly a conflicting COM port), but I wasn't able to locate it.  It's not a show-stopper, but it can get annoying.  Overall, the IDE is more sluggish than native IDE's for the Propeller or PICaxe.  Loading the IDE took 13.5 seconds compared to 5.1 seconds for the PICaxe, and 4.5 seconds for the Propeller (video).  Program upload takes 5 seconds (video).  I didn't test the PICaxe, but the Arduino probably is a little faster.  Uploading programs to the Propeller's RAM takes < 1 second, but uploading to EEPROM takes about 6. 

IDE load time is pretty minor because you only load it once, but I would really like further improvement on program upload.  I like to make minor changes to my program, upload, then see what happens.  Waiting for the upload on every iteration adds up.

A few more small annoyances;

  • No installer, you'll have to manually associate files to the Arduino IDE.
  • The IDE is case sensitive, which can be a source of bugs and confussion.

Plenty of nice things to report;

  • Helpfiles are offline so they can be referenced without an internet connection.
  • Tons of example programs are built right into the IDE.
  • bootloader flash capability into the IDE is a nice touch (and saves a bunch of time setting up the AVR dev tools).

I've read that usage with a Mac or Linux will not require a driver, but with Windows 7, you'll still got the 'driver not found' prompt;

ard_rev_4

The driver .inf is part of the IDE download.

After playing with PIC and AVR development environments (like MPLAB), the Arduino IDE simplifies the hardware and library setup — programming the chip is much easier than using an AVR Dragon & the IDE is significantly streamlined.  Overall, I like the IDE.  Not a lot of bells & whistles, but it will get the job done.

Programming

The Arduino is programmed in 'Wiring' which is a subset of C and includes several libraries.  How you feel about programming the Arduino depends on how you feel about C.  I believe there are better languages for beginners available, but the advantage of using Wiring is that you'll gain some familarity with C / C++'s syntax.

Ultimately, I don't worry too much about the language; every language has its quirks and you're probably going to learn more than one, anyway.  Logic and math are the challenges in programming, the syntax of a particular language is secondary.

Performance

The Arduino Uno uses an AVR Atmega328, an 8-Bit, 16MHz, microcontroller with 32kB of Flash, 2kB of SRAM, and 1kB of EEPROM.  The Flash is meant for program storage (.5kB are taken by the bootloader, your program has 31.5kB available), SRAM is where your program runs, and the EEPROM is meant for storing values between resets.  There's overhead in C and the Arduino / Wiring libraries.  My basic testing showed about 4000ns (4 microseconds) to change the state of a pin, this would be about 100 kHz. 

What does this mean?  You have the power to do an LED light display, read a real-time clock, and drive a few servos.  But more intensive things like hi-fi audio playback or driving a TV display will require a shield.  Multitasking is also complicated, requiring an understanding of interrupts.

Value

The Arduino Uno goes for $35USD.  You'll need to supply a USB cable (and probably power adapter), and you won't be able to do much without a breadboard or protoboard.  I already had a power adapter, but needed a USB type-B cable & I picked up a protoboard shield, so my cost was $55.  I suspect most users will spend around $60 with their initial purchase. 

Whether it's a better value than alternatives (e.g., PICaxe, Propeller, Basic Stamp) depends on how you intend to use it and what parts you already have — but the Arduino is priced competitively. 

Comparing the Uno to the Duemilanove

I've never owned a Duemilanove, but the differences are minor.
Better;

  • 150mA 3.3v Voltage Regulator
  • Smaller, faster Bootloader
  • More flexible USB Chip
  • A 4th mounting hole

Worse;

  • Replaced crystal with lower accuracy ceramic oscillator

If you've already got a Duemilanove, I don't think there's enough reason to upgrade, but if you're looking to get started with the Arduino, the Uno works great.

Conclusions

  • The Arduino Uno makes AVR's easier to program — compared to using my AVR Dragon & AVR Studio, the Arduino IDE and bootloader is much easier.
  • The modular format is awesome — although it would be better if it used standard spacing.  Backwards compatability could be retained just by adding a second set of through holes right next to the original headers.
  • The hardware is inexpensive but cheap — lack of a power switch, lightweight voltage regulators, and a ceramic oscillator help to keep price down, but they're features you might miss.
  • Performance is mediocre — but you probably won't notice until you get to more advanced robots or multitasking.
  • If you have a Duemilanove, you're fine — there's currently no compelling reason to upgrade, although the new USB chip opens up future possibilities.

Overall, I like the Arduino Uno.  It doesn't replace my Propeller for most tasks, but many of the simpler projects I would have done with a PICaxe I can now do more easily with the Uno.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

 Thank you for the clear,concise review of the arduino uno!  the contrast and compare of certain features on the various microcontrollers I have found very helpful in understanding how they work.

Well written, as your reviews always seem to be!

The USB-B connector is pretty large. Not sure why the Arduino team continues to use these other than perhaps compatibility with their older hardware? No complaint of my own here really other than I have to keep an assortment of adapters at my workbench. :-) SolarBotics and SeeedStudio offer Arduino clones that use mini-B USB connectors. If I remember correctly the SolarBotics board also includes (gasp) a power switch. What a concept! :-)

Well, anyway, just wanted to complement you on a nicely written and well-balanced review, especially from someone fairly well entrenched in the Propeller camp! Also to point out to anyone thinking of an Arduino that there are some Arduino-clone alternatives that have the features that you found a bit lacking in the official Arduino release...

 

I tried to limit the review to the Uno, but yeah, there are better Arduino boards. Personally, I would get another board with a mini connector that's compatible with standard .1" spacing - there are plenty, like the nano. 

The big USB connector really bugs me because components on shields can short on the metal shroud.  That's lame.

I started with the Propeller & like it a lot but the Arduino is great, too!  Having more tools available is a good thing.

 

I'm surprised they would use a crystal for their all new USB interface and then put a ceramic resonator on the processor. That seems to be a bit backward.Thanks for pointing that out.

As a side note, The Arduino runs much faster than a Picaxe using the same clock frequency. When I first used Arduino I translate the Picaxe program for Mr. General and ran it on a Arduino Nano. I didn't measure anything with an oscilloscope but it did seem about twice as quick to respond. Both chips used a 16MHz clock.

It is hard to compare the speed of the two chips as different code will result in different speed margins.

 

I think most Arduino users aren't going to miss the accuracy from the switch.  Their design is really 'price optimized' and it makes sense to reduce costs where folks will notice the least.  I believe the USB chip requires high accuracy so a ceramic resonator is a no-go. 

Great review! I finally understood what the main differences are.

Only a few questions: 1) You say performance is mediocre, what exactly are you referring to (speed, IDE is limited, etc..) ?

2) In what doesn't it replace the propeller? (i just want to understand what you like more about the propeller and what you don't about the AVR, since i've always been attracted to the Prop but never had the chance to test it out)

thanks for the review!

Glad you enjoyed it - I had a lot of fun writing it.  To answer your questions;

1.  Performance is relative & it's also only relevant if your project needs it, so I don't want to sound down on the Arduino.  It's also important to keep in mind the cost of the product.  But I was referring to both the IDE & the chip as compared to the Prop or PICaxe.  The IDE is slower to load & update the board.  The chip is only 16 MIPS, too slow to do things like advanced audio & the SRAM is limited (2k). 

2.  Biggest thing: multitasking.  With the Propeller, it's so much easier to do 2 (or 3 or 4 or 5) things at once.  This is especially helpful in robots where you want to read multiple sensors and drive motors at the same time.  It is more expensive, though. 

Does that help?

Yep, thanks for answering.

Might try the propeller out one day, only disappointed by the fact it has no adc, but some of its PROs are evident.

on the performance issue, digitalwrite is very slow as it checks quite a few things to make it newbie proof (disbles PWM etc).  The is direct port manipulation for experienced users. 

Also, 16 Mips is more than any picaxe, since PIC18s only go up to 10Mips.

You are correct on direct port manipulation - Digital read & digital write are particularly slow.  I believe other stuff in the wiring libraries performs better.  But even without wiring, you still won't get more than 16MIPS.

For performance , the 28x2 and 40x2 PICaxe's can actually run up to 16 MIPS - they're based on a 18F25k20 which can clock up to 64MHz.  But the PICaxe interpreter is almost certainly slower than an AVR using wiring libraries.  How much slower, I can't say - I haven't hooked up a frequency counter to my 40x2, but I should give it a try sometime.

But you should really ask yourself, "What do I want my robot to do?" then pick the cheapest chip that can do it.  Performance numbers aren't very meaningful without context.