

The hardware was designed to create a robotic car with four individually controlled servo motors using PWM signals and H-bridge circuits. The rotation of each motor was measured with a 2-bit (gray code) rotary encoder. Additionally, the acceleration of the vehicle was measured with a z-axis 1.5g acceleration sensor. A basic schematic of the hardware setup is shown below.
H-Bridge Motor Driver
The H-Bridge circuit allows the microcontroller to run a two-terminal motor without any large noise spikes feeding back into the microcontroller circuitry. When the motor is switched on and off, there is a large change in voltage in a short period of time. Since the motor can be modeled as an inductor, the big change in voltage will cause a huge spike in current, which can destroy the input terminal of the microcontroller. This is prevented by wiring diodes across four MOSFET in the configuration shown below to stop current from flowing when the MOSFET is turned off. These devices have similar properties of a switch because they can limit or amplify the flow of current depending on the voltage across the gate to body terminals.
The H-Bridge came in a 8-pin SOP package with inputs for Vcc, ground, forward pulse width modulation (PWM), and reverse PWM. There were two outputs to wire across the terminals of the motor. Since there were two separate inputs for forward and reverse PWM signals, our design was utilized only the forward PWM signal to control how the vehicle moved in the forward direction.
No comments:
Post a Comment