Need help with PWM + PID project

Thread Starter

usef88

Joined Jul 30, 2008
1
hi
i am trying to drive a DC motor via a PWM. the system consists of 2 PCBs: one for the PWM and and another for the PID

the PWM i have made is done using a microchip (16f877), 2 buttons, an LCD screen (16x2) and another input for the motor encoder.

-the 2 buttons are used to increase and decrease the speed/duty cycle of the PWM.

-the encoder input is used to read and calculate the RPM of the motor

-the LCD screen is to display the RPM


the PWM part works fine but i am having trouble with the PID.. i used Matlab to get the PID gains and they are as follows:
Kp= 0.408
Ki= 0.612
Kd= 0.204

how do i implement those gains physically as in what capacitor and resistor values to use (i know how to implement Kp its stright forward)..
PLEASE HLEP..

for those who are interested in commenting here is the block diagram:

PWM----->subtractor----->PID----->Motor
..................|_ _ _ _ _encoder_ _ _ _ _|


thank you
 
Top