14.11.2012 Views

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.7. Hardware Architecture 35<br />

The simplest case is a switch to connect a motor to a power source, such<br />

as in small appliances or power tools. The switch may be manually operated<br />

or may be a relay or conductor connected to some form <strong>of</strong> sensor to automatically<br />

start and stop <strong>the</strong> motor. The switch may have several positions<br />

to select different connections <strong>of</strong> <strong>the</strong> motor. This may allow reduced-voltage<br />

starting<strong>of</strong> <strong>the</strong>motor, reversingcontrol or selection <strong>of</strong> multiplespeeds. Overload<br />

and over-current protection may be omitted in very small motor controllers,<br />

which rely on <strong>the</strong> supplying circuit to have over-current protection.<br />

Figure 3.15: Structure <strong>of</strong> an H bridge (highlighted in red)<br />

The DC motors cannot be controlled directly from <strong>the</strong> output pins <strong>of</strong><br />

<strong>the</strong> microcontroller. We need <strong>the</strong> circuit so called ’motor controller’, ’motor<br />

driver’ or an ’H-Bridge’. The term H-Bridge is derived from <strong>the</strong> typical<br />

graphical representation <strong>of</strong> such a circuit. An H-Bridge (Figure 3.15) is<br />

built with four switches (solid-state or mechanical). When <strong>the</strong> switches S1<br />

and S4 are closed (and S2 and S3 are open) a positive voltage will be applied<br />

across <strong>the</strong> motor. By opening S1 and S4 switches and closing S2 and<br />

S3switches, this voltage is reversed, allowing reverse operation <strong>of</strong> <strong>the</strong> motor.<br />

To drive motors we used a PWM signal and vary <strong>the</strong> duty cycle to act<br />

as a throttle: 100% duty cycle = full speed, 0% duty cycle = coast, 50%<br />

duty cycle = half speed etc. After some testing we optimized <strong>the</strong> percentage<br />

<strong>of</strong> <strong>the</strong> duty cycle in order achieve a better performance. This optimization<br />

will be mentioned later in Control Chapter.<br />

For <strong>the</strong> motor control, we started by using <strong>the</strong> H-Bridge motor control<br />

circuits provided by our sponsor. The initial tests have been performed by<br />

implementing <strong>the</strong> correct PWM waves using <strong>the</strong>se boards. Later, we real-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!