powerful techniques used in control systems It is used in wide range of application speed control, power control, measurement and communication
Basic Principle of PWM
Pulse width modulation is basically a
square wave with a varying high and low time
Definitions
On-Time: Duration of time for which
o/p signal is high Off-Time: Duration of time for which o/p signal is low Period: It is represented as the sum of on-time and off-time of PWM signal Duty cycle: It is represented as percentage of time signal remains on during the period of the PWM signal
Period of signal Ttotal = Ton + Toff
Duty Cycle =
PWM implementation using timers
switching port pin high/low at defined
intervals width of square wave varied but keeping same time period of the square wave.
A DC motor used for irrigation purposes is controlled by two
switches. Design a circuit to control the duty cycle of the motor Switch 1 Switch 2 Duty cycle 0 0 25% 0 1 50% 1 0 90% 1 1 10% With neat block diagram and embedded C program, explain its operation
void MSDelay(unsigned int itime)
{ unsigned int i,j; for (i=0;i<itime;i++) for (j=0;j<1275;j++); }