AnsweredAssumed Answered

Problem with ADC Timer Trigger.

Question asked by Mor.Keyshav on Jan 2, 2017

I am trying to get the rate of change of value of the potentiometer using ADC with a timer trigger. So far I have failed. I am trying to measure the change in value of ADC with the Timer trigger of every 100 micro second. so if the value changes in 100 micro second, the (dADC/dT) will be equal to say [(Change in ADC Value)/100 micro seconds]. I am not able to wrap my head around as to how to achieve it . Can anyone please explain to me what to do? I am using CubeMx for STM32F103RBT6. 

 

The purpose of the project is simple.The motor should rotate in closed loop control, depending on the value of the potentiometer. It should rotate at a speed proportional to the rate of change of potentiometer value .Also the motor will be sending current RPM through the TIMER encoder mode. That will help compute the error and decide the proportional increase or decrease in speed. So can anyone suggest me a better method to measure the rate of change of ADC value or any method to bypass this requirement ?

Outcomes