← Back to context

Comment by Animats

5 days ago

That's a unusual servo. Servos usually have a small optical encoder that emits quadrature pulses as it rotates. That's immune to magnetic interference but can potentially miss counts. This servo seems to have an magnetic analog position sensor. Something like this.[1] Can't miss counts but has less noise immunity.

[1] https://www.analog.com/en/products/adaf1080.html

Our nomenclature for servos in machine controls is a little different, for example a traditional 3phase servo with a 3phase hall sensor is still called "servo" even if it doesn't have an optical encoder. With this setup you can commutate the motor and get smooth motion and variable speed control but not precise position control. We then add on a optical shaft encoder or a optical linear encoder for position control.

In the video he has what looks like a magnetic absolute encoder, I have honestly never seen that in industrial applications although I have seen "absolute" optical encoders that have a backup battery to store the home point, kind of weird imo.

I was surprised when I first encountered servos with just magnetic hall effect sensors but there are actually lots of applications where you want speed control but not accurate position control.

  • Absolute encoders can be really good for position critical applications that you don't want to re-home all the time. Linear stages, winches - if you don't want to re home it and it needs accurate position control you start looking at an absolute encoder.

    Even for speed control, hall effect sensors are kind of a poor way to track position. What is nice about hall effect sensors is that you can use them as a signal to perform brushless commutation in your motor controller, and then also use them as a poor-man's encoder. Very useful if you don't need that much accuracy in your application, but you do need brushless motors for some reason. But one of the first things I would go to as a application engineer was recommend customers get an encoder mounted.

    • It seems like an absolute encoder would immediately lose its advantages if a reduction gear were used though? Then you would still need to rehome the number of revolutions.

      3 replies →

    • Yeah, we have one application like that, a big gantry that would be a pain to home. Interestingly, the high res absolute encoder is also used to commutate the servo (it's sine) but the teaching of the commutation is a little nerve wracking. Maybe I'm getting old but the whole setup stresses me out

Not at all unusual. They are called resolvers which are rotary transformers which output a sine and cosine signal. You input an AC sine wave and compare the phase offsets of the outputs to determine the rotor angle. Another type is called the Inductosyn which uses a flat coil. My Beckhoff 500W 400V brush-less servos have them as do older brushed Electrocraft servos in a CNC machine at work. https://en.wikipedia.org/wiki/Resolver_(electrical)

Quadrature encoders don't skip counts unless your output is single ended and your wiring is poor leading to interference of the signal. PWM drives tend to make a lot of noise and single ended encoders will see lots of problems unless you take great care. I always use differential signal encoders in our machines here at work. They use an RS485 driver to achieve this in the encoder itself. Aerotech, the main vendor we use for motion control, uses differential signal by default. Never had positioning or counting problems unless the encoder was physically damaged.

  • > They are called resolvers which are rotary transformers which output a sine and cosine signal. You input an AC sine wave and compare the phase offsets of the outputs to determine the rotor angle.

    Right. Syncro resolvers are the classic way to do it. Modern versions use a permanent magnet and two Hall-effect sensors.

    • How accurate can you get with Hall-effect sensors? Back in the day when I was in the field (30-40 years ago), we used to get 20 bits of resolution out of a course+fine rotary inductosyn pair.

I once saw a servo with two smooth optical encoders. A disc, each side is white with a black off-center ellipse on it. Each side lit with a LED through a narrow slit, with a photo diode measuring the reflected brightness.

Each angle has its value of the optical signal, down to the ellipse's symmetry. Two ellipses, painted at an angle between their axes, give a unique pair for each angle, even amenable to interpolation.

This must be quite resistant to both electromagnetic interference and to fast / jiggy rotation. It's more bulky though, and likely requires calibration.

If you want precise movement, I always recommend an external encoder, even if the motor itself already has one. You probably use some form of transmission and there is always some transmission tolerance.

Also a good engineering rule is to have your stepper provide double the maximum torque than you need by specification, especially if you use partial steps.

Common dc motors don't need as much tolerance, but it doesn't hurt anyway.

Also, you still need to debounce signals from optical encoders because of the inteference you mentioned, even if your physicist tells you that optical encoders cannot bounce.

To read encoders try to use timer interrupts instead of pin change interrupts. A bit unintuitive for software developers, but polling is safer because you have specified maximal speed and your µC program isn't disabled from magnetic interference as well. There are specialized µC for quadrature encoders, but you usually do not need them if you don't have high speed applications.

A proper optical encoders doesn't miss counts. The only time you'll lose positioning is if you lose power. Then you re-home the system to establish your zero.