Project Overview
The following is a high-level block diagram showing the data path through the system.
Joystick Input Controller
These circuits were connected to the joystick to allow the microcontroller to read steering and speed input from it. The potentiometers R3 and R4 are part of the joystick and change values as the stick is moved around. The current mirrors maintain a constant current flow through the potentiometers so the ADCs can digitize the potential across them in a linear fashion.
Steering Control
The steering is controlled by a servo that is powered off the main battery and is controlled through pulse width modulation. The microcontroller pulses the servo about 60 times per second. Pulses that are on for 1 ms turn the wheels all the way left, and pulses for 2 ms turn the wheels all the way right.
Speed Control
The Speed control circuit is basically a large push-pull amplifier that can be driven off the port pins of the microcontroller, but can drive enough current to power the motor. The logic gates at the head of the circuit ensure that only one side of the push-pull configuration is active at a time. This protects the circuit from programmer error and from conflicting signals from the microcontroller. The power BJTs are controlled by a combination of the smaller transistors and the current limiting resistors. The diodes across the power BJTs protect them from back EMF when the motor is turned off.