Skip to content(if available)orjump to list(if available)

Servo vs. steppers: Speed, Torque and Accuracy [video]

nimish

"Servo" is a control method. You can control steppers using servo methods and it's pretty good actually. There are chinese encoder boards that'll do everything for like $10

YZF

Technically the motor is also called "brushless servo motor". AI says: "A servo is a control system that converts a small mechanical motion into a larger one. It can also be used as a noun to describe a part of a machine that controls a larger machine." which sounds reasonable.

Stepper motors can be controlled with closed loop controllers and an encoder. As I said in some other comment way down the only difference between a stepper motor and a brushless servo is that steppers have more poles. A by the way is you can also "step" a BLDC (i.e. run it in open loop just like a stepper motor).

analog31

This is good to point out, and is a typical problem with terminology, which is that a term picks up popular definitions that differ from the technical ones. I've seen the term "servo motor" applied to little DC motors that have no feedback sensor.

bsder

That's one of the motors that the video covers. And it shows that there are limitations to steppers with servos.

thatcat

interesting observation. i found a reference project detailing how this works below

https://calischs.pages.cba.mit.edu/step/servo-stepper/

stavros

The ones with the magnet? Those are really cool indeed, such a great idea.

Animats

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

zwieback

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.

GabeIsko

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.

aidenn0

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.

zwieback

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

nine_k

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.

YZF

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.

MisterTea

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.

Animats

> 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.

deepspace

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.

ge96

I'm gonna experiment with adding hall effect sensors to a standard servo to make a cheap feedback mechanism since those are pretty cheap nowadays seems like. Steppers still have a place but for hobby stuff with basic "what pos is it" this could be something I use a lot.

Animats

A "standard servo" of R/C toy type does have feedback. It just doesn't come out the standard 3-wire interface. Robotics hobbyists have been fighting this for decades.[1] There are "digital servos" for R/C, but they have the same 3-wire interface. They just have better motor drive circuitry. Dynamixel [2] has been selling R/C type servos with a digital interface for years, but they are somewhat overpriced. It's a tiny product niche.

Rod Brooks' original insect robots used R/C servos where someone had wired in an extra wire to extract the analog error signal. This provided force feedback. So that's quite possible.

The general problem with servomotors for hobbyist use is price. Note that the OP was given those motors as an influencer. Industrial motors with encoders are expensive, and controllers are worse. Some years ago I was talking to a Maxon rep at a trade show. They'd just introduced their own controllers. He told me that the motor and the controller cost about the same to make, but the controller people were getting 90% of the profit because controllers had become cheap to make. So they built a controller to improve their margins.

[1] https://github.com/SUSF-Robotics-and-Software/OpenServo

[2] https://www.robotis.us/dynamixel/

gertlex

FWIW (having used Dynamixels for 13+ years for hobby stuff), there are cheaper alternatives with tradeoffs now, too. Though I've only played with e.g. AX-12-sized ones (specifically HiWonder HX-35HM sitting on my desk from early last year)

There's so much to do in robotics, that you won't catch me going back and modifying RC servos, ever. I'll do hard things elsewhere! (And I don't even do autonomous hobby robots...)

Animats

Ah. Now, Dynamixel-type servos with a "China price".

Order now, before tariffs go up.

ge96

those prices look good

ge96

I have tried that one time to tap into the potentiometer (not sure if that's what you're talking about with hobby servos).

Eventually you do want to fork out money for more expensive servos as those cheap 9g blue ones don't cut it, start to get hot/melt when used in a more serious robot application. Granted at that time I was using one cell so maybe that was more current. At any rate when I switched from $2 to $10 servos (especially metal gear) it was noticeable. The price matters when your robot has 12 or 18 of these servos on it.

Thanks for the links, as my robotic projects get more serious I do want positional feedback, term I picked up from a fun book "proprioception"

YZF

You can also use the motor itself for feedback. It's called "sensorless bldc". With the right controller you can run a closed loop servo with no sensor.

zokier

If you are going to add your own sensors and feedback, then isn't using a servo kinda pointless, might as well go with plain dumb motor? I thought the whole point of servo is to have sensor+feedback+motor in a integrated package

ge96

It depends on the use case, I was curious on price. It is geometrically limited too, with regard to how to mount the magnet to the servo horn (vs. taking the body apart). I just like how you can use that tech, I've seen someone make a USB joystick with a magnet/hall effect sensor to use as a 3D mouse for example. Also have seen people taking hs and using them as rotary encoders on BLDC motors.

edit: I probably should have watched this video before my initial comment, servo I thought RC servo not these big ones. Even so the bigger one would be easier to work on than a smaller hobby one.

riiii

Published 1h ago and already on HN. Not surprised, Matthias Wandel is always worth a watch!

fotta

His breadth of knowledge constantly amazes me

LeifCarrotson

Eh, as a controls engineer, I get a bit of Gell-Mann amnesia watching his content on drives and motors. There's a complete lack of tuning described in the video, it seems a lot of his performance complaints are due to conservative out-of-the box defaults.

The stuff he builds very cheaply with little more than some wood, Python, and Raspberry Pis is impressive, and he deserves all the kudos for building cool shit and putting it on the Internet (I'm just a consumer and critic, not a creator in comparison). But serial control from an interpreted script instead of CAN/Ethercat messaging from a motion controller or PLC is not the way these products are typically used in industry, and most people don't run the defaults.

There's definitely a niche for hobbyist-grade, student-grade, or lab-grade motion products that name brands like Beckhoff, Omron, Fanuc, Rockwell, and Siemens largely ignore. You could get 4 axes from DMM for the price of 1 from most of those vendors. And while simple serial commands can make interesting things happen with the DMM unit, you'd have to scale a daunting cliff of a learning curve just to get a motion axis initialized in their massive, standardized, proprietary, legacy ecosystems.

Again, no disrespect intended: I've invested thousands of hours into building custom, multi-million-dollar machine tools at my day job and instead of challenging myself, going to the workshop and turning on a camera when I get home, I've vegetated on the couch, entertained, and sometimes educated by his content building a milling machine or lathe out of wood. But this "servos vs. steppers" debate really only applies to low-cost, simple, hobbyist-grade equipment, and isn't such a big topic in the industrial space.

bluGill

> I've invested thousands of hours into building custom, multi-million-dollar machine tools at my day job

One key is find a hobby that is enough different from your day job you are not burned out of doing it. I can write code at home and sometimes I do - but most of the time I'm burned out after doing that for my day job. However I can still bend the sides of a ukulele, use CAD to design a new switch housing for some manual machine, practice trumpet, or other such tasks that are not related to my day job. I personally am not interested in editing a video (which takes a lot of time to do well) so you won't see me on youtube, that too is something I could do if I was interested in it.

Though with kids often all I have time for is cooking a meal before getting them to bed and then I'm off to bed myself. I wouldn't trade it for the world, but there is limited time and so there are a lot of things I want to do that I don't have time to do.

cortesoft

> But this "servos vs. steppers" debate really only applies to low-cost, simple, hobbyist-grade equipment, and isn't such a big topic in the industrial space.

I assume these videos are targeted at hobbyists… I can’t imagine people in your position using him as a source of knowledge.

fotta

Sure this criticism is totally fair, and I suspected as much (as a non controls engineer), but that's also why I said breadth and not depth :)

HeyLaughingBoy

Yeah. The first (and only, so far) time I came up against a servo controller from AMC (https://www.a-m-c.com/) my initial thought was "why the hell is this so difficult?" Sure, the product manual has everything you need to know about how to program the device. But that manual is also practically unreadable unless you already know how to program the device

Contrast with Teknic where I could get the servo drive up and running in a few hours because of an actually readable product manual and plenty of sample code and a Windows DLL to make everything easy.

There's definitely opportunity at the lower end of the market.

gaze

Yeah Matthias is fun to watch because he does a lot of hack stuff with plywood that works better than you'd expect. He does a lot of stuff with a lot of confidence, a lot of it dangerous. He's a smart guy for sure, so for what the setups are, the data is interesting. However, the problem is that people extrapolate beyond the setup. It's rare that the way he does something is a _good_ way to do something. He doesn't demonstrate himself to be an expert in much beyond software and hacking stuff together with wood, and I don't think he claims much beyond that.

YZF

Brushless servo motors and steppers are very similar, it's just that steppers have many more poles.

f1shy

In general yes, but there are variable reluctance steppers, which work a little bit different. While a BLDC defines how it is made, a stepper has a couple of different technologies.

zwieback

In my mind the main difference is steppers always taking full current, that's why we tend to switch to traditional servos past a certain size or use hybrid steppers like the MDrive

YZF

If you're micro-stepping a stepper then you're applying different currents to the coils. You can also microstep/openloop a BLDC just like a stepper and you can run a stepper with a closed loop controller just like it's bigger BLDC cousin.

Steppers had a niche in situations where you want to take discrete/accurate steps with very little control circuitry, e.g. printers, disk drivers etc. they're much simpler to work with vs. a closed loop bldc system, require no tuning, less software, etc.

SequoiaHope

I used to think this but you can actually drive steppers with FOC (if they have appropriate feedback) and modulate the current based on required torque. It’s open-loop steppers that don’t do this.

globalnode

really liked his software's ascii display of the rpm in big letters when he was running the fan. also hope he had an e-stop nearby, that looked a little unsafe!

btbuildem

That's an impressive servo! I've been messing around in this space lately, though on a smaller budget. The cheap NEMA-x motors he mentions are still quite decent, and you can do a lot of the position keeping etc in software. Accel/decel curves are a _whole thing_, there's definitely a lot to learn and explore here.

I'm making a set of roller blinds, and it's a pretty fun/challenging project that incorporates 3d design and printing, circuit design, and "microprogramming" (using a pico w board). It's really neat seeing physical manifestations of running code!

01HNNWZ0MV43FF

Nice that the servo tells you the position. The only time I used a servo it was a cheap 3-wire one, and it didn't tell me the position. So even though it was "closed-loop" internally, it was open-loop from the perspective of my code. Still mad about that...

HeyLaughingBoy

R/C servo? If so that's not surprising: they're designed for use in radio-controlled vehicles where the main feedback to the operator is the vehicle's motion.

hydrogen7800

When I was about 13 I took apart a broken servo from a hobby RC car I had. What a revelation to me. The circuit board was pretty mysterious to me, but I noticed the encoder (didn't know what it was called then) on the output shaft, and immediately realized its purpose. It looked to me a bit like a volume knob. I wondered why the servo motor didn't keep turning, but I realized this thing must be telling the motor "a little more" or "a little less", and it would have to keep making small oscillations back and forth to compensate for external forces, etc, which explained all the twitching noises it made. It was a great discovery at that age.

HeyLaughingBoy

It's amazing how many parts they fit into such a tiny space, isn't it? Those things are little marvels.

It's a potentiometer most of the time, BTW. Encoders are on the spendy "digital servos"

jcims

Check out his video on turning one into a catapult: https://www.youtube.com/watch?v=IF78MpQqejI

kuon

If you want high quality affordable servo motor, I highly recommend the clearpath from teknic.

HeyLaughingBoy

Seconded. Add "incredibly simple to use" to the list of qualifications.

TechSquidTV

I was googling exactly this just two days ago. Great timing.

brcmthrowaway

Is there something like an sg90 toy servo but rotates 360 and gives me position with similar speed?

HeyLaughingBoy

I think this might be what you're looking for: https://www.pololu.com/product/3432

ge96

$30? That's steep

edit: granted it pulls 35oz