Magnetic encoder signal processing

In summary, Jarfi is looking for a method to offload the interrupts from his microcontroller to a counter that he can read without disturbing other programs. He is also looking for a counter with 16 bits.
  • #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
 
Engineering news on Phys.org
  • #2
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 Asymptotic
  • #3
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 berkeman

1. What is a magnetic encoder signal?

A magnetic encoder signal is a type of digital signal that is generated by a magnetic encoder. It contains information about the position, speed, and direction of a rotating object.

2. How does a magnetic encoder work?

A magnetic encoder consists of a rotating disk or strip that contains a series of magnets, and a sensor that detects changes in the magnetic field as the disk rotates. The sensor converts these changes into electrical signals, which are then processed to determine the position and movement of the object.

3. What is the purpose of signal processing in magnetic encoders?

Signal processing in magnetic encoders is necessary to filter and interpret the raw electrical signals from the sensor. This allows for accurate measurement of the object's position, speed, and direction, and also removes any noise or interference that may affect the signal.

4. What are some common methods used in magnetic encoder signal processing?

Some common methods used in magnetic encoder signal processing include digital filtering, interpolation, and error correction algorithms. These methods help to improve the accuracy and reliability of the signal, and also compensate for any errors or disturbances.

5. What are the applications of magnetic encoder signal processing?

Magnetic encoder signal processing is used in various industries and applications, such as robotics, automotive, aerospace, and manufacturing. It is essential for precise control and positioning of machines and equipment, and also for monitoring and analyzing the performance of rotating components.

Similar threads

  • General Engineering
Replies
3
Views
2K
  • Electrical Engineering
Replies
7
Views
1K
Replies
14
Views
1K
  • Electrical Engineering
Replies
3
Views
1K
  • Electrical Engineering
Replies
4
Views
11K
  • Electrical Engineering
Replies
2
Views
3K
  • Astronomy and Astrophysics
Replies
6
Views
2K
Replies
7
Views
11K
  • Programming and Computer Science
Replies
2
Views
2K
Replies
9
Views
2K
Back
Top