Sunday, June 22, 2008

DC motor control

A single pin of the 16F84 PIC microcontroller is limited to a maximum output
current of 25 mA. In most cases, this is too feeble a current to power a dc
motor directly. Instead, we use the output of a PIC pin to turn on and off a
transistor that can easily control the current needed to run hobby motors. The
two methods we use incorporate transistors to switch current on and off. The Transistor The transistor of choice ulled in most of these examples is a TlP120 NPN transistor. The TIP120 is a Darlington transistor, medium power, 5-A maximum current, and designed for general-purpose amplification and low-speed switching. The PNP version of this transistor is the TIP125. First Method This is a simple on-off motor switch (see Fig. 11.1). When the PIC pin is brought high, the transistor goes into conduction, thereby turning on the dc motor. The diode across the collector-emitter junction of the transistor protects the transistor from any inductive voltage surge caused by switching the motor off. For added PIC protection, insert a signal diode and current-limiting resistor on the output pin. ' program dc motor pause 1000 ' wait one second high 0 ' turn on dc motor pause 1000 ' wait one second low 0 ' turn off dc motor end In the circuit, notice the 1500-u.F(micro Faraday) capacitor. A large capacitor is needed to smooth the voltage dips caused by the dc motor's turning on and off. Without a large capacitor, the sudden dip in voltage may inadvertently reset the PIC microcontroller. Bidirectional Method
An H-bridge allows bidirectional control of a dc motor. Th achieve this, it uses
four transistors . Consider each transistor as a simple on-off
switch, as shown in the top portion of the drawing. This circuit is called an Hbridge
because the transistors (switches) are arranged in an H pattern.

No comments: