Sunday, October 17, 2010

DC motor control a AVR ATmega8

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.

2 comments:

  1. Baš si izmislio toplu vodu!

    ReplyDelete
  2. does this ATmega 8 which you have used has a program that is been flashed in it or its working without the coding

    ReplyDelete