controlling velocity

Status
Not open for further replies.

zika1212

New Member
how can i control velocity of a motor (servo motor) using 16f876 when i have an analog input to select velocity and tachometer to measure the feedback velocity ?
 
I would imagine velocity would be achived via current or voltage control? As a PIC can only do logic operations per port (0-5v) I imagine you'll need to run your PWM signal through a DAC and have that in turn through a power FET/H-Bridge....
 
zika1212 said:
how can i control velocity of a motor (servo motor) using 16f876 when i have an analog input to select velocity and tachometer to measure the feedback velocity ?

You enable two channels of the A/D converter to alternately sample the tachometer and the voltage input. Use a PID based algorithm to control the PWM output which in turn controls a driver circuit.

There is an application note in the microchip's website which describes servo control of a brushed DC motor. Although it is designed for position control, I think it can be easily converted to velocity control. It is for the PIC17C42 however.

https://www.electro-tech-online.com/custompdfs/2004/05/00532c.pdf
 
Tachometer's pulses, so there is probably no reason to use the A/D converter. Just use it on the CCP input or external interrupt. The response will not be delayed by RC filter lag and will not be affected by varying voltage levels on the tach signal.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…