Pages: [1]   Go Down
Author Topic: Servo Control  (Read 1524 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've read somewhat conflicting posts and I'm curious to know how well the duemilanove or uno can control servos.  I'm looking to move 2-3 small servos (hs-55) smoothly and slowly without jitter.  Is this possible and fairly easily accomplished with the Arduino, or would I be better suited with something like a Pololu Maestro?
« Last Edit: October 14, 2010, 11:35:20 pm by cubiclegnome » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah that shouldn't be a problem with the Arduino, you may be better off with something like a roboduino as the pin outs make the servos much easier to work with.

Can't say I've used that other product you've mentionefd
Logged

Central Europe
Offline Offline
Edison Member
*
Karma: 7
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Cubiclegnome,

what Ohm posted above is correct, 2 or 3 servos are no problem, even hooking up 12 don't increase the jitter. The reason for this is, that the Servo library controls the servos sequentially just like old style rc-receiver.

However you have to be careful, the jitter is produced by interrupt functions taking too long to run. The clock update for millis() and the Serial receivers are rather harmless, the add in the worst case 1 or 2 µs to the PWM signal, which is 0.1 or 0.2 % of the movement rate. Most servos I've seen can't keep a postion with that precision anyway and are far worse.

Korman
« Last Edit: October 15, 2010, 07:46:33 am by Korman » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the quick replies.  Other than the Roboduino and a few shields, are there any other duinos that have built in servo headers?
Logged

Ohio
Offline Offline
Full Member
***
Karma: 0
Posts: 227
Arduino Hexapod
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I used a prototyping shield to make my own.


That sits on a Mega and lets me run 18 servos.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Keep in mind that while an Arduino can CONTROL many servos, most people have problems trying to reliably power more then one directly from a Arduino board. External regulated +5vdc is a better way to power servos. I budget one amp current capacity per servo for the external power supply and have never had a problem.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I haven't delved into any of the actual programming for the Arduino yet.  How difficult is it to simultaneously move multiple servos, compared to moving one at a time?  
Logged

0
Offline Offline
Tesla Member
***
Karma: 148
Posts: 9750
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I haven't delved into any of the actual programming for the Arduino yet.

Why not? Have you tried the servo sweep program? If you are serious about your project, you should start trying some actual coding. Otherwise this is turning into another game of "20 questions".
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Zoomkat,

Assuming I had unlimited amounts of free time and money, I might consider learning to program something I haven't even decided to buy yet.  Unfortunately I dont.  So, I'd like to be sure the device does what I would like it to do before spending the cash and devoting the time.

For those that are offended by questions,  my apologies.
Logged

0
Offline Offline
Tesla Member
***
Karma: 148
Posts: 9750
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Assuming I had unlimited amounts of free time and money, I might consider learning to program something I haven't even decided to buy yet.  Unfortunately I dont.  So, I'd like to be sure the device does what I would like it to do before spending the cash and devoting the time.

Just wanted to confirm you are playing "20 questions".  smiley-wink  
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
God Member
*****
Karma: 3
Posts: 722
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Its no trouble really. There are lots of code samples available which you can just use and then slowly modify so that they suit your liking.

I got myself a mega and a sensor shield, and I am extremely happy with my input/output options --> most of the time I dont even need a breadbord, as I can just directly plug everything in.

check out this link if you dont  know what I'm talking about
http://www.emartee.com/product/41953/Arduino-Sensor-Shield-V5.0
(the regular version. you can get it for arduino mega as well... asuming you want to control loooots of servos :-D )
Logged


Central Europe
Offline Offline
Edison Member
*
Karma: 7
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Cubiclegnome,

you also should consider, that you (and everyone else for the matter) only gets a limited attention span. To put it bluntly, people are only willing to spend so much time helping you. If your requests are more interesting or entertaining, you will get more time by more people, if one comes across as an illiterate dolt, less time will be spent.

Now if  you waste the attention you can get with boring questions or things that can be figured out easily by typing related words into Google, you will get less once you really run into serious problems and need advice. I'm not saying that your first question didn't have some merits, but it's a good idea to consider helpful answers from the internet as a resource to use wisely.

At least that's how I work and it seems I'm not the only one.

Drive carefully, 90% of the people are caused by accidents.

Korman
« Last Edit: October 15, 2010, 03:03:38 pm by Korman » Logged

Ohio
Offline Offline
Full Member
***
Karma: 0
Posts: 227
Arduino Hexapod
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
How difficult is it to simultaneously move multiple servos, compared to moving one at a time?

Controlling multiple servos at the same time is not difficult.

For my hexapod, I break the total movement into small slices of time.  I calculate where I want the servos to be at that point in time, then wait.  When the time rolls around, I tell all the servos to move to the calculated positions.
Then I start over.  Calculate where I want the servos to be at the next time point.  Wait for that time.  Tell the servos to move.

Kind of like the servo sweep tutorial, where is uses the delay between each iteration of the loop.  But instead of a delay, I have the main loop do nothing until the millis tell me that the next time point has arrived.

That, and a little bit of array work to deal with the multiple servos easily, and you are off to the races.

Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So, I'd like to be sure the device does what I would like it to do before spending the cash and devoting the time.

One problem is your question is a little too broad and not focused. There is virtually nothing a Arduino can't do with servos, however an Arduino as shipped does absolutely nothing other then possibly blink pin 13 LED. So not knowing your skill level in C programming or your patience in learning to program, it's really hard for any of us to tell you if the Arduino is the best solution for you needs.

Lefty
Logged

Pages: [1]   Go Up
Jump to: