Skip to content

Linear Actuators and Servos

Kevin Hoser edited this page Apr 7, 2021 · 2 revisions

These are effectively motors that: rather than turning a rotor, extend or retract a shaft. It can be very useful to convert this rotational work into linear work. Presently, we are using linear servos to raise and lower our digging and deposition systems.

Linear Actuator

Linear Actuators are simpler but have less functionality. They function similar to DC motors: provide a positive voltage and it will move one way, provide a negative voltage and it will move the other way. The speed that it moves depends on the magnitude of the voltage. As such, it can be difficult to accurately control linear actuators. This difficulty in control is the reason why linear actuators often contain one particular sensor: a potentiometer. A potentiometer is a resistor that changes value basically. Implemented with the actuator, it allows the user to determine exactly how much the actuator is extended by reading the resistance.

Linear Servo

Linear Servos are linear actuators that have their own control board implemented. They function similar to servos: servos can control the angle of the rotor given a PWM signal. Linear servos can control the position of the actuator given a PWM signal, so sending the minimum PWM signal will fully extend the actuator and sending the maximum PWM signal will fully retract it. This makes it far simpler to control the actuator in code using a micro-controller because we no longer need to track the position of the actuator ourselves, but rather, just tell the servo to move the actuator to a certain position whenever we need it and then forget about it until we need it again.

Control

Both motors are controlled with pulse-width modulation (PWM). A key term to know about PWM is duty cycle, which is the ratio between how much the signal is on to off. Each motor has set duty cycle for configuring the position of the servo to be in the minimum and maximum states. In the upmoon/upmoon_gpio/src/upmoon_gpio/PWM.py class, the range for the duty cycle is normalized to a scale between 0 and 1 for ease of use.

Commonly, PWM uses 5V signals. Hence, it is important to check the schematics of the motors to see if it is compatible with the RPi's 3.3V signals.

Clone this wiki locally