[HN Gopher] Servo vs. steppers: Speed, Torque and Accuracy [video]
___________________________________________________________________
Servo vs. steppers: Speed, Torque and Accuracy [video]
Author : f1shy
Score : 206 points
Date : 2025-01-14 14:05 UTC (1 days ago)
(HTM) web link (www.youtube.com)
(TXT) w3m dump (www.youtube.com)
| TechSquidTV wrote:
| I was googling exactly this just two days ago. Great timing.
| riiii wrote:
| Published 1h ago and already on HN. Not surprised, Matthias
| Wandel is always worth a watch!
| fotta wrote:
| His breadth of knowledge constantly amazes me
| LeifCarrotson wrote:
| 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.
| HeyLaughingBoy wrote:
| 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.
| bluGill wrote:
| > 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.
| gaze wrote:
| 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.
| kleiba wrote:
| I have no idea how you would arrive at such a conclusion.
| Perhaps only if you have just watched a small selection
| of his videos?
| gaze wrote:
| I've seen quite a few. His pantorouter series is very
| good and I have a lot of respect for doing this sort of
| thing without CNC. His most recent series building a
| milling machine is asinine, but fun to watch.
| f1shy wrote:
| I've never seen him doing anything that I would call
| dangerous. Not in the sense that he, someone or something
| is at risk. He make things that can fail, but it will not
| reault in an injury.
| error503 wrote:
| The 'fan' in this very video is pretty dangerous, even
| ignoring its cobbled-together nature.
| fotta wrote:
| 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 :)
| MatthiasWandel wrote:
| Actually not fair criticism, given that I even talk about
| changing the control parameters and demonstrate the
| effect of changing them.
| cortesoft wrote:
| > 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.
| MatthiasWandel wrote:
| Please re-watch the video, but THIS TIME PAY ATTENTION. I
| do talk about the motion parameters, even show the code on
| the screen briefly. I even show the effects of changing the
| parameters.
| on_the_train wrote:
| The guy who fell for the most basic boomer Phishing mail - two
| times in quick succession
| mikey_p wrote:
| Yeah, clearly tech people never get their Youtube hacked:
| https://www.theverge.com/2023/3/24/23654996/linus-tech-
| tips-...
| YZF wrote:
| Brushless servo motors and steppers are very similar, it's just
| that steppers have many more poles.
| zwieback wrote:
| 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
| SequoiaHope wrote:
| 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.
| mitthrowaway2 wrote:
| You can do this but it's very difficult; the high pole
| count means it requires extremely precise and high-speed
| feedback to get good torque control on a stepper motor.
| YZF wrote:
| 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.
| f1shy wrote:
| 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.
| 01HNNWZ0MV43FF wrote:
| 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 wrote:
| 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 wrote:
| 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 wrote:
| 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"
| hydrogen7800 wrote:
| Yeah, it was a potentiometer. Is an encoder not simply
| any device that provides a signal proportional to its
| position or displacement? It had wiper arms (brushes?)
| that dragged along a conducting surface on a PCB below
| the rotor.
| HeyLaughingBoy wrote:
| An encoder is a device that encodes the position --
| absolute or relative -- of its shaft as a set of digital
| outputs.
|
| Most common type uses optical sensors internally,
| although there are also magnetic types. A quadrature
| encoder is the most popular and provides two output
| signals, phase separated by 90 degrees. The phase
| separation allows the reader to determine which direction
| the shaft is moving.
|
| A potentiometer used for position feedback is usually
| just called a potentiometer. I guess it's technically an
| encoder, but I don't think I've ever heard it referred to
| that way.
|
| There are also resolvers, discussed somewhere else in
| this thread, but we won't go there!
|
| HTH
| f1shy wrote:
| > A potentiometer used for position feedback is usually
| just called a potentiometer. I guess it's technically an
| encoder, but I don't think I've ever heard it referred to
| that way.
|
| I have absolutely seen potentiometers called encoders in
| industrial applications. The underlaying technology is
| irrelevant. Encoders and revolvers are just transducers
| of position.
| brcmthrowaway wrote:
| Is there something like an sg90 toy servo but rotates 360 and
| gives me position with similar speed?
| HeyLaughingBoy wrote:
| I think this might be what you're looking for:
| https://www.pololu.com/product/3432
| ge96 wrote:
| $30? That's steep
|
| edit: granted it pulls 35oz
| ge96 wrote:
| 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 wrote:
| 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/
| ge96 wrote:
| 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"
| gertlex wrote:
| 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...)
| ge96 wrote:
| those prices look good
| Animats wrote:
| Ah. Now, Dynamixel-type servos with a "China price".
|
| Order now, before tariffs go up.
| shellfishgene wrote:
| Also have a look at this project, he adds an optical encoder
| and mc to a cheap servo to enable smooth control. So there is
| extra feedback, but processed on the modified servo.
| https://github.com/adamb314/ServoProject
| zokier wrote:
| 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 wrote:
| 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.
| YZF wrote:
| 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.
| Animats wrote:
| 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 wrote:
| 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 wrote:
| 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 wrote:
| 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.
| ansgri wrote:
| Wouldn't you mount the encoder after the reductor then,
| where the position actually matters?
| aidenn0 wrote:
| Yes, we are discussing servos packaged with an absolute
| encoder
| onetwentythree wrote:
| You can get multi-turn absolute encoders for these
| applications.
| zwieback wrote:
| 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
| MisterTea wrote:
| 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 wrote:
| > 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 wrote:
| 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.
| nine_k wrote:
| 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 wrote:
| 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.
| raxxor wrote:
| 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 uC program isn't disabled from magnetic interference
| as well. There are specialized uC for quadrature encoders, but
| you usually do not need them if you don't have high speed
| applications.
| btbuildem wrote:
| 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!
| kuon wrote:
| If you want high quality affordable servo motor, I highly
| recommend the clearpath from teknic.
| HeyLaughingBoy wrote:
| Seconded. Add "incredibly simple to use" to the list of
| qualifications.
| jcims wrote:
| Check out his video on turning one into a catapult:
| https://www.youtube.com/watch?v=IF78MpQqejI
| nimish wrote:
| "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
| stavros wrote:
| The ones with the magnet? Those are really cool indeed, such a
| great idea.
| thatcat wrote:
| interesting observation. i found a reference project detailing
| how this works below
|
| https://calischs.pages.cba.mit.edu/step/servo-stepper/
| YZF wrote:
| 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 wrote:
| 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 wrote:
| That's one of the motors that the video covers. And it shows
| that there are limitations to steppers with servos.
| arghwhat wrote:
| Closed loop is the control method, "servo" describes an
| assembly of a servo motor and its controls.
|
| Good closed loop stepper controllers are a huge step up (heh)
| from open loop control, but there's a big difference in
| characteristics of a stepper motor - which is a very special
| motor configuration making huge trade-offs specifically to
| allow repeatable open-loop operation - and the more standard
| servo motor choices. Because steppers are special you also tend
| to specifically say "closed loop stepper" rather than
| considering it a servo.
|
| Be a bit careful with random closed loop controllers though.
| Cheap ones can be finicky, and poor tuning and broken failure
| modes is no fun when used in machinery that could injure you,
| which tends to be where such steppers are installed. Aggressive
| and erratic movement or randomly entering fault and powering
| down is quite a lot different from simply losing steps.
| globalnode wrote:
| 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!
| alkonaut wrote:
| Now I understand why these 10-15Nm race sim wheels are really
| expensive.
| numpad0 wrote:
| Why aren't everyone buying power steering column units for
| simracing purposes? They're cheap and plenty powerful. Only
| problems are that they're heavier and brushed DC types are
| deliberately imprecise for simplicity.
| oinx wrote:
| Servo
| benbojangles wrote:
| stick a planetary gearbox on any motor and you have a much more
| powerful motor
| MisterTea wrote:
| Not more power but more torque with a sacrifice in velocity.
___________________________________________________________________
(page generated 2025-01-15 23:02 UTC)