Friday, July 23, 2010

DC Motor Control with Microcontroller ATmega8535

At mega 8535 microcontroller can use control dc motor that is on pin d where there have PWM control. DC motor can rotate because of the induction when the motor is connected to the DC voltage source. DC motor control with microcontroller if it is done more easily than without the microcontroller. We can change the direction of rotation of DC motor directly by changing the polarity of the voltage source. To change the speed of DC motors can be done by changing the size of a fox-voltage source. Control with a microcontroller as well as principled, but with an automated system. We do not have to change the cable from the motor to the battery if you want to change the direction of rotation, we just provide the logic 0 or 1 to the microcontroller is performed on the program in the microcontroller. To change the velocity is also easier because we simply use the existing PWM feature on the microcontroller. Maybe there are still many who do not know what PWM

PWM (Pulse Width Modulation) is a technique to get the effect of the analog signal from a digital signal to falter. PWM can be generated using only digital i / o which functioned as an output.

In the example above the waves, the comparison between high signal (1) and low signal (0th) is the same. Above the wave is said to have 50% duty cycle. Duty cycle is the ratio between the width of high signal (1) the overall width of the cycle (cycle). If the PWM wave amplitude is 5 volts, then the average stress (as if to analog) that we get is 2.5 volts. Here's an example of wave PWM with duty cycle 10%, if the amplitude of wave 5 volts then we will get the average analog voltage 0.5 volts.



In  ATMEGA8535 have two way control PWM, the PWM can be generated from the first port input / output is enabled as output. The second is to utilize the facilities of the function of the PWM timer / counter which has been provided. With this facility, the timing of the process of high / low digital signal will not disrupt the sequence of other programs being executed by the processor. In addition, by using this facility to enter how many servings we lived on and off time period on a wave PWM registers. OCR1A, OCR1B and OCR2 is register a place set PWM duty cycle.

No comments:

Post a Comment