Servo's
Brandon C.
Posts: 106
Hi! I am about to order the propeller chip. I have just one more question though. Can the chip run up to 32 servos at once, or move one at a time?
Comments
Will I need a resistor between the pulse wire and the Propeller?
It is recommended to use a 4.7 k resistor, I'm not sure why.
Rich H
Cheapest / simplest is probably to add four 74HC595's, and using just four Propeller pins you can get the 32 I/O's you need.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Largos - a feature full nano operating system for the Propeller
www.mikronauts.com - a new blog about microcontrollers
Really? I was under the impression that after boot up, those pins were free to be used.
Rich H
After bootup ALL 32 pins can be assigned to Servo's
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Anyways I just ordered my Propeller chip. I am so excited!
Thank you all for the help!
That is true, however I wonder how the Servo's would like the I2C traffic during boot, or serial traffic while programming.
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Largos - a feature full nano operating system for the Propeller
www.mikronauts.com - a new blog about microcontrollers
I believe that this has been brought up before, and there are ways to buffer the signal to the servo upon powerup. During testing when I wrote the object, normal I2C traffic to the EEPROM did not seem cause any noticeable movement on the servo's.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
That is good to know... I do plan on getting into robotics, and have some servo's waiting for my attention
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Largos - a feature full nano operating system for the Propeller
www.mikronauts.com - a new blog about microcontrollers
If you must have all of your servos move at the same time, make sure they are in the same group of 8.· If you need more than 8 servos to move at the same time, you'll have some code modifications to make.· You said above you're only only to move 6, so you should be fine as-is.
Joel-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I saved Earth from an Alien Attack.· Can you?
http://www.joelspennyarcade.com
·
Beau's servo object sends a pulse to each of 32 servos every 20 milliseconds. Rather than send a pulse to all 32 then wait 20 mS it sends a pulse to eight, waits 5 mS, sends pulse to eight more, waits 5 mS and so on.
There is no disadvantage whatsoever in this approach as far as controlling servos is concerned. All servos are updated at 50 hz. With the exception of very high performance servos, there is nothing to be gained by framerates faster than 50 hz.
Rich H
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
No purchase necessary. See back panel for more details.
Mike is correct. It would have actually been easier to make all pins HIGH and then drop them off in turn, but the initial current demand (Not on the Propeller) on the Servo's would be large.
Brandon C.,
If you can perceive 15ms (worst case scenario) then you would see a noticeable lag. Between each group, there is a lag difference of 5ms. ...Consider a single servo however, the lag difference of a single servo can be as high as 20ms if you send an update right at the tail end of the servo pulse. The lag between groups is really negligible.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
No purchase necessary. See back panel for more details.
Rich H
You have to be careful about how much current you source sink. There is a rating for each pin and a separate rating for a group of 8 pins. So if you set all pins high then, depending on what you're doing, you may have a problem. The series resistor would help prevent the problem.
You're confusing frame rate (50hz) the rate at which servos are given a signal pulse, with the phasing, the point in time within a frame at which a servo is given its update signal pulse.··As I indicated earlier, Beau's object cascades 4 groups of updates.· Each group updates 8 servos at the same time.· This has nothing to do with the frame rate.· Because the groups are cascaded,·all servos do not get updates at exactly the same time.
Whether or not this makes a noticeable difference to anyone is a different issue.· The answer to that depends completely on the requirements of the mechanical system that the servos are part of.·
The reason I even replied to the thread was that I have a particular sensitivity to this phase issue in my applications.· It was quite possible that the original poster would have a similar sensitivity, too.· It's hard to say without knowing what he was doing.· Making a blanket statement that there is no disadvantage whatsoever in this approach can lead people down the wrong path.·
Joel
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I saved Earth from an Alien Attack.· Can you?
http://www.joelspennyarcade.com
·
No, I wasn't. But I agree that in certain situations with critical timing issues that the phasing could present a problem so I will amend my statement.
There is no disadvantage whatsoever in this approach as far as controlling servos is concerned - except in special cases where critical timing is an issue where more than eight servos (or multiple servos that cannot be in the same group) must begin movement within less than 15 mS of each other or be synchronized within less than 15 mS.
I was responding to that mostly. All servos in fact can be moving at the exact same time unless they are commanded to move such a small amount that they are finished moving in under 15 mS. It made it sound a little bit like eight servos would move, then eight more, then eight more and so on - as if only eight could me moving at any one time. I think that under normal uses it would look more than "reasonable".
Rich H