Golf Challenge: Controlling 2 servos with one pin
Beau Schwabe
Posts: 6,566
The idea was suggested in this thread...
http://forums.parallax.com/showthread.php/145161-Controlling-2-servos-with-one-pin-using-a-transistor
Here is the Challenge:
Using only 1 pin and a Basic Stamp or Propeller, the object is to control two servo's using as few parts as possible.
I have a transistor only based solution, but I'd like to see what others can come up with.
http://forums.parallax.com/showthread.php/145161-Controlling-2-servos-with-one-pin-using-a-transistor
Here is the Challenge:
Using only 1 pin and a Basic Stamp or Propeller, the object is to control two servo's using as few parts as possible.
I have a transistor only based solution, but I'd like to see what others can come up with.
Comments
One package/component can split the three states of a pin into two Logic signals, and another may be needed if one of those Logic signals needs to be inverted ( or the inverter may already be spare somewhere in the design )
Using a Basic Stamp or Propeller... "control two servo's using as few parts as possible... using only 1 pin" - Lets keep it simple....
How about a P8X32A QuickStart OR a BASIC Stamp 2 OEM Module (Kit Form) for the prize depending on if a Propeller or Basic Stamp was used in the solution?
Lets announce a winner on January 31st. 12:00pm (CDT) will be the cut-off. To keep it blind, entries must be sent to me at ...
bschwabe@parallax.com
EDIT: Two standard Hobby servos, each with independent position control
- Are all the servo's connected meant to receive the SAME position information? In this case it may just be a matter of boosting the output to drive more SERVO inputs.
- Or, is the intent to try and interleave the position information to drive two separate servos with two separate positions? Sort of like the way they were sent from the old RC transmitter to the receiver?
That makes a huge difference....
Two standard Hobby servos, each with independent position control
Discontinued! http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/servopal/List/0/SortField/4/ProductID/481/Default.aspx
Hopefully it may return one day.
This circuit can drive 2 analog servos independently.
One assumes the 1mS to 2mS PWM pulses are sequentially generated in software.
1. The lower servo is pulled high directly by the Prop Pin for the required PWM time. Then the Pin is set to input.
2. The upper servo is pulled high when the Prop Pin is pulled LOW for the required PWM time. Then the Pin is set to input.
Duane J
-Phil
2 parts:
one tiny IC and 0.1uf cap
Can control 2 (or even 5) servos with its 50/50mA push-pull
Autobaud, the first 3 bits out of 8 sets the baud rate.
http://www.ti.com/lit/ds/scps228/scps228.pdf
I think with that part you would have trouble timing the width of the output pulses accurately enough for servo positioning. For one part in 100 your pulse timing must be accurate to 10 microseconds.
With the correct software routine it could be done (the same way servo32 does it etc)
Min PER DIN period: 0.001 ms
Maximum switching frequency on DIN: 1 MHz
-Phil
IMO a complete challenge (or the next challenge) should read 2 pots on one pin, which control 2 servos using a different pin. Very demonstrable.
-Phil
How small resoltion does a servo need, if 1ms to 2ms is the range?
And you shop that up that in 0.001 ms parts.
And there is no problem to stager five 2ms pulses in a 20ms period, with no overlapping.
And you could even add the Props wait for a 12.5ns resolution.
Even though it wasn't spelled out clearly, I think using an IC other than what's on the Stamp or Propeller is cheating. I sorta feel like I just blew $30 ... Sigh. :-)
I agree. Transistors & passive components only. Maybe relays & plywood.
Hmmm. How fast can I toggle a relay?
Note! Since the BS2 is a 5V part, as I understand it, the resistors would need to be adjusted a bit.
Duane J
'Too much interpreter overhead to get the required precision.
-Phil
I have look at quite a few of the manufacturers websites and not found a full spec for the PWM input pin.
Sure, they describe the timing requirements. but I need more.
What I want is the input pin electrical requirements.
1. Voltage input min/max of the pulses? (There is a vague suggestion it is 3V to 5V in Wikipedia.)
2. What is the input impedance or resistance?
Duane J
You need to define the signals more than this. - and add a Temperature and Voltage span for good measure.
Some circuits may be 'simple', but very temperature/device param dependent.
Reliable often matters more than saving one fractional-cent resistor, or 3c transistor.
500us - 2500us active position pulse with a 20ms (+/- 2ms) Period between pulses.
LOW = < 0.8V
HIGH = > 2V
Input impedance on the signal line to the servo might be as low as 1k
jmg,
Are you planning to enter the challenge or just to critique its premises?
-Phil
Did you not read the whole thread ? - I already gave a suggestion way back in #2
If you want a part number to add to that, try the PUMD9 (et al) One, (or two), of those
My apologies. I had overlooked the detailed circuit embedded in those broad brushstrokes.
Here's my entry:
The outputs may need pull-down resistors for servos with high input impedance.
-Phil
The NXP PUMD9
There are a number of manufacturers that make things like this with various combinations of resister and transistor values, Rohm comes to mind.
Duane J
Here's a scope trace, where the output drives a 4.7K-4.7K voltage divider:
-Phil