Pic 18F4431 at 40MHz (10MHz xtal x 4 PLL)
Main loop + TMR1 interrupt at 10KHz for QEI module with in interrupt counter for divide 10KHz / 10 to make 1KHz servo operate frequency.
MANY THANKS to Mr. HENRIK for incPID and to many others from these Forum for god advice how to...
All work as I expect but with one problem what I can't find from where it come.
Irrespective which speed is of motor movement I have some erratic clip of motor in not constant period - from time to time lik "ping ,ping ping" and motor stress a couple steps +/- and go to next stress which come after unknown period. Sometime is couple stress one after one but sometime only one and so on.
I was look at scope and I cant find any anomaly in signals.
The output stage is identical HP UHU with IRF540N and motor is 30V "duncanmotor with gear 6.25:1 with optical encoder RE30-2-500".
I read it in 4X mode and drive 20KHz PWM from pic on CCP1 for Locked-Antiphase.
Any idea or help please.
The best regards
/Robert
Original HP UHU:
UHU SERVO