go away spammer

Author Topic: Recommended MCUs  (Read 3780 times)

0 Members and 1 Guest are viewing this topic.

Offline spectrem12Topic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Recommended MCUs
« on: February 16, 2011, 04:15:49 PM »
I am fairly familiar with the MSP430 by TI. I was thinking about building a robot around this MCU since it is the only one I really know and this is my first robot.
Are there any suggestions for other MCUs? Or if the MSP430 seems as good as any?

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: Recommended MCUs
« Reply #1 on: February 16, 2011, 06:00:46 PM »
Hm...this sort of thing is a very popular topic on these forums.  It depends entirely on what you want to do, of course, but I've found the Axon (from this site) is a great MCU.

That being said, I've also worked with PICs and they've worked very well, plus they're cheap.  They won't have the IO capacity that the axon does, but you can get 32 bit versions with 40 pins that can probably trounce an axon in terms of price (something like $15 for a 40 pin PIC, IIRC, plus around $70 for a programmer if you don't want to build it yourself).

I've found the axon way easier to use than the PIC, though, but the major advantage to using a PIC (or similar uC) is that you can get a whole bunch of them for super cheap.  If you want to do any distributed processing stuff, or especially distributed control of a whole lot of motors while still having a central controller for delegation and stuff (this is basically my plan for the robot hand I'm building...) then it has been my experience that PICs are fantastic.

There's a big debate going on about the arduino, which is open source and has a larger user community, and is cheaper than most uCs (that are fully integrated into a board).  Typical concensus is that the arduino is great for a beginner, but if you're trying to do something that needs some teeth, you're better off looking to a more established controller.

Just my two cents, though.  Asking which uC to use is sort of like asking six economists what to invest in -- you'll get eight answers, all of them contradictory, and all of them (probably) right! :-P

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline spectrem12Topic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: Recommended MCUs
« Reply #2 on: February 17, 2011, 09:55:39 AM »
So what is a good PIC to get started with ?
I have been looking at all the ones you have said.

I'm looking at the PICs and it seems they are ridiculously cheap. Am I right? All of them seem less than $20 for a 32 bit MCU.
Is there a particular PIC you would recommend?

The Axons don't require soldering. Are the PICs like that? Poking around the site for a minute and I could not tell.

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: Recommended MCUs
« Reply #3 on: February 17, 2011, 10:12:11 AM »
PICs are basically just integrated circuits.  You have to supply all the circuitry to get them working (typically this is a few capacitors, some resistors, and an oscillator, as well as power/ground).  PICs, if you get the DIP package, can be put onto a solderless breadboard, but if you want something more permanent it's best to solder.

Usually you'd use an IC socket, and solder the socket onto the breadboard.  This is because A) you can damage the PIC if you solder it wrong or heat it up too much and B) if you ever want to reprogram the PIC, you'd need to take it out anyway.

