5 Servos with no Servo Controller
I have connected 5 servos directly on the BOE on various pins (no SC) which is powered by a 6V battery pack.
Am I damaging anything using this method? Everything seems to work fine and I cannot see any smoke or feel anything getting warmer. It's just that I could not find anyone on these forums that has done the same and I feel that I am doing something wrong. Everyone seems to be doing the right thing by using a Servo Controller. In "What's a Microcontroller", nothing gives me the indication that I am doing something wrong.
I just don't want to burn anything out.
Thanks
Am I damaging anything using this method? Everything seems to work fine and I cannot see any smoke or feel anything getting warmer. It's just that I could not find anyone on these forums that has done the same and I feel that I am doing something wrong. Everyone seems to be doing the right thing by using a Servo Controller. In "What's a Microcontroller", nothing gives me the indication that I am doing something wrong.
I just don't want to burn anything out.
Thanks
Comments
5 servos is about the max that you would want to control without a servo controller.· You just want to·monitor the current consumption·of the I/O pins· with your circuitry, make sure that your circuit doesn't draw more than 50mA per 8 I/O pins (0 to 7 & 8 to 15).
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
www.parallax.com
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
I am assuming that what you both said above is if some or all of the servos are used at the same time. Apart from 2 servos which move in sync with
BottomArm:
FOR counter = 0 TO 100
PULSOUT 13, (Pulses * 15) + 250
PULSOUT 12, ((Pulses * 15) + 250) + (Pulses + 5) 'Adjustment to move in sync with no straining one another...
PAUSE 20
NEXT
RETURN
all the other servos move one by one and never together with any other servo. They all have a "PAUSE 20" instruction at the end.
Does this still pose a problem? Because I am thinking of actually putting a sixth servo (the last one needed).
Am I correct to assume that when a servo has finished its motion, the PIN returns to LOW state?
In the end, you CAN do what you want to do, but you're going to spend a lot of time writing code to manage the servos correctly.· So ... is your time and trouble worth less money that a simple servo controller?· You decide.
To give you an idea, I've attached a (non-trivial) sumo robot program that synthesizes a timer based on other running code (I had to manually time each subroutine) and the servos get refreshed when needed.· That way I don't have the ubiquitous PAUSE 20 during the combat portion of the code-- which does nothing but kill precious time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
(I admire you for writing so much here and having the time for us all)
The best way is a Servo Controller but I need to finish this today. Where I come from (Cyprus), we do not have a Parallax distributor and I have to order everything online which not only is time consuming but very expensive. A $12 servo costs $70.86 when the $58.86 shipping is added.
Parallax would be great if represented in Cyprus but the minimum orders required by Parallax are too high for anyone to be interested. Therefore I have to improvise when it comes to last minute projects.
Thank you again for your helpful ideas. A couple of Servo Controllers is on my shopping list for my next purchase.
I don't know what you are using for a power supply -- 1 amp at 6 volts can drain 4 AA batteries pretty quickly. Shouldn't break anything, though.
It is a good idea anyway as you never know when you might get an accident short to ground or +5. Things tend to shake loose on hobby projects and people tend to just plug them back in with powering down.
You could use an ULN 2003 as a buffer or a 74HC240 [noparse][[/noparse]with inversion]. Both nicely clean up some noise problems as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan
Post Edited (Kramer) : 5/16/2005 4:45:59 PM GMT
The DRIVE current for a Servo is substantial -- 100 mA or more when moving. The BS2 does NOT supply the 'DRIVE' current, that comes from the Servo power connection -- hopefully directly to the battery if 6 volts or less, possibly connected to the Linear Regulator (7805 or 2840-5).
Now, the amount of DRIVE current a Servo consumes while moving, or standing still, depends on the mechanical resistance it has on its 'arm'. I don't know what you are using your six servo's for -- if they 'stand still' when you are not refreshing them, they must have almost no load on them.
The next problem is the timing, as Jon has correctly stated. The control signal for a Servo is a 1 mS to 2 mS pulse, repeated every 20 to 50 mSec. Refresing 6 servo's takes 12 mSec worst case. That doesn't give you a lot of time to decide what the next Servo Settings need to be, but it is do-able.
The next problem is having enough memory to remember the settings for all those servos -- but I think that's it.
Regarding the timing and memory limitations, these are really the reason to get a servo controller board. Parallax has a nice one with ramping. I don't think anyone else has that feature. It seems needed if you are going use all thosed servos to make something walk, rather than roll.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan
Now this works fine for all five servos if only one servo is connected. But when I connect two or more servos (without changing the program) the servos go berserk, jumping and twitching. Any suggestions?
When servos don't receive a control pulse in the required time window, they turn themselves off, shutting off power to the motor and some of the control circuitry. When a new pulse comes in, they turn themselves back on which causes the twitching. 3 servos is about all a Stamp can handle without help. Using a faster Stamp (like a BS2p) may help a little, but you're still working with a too small time budget set by the servo repeat pulse time.
Do keep in mind that a servo which is heavily loaded mechanically can draw close to 1A. If, for some reason, all the servos are heavily loaded, that's around 5A total ... a lot of current. Make sure your power supply for the servos can handle this sort of peak load.
@Mike: Which would be getting the maximum capability out of a Stamp. That's my quest in life...
@DC3: Per Mike, that could be done with some extra hardware (ADCs) and a fair amount of fudging. But if all you want to do is read 5 pots and drive 5 servos, I'd save the $50 Stamp for something better suited and buy five $2 servo testers: http://www.ebay.com/itm/multi-Servo-tester-3CH-ECS-speed-controler-tester-Power-CHANNELS-CCPM-meter-/280929965473?pt=US_Character_Radio_Control_Toys&hash=item4168bb15a1
http://www.youtube.com/watch?v=_lCjZrLUAP8
Like erco, I like Stamps. I have a couple of BS1s around that occasionally get pressed into service ... usually something simple and slow ... and they work fine for that. I have a BS2 or two that are great for more complicated things or where more speed is necessary. I also like to use Propellers. They're fast, can do several things at once, can do even more complex stuff. It's a matter of picking a "right tool for the job". Controlling 5 servos is right on the edge of something that a Stamp can do well. A lot depends on what you're willing to do to offload some of the work from the Stamp. You can offload the work of generating regular servo control pulses. You can offload the ADC function. You can get a faster Stamp (like a BS2sx or BS2px). You've got choices.