Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: cgrenier on August 20, 2012, 09:24:01 AM

Title: Servo Controller vs Micro Controller
Post by: cgrenier on August 20, 2012, 09:24:01 AM
Hi, I'm planning my first robot (I like to pretend it's an educational project for my nine years old boy, but my wife knows I'm psyched about it ;-)
I try to learn as much as possible early in the process so subsequent steps goes as smoothly as possible, so I made a lot of reading but there's a question I can't seem to find a satisfying answer for.

I plan to make a Raspberry PI the brain of the robot but in order to control the servos I consider connecting a controller to i2c bus.

I came accross two different terms that I think are different controller types (microcontroller and servo controller or servo driver) but I'm not sure what is the difference and what I should use.

Here's an example of a servo controller I'm considering: http://www.adafruit.com/products/815 (http://www.adafruit.com/products/815)

Micro controllers are often associated with Arduino cards in my readings, I know there are others (Like the Axon Mote)

I don't want to look like I make pub, only giving examples so you guys can have a good comprehension of the information I gathered until now and help me fill the blanks.

Thank you guys for your help,
Christian
Title: Re: Servo Controller vs Micro Controller
Post by: jkerns on August 20, 2012, 09:41:26 AM
A servo controller like you linked will take the I2C signal and generate the pulse width modulated signal a hobby servo needs. Period.

A microcontroller like an Arduino or Axon, or PIC, or... can, well, do a lot more. Not as much as the Raspberry Pi, but they are essentially small 8 bit computers on a chip. They can communicate via I2C, SPI, Serial, etc. Have analog inputs, digitial I/O and are programmed using a language such as C.
Title: Re: Servo Controller vs Micro Controller
Post by: Soeren on August 20, 2012, 02:10:28 PM
Hi,

A microcontroller like an Arduino or Axon, or PIC, or... can, well, do a lot more. Not as much as the Raspberry Pi, but they are essentially small 8 bit computers on a chip.
I'll chime in here with what is a quite important distinction...
Arduino and Axon are microcontroller boards, which means they have a microcontroller and a range of other stuff, like a voltage regulator, interface connectors etc. all on a single PCB.

A microcontroller is the chip itself (which can be 8, 16 or 32 bit) without PCB or anything else - just the single black brick with the pins or pads needed to solder it to a PCB.


