ChArLyZzZ
New Member
Hey guys
I'm connecting a DC motor to the CCP1 (PWM mode) and measring the RPM with a slotted wheel using a photo interrupter which is feedback to CCP2 (capture mode).
The math functions that i'm using work correctly and on a full speed the measured RPM matches the one given in the datasheet of the motor..
The problem is when i reduce the duty cycle of the motor, the measure RPM doesnt decrease,instead it increases a little bit!!!
I've found somewhere on the net that i cant connect a motor with a photo interrupter on the same PIC because of voltage supply disruption due to the fast switching of the PWM!
does anyone guys have an idea or build the same circuit before??
I really appreciate ur help
I'm connecting a DC motor to the CCP1 (PWM mode) and measring the RPM with a slotted wheel using a photo interrupter which is feedback to CCP2 (capture mode).
The math functions that i'm using work correctly and on a full speed the measured RPM matches the one given in the datasheet of the motor..
The problem is when i reduce the duty cycle of the motor, the measure RPM doesnt decrease,instead it increases a little bit!!!
I've found somewhere on the net that i cant connect a motor with a photo interrupter on the same PIC because of voltage supply disruption due to the fast switching of the PWM!
does anyone guys have an idea or build the same circuit before??
I really appreciate ur help