- #1
Jarfi
- 384
- 12
I've been using DC motors with magnetic hall effect encoders on them to measure position control. It's basically a feedback servomotor system.
i've so far been feeding the signal into my microcontroller's interrupts. This has been causing some problems with my timers and program. Let's say the motor is going at 600RPM, that becomes 10 revolutions per second. Now if my accuracy is 600CPR, I will have around 6000 interrupts per second which is not exactly ideal as it disturbs my other processes.
I want to offload this to a simple counter. I know this exists but is it generally used or practical? I am thinking about a simple IC where the signals are taken and incremented at very high speeds, so I don't need to worry about interrupts or my microcontroller's speed. The output would then be a simple PWM encoding of my "count" that I can then convert into radians or degrees.
What is this kind of counter called, and is it generally used or a good idea? Or should I stick with making my microcontroller do the counting through interrupt. In the external counter method the microcontroller would only read the angle from the counter when it needs to through a digital input.
What I am looking for is mainly angular position, not angular velocity.
Thanks in advance
-Jarfi
i've so far been feeding the signal into my microcontroller's interrupts. This has been causing some problems with my timers and program. Let's say the motor is going at 600RPM, that becomes 10 revolutions per second. Now if my accuracy is 600CPR, I will have around 6000 interrupts per second which is not exactly ideal as it disturbs my other processes.
I want to offload this to a simple counter. I know this exists but is it generally used or practical? I am thinking about a simple IC where the signals are taken and incremented at very high speeds, so I don't need to worry about interrupts or my microcontroller's speed. The output would then be a simple PWM encoding of my "count" that I can then convert into radians or degrees.
What is this kind of counter called, and is it generally used or a good idea? Or should I stick with making my microcontroller do the counting through interrupt. In the external counter method the microcontroller would only read the angle from the counter when it needs to through a digital input.
What I am looking for is mainly angular position, not angular velocity.
Thanks in advance
-Jarfi