The actual setups for PICs, as in the circuitry required, is usually on the internet (it's been a while since I last set one up, so I dont' quite recall the exact circuit, but it's nothing impossible).  And keep in mind that you also need a PIC programmer.  However, for a programmer that can handle *any* PIC, it's like $70. 

Something like this: http://www.electronickits.com/kit/complete/prog/ck1710.htm, although there are tons of other PIC programmers on the market.  The goal is to get one that is fully assembled -unless you want to solder it together - and one that works with any size PIC, up to 40 pin.  That way you just need one programmer and you can program any PIC, from the 8-pin versions to the 40 pin versions.  Just make sure that the programmer works with the PICs you want -- that one I showed you only works with the "F", or "flash" pics, which are pretty common, but you have to make sure you've actually bought the flash pic to use it :-P

As for which one to start out with...if I recall correctly (and I probably don't...) all PICs are programmed very similarly.  The differences come in their capabilities, so while a 40 pin PIC will have a few more features than the 8-pin PIC (including WAY more IO...), the basics are all the same.  That being said, something like the 16F628A is a well-rounded PIC.

Keep in mind, though, that although using PICs gives you a lot of flexibility, they aren't as easy to use as the axon or the arduino, which have all the preliminary programming done for you.  A great book to get started with PICs is: http://www.amazon.ca/123-Microcontroller-Experiments-Evil-Genius/dp/0071451420  it gives you just about all the information you'd need to get started.  PICs are harder to use, but the flexibility for large-scale, distributed projects is often worth it.

That being said, if you just want to make a robot that drives around and uses a few sensors, the Axon is an excellent choice, since all the hard stuff is already done for you :-)

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Recommended MCUs
« Reply #4 on: February 17, 2011, 10:29:16 AM »
Microchip does offer Demo boards for various PICs. These are a good bit more expensive than just the PIC IC but do have much of the external circuits needed.
I have been using PICs for years so they are my first choice. The Axon and Ardiuo are just as good and widely supported in the hobby community so have many advantages for some one just starting out using micro-controllers.

The TI MSP430 looks to be a very capable processor and if you already have the development tools and boards then this could be a good choice for you.

Speaking of which, the developments tools: IDE, compiler, simulator, programmer and debugger should be a big part of your decision. There are some very good free tools and then there are some very expensive tools.

Offline spectrem12Topic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: Recommended MCUs
« Reply #5 on: February 17, 2011, 12:06:29 PM »
Thanks for the help guys.
I do not own the MSP430 but used it while in college. It only has 12 - 14 I/O. So i think I should stick with something that has more expandability. For later use.

The software is free, but the free version only lets you use 2kb of memory. The software is very expensive, but the MCU itself was only $50.

I saw the Axon one, but its $100. Seems a little expensive, but might be necessary for projects later.

I want one that does not require soldering and one that can use bluetooth or some other wireless communication with my computer.

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: Recommended MCUs
« Reply #6 on: February 17, 2011, 12:39:17 PM »
Most bluetooth enabled MCUs I've seen have been rather expensive, and they're usually a standard MCU soldered into a board with a bluetooth unit in it.

The Axon is a bit expensive, but if you're dealing with PICs, for instance, a programmer can cost $70, so the costs sort of even out.  The beauty of a PIC programmer, though, is that all you have to do is get another PIC if you want to do a new project but keep the old one.  buying an Axon will mean you have to remove it from the current project and put it into a new one...

bluetooth modules themselves cost anywhere between $20 (for a low range one) to about $100 for a long range module.  Most a pre-assembled, that I've seen, and they seem to all work on UART, meaning that just about any MCU can communicate with it. 

Ultimately (and I have to come to terms with this too), you won't be able to do much without soldering unless you're willing to pay for it.  Sometimes it's just easier to rig up your own circuit, and it's almost always cheaper.  I suggest that you just learn to solder -- it'll take a while, but it's a good skill to have.  I recently started learning to solder, and I'm slowly getting better at it.  But it's a long term project for me, so...

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline spectrem12Topic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: Recommended MCUs
« Reply #7 on: February 17, 2011, 12:42:25 PM »
i know how to solder. But I wanted less construction and more programming.

plus once I solder, if i wanted to trade out a sensor or something. I have to remove it. Which is a huge pain.

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: Recommended MCUs
« Reply #8 on: February 17, 2011, 12:44:52 PM »
What kinds of projects do you intend to work on?  That will typically determine the choice of MCU.
Current project: tactile sensing systems for multifingered robot hands

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: Recommended MCUs
« Reply #9 on: February 17, 2011, 12:46:18 PM »
I use Atmel chips for most of my building. They are the MCUs behind both the Arduino and the Axon. Relatively powerful Atmel chips can be had for pennies. You can buy quite a few decent Atmel chips in the sub $5 range, even in single chip quantities. Take a quick look at the ATMega324x series, cheap and pretty powerful @ 8-20mhz with 32k flash and 2k ram.

I just ordered some TI chips and PICs to sample though, I am looking to branch out a bit and check out what others have to offer.

**EDIT**
Just noticed the 'no soldering constraint'. As someone else stated, you have to pay for it if you want that. Arduinos are pretty cheap and have a good following. An arduino can be had for less than 20$ shipped on ebay.
« Last Edit: February 17, 2011, 12:57:49 PM by garrettg84 »
-garrett

Offline spectrem12Topic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: Recommended MCUs
« Reply #10 on: February 17, 2011, 12:49:59 PM »
First I would like to make something simple, moves maybe with obstacle avoidance. Then I would like to move to something like path finding or following.

My ultimate goal at this point is 2D mapping using several sensors. This will be transmitted back (wireless of course) to my computer and rendered into a 2D graph.



EDIT
Soldering is not that big of a deal. I am just worried about how big I am making the scope of the project when I begin soldering. Like I said I have plenty of experience in programming and some in soldering and understanding electronic components.
Does anyone have a guide that I can look at. "Beginning your board from scratch?" maybe?
« Last Edit: February 17, 2011, 12:52:03 PM by spectrem12 »

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: Recommended MCUs
« Reply #11 on: February 17, 2011, 12:54:35 PM »
i know how to solder. But I wanted less construction and more programming.

plus once I solder, if i wanted to trade out a sensor or something. I have to remove it. Which is a huge pain.

What about a couple breadboards? Using breadboards you can get away without soldering (at the expense of size) and still use really cheap chips like the Atmel stuff I had mentioned. I do this when I'm working out a new circuit. I'm a hands on kind of person and just like to start putting stuff together, I'm not a fan of using circuit diagramming tools on a computer - but ofcourse I haven't done anything too complicated yet that would require it.
-garrett

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: Recommended MCUs
« Reply #12 on: February 17, 2011, 12:58:58 PM »
From your project description, it seems like something like the Axon or Arduino is probably where you should start (although arrays of PICs will outperform them if designed properly).  I'm using the axon right now for control of seven motors and (eventually) processing of about 125 individual tactile sensors (the latter requires a creative use of analog multiplexers that I haven't yet figured out :-P ).

