MICROCONTROLLER -BASED DC MOTOR SPEED CONTROLLER
ELECTRICAL DRIVES PROJECT REPORT on.docx (Size: 414.75 KB / Downloads: 259)
DC motor speed controllers are very useful for controlling the motion of robotic and industrial automation systems. The controller presented here uses the pulse-width modulation (PPWM) technique. The PWM wave for speed control is generated using Atmel AT89C52 microcontroller. To control the speed of the DC motor, you need a variable-voltage DCpower source. When the DC motor isswitched on, it takes certain time toreach the full speed. As soon as the power supply is switched on, the DCmotor starts gaining speed and if you switch off the power supply before itreaches the maximum rated speed, itstarts to slow down.
IC1 -7806, 6V regulator
IC2 -AT89C51 microcontroller
T1 -TIP122 pnp transistor
D1-D6 -1N4007 rectifier diode
LED1 -5mm light-emitting diode
Resistors (all ¼-watt, 5% carbon):
C1 -1000 µF, 5V electrolytic
C2, 3 -0.1µF ceramic disk
C4, 5 -22pF ceramic disk
C6 -10 µF, 6V electrolytic
X1 -230V C primary to V,
500mA secondary transformer
S1-SS3 -Push-to-on switch
S4 -On/off switch
X TAL -12MHz crystal
-6V C motor
Connector for power supply
Fig. 1 shows the circuit of the DC mo-tor speed controller. 230V AC mains is stepped down by transformer X1 to deliver secondary output of 9V, 500 mA. The secondary output is rectified by a full-wave bridge rectifier comprising diodes D1 through D4,filtered by capacitor C1 and regulated by IC 7806 Capacitor C2 bypasses any ripple present in the regulated output. LED1 acts as the power- ‘on’ indicator. Resistor R1 limits the current passing through LED1.Diode D5 causes a voltage drop of 0.6V and, as a result, the final output of the circuit is approx.44V.
IC AT89C51 is a low-power, high-performance, 8-bit microcontroller with 8 kB of Flash programmable and eras-able read-only memory
(EPEROM),256 bytes of RAM,32 input/output (I/O)lines, three 16-bit timers/counters, a six-vector two-level interrupt architecture, a full-duplex serial port, on-chip oscillator and clock circuitry.
In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software- selectable power-saving modes. The idle mode stops the CPU while allowing the RAM, timers/counters, serial port
and interrupt system to continue functioning.
The power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next hardware reset is activated.
At the heart of the speed controller system is microcontroller AT89C52
which creates (using timer 0)pulses of varying width for pulse-width modulation and controls the motor speed.
To change the speed of the motor, switches S2 and S3 are interfaced to
interrupt the input to pins P3.22 and P3.33 of IC2,respectively.Whenever any of
switches S2 and S3 is pressed, an interrupt is generated, which changes the duty
cycle of the pulse train. Switch S2 interfaced to Interrupt-0 increases the
duty cycle of the pulse waveform, whereas switch S3 interfaced to Inter-
rupt-11 decreases the duty cycle of the pulse waveform. Power-on reset for
the microcontroller is achieved through capacitor C6 and resistor R2.Switch S1
provides manual reset to the microcontroller. A 12MHz crystal (XX TAL ) is used for basic clock frequency. Port 2 is an 8-bit,bidirectional, input/output (II/O) port with internalpull-ups.Port-2 output buffers can sink/source four TTL inputs.
The software is written such that the duty cycle for PWM is increased in discrete intervals of ‘10 ’.Hence the speed of the DC motor is divided into eleven steps from Port pin P1.11 is internally pulled up. It is used as the output to control the motor with driver transistor T1. Whenever timer-0 overflows, the status of pin P1.1 is complemented and hence a square wave with appropriate duty cycle is generated. This pin is inter-faced to power transistor TIP122 (TT1),, which is fed to drive the motor. When the transistor is driven into saturation, current flows through the motor. When the transistor is cut off,
the motor current keeps flowing be cause of the motor ’s inductance. Diode
D6 connected across the motor coil prevents reverse current flow. A heat-sink
is fed with over transistor T1.