Magnetic encoder signal processing

Click For Summary
SUMMARY

The discussion focuses on optimizing position control in DC motors using magnetic hall effect encoders. The user, Jarfi, experiences performance issues due to excessive interrupts generated by the encoder signals at high RPMs. A solution proposed involves using a dedicated counter IC, such as the CD4060 or a dual 16-bit counter, to offload counting from the microcontroller, thereby improving system efficiency. The conversation emphasizes the practicality of external counters for handling high-speed signals while allowing the microcontroller to focus on other tasks.

PREREQUISITES
  • Understanding of DC motors and feedback servomotor systems
  • Familiarity with magnetic hall effect encoders
  • Knowledge of microcontroller interrupt handling
  • Basic concepts of PWM encoding and angular position measurement
NEXT STEPS
  • Research the CD4060 counter IC and its applications in signal processing
  • Explore dual 16-bit counter ICs and their specifications
  • Learn about hardware counters in microcontrollers and their configurations
  • Investigate quadrature encoders and their advantages in bi-directional feedback systems
USEFUL FOR

Engineers and hobbyists working with DC motors, embedded systems developers, and anyone interested in optimizing signal processing for position control applications.

Jarfi
Messages
384
Reaction score
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
 
Engineering news on Phys.org
Are the motor and its feedback pulses bi-directional? If bi-directional, what is the difference in the feedback for the two different directions of rotation? Are you using a quadrature encoder?

In any case, you might consider just using a 4060 counter IC, and only generate interrupts for one of the upper bit outputs. You could still bring all of the counter outputs into your uC so you can read the position if you want to, but this would offload the interrupts to some 2^x multiple that you choose when you pick one of the outputs for your interrupt input...

http://www.ti.com/lit/ds/symlink/cd4060b.pdf
 
  • Like
Likes   Reactions: Asymptotic
Many microcontrollers have hardware counters built-in to count incoming pulses and even interrupt on overflow/underflow. If the microcontroller you are presently using doesn't have this feature, perhaps consider changing to one that does.

Or here is a datasheet for a dual 16 bit counter: http://www.ti.com/lit/ds/symlink/sn74lv8154.pdf

There are many suppliers for counter ICs from 4 to 64 bits.
Try a Google search for: x bit counter IC; where 'x' is the number of bits you want.

Cheers,
Tom
 
  • Like
Likes   Reactions: berkeman

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
13K
Replies
9
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
7
Views
12K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K