79Views1Replies

Author Options:

Controlling two servos with one pin and a NOT-gate Answered

Here's an interesting idea. It may be possible to control two servos independently with only one output pin and an inverter/NOT-gate. Normally, a servo is at its 'center' position when a pulse is 1.5 ms & its angle (or speed for continuous servos) is based on the difference between the length of time of the pulse it received & the base-time of 1.5ms. The servo itself does not react to the time BETWEEN pulses however. If the signal was inverted, the result would be a pulse with a time being that of the time between pulses of the initial signal. If the width of a pulse and the time between pulses can be independently controlled, then it would be possible to control one servo with the signal directly, and another servo using the inverted signal. I found something similar here [http://www.diyrc.com/reversers.htm] but it seems to be intended for 'reversing' the signal used to control one of the servos.

Discussions

0
None
Downunder35m

3 years ago

Sure you use two generated PWM signals, invert one nd then a chip to seperate the two with the right polarity.
But although it might be possible in theory you will have a hard time getting this to a properly working stage.
For example the programming: Most controllers won't allow to create such pulses the easy way as it is not possible to give out a negative pulse.
Doing it by messing with a single pulse or the pulse width won't work IMHO as most servos do the speed using the PWM signal - therefor your idea would only result in chaotic movments.
Anyone feel free to correct me here as it is at least semi interesting as a topic.