However I'm also sending just about everything processing intensive to my PC to handle it -- I have that option because the hand will be mounted onto a robot arm that is attached to a fixed point.  But it has been my experience that most of the ready-made MCUs are built for the hobby market -- they're not built for high throughput computation from vision, for instance.  More expensive computers-on-a-board, like the Linux Stamp, CAN handle those kinds of computations on board.  

My suggestion is for you to get an Axon and play with it.  You'll find you have a LOT of flexibility there.  If you decided you need a lot of fast programming on board, then you'll have to move up to something beyond a uC, or make some horrifyingly complex (but cool!) computer out of PICs.  Right now, I'm using an Axon for research-level work, so I definitely have confidence that it can handle the complexities of my project.  

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: Recommended MCUs
« Reply #13 on: February 17, 2011, 01:09:47 PM »
-garrett

Offline spectrem12Topic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: Recommended MCUs
« Reply #14 on: February 17, 2011, 01:23:34 PM »
Again, you guys are too helpful.

If I was to build starting with the above ATMEL processor. I can place it on a bread board, but whats the next step? Im going to need all sorts of capacitors and resistors etc.

One of you guys know of a helpful guide?

I guess I should search the forums as well. :)

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Recommended MCUs
« Reply #15 on: February 17, 2011, 01:27:34 PM »
Quote
Does anyone have a guide that I can look at. "Beginning your board from scratch?" maybe?
Look at the $50 robot project in the SoR Robot Tutorials. This uses an inexpensive ATmega8 AVR and goes through the steps to solder all the parts onto a perf board.

Quote
if i wanted to trade out a sensor or something. I have to remove it.
Put headers on the processor board like the Axon does so you can just plug a sensor onto the processor board. Changing a sensor or motor controller is then simple.

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: Recommended MCUs
« Reply #16 on: February 17, 2011, 01:36:30 PM »
The chip has an internal clock, but it does not run at 20mhz. I believe it will default to 8mhz. So, without a crystal, all you'd need to do is provide power. These chips are pretty tollerant of anything you throw at them, this one in particular 1.8-5.5v. If you had a wall wart cell phone charger these will normally provide ample voltage/current for the chip and a few LEDs. Otherwise you'll need to build a power regulator of some kind and use batteries. Just pick up some random resistors and capacitors and you'd likely have enough to get going.

