more questions about servo's

Ask and answer questions, share tips and resources for installing lighting and other electronics in your models.

Moderators: Sparky, Moderators

Post Reply
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

more questions about servo's

Post by kitty »

On my F-toys 1:144 At-AT i want to make the head move left to right and back randomly.
I could use an electromotor with gear and a concentric wheel to push a rod (piston rod?)

A microservo might be smaller, neater and easier to put in there though.
However i never took time to figure out how to drive these servo's.
So i've got a few questions.

Can someone help me and give me crashcourse on servo's? :)

How do i control their movements (i think they have tiny steppermotors inside, not sure though and i've never designed anything to drive a steppermotor either)
What is the difference between a normal servo and a digital servo?
What else do i need to know about these things?
Last edited by kitty on Sun May 17, 2009 6:47 pm, edited 1 time in total.
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
User avatar
Umi_Ryuzuki
Posts: 3841
Joined: Fri Jul 12, 2002 2:22 pm
Location: PDX, Oregon
Contact:

Post by Umi_Ryuzuki »

Servos are not really stepper motors.
As a servo turns, the gears inside also turn a potentiometer.
The resistance feedback that the potentiometer provides then
tells the servo board when to stop the motor.

Now this known, if you just want to push a button to move the head
left, or push a button to move the head right you could remove the
circuit board, and power the motor in the model directly. The gear
stop will limit the movement of the servo.

If you plan to use remote control, you can purchase a "servo tester",
and plug the servo into the tester. A nob on the tester will allow you
to control the movement and servo position.

If you want continuous rotation, that can also be managed, but will
require a bit of modification to the gear stop, and potetiometer feed back system.

Hope that helps a little.

:wink:

Aimee
'
"I have to go now,... because my life is stupid and leprachans are dorks."
Nyow!
/
=^o^=
jwrjr

Post by jwrjr »

Radio-control servos have brush-type, and sometimes brushless motors inside, but not stepper motors. I don't even know if they make stepper motors small enough to be useful for that.
Servos are available that are very small. These are usually the ones intended for R/C helicopters.
Servos have three wires - power +, ground, and signal. The signal consists of a pulse with a width of 0.5 to 1.5 milliseconds, which controls the position of the servo.
A conventional servo uses analog parts to decode this signal, while a digital servo uses a microcontroller. The practical difference is that you can usually get more torque from the same size digital servo, at the cost of drawing more current.
Programmable servo controllers are available from at least two different sources (and probably more). If you are unwilling to purchase a controller (or design and build your own), the gearmotor with some sort of cam might be easiest.
User avatar
Umi_Ryuzuki
Posts: 3841
Joined: Fri Jul 12, 2002 2:22 pm
Location: PDX, Oregon
Contact:

Post by Umi_Ryuzuki »

Here's a build your own "servo tester" that can be used to
control a servo without a radio system.

http://www.pm.keirle.com/Servo/SERVO.HTM

:8)
'
"I have to go now,... because my life is stupid and leprachans are dorks."
Nyow!
/
=^o^=
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

Post by kitty »

Thanks Aimee,
That will help me some.
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
User avatar
Umi_Ryuzuki
Posts: 3841
Joined: Fri Jul 12, 2002 2:22 pm
Location: PDX, Oregon
Contact:

Post by Umi_Ryuzuki »

If it's easier, you can buy one here.

See the servo Swinger...
http://www.action-electronics.co.uk/pat.php


:wink:
'
"I have to go now,... because my life is stupid and leprachans are dorks."
Nyow!
/
=^o^=
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

Post by kitty »

Ok, i got it i think.
a servo has 3 wires, 1positive, one negative and 1 lead which receives a pulse from an external device (microcontroller, receiver etc.)
internaly a potmeter is connected to the the arm.
It generates a pulse internaly, controlled by the potmeter and compares it's pulsewidth to the pulse that is applied externaly while rotating the arm.
If a servo can rotate 180° than a 0.5 ms pulse will rotate the arm to its maximum position anticlockwise (-90°), a 1 ms pulse will rotate the arm untill it is in center position (0°) and with a 1.5 ms pulse it will turn to it's maximum clockwise position (90°)
Since only a linear potmeter would make sense in this setup, i can only assume that a 0.75 ms puls would rotate the arm to -45° position.
I think thats basicaly it.
Please correct me if i'm wrong.

Now i have 2 other questions:
The signal applied to the input lead , does it need to be a pulsetrain or a single pulse?
If it needs to be a pulse train, does the high state of the pulse have to be 0.5 ms as well as the low state?
I need to know this if i want to write a programm for a PIC to controll the position of the servo.
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
jwrjr

Post by jwrjr »

That's basically it. Keep in mind that the 0.5ms and 1.5ms values are somewhat nominal - best that your signal generator can go a little shorter than 0.5ms and a little longer than 1.5ms.
The signal is repetitive. This is especially important for an old-style analog servo The movement will be smoother with a faster repetition.
The high part of the signal is the important one. The time between can be as long as you want - with the above stated condition. (I generally use 80 pulses / second.)
The PIC program is not particularly difficult But if you want to be able to program in a series of movements, that will complicate things a bit.
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

Post by kitty »

What i have in mind is quite simple, i basicaly just put a random value in a counter register and enter a loop in which i increase or decrease the pulsewidth with a constant value untill the counter reaches zero meanwhile checking that it goesn't go below the 0.5 ms or above the 1.5 ms and then put another random value in the counter register and enter the loop again.
That way i can get a random positive or negative rotation of the servo.
It will give me a random left to right and right to left swing instead of a constant swing on a head of an AT-AT.
And it's a lot easier to achieve in a much smaller routine (so less memory needed thus smaller PIC and lower cost) than a complicated set pattern of movement.
4 randomly firing guns will be an entirely different matter since each of them has to light up full then fade out for every shot fired.
Quite complicated to achieve that with only 1 counter :)
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
jwrjr

Post by jwrjr »

Of course with a PIC (and probably AVRs, too) every register can be a counter.
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

Post by kitty »

counters yes, but they would run syncrounous of only 1 timer is used.
I need to come up with a routine to make the lower AT-AT cannons fire at a slower pace than the side cannons and i cannot use the same timer for that, because they have to cycle asynchronous.
And then i have to switch each cannon randomly on/of to create the illusion that they fire independently sometimes in pairs, some times single.
So i need 3 different timing cycles, 1 for the servo's and 2 at least for the cannons if i use only 1 PIC.
And it all has to be done in the smallest DIP package that hold the programm :)
I don't need inputs, so i have the advantage of beeing able to use PICs that have pins double as input and output.
I might even use an arduino nano for the thing and forget about a PIC.
Electronics is not my thing, i only have basic knowledge and very little of that is digital.
And i hate programming in general.
If push comes to shove i can always use 3 seperate pics :)
I have about 1"x 1"x 3" free space at my disposal to put a servo + a small circuitboard in, so it's doable.
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
Post Reply