Circuit to turn a servo with 2 inputs

Thread Starter

mkakasapu

Joined Apr 9, 2020
19
Hi All,

I want to turn a rudder like mechanism and currently I use DC motor and polarity to turn it left & right. But It has a limitation that it can cannot be positioned in between. Now I want this extra position to be included. So thinking about a servo to achieve three positions ( left - 0, middle (default) - 90, Right - 180.
I know I can achieve this with nano. But is there anyway to control the servo positions without board. Is there any chip or very minimal circuit to achieve this?

So, A circuit that takes 2 inputs A, B and
When
A-0, B-1 = Move servo to 0 ;
A-1, B-0 = Move servo to 180;
A-0, B-0 = Move servo to 90 (default position).

A-1, B-1 is not a possible combination. So no need to concern about it.
 

MaxHeadRoom

Joined Jul 18, 2013
28,692
A simple motor controller using a low res optical photo cell or similar encoder on the motor shaft., And some means of registering or counting the pulses.
Cut power at the appropriate count.
 

Thread Starter

mkakasapu

Joined Apr 9, 2020
19
I am thinking about 555 circuit and send various PWM signals. This is exactly what I want to do.

Here’s a cheat sheet for the shaft’s position in a typical hobby servo motor:

"0°" (~1 ms pulse) - 0, 1
"90°” (~1.5 ms pulse) - 0,0
"180°" (~2 ms pulse) - 1, 0

Is it possible with 555 chip? (Or should I go for AtTiny to program which I do not want to?)
 

Thread Starter

mkakasapu

Joined Apr 9, 2020
19
Do a search for “555 servo tester”. (the link is for ‘let me google that for you’. Ignore the snarky comments. They don’t apply to you.)

Using a 555 and a handful of components, you can control a RC hobby servo with a potentiometer.
That is the route I am taking.. But I couldn't figure out how (0,0) - 90deg state can be handled.
Also at 180, the servo is moving shakily.
 

djsfantasi

Joined Apr 11, 2010
9,163
That is the route I am taking.. But I couldn't figure out how (0,0) - 90deg state can be handled.
Also at 180, the servo is moving shakily.
180° might be beyond the limits of the servo. Try changing the resistors to command the servo to move to a lower degree. 179, 175, etc… Or you may not be sending the pulses at 50Hz. Some servos may work outside of this range. Others won’t. So stick to the standard.

90° is center and corresponds to a pulse 1.5mS wide. Servos operate by using pulse modulation where the high pulse width determines both direction of servo operation and possibly the speed of operation. The time of the pulses is generally every 20 milliseconds and is not adjustable by this command. The pulse width generally varies around a mid-point of 1.5 milliseconds (1500 microseconds). Pulse widths less than 1.5 milliseconds cause servo operation in one direction, while pulse widths greater than 1.5 milliseconds cause operation in the opposite direction.

Send pulses at 50Hz that are 1.5mS wide. Then attach the servo horn in the desired center position.
 

Thread Starter

mkakasapu

Joined Apr 9, 2020
19
180° might be beyond the limits of the servo. Try changing the resistors to command the servo to move to a lower degree. 179, 175, etc… Or you may not be sending the pulses at 50Hz. Some servos may work outside of this range. Others won’t. So stick to the standard.

90° is center and corresponds to a pulse 1.5mS wide. Servos operate by using pulse modulation where the high pulse width determines both direction of servo operation and possibly the speed of operation. The time of the pulses is generally every 20 milliseconds and is not adjustable by this command. The pulse width generally varies around a mid-point of 1.5 milliseconds (1500 microseconds). Pulse widths less than 1.5 milliseconds cause servo operation in one direction, while pulse widths greater than 1.5 milliseconds cause operation in the opposite direction.

Send pulses at 50Hz that are 1.5mS wide. Then attach the servo horn in the desired center position.
I am able to turn the servos to position individually by changing the resistors. Now I need to control them by power as I mentioned in my previous post. The tricky part is to keep the servo 90 position always unless button left / right is pressed.
 

djsfantasi

Joined Apr 11, 2010
9,163
Just blue skying…

What do you mean “control them by power”?

Maybe you could use relay logic to switch appropriate resistors in and out. You’d need two signal lines for left and right. Center would be neither relay energized.
 
Top