Chapter 5. Working with Robotic Actuators and Wheel Encoders
In this chapter, we will cover:
Interfacing a DC Geared motor with Tiva C LaunchPad
Interfacing a quadrature encoder with Tiva C LaunchPad
Explanation of interfacing code
Interfacing Dynamixel actuators
In the previous chapter, we have discussed the selection of hardware components needed to build our robot. One of the important components in robot hardware is the actuator. Actuators provide mobility to the robot. In this chapter, we are concentrating on the different types of actuators that we are going to use in this robot and how they can be interfaced with Tiva C LaunchPad, which is a 32-bit ARM micro controller board from Texas Instrument that works at 80 MHz. The first actuator that we are going to discuss is a DC geared motor with an encoder. A DC geared motor works using direct current, and has gear reduction to reduce the shaft speed and increase the torque of the final shaft. These kind of motors are very economic and we can...
Interfacing DC geared motor with Tiva C LaunchPad
In the previous chapter, we selected a DC geared motor with an encoder from Pololu and the embedded board from Texas Instruments called Tiva C LaunchPad. We need the following components to interface the motor with Launchpad:
Two Pololu metal gear motors 37Dx57L mm with 64 count per revolution encoder
Pololu wheel 90x10 mm and a matching hub
Pololu dual VNH2SP30 motor driver carrier MD03A
A sealed lead acid/Lithium Ion battery of 12 V
A logic level convertor of 3.3 V to 5 V https://www.sparkfun.com/products/11978.
A Tiva C LaunchPad and its compatible interfacing wires
The following figure shows the interfacing circuit of two motors using Pololu H-Bridge:
To interface with Launchpad, we have to connect a level shifter board in between these two. The motor driver works in 5 V but the Launchpad works in 3.3 V, so we have to connect a level shifter, as shown in the following figure:
The two geared DC motors...
Interfacing quadrature encoder with Tiva C Launchpad
The wheel encoder is a sensor attached to the motor to sense the number of rotations of the wheel. If we know the number of rotations, we can compute the displacement, velocity, acceleration, and angle of the wheel.
For this robot, we have chosen a motor with an in-built encoder. This encoder is a quadrature type, which can sense both the direction and speed of the motor. Encoders use different types of sensors, such as optical and hall sensors, to detect these parameters. This encoder uses Hall effect to sense the rotation. The quadrature encoder has two channels, namely Channel A and Channel B. Each channel will generate digital signals with ninety degree phase shift. The following figure shows the wave form of a typical quadrature encoder:
If the motor rotates clockwise, Channel A will lead Channel B, and if the motor rotates counterclockwise, Channel B will lead Channel A. This reading will be useful to sense...
Working with Dynamixel actuators
Dynamixel is a kind of networked actuator for robots developed by Korean manufacture ROBOTIS. It is widely used by companies, universities, and hobbyists due to its versatile expansion capability, power feedback function, position, speed, internal temperature, input voltage, and so on.
The Dynamixel servos can be connected in a daisy chain; it is a method of connecting device in a serial fashion, that is, connecting one device to another through the connected devices, and can control all the connected servos from one controller. Dynamixel servos communicate via RS485 or TTL. The list of available Dynamixel servos is given at http://www.robotis.com/xe/dynamixel_en.
The interfacing of Dynamixel is very easy. Dynamixel comes with a controller called USB2Dyanmixel, which will convert USB to Dynamixel compatible TTL/RS485 levels. The following figure shows the interfacing diagram of Dynamixel:
ROBOTIS provides Dynamixel SDK for accessing motor registers; we can read...
In this chapter we have discussed the interfacing of motor that we are using in our robot. We have seen motor and encoder interfacing with a controller board called Tiva C LaunchPad. We have discussed the controller code for interfacing motor and encoder. In the future, if the robot requires high accuracy and torque, we have seen Dynamixel servos that can substitute current DC motors. In the next chapter, we will see different kinds of sensors that can be used in robots and its interfacing.