DC motor control using the PWM counters of AVR ATmega8 microcontroller. I had used a DC motor from an old personal stereo cassette player. The circuit provides speed and direction control of the motor. The PWM waveforms are used for driving the MOSFET H-bridge as shown in the schematic:
At a time only one of the two PWM channel is active, driving only two MOSFETS (either Q1-Q4 or Q3-Q2). Other two MOSFETs remain OFF. Whenever the Direction Control switch is toggled, the PWM channel is also changed, driving the alternative pair of MOSFET, which changes the direction of current flow through motor, resulting in the direction change in rotation of motor shaft.
No comments:
Post a Comment