servo controller help
Roboticsmaster128
Posts: 32
I need to find a servo controller that can handle more than 2 servos and runs on the basic stamps,or if you can find me a guide how to build one that would be fine too.
Comments
Runs up to 6 servos and you might not even need a Stamp. You can program scripts directly into it. Read the literature on it. Excellent value for $20.
Parallax makes great servo controllers, too. Here's a 16-servo PSC on Ebay ending in 4 hours, currently ~$16: http://www.ebay.com/itm/350523738632?ssPageName=STRK:MEBIDX:IT&_trksid=p3984.m1426.l2649
From Pololu: The Micro Maestro is a highly versatile servo controller and general-purpose I/O board in a highly compact (0.85"
The "Propeller" part of the name comes from the fact that it has a Propeller on it as the brains. You can use any microcontroller to run, or even run it from your PC.
-- Gordon
Just as a general note, most of them are indeed just controllers, but there are several that are also "programmable" in that they will record or store servo motions. These include the Pololu boards Erco mentions, a servo recorder from ServoCity, and some others I've seen but forgotten about. The Pololu controllers are probably the most advanced, as they use their own scripting language that's similar to Prof Braino's beloved Forth.
-- Gordon
Since I am on a parallax site; I won't name names. Just about any microcontroller can run 8 or more servos with serial input to run them; without any help. You can even add cheap R.C. using "onshine" (transmitter) rec. modules to the same microcontroller. Are you trying to build a servo robot?
Al
http://www.youtube.com/watch?v=VmNc_V5jdPE
If you were careful with how you powered the servos, you should be able to use the servo control program in a QuickStart board. The BS2 would just send serial (I assume) commands to the QS which would then move the servos where you wanted them.
I haven't looked at the servo controller's code, but I'd be surprised if it wouldn't work from a QuickStart board. It should be possible to drive 31 servos (with a modified version of the servo controller code) from a QuickStart board (leaving one pin for communication).
The price of Parallax's Servo Controller is reasonable and it would make it easier to power the servos if you were to use it. Either way, you should be able to use a Prop as a slave device without needing to learn to program it.
You're on, Duane! I'll see how many servos a BS2 can run, you see how many a QS board can do. Something along these lines (using "another" processor) is my goal:
http://www.youtube.com/watch?v=HSLktpOkrGs
Great, this will be fun!
So does each servo need to move at a different rate? I'm not sure I have 31 servos without using continuous rotation servos too (at least not until my recent HobbyKing order arrives).
What should we do? Have each servo oscillate at a different rate with continuous servos changing speeds with different accelerations?
Edit: If the QS doesn't need to communicate with anything, I might be able to have 32 servos moving. Now if I could use some 595 shift registers, then you'll really see something!
There's this annoying servo controller on Ebay: http://www.ebay.com/itm/JP-Serial-Servo-Controller-Module-34ch-Stamp-Basic-Picaxe-and-Arduino-/170767045519?pt=Radio_Control_Parts_Accessories&hash=item27c282538f
it claims to control 34 servos, but the video embedded only moves one at a time or big groups together. I'm not too impressed by that one. Might just be the programming, but no way to tell.
Sure, but that would be cheatin'...
I think at 119200 bps one should be able to send it a lot of instructions to it.
Per Mike's comment #12, on a BS2 this exercise is purely academic to see how many servos can be controlled. It won't be particularly useful since there isn't any time for any other calculations, but an interesting diversion nonetheless. I'm sure the quality of the servos makes a difference as well; I'm sticking with my bag of China Ebay 9-gram cheapies for now.
And I'm not above bit banging if it helps the BS2 cause in any way.
Thirty or so servos shouldn't be a problem for a Prop. It'll be a big problem for the battery on your robot. You do NOT want to command all those servos to move at once. The proper way to do is move each one separately. Otherwise the battery just can't handle all the simultaneous current draw.
You actually don't want each servo out of sync (positionally) with one another. Like a sine wave the segments just repeat X times for the given length. At most you could taper off the segments toward the rear, but those segments simply describe a shallower sine wave than the wave before it.
This one is said to handle 84 servos -- that's one big snake:
http://www.robot-electronics.co.uk/htm/sd84tech.htm
-- Gordon
It's the programming for the demo. Like all serial servo controllers you send it a couple of bytes specifying the servo number, position, and transit speed (if so able). That chip has a max serial comm speed of 19.2k, but even at that it's just a couple of bytes per servo, so things are fast. You can do the math to see how long it takes to send the required bytes for each servo to the controller, but guaranteed it's faster than your snake needs it to be.
Be sure to thoroughly read the docs of whatever controller you use. It MUST allow you to set the transit speed. You don't want to have to do that in your microcontroller, especially if you're using a BS2.
So you know, my snake has 10 segments, is controlled only by an Arduino (position and transit speed), and has sufficient -- but not great -- time left over for other things. Everything is hardware interrupt driven, and of course hardware timer driven for the servo PWM. There are no blocking delays in the code, and that's the key to making this stuff work.
-- Gordon
I just pointed that controller out for others who may not wish to follow my long and circuitous route.
Most of the times I agree with your answer but not this time. It is very misleading. It does not take 10 ms to produce 5 2 ms pulses in just software. It is the time you need to route the timing pulses to lots of servos is one of the factors that limit how many servos you can run at one time. I can very easily run 8 servos on a low cost microcontroller with time left over to do other things.
The formula 5 servos x 2 ms = 10ms just is not true for microcontrollers. Your formula may be true for the BS2; I don't know, I never used one.
"There just isn't enough time left over to reliably do anything else. The 5 servo control pulses could take 5 x 2 ms to produce (= 10ms out of a control cycle of 20ms). The remaining 10ms would quickly be absorbed by a few other statements at a rate of 150us to 1ms or more per statement."
Al
Al, I looked back at Mike's post. I thought he was pretty clear about discribing the issues with a Basic Stamps. I'm sure many other microcontroller can handle more servos but the Basic Stamp has to wait for the pulse to complete before continuing its execution. So the "5 servos x 2 ms = 10ms" is true for a Basic Stamp. There actually some overhead so a 2ms pulse will take longer than 2ms.
I don't see how Mike's post was in the least bit misleading. He was clearly talking about Basic Stamps not microcontrollers in general.
>>>The Dark Side<<< especially note the servo control section toward the bottom of the page.
You may be suprised the Propeller is so easy to learn and use...
-Tommy
That can hold a lot of servos.
Basic stamps can only speculate about maybe 15 or 16 servos... the dark side offers 32 servos...
Embrace the dark side, Do not fear the change, change the fear instead...;)
-Tommy
Dare I try TEN? TWELVE? THIRTEEN?