“Control up to 4 motors with high precision using quadrature encoders, can be added to robots or create CNC machines.
Background and Theory
The purpose of this project is to create a system that give precise control of speed, acceleration and motion to motors. Although stepper motors can provide high torque and are highly synchronized to the inputs (therefore the microcontroller controlling it can keep track of their current position), they are not efficient while running, it will severely affect the time a battery can last. Also, if for some reason the stepper motor stalls, there is no way for the controller to know that it didn’t move but it will register as if it had, this will throw the whole system into chaos (imagine a 3D printer skipping a step because it got jam, the whole printing will be messed up from the event of occurrence). For this reason, I have implemented a system that can control DC motors with feedback to keep track of what has the motor done regardless of the amount of PWM cycles, stalls, etc. This requires the motors to have quadrature encoders (for this analog/power board the motors must be 12V-24V), the LM629 precision motor controller, and a microcontroller to setup the LM629 ICs. With this system, mobile robots, for example, can enjoy of symmetrical speeds on their motors.
In video above, a test drive of a prototype mobile robot shows that it can effectively spin on it center without having a lop-siding. It also goes through a simple obstacle course with predictable movements.
How the LM629 works internally
The LM629 is a microcontroller peripheral that incorporates all the functions of a sample-data motion control system in a single device. Using the LM629 makes the complex task of designing a fast and precise motion control system much easier. The LM629 implements a position decoder, a summing junction, a digital PID loop compensation filter and a trajectory profile generator. The LM629 provides a 7-bit PWM signal plus a sign bit, providing a sign-magnitude output port. In operation, a host microcontroller downloads the acceleration, velocity and target position values to the trajectory generator. At each sample interval these values are used to calculate new demand or “set point” positions which are fed into the summing junction. Actual position of the motor is determined from the output signals of an optical incremental encoder. The internal decoder sends the actual position to the other input of the summing junction and subtracts from the “demand” position to form the error signal input for the control loop compensator which is a PID filter.”