Académique Documents
Professionnel Documents
Culture Documents
Drawback of using Pulse Width Modulation (PWM) in controlling the speed of DC motor
1)The microcontroller comes with the PWM circuitry embedded in the chip, we have to do is load the proper registers with the values of the high and low portions of the desired pulse.
2)For microcontroller without PWM circuitry, we must create the various duty cycle pulses using software.
3
H-Bridge Circuit
-Widely used to control the rotation of DC motor
-Most of the switches in H-Bridge circuit are designed using BJT or FET switches
- We just focus on DC motor control with ECCP
-PIC18 comes with one standard Compare Capture PWM (CCP) and one Enhance CCP (ECCP) -ECCP allows the implementation of the H-Bridge for bi-directional control of the DC motor. -It uses 4 pins (P1A, P1B, P1C, P1D; (RD4-RD7) as shown in Figure below.
DC Motor
Duty Cycle
(ECCPR1L) Pg 586
;PERIOD
;DUTY CYCLE ;REVERSE FULL BRIDGE ;TURN ON TIMER ;START PULSE ;CLEAR FLAG ;WAIT FOR PERIOD ;DO IT AGAIN
8