-
Notifications
You must be signed in to change notification settings - Fork 0
Linear Actuators and Servos
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 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 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.
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.
Currently the most updated code is on dumping_actions. Make sure to push the code from the RPi on the rover. Computer 10 has most updated Teleop code, but this has also been pushed.
Recommended to make new repository for next years competition.
Middle right motor is bad (the wrong firmware has been installed and control circuit does not work for motor).
One motor has soldered connections between circuit board and motor. This should be fixed or replaced, this is temporary solution.
One control wire for a motor is hot glued into the white connected (for the Trinamic motor). This needs to be fixed and wired in correctly.
WARNING: When you first turn on the robot, hitting an acceleration button will move the rover in the other direction. Quickly hit the other acceleration button (trigger buttons) to stop this and make the rover move normally
Using ROS software to align wheels when needed.
Most useful files are the Teleop script file (code responsible for controlling rover) and the upmoon_gpio file that contains all the information for motor initialization and other code.
Recommendations: For automation, try not to do full automation but rather have routines programmed in. For example, you drive the rover but have a routine for if the rover should go forward and start digging. Basically, full automation is a pain, make routines for more simple parts and build up from there.
Recommendation: Try updating motors and circuit boards as the parts are getting old and it is getting difficult to buy replacements.
TIP: Turning on and off the rover can help reset motors and help the digging system.
IMPORTANT: If you have a broken motor that is causing you pain. Maybe try customer support. The Trinamic motor costumer support takes a day and they will give you a detailed solution or let you know that fixing a motor is impossible. DON'T BE AFRAID TO ASK FOR HELP!