controlling two servo via single pin using ATmega32 ??

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

how can i control two servos explicitly via single PIN out?
i mean the PWM signals are same for both servos but i want to rotate them one at a time.
THE IC i am using is ATmega32 and servos are std analog servos
should i use MUX or NOT logic at PIN out?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

raaj90 wrote:
how can i control two servos explicitly via single PIN out?
Probably can't. There are a couple of ways to do the job, but they require 2 I/O lines minimum, unless you're prepared to use extra external circuitry.
Save yourself the hassle and free up an extra I/O line.
Quote:
.. and servos are std analog servos
Analog/ue servo ? Never heard them called that. Standard servo and digital servo ... yes. The major difference is that the so called digital version has a micro on board. The standard servo still uses digital control input. There's nothing much analog/ue about them.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Should be doable.
A servo frame takes 20mS but the actual control pulse(PWM) is only 2ms at the start. Nothing stop you to control other servos on same pin during the remaining 18ms.
BUT, you need to leave the 1st servo at high level(+5v) during those 18ms.
How to shift btw servos if you only have one pin available?
Some external timer(555)running 20mS square pulses?
But how will you detect the start of a frame?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the world of RC models, a common technique for encoding multiple servo control values on a single digital output is PPM (pulse position modulation). Unfortunately, the PPM decoding circuit is a tad complex (a cd4017, plus a timer to detect the end of frame). It would be much less effort to find a spare i/o pin and use that instead.

- S