Johnyc
Newbie level 2
how to write algorithm
Hi everyone,
Im facing a problem in developing a algorithm for a sensor absolute encoder that need to count the number of rotation for example 5 rotation or 4.5 rotation (1 full rotation = 360degree)
The characteristic of the absolute encoder is, the change of degree in rotation will also changing the duty cycle width of the PWM ( eg. large angle of rotation will gives larger duty cycle width) which is output by the sensor. The data sheet for this sensor is found https://www.usdigital.com/products/ma3/
i want to develop an algorithm for detecting the number of rotation of the motor that need to be turned to the desired position. the mircocontroller for this system is PIC 16F876. my application is that the motor will need to turn more than 1 full rotation sometimes to achieve the desired position.
Im using CCS C compiler to write program in PIC,
so what is the algorithm that can be write in C to detect such an application?
can anyone give me an idea and solution?
thanks
Hi everyone,
Im facing a problem in developing a algorithm for a sensor absolute encoder that need to count the number of rotation for example 5 rotation or 4.5 rotation (1 full rotation = 360degree)
The characteristic of the absolute encoder is, the change of degree in rotation will also changing the duty cycle width of the PWM ( eg. large angle of rotation will gives larger duty cycle width) which is output by the sensor. The data sheet for this sensor is found https://www.usdigital.com/products/ma3/
i want to develop an algorithm for detecting the number of rotation of the motor that need to be turned to the desired position. the mircocontroller for this system is PIC 16F876. my application is that the motor will need to turn more than 1 full rotation sometimes to achieve the desired position.
Im using CCS C compiler to write program in PIC,
so what is the algorithm that can be write in C to detect such an application?
can anyone give me an idea and solution?
thanks