A microcontroller board can control a number of servos directly and only when you have a large amount of servos (and a lot of other stuff going on in the microcontroller), there's a need for a dedicated servo controller - which contains a microcontroller preprogrammed for the job.
Title: Re: Servo Controller vs Micro Controller
Post by: cgrenier on August 20, 2012, 02:39:26 PM
Thank you jkerns and Soeren for your answers, I now get the difference. What I understand is I could have opted for an Arduino board instead of a Raspberry PI and I would have saved myself the cost of a servo controller, but since I chose Raspberry PI (mainly for the Linux Platform I'm familiar with) I have to interface my servos with something.

That being said, since I'll eventually want to add some sensors, programatically controlled LEDs, maybe an LCD screen, should I still go with a microcontroller board instead of a maybe more simple but more limited servo controller ?

I think I saw several devices suited for use on an i2c bus (that I was planning to use on the Raspberry PI) AND also a ton of them advertised as compatible with Arduino... I'd like to have your opinion about the best way to go ?
Title: Re: Servo Controller vs Micro Controller
Post by: Soeren on August 20, 2012, 03:50:50 PM
Hi,

Perhaps this add-on board in the link below would be a better addition?
http://www.element14.com/community/groups/raspberry-pi (http://www.element14.com/community/groups/raspberry-pi)
Title: Re: Servo Controller vs Micro Controller
Post by: cgrenier on August 21, 2012, 12:14:02 PM
What would be the advantages of this board comparatively to the other two discussed previously ? (I see the price is somewhat higher, it's back order til mid-september and comes as a kit so I 'll have to assemble it. If you guys consider this option a better value I'll listen to those who know, but I'd like to understand what I'm getting into ;-)

Also, is there a big difference in the learning curve in order to achieve some percievable results ? (From where I stand I understand I have tons of stuff to learn anyways and I realize tinkering and fine tuning all the aspects of this project will take time, just dont want to make it harder than necessary ;-)
Title: Re: Servo Controller vs Micro Controller
Post by: jkerns on August 22, 2012, 09:57:10 AM
Thank you jkerns and Soeren for your answers, I now get the difference. What I understand is I could have opted for an Arduino board instead of a Raspberry PI and I would have saved myself the cost of a servo controller, but since I chose Raspberry PI (mainly for the Linux Platform I'm familiar with) I have to interface my servos with something.

That being said, since I'll eventually want to add some sensors, programatically controlled LEDs, maybe an LCD screen, should I still go with a microcontroller board instead of a maybe more simple but more limited servo controller ?

I think I saw several devices suited for use on an i2c bus (that I was planning to use on the Raspberry PI) AND also a ton of them advertised as compatible with Arduino... I'd like to have your opinion about the best way to go ?

I hate to say this, but the best way to go is what works best for you.

The Arduino (and similar) are very popular because it gives you decent off the shelf capability and has a reasonably easy programming environment and is inexpensive. The disadvantage is that it doesn't have the horsepower that you can get with something like the Raspberry Pi if you want to do some vision processing, or...

You could even use both kinds of boards - get the higher level board to do the fun stuff and have it send commands to the Arduino which will do the grunt work of putting out pulse modulated signals to servos or H-Bridge chips to run DC motors.

How was that for not being helpful?

For an industrial application we would look at cost effectiveness, have some hard requirements, etc. that would drive the decisions (even then the arguments can be entertaining), but  this is (I assume) a hobby for you and you are the one who is deciding what to do with it.
Title: Re: Servo Controller vs Micro Controller
Post by: cgrenier on August 22, 2012, 11:12:37 AM
Thanks for the input, jkerns. I understand that there's no single ultimate answer to that question I asked and I appreciate the information that will help me make my mind about that (maybe I'm making too big a deal about that and every solution would end up being fine, I don't know)

Since I have no experience programming micro controllers (and no experience with robots at all) and since it's a hobby I'm considering sharing with my son, I'm aiming for a platform that would not be too big of a challenge for my first time.

I think with all you explained 'til now I will order this Gertboard (that seems to be based on the same chip as those Arduino and compatible with the programming environment, only with additionnal goodies I will probably learn to use over time hehe.

I'll probably post again in the next months, either to show off my robot or beg for help ;-)
Title: Re: Servo Controller vs Micro Controller
Post by: Gertlex on August 22, 2012, 02:41:55 PM
To briefly re-answer the thread title, the main difference to me is that the servo controller requires no programming on its end, and is intended for use with servos. An MCU board driving servos requires programming on the MCU, and may not interface hardware-wise as nicely with servos.

The way I got started is, I imagine, similar to using a RasPi.  I started off  (https://mywebspace.wisc.edu/relson/web/BluetoothCar.html)with a bluetooth serial connection between my computer and a MiniSSC II servo controller (http://www.seetron.com/docs/ssc2mnl.pdf).   In essence, the programming was to take in key presses on the keyboard, read some sliders in a GUI, and send signals to 3 servos on a modified RC car.

That sort of thing would fit the bill, I imagine.  I'm not sure you can buy that servo controller anywhere except Ebay these days, but there are newer, better solutions to be had.  One line that seems well designed are the Pololu servo controllers (http://www.pololu.com/search/compare/12). Caveat: I have their micro serial servo controller, and have yet to get it working with the Axon + Webbotlib (and others seem to have issues with this too); Not sure if I ever tried doing computer to servo controller directly with that one (that might need an FTDI adapter, e.g. UartSBee (http://www.trossenrobotics.com/p/uartsbee), or via Sparkfun (https://www.sparkfun.com/products/9716?)).

I would choose a servo controller over an Arduino, since, from what I can tell, the Arduino is not particularly well suited for interfacing with servos.  (In my mind: Arduino < Axon boards < Servo Controller for servo control)  Servo controllers are still useful when you move on to a MCU; I use mine along with an Axon, offloading the different power supply being used and the PWM signal generation to the servo controller.

Re: The Gertboard (not my invention, hehe), I've no interest in the RasPi, and thus haven't bothered to compare the Gertboard's features with the MCU boards I'm already familiar with.
Title: Re: Servo Controller vs Micro Controller
Post by: Soeren on August 22, 2012, 03:44:59 PM
Hi,

What would be the advantages of this board comparatively to the other two discussed previously ?
It's developed for the Pi, so there shouldn't be any compatibility issues.


(I see the price is somewhat higher, it's back order til mid-september and comes as a kit so I 'll have to assemble it. If you guys consider this option a better value I'll listen to those who know, but I'd like to understand what I'm getting into ;-)
Oh well, I didn't read it thorougly, so didn't realize it was a kit - perhaps you're better off with something else for now.


Also, is there a big difference in the learning curve in order to achieve some percievable results ? (From where I stand I understand I have tons of stuff to learn anyways and I realize tinkering and fine tuning all the aspects of this project will take time, just dont want to make it harder than necessary ;-)
Just get the cheapest interface that'll work as you want for now. When you get more into it, you'll be better equipped to select exactly what you want and even a cheap board should provide you with ample joy and learning :)
Title: Re: Servo Controller vs Micro Controller
Post by: cgrenier on August 22, 2012, 08:28:44 PM
Guys I really appreciate the informations and advices you all provided. It will help a great deal enjoying this project (and maybe several to come ;-) My parts shopping list is becoming more complete as I read and learn and plan, woot!