| MOTOR CONTROL SYSTEM
The motor control system is based around a PIC controller. I decided to design one rather than buy one since I wanted the following extra features:
- A high current output - that could be increased if needed.... it was.... up to 30A!!
- Switchable between manual control from the internal joystick and the RC receiver
- The option for an Emergency stop should sensors be included in the bumper later on
So it took a couple of attempts, first an analogue version from op-amps, it worked a treat but was unflexible. Then a PIC version that could be tailored and adjusted at will - it seemed the obvious choice.
There were 4 motors to control initially. They were allocated to the joysticks as follows:
Left Joystick:
x - axis = Rotate the head
y - axis = Left motor control
Right Joystick:
x - axis = Raise/lower Eyestalk
y - axis = Right motor control
The power drivers for the head and eyestalk use an H-bridge driver whereas the main motors have relays to reverse the direction. This was because of the large current required for the main motors a full H-bridge would have been large.
The main function of the controller is to convert pulse widths from 1 to 2 ms into PWM control from 0 to 100% ratio in 2 directions. Below are the ranges of speeds against pulse width time.
|