There are two types of Servo motors, continuous and sweep. More about SERVO Motors
Title |
Servo Motor |
---|---|
TI Item Name |
STEMKT/AC/D |
Description |
360 degree, continuous rotation servo motor with gearing and feedback system; used in driving mechanism of robots. |
Category |
Motors |
4-Pin Cable to only this port: OUT 3 |
|
Assembly Instructions |
Mount a gear to the top of the Servo Motor using one of the provided screws. |
Precautions |
Use an Auxiliary Power Source. Do not hold the Servo Motor’s shaft while it is rotating. Also, do not rotate the Servo Motor by hand. |
Specifications |
Operating Speed: 110RPM (4.8V), 130RPM (6V) Stall Torque: 1.3kg.cm/18.09oz.in (4.8V), 1.5kg.cm/20.86oz.in(6V) Operating Voltage: 4.8V~6V |
There are two types of Servo motors, continuous and sweep.
• | The motor in the I/O pack is a continuous motor. This motor rotates either clockwise (positive direction) or counter clockwise (negative direction) for a specified amount of time. |
• | Sweep servo motors turn only 90 degrees in each direction. |
It is necessary to connect servo motors to the OUT 3 port. This port provides the 5 volts needed for these motors.
• | You will also need to plug an external battery into the PWR micro USB port. |
• | You will also give a number, in this case 1, as part of identifying to an external device plugged into a port. (Note: In some cases you may have multiple devices of the same type connected to the TI-Innovator (e.g. temperature probes)) |
Code |
Send("CONNECT SERVO.CONTINUOUS 1 TO OUT 3 ") |
The first argument sets the speed and direction of the motor. You can use -100 to 100. Negative values are in the counter clockwise direction. Positive values are in the clockwise direction. Zero stops the motor.
The second argument is the amount of time in seconds to run the motor in the specified direction and speed. If there is no argument for time, then the motor will turn for one second.
The Wait command is used in the case to delay execution of commands on the calculator until the motor action is complete. This optional command is useful in delaying commands that might replace the current motor command before the desired end time.
Code |
Send("SET SERVO.CONTINUOUS 1 ¬50 TIME 2") Wait 2 |
You also have the options of using explicit CW and CCW settings with values for speed of 0 to 100.
Code |
Send("SET SERVO.CONTINUOUS 1 CW 100 TIME 3") Wait 3 |
This example prompts for the inputs to the SERVO.CONTINUOUS command.
The example also uses a While loop with getKey as a way for the user to control when the command to stop the motor is executed.
Code |
ClrHome Disp "S:SPEED AND DIRECTION" Disp "ENTER VALUES ¬100 TO 100 FOR S" Disp "T:TIME IN SECONDS" Prompt S,T Send("SET SERVO.CONTINUOUS 1 eval(S) TIME eval(T)") Disp "PRESS 1 TO STOP THE MOTOR AND END THE PROGRAM" 0→K While K≠92 getKey→K End Send("SET SERVO.CONTINUOUS 1 0”) |