Building A Robot: Motor Control

Project Info
Author: Chris
Difficulty: Medium-Difficult
Time Invested: 4 Hours

Take a look at the above
tutorials before continuing
to read this tutorial.
           Since we now have a beautiful robotic chassis, we're ready to continue our Building A Robot series, and get serious with some motor control. This second part of building a robot is perhaps the most crucial as it will define what type of control we will have over the motors. Ideally, we want a simple method for controlling the motors so that our software is free to do other things.
           In this article we will move forward with the Building A Robot series by adding the electronics necessary to control the speed and direction of both motors on the robotic chassis, which we developed in the previous article, Part 1: The Chassis. The two main additions in this portion of the project are a microcontroller and a motor controller IC.

Building A Robot: Motor Control - Demonstration

Building A Robot: Motor Control - Setup

Purpose & Overview of this tutorial
           The goal of this part of the project is to build up firmware for a microcontroller that can tell a motor controller IC to move the motors at specific speeds and directions. To verify that we have good control over the system, our core goal for this part is to make the robot be able to move forward, turn around and then continue back, then turn around and move forward...over and over. If we can build a program for the microcontroller that makes the robotics platform do that, our goal will be reached for this part.
           The microcontroller that we will use for this part of the Building A Robot series is the PIC 18F252 8-bit microcontroller. It is manufactured by microchip, and most of my tutorials/projects on this website use the PIC. The motor controller IC that we will use is the same as some other tutorials, the SN754410NE Quadruple Half-H Driver.