Beruflich Dokumente
Kultur Dokumente
http://www.lizarum.com/assignments/physical_com...
A Servo is a small device that has an output shaft. This shaft can be positioned to specific angular positions by sending the servo a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of the shaft. As the coded signal changes, the angular position of the shaft changes. In practice, servos are used in radio controlled airplanes to position control surfaces like the elevators and rudders. They are also used in radio controlled cars,
The servo motor has some control circuits and a potentiometer (a variable resistor) that is connected to the output shaft. This pot allows the control circuitry to monitor the current angle of the servo motor. If the shaft is at the correct angle, then the motor shuts off. If the circuit finds that the angle is not correct, it will turn the motor the correct direction until the angle is correct. The output shaft of the servo is capable of traveling somewhere around 180 degrees. Usually, its somewhere in the 210 degree range, but it varies by manufacturer. A normal servo is used to control an angular motion of between 0 and 180 degrees. A normal servo is mechanically not capable of turning any farther due to a mechanical stop built on to the main output gear. The amount of power applied to the motor is proportional to the distance it needs
1 de 7
08/12/10 22:20
Servos
http://www.lizarum.com/assignments/physical_com...
to travel. So, if the shaft needs to turn a large distance, the motor will run at full speed. If it needs to turn only a small amount, the motor will run at a slower speed. This is called proportional control. Angles of Rotation:
Continuous Rotation servos The continuous rotation servos keep on rotating when pulsed with power. The most common continuous rotation servos from Parallax rotate in one direction when pulsed with power with a delay above 1500 microseconds and the other way when pulsed with a delay below 1500 microseconds. This program will make the continuous rotation servo go 100 steps one way then 100 steps the other way.
#define motoPin 9 void setup(){ pinMode(motoPin,OUTPUT); } void loop(){ for(int i = 0; i < 100; i++);{ digitalWrite(motoPin,HIGH); delayMicroseconds(1850); digitalWrite(motoPin,LOW); delayMicroseconds(1850); } for(int j = 0; j < 100; j++);{ digitalWrite(motoPin,HIGH); delayMicroseconds(1250); digitalWrite(motoPin,LOW); delayMicroseconds(1250); } }
What servos are good for Roboticists, movie effects people, and puppeteers use them extensively Any time you need controlled, repeatable motion Can turn rotation into linear movement with clever mechanical levers
2 de 7
08/12/10 22:20
Servos
http://www.lizarum.com/assignments/physical_com...
3 de 7
08/12/10 22:20
Servos
http://www.lizarum.com/assignments/physical_com...
Chalayan's latest runway show. Wires within the tubes connect to motors at the bottom of the dress. The motors reel in wires attached to the outer layer of the garment, altering its shape.
When using the servo, it is helpful to mark the servo horn. This allows you to follow the rotation:
The computer can't really output analog values, but it can fake it. It fakes it using Pulse Width Modulation or PWM. This program moves a servo across its full range:
4 de 7
08/12/10 22:20
Servos
http://www.lizarum.com/assignments/physical_com...
Yes Arduino has built-in PWM on pins 3, 5,6, 9,10,11, and you can use analogWrite(pin,value) to write an analog value (PWM wave) to a pin. You can light a LED at varying brightnesses or drive a motor at various speeds. After a call to analogWrite(), the pin will generate a steady wave until the next call to analogWrite (or a call to digitalRead or digitalWrite on the same pin). But it operates at a high, fixed frequency and isn't usable for servos. The PWM speed used for analogWrite() is set to 490Hz currently. It's not something changeable without understanding more about how AVRs work. So when programming AVRs in C outside of Arduino, PWM speed can be set to just about any value. Here's the good news, the Servo library takes care of this for you:
Exercise
Wire up the servo and a potentimeter:
S E RV O CRITTE RS
From my class:
5 de 7
08/12/10 22:20
Servos
http://www.lizarum.com/assignments/physical_com...
Others:
6 de 7
08/12/10 22:20
Servos
http://www.lizarum.com/assignments/physical_com...
MKTET2-2T.jpg
twitchie code
7 de 7
08/12/10 22:20