Projects › Projects › USING OF PWM TECHNIQUE TO CONTROL SPEED OF A MOTOR ,WHEN LPC2148 MICROCONTROLLER IS USED › Hi Abiram,That’s a very good
That’s a very good question !
Frequency is nothing but 1/ PERIOD or 1/(Ton + Toff) which will be a constant value.
The frequency or the time period (inverse of frequency) for a PWM is decided based on where we are going to apply it. For example very high frequency PWM are used in audio output circuits, medium frequency are used in light intensity control circuits and low frequency are used for motor control circuits.
A motor has a property called inertia of rotation and due to that the motor continue rotating even at the Toff period of a PWM wave. If the Toff is too large then the motor will come to a stop at Toff period. Similarly the Ton should be long enough for the motor to escape from the inertia of non rotation initially and start rotating. All these depends on the motor that you use.
I suggest to keep the Ton and Toff in milliseonds range for the motor. For that you have to use the low frequency oscillator in the controller only.
How to configure the controller, please go through the datasheet or you can find lot of sample codes from the internet.