Author Topic: MCU Choice?  (Read 963 times)

0 Members and 1 Guest are viewing this topic.

Offline brettsparkTopic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
MCU Choice?
« on: April 18, 2010, 04:42:41 PM »
I recently competed in a robotics competition as a junior EE. I extremely enjoyed and and am thinking about starting up a robotics hobby.
Although our team did not do very well, coming in 14th out of 27 while only working on the robot for 48 hours seems like a worthwhile accomplishment.

Let me explain a little about what I've done to those who would think previous experience would matter:
uP Class: 8051 Assembly and C
Boe-bot maze competition with the Basic Stamp2 (also with 8051 - honors project in class).

I've read up a little on the PIC and 8051, but would like some input from experienced robotics users.

It would be nice if it had a built in ADC and PWM function.

Thanks,
Brett




Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: MCU Choice?
« Reply #1 on: April 18, 2010, 05:29:13 PM »
So, you want advice on a good starting platform?
Are you willing to take a look at avr's, if you are you could do admins $50 robot!
It has adc and pwm! http://www.societyofrobots.com/step_by_step_robot.shtml
Howdy

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: MCU Choice?
« Reply #2 on: April 19, 2010, 12:28:22 PM »
Atmega's are very nice, especially for beginners. They have usart, i2c, adc, pwm, and much more!
Save yourself the typing. Just call me Zach.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: MCU Choice?
« Reply #3 on: April 19, 2010, 09:04:44 PM »
Hi,

uP Class: 8051 Assembly and C
Boe-bot maze competition with the Basic Stamp2 (also with 8051 - honors project in class).

I've read up a little on the PIC and 8051, but would like some input from experienced robotics users.
If you've only read (a little) on the PIC, but have actually done MCS51 (the 8051), you will find the AVRs easier than the PICs (as the latter is a whole new ballgame). AVRs are of the MCS51 core initially (although gone to some form of Harvard architecture), so will be very similar to 8051 (MCS is an ancient core dating back to the 8080 and IIRC the 4040 (don't mind if you don't know what I'm onto, this is cyber archeology.

The above only holds true if you plan to program in assembler of course, as with C, it's pretty much the same and you will need to look up stuff in datasheets whatever your choice.


If, on the other hand, you liked the BASIC Stamp, you could take the PIC route and add a PIC BASIC compiler (or a PIC BASIC Pro compiler) and reap the benefit of an easy to learn language and the huge speed advance this combination have over the Stamps.

Still another controller worth considering is the Propeller (from Parallax), as this should be aces for true multitasking (it's like a multicore processor, able to do several things at once). I haven't worked with it, but plan to some time into the future, just to give it a spin  ;D


Apart from the mentioned ones, there is several of other controllers that each may look promising, but AVRs and PICs are the ones that have the largest base of user code and support for hobbyists on the net.
 

It would be nice if it had a built in ADC and PWM function.
Most do these days.
The way to select is to plan ahead:
What's needed, what would be nice, add 30% for unforeseen sensors/code/etc.
Is a 16 bit timer necessary (for servo PWM = yes) or would less suffice (or perhaps a 32 bit counter for that matter)?
Do you need hardware IIC/SPI/whatever, is USB needed (or nice) to have in the foreseeable future?

Like nails, that come in all sorts of shape, length, thickness, plated/galvanized/rusty/stainless, so do controllers come in all sorts of flavors, but here you need to look in your toolbox as well, as there's not much sense in buying 12" nails if you only have a 7 oz. hammer and neither would you want to go for a controller that can only be used with development tools costing a fortune.
(Look at what's out there and how it fits your budget).

Whichever controller family you choose, stick with it for a year or two, until you feel reasonably proficient, before starting on another controller family. That way it will be way faster learning the second one, but if you try to take in two very different cores, like AVR and PIC, concurrently, you're as good as doomed to fail with both.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: MCU Choice?
« Reply #4 on: April 20, 2010, 10:02:57 AM »
Quote
Still another controller worth considering is the Propeller (from Parallax), as this should be aces for true multitasking (it's like a multicore processor, able to do several things at once). I haven't worked with it, but plan to some time into the future, just to give it a spin
I wouldn't recommend the Propeller. Its 100% proprietary, for starters.

Also, if you look at the specs, its seriously underpowered compared to PICs and AVRs. Sure, its interestingly multi-core, but I think the single cores from PIC and AVR still outperform . . .

(fyi, I haven't used the Propeller)

Offline rogue

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: MCU Choice?
« Reply #5 on: May 06, 2010, 10:44:29 PM »
AVRs are awesome with the free software (AVR Studio 4 and GNU C compiler), the cheap chips/ programmer, and abundance of online forums/ tutorials. If you're looking for a spoonfeed tutorial on getting started programming Atmel AVR microcontrollers, here you go:

http://imakeprojects.com/Projects/avr-tutorial/

 


Get Your Ad Here