Sunday, November 28, 2010

Which microcontroller should I get?

There is a huge controversy about which microcontroller is the best, it's almost like a Mac vs PC thing, but just like the Mac vs PC debate I think it is clear which is better (Mac!!!). Before I start let me just make sure you know that when you are getting a microcontroller you usually want to buy a microcontroller on a development or prototyping board. So there are two parts to the decision, the actual microcontroller and the supporting board which provides all the necessary support circuitry.

The major microcontroller contenders I see for beginners are PIC, AVR, MSP430, ARM, and the BASIC Stamp. It is really hard to be able to say which microcontroller you should get because it really depends on your budget and what you are going to use it for. But from my opinion, for a beginner the AVR has a better community, free tools, and the Arduino board.

The Arduino board not only provides you with a great board but also a great programming environment. If you are not a pro at C/C++ but you still want to be able to program in a powerful language then the Arduino is perfect. Truly, it is actually C++ minus a main and plus a easy-to-use library. The Arduino also has an AWESOME community and great documentation! I cannot stress enough how much good documentation and a healthy community helps beginners. The first microcontroller I got was a MSP430 board from Olimex and I have never programmed it in 2 years. This is mainly because I didn't get the right tools to program it but if there was good beginner help I would have gotten the right stuff! The second microcontoller I bought was an Arduino and I had it up and running in minutes.

Now before you go buy your Arduino, you need to understand some things. First, this is a general purpose board, this means will not be able to run DC motors or run a bunch of servos or sensors straight off the board. For you motor people, you will either need a motor shield or a motor driver. The Arduino has a bunch of I/O pins but only one 5v power pin so in order to connect all your servos or and sensors  you will need a breadboard and some jumper wires. Depending on what you want this microcontroller to do you will either need additional circuitry or a shield OR you could buy a specialized microcontroller. I personally like the general purpose Arduino boards but usually the specific microcontroller boards are cheaper than the Arduino + Shield.

Now that I have given my sales pitch for Arduino, lets make a list. When considering which microcontroller to buy:

  • Check out the documentation and the community. If you don't understand the documentation and there is no one to help you, this is probably not a good microcontroller to start off with.
  • Make sure you understand how it's programmed and what you need to program it. Whether it is special programming hardware, expensive software, or free and very complicated software. Arduino's software is free, all you need to program it is a USB A to USB B cable, and if you want you can program it with the AVR tools which are also free.
  • Make sure the board that your microcontroller is on can do what you want. If it can't then you need to buy additional stuff to get that functionality (make sure it's compatible!). The Arduino has many compatible circuits, which they call shields, that attach to the top of the board.
  • Don't be too concerned about features! Don't get overconfident and take on the biggest and baddest board out there for your first project. Start with the basics. If you go buy an Olimex ARM board... You're on your own.
Of course I should give you some links to wet your appetite:
  • Arduino  -  I have used an Arduino Uno and an Arduino Mega and very much enjoy working with them. The good news is that Arduino is Open Hardware and Open Source. This means that every aspect of this board and it's software is open to the public. It also has a large and helpful community and great documentation. The bad news is that it requires a shield to do some tasks and and you have to make sure that sensors and other things you buy for it are compatible. The main Arduino board is currently the Uno and it sells for around $30.
  • LilyPad  Arduino  -  If you want to make wearable computing, the LilyPad is worth a look. It is designed to be sewn onto fabric and connected to other devices via conductive thread. If this is something you are interested in it is only $21.95.
  • Arduino Clones  -  Arduino clones are boards based on the Arduino and support the Arduino enviroment. They may have more features or less features and may be larger or smaller. Some of the more popular ones are the Bare Bones Board, Really Bare Bones Board, Freeduino, Boarduino, Illuminato Board, Orangutan Robot Controllers, Roboduino, Sanguino, and the Seeeduino. I have not used any of these but they may have the features you want. Go ahead and check them out.
  • Axon Microcontroller  -  The Axon was designed by the author of the Society of Robots website so I assume it is a great robot controller. It has a TON of pins and they are arranged in a 3 pin fashion so that you can plug in servos and sensors directly. It is available from the Society of Robots website for $94.
  • PICAXE  -  The PICAXE is based on PIC so that means no free software. It also requires a special programming cable that costs more than the board. I have heard that some people like this controller but I am unsure how healthy the community is. It is fairly cheap, $9.95, if you you don't count the software and the cable.
  • VEX ARM Microcontroller  -  I used this controller on my robot for a recent high school robotics competition. The nice part about this microcontroller is that you know anything you buy from VEX will work with it. The bad part is it costs $249.99 and then you must pay for a crummy programming environment. No thank you! You could get the $149.99 PIC Version but that is still expensive!
  • Mindstorms NXT  -  The NXT Intelligent Brick is a microcontroller meant to bring Lego projects to life. Unfortunately you have to pay for the more powerful programming environments. It has the advantage that you know that whatever you buy from Lego will work with it. Currently it is priced at $144.99.
  • Board of Education  -  I have never used this board. It is based on the Basic Stamp 2 so that means you will be programming in BASIC (booooo!). It has the same nice feature as the VEX, you know anything you buy from Parallax is compatible. The bad is that it is programmed in BASIC and it costs $99.99. You could buy a robot kit version for $159.99 if you are interested in robotics. In fact, their website has lots of cool stuff I think is worth taking a peak at, if you do make sure you check out the Hydra Game Development Kit!
Those are just some of the most popular that I know of. There are more, but most of those are not well suited for beginners. I hope this adequately equips you to go out and purchase the right board. Please leave any comments or questions you have!

No comments:

Post a Comment