Basic setup with crystal (slightly different pin out on chip - but should be similar):
http://www.instructables.com/id/Standalone-Arduino-ATMega-chip-on-breadboard/

More complicated setup with dc regulator (still simlple - and again different atmel chip, but should be similar):
http://www.instructables.com/id/How-to-Breadboard-Arduino-Compatible/

To do the identical diagrams to the ones in the instructables links, just go for an ATmega168 or ATmega324 both should be at or less than $3 in single chip quantities.
-garrett

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: Recommended MCUs
« Reply #17 on: February 17, 2011, 01:40:30 PM »
-garrett

Offline Darth Maker

  • Beginner
  • *
  • Posts: 4
  • Helpful? 1
Re: Recommended MCUs
« Reply #18 on: February 17, 2011, 11:43:35 PM »
About your original question;

Nothing you have described will tax an Arduino.  You can do a lot with the things.

This Axon controller is pretty nice looking, but it's going to be way overkill for what you want.

I would suggest you get an Arduino UNO, and put one of these shields on it.  Or, if you are feeling a bit programming adventurous, consider the Orangutang series from Pololu.

The real problem with picking a MCU is that there are so many to choose from.  If you already understand the MSP430 series, you could start there with something like a Launchpad.  They are extremely cheap, 16-bit have on-board USB programming/debug/emulation.  However, they are 3.3V devices and have very few I/Os and peripherals.

I'd like to put something in about PICs too.  You can get a Pickit2 programmer for $35.  $50 will get you the newer Pickit3.  Both programmers will program basically any Microchip microcontroller, and offer some other sweat features too if you need them.  Also, the 628A is an old PIC, lacking many features that newer ones have.  A much better choice is the 16F690 for a small simple chip.  But picking a PIC largely depends on what you plan to do with it.  Purely feature-wise, one would want to jump into the PIC32s.  However, 8-bit PICs are much easier to program.  The 16-bit PICs are a nice balance, but you really need to spend a lot of time researching them before buying.  Lets' just say that I know PIC microcontrollers pretty well, and my favorite PIC chip changes all the time.  At the moment, I really like the new 18F23K22, but I wouldn't buy any for a couple months to make sure that they didn't make any mistakes in the design (which you can follow in the errata sheets for every device.)


As for me, I've been building robots for some time now and I still don't have a end all answer for which MCU to use.  On the other hand, when just starting into it, something like the Arduino which has a huge community is very helpful.  Right now, my favorite MCU to use is a Cortex M3, wrapped up nice and tidy with the Maple Dev board.  This controller is a beast.  I'm not sure what you can't do with it as far as robotics goes.  However, I would not suggest it for a beginner.  The whole project is very much WIP, and the documentation isn't the best right now.


TL'DR  Buy an Arduino and you will be happy with it.  When you are done with it, buy a LeafLabs Maple or Axon or PIC or PIC32 or etc, etc, ETC!

Offline spectrem12Topic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: Recommended MCUs
« Reply #19 on: February 18, 2011, 10:39:42 AM »
About your original question;

Nothing you have described will tax an Arduino.  You can do a lot with the things.

.......


TL'DR  Buy an Arduino and you will be happy with it.  When you are done with it, buy a LeafLabs Maple or Axon or PIC or PIC32 or etc, etc, ETC!

I appreciate the cutting straight to the point. But luckily, I bought the Uno yesterday before I read this paste. Thanks for the help! I'm glad I made the right choice.

I'm trying to figure out exactly what the shield does. It is meant for noise protection correct? But the link you sent me looks like a picture of an expansion to the board. Does it add more features besides protection?

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: Recommended MCUs
« Reply #20 on: February 18, 2011, 01:25:48 PM »
I'm trying to figure out exactly what the shield does. It is meant for noise protection correct? But the link you sent me looks like a picture of an expansion to the board. Does it add more features besides protection?

I was confused the first time I heard of an Arduino shield as well. Shield is just a terrible name for an expansion board as you put it. They stick right on top of (like a shield I guess) the Arduino. Nothing too strange or fancy other than the name.
-garrett

Offline spectrem12Topic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: Recommended MCUs
« Reply #21 on: February 18, 2011, 03:15:09 PM »


I would suggest you get an Arduino UNO, and put one of these shields on it.  Or, if you are feeling a bit programming adventurous, consider the Orangutang series from Pololu.


So I could plug in some type of wireless adaptor into the I2C/UART communication port? Or do i need another shield for that?

Offline Darth Maker

  • Beginner
  • *
  • Posts: 4
  • Helpful? 1
Re: Recommended MCUs
« Reply #22 on: February 18, 2011, 04:57:47 PM »
So I could plug in some type of wireless adapter into the I2C/UART communication port? Or do i need another shield for that?

Theoretically, yes.  Practically, it depends.  You can use a simple Tx/Rx radio pair for communication, and those run pretty cheap, but you wont be able to program over them (as far as I know.)  I think the highest success rate for wireless Arduino programming is with Xbee chips, following something like this guide.  Sparkfun sells a bluetooth Arduino that basically acts as a virtual com port over bluetooth, however, since you already have a board, this rather expensive option is probably not the one you want.

Unfortunately, there isn't really a "wireless adapter" that works just that easy.  XBees (I refer to series 1 only, 2.5 is a lot more complex) gets pretty close, but you would still want to configure them before using them for programming.

There are some Bluetooth-serial modules you can buy for communication, but you probably wont be able to upload code over them.  Sparkfun's Bluetooth Mate Gold/Silver are an example of this.  Just be forewarned, some Bluetooth drivers conflict with the Arduino IDE, making it run slow or not at all.

And yeah, shield is a terrible name.  They are expansion boards that plug into the female headers on an Arduino.

Offline spectrem12Topic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: Recommended MCUs
« Reply #23 on: February 23, 2011, 01:00:53 PM »
Not necessarily run a program. Just have the Arduino send packets of data, and my computer will do the calculation to draw the map. The computer will not send anything back (as of yet, maybe a different project)

The XBee looks very easy to set up. But I would still have to buy 2 of them and the adaptor kit, correct? At that point, isn't it cheaper to buy blue tooth anyway?

Offline Darth Maker

  • Beginner
  • *
  • Posts: 4
  • Helpful? 1
Re: Recommended MCUs
« Reply #24 on: February 23, 2011, 02:16:44 PM »
Yeah, bluetooth is going to be cheaper if you don't need to be able to program wirelessly.  There are also even cheaper options.  Several places sell boards like these:
http://www.sparkfun.com/products/8949
http://www.sparkfun.com/products/8946
Looking through the comments, you might have to do some careful datasheet reading, but all you should need is an antenna, USB-ttl (FTDI or similar) board for the computer side, and possible some power for the receiver board.

There are other low cost wireless boards, you just need them to do TTL serial, run at 5V, and you probably want them to at least do 2400baud.  And you can always google the name of a possible unit and "arduino compatible."  You are pretty likely to get hits.

This is sparkfun's FTDI breakout board:
http://www.sparkfun.com/products/9716
And this is a cheaper board that will work probably just as well.  Possibly a little more digging for the proper drivers though.
http://cgi.ebay.com/USB-2-0-TTL-UART-6PIN-CP2102-Module-Serial-Converter-/150566132003?pt=LH_DefaultDomain_0&hash=item230e70d923

Offline spectrem12Topic starter

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: Recommended MCUs
« Reply #25 on: February 25, 2011, 02:43:04 PM »
Cant I use 2 of the RX/TX combo and be able to send data back and forth?

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Recommended MCUs
« Reply #26 on: February 25, 2011, 08:35:25 PM »
You need them on different frequencies, and you need to account for their design (They're on-off-keyed, which means that not transmitting data will cause the gain to ramp up, giving you a bunch of weird data, etc, etc).  But yes, you can use two pairs and transmit in both directions.

 


Get Your Ad Here