How do you start the first video in a three part series on steppers?
I guess you just say STEPPERS while pointing to one.
Part one is all about the hardware.
We all have these huge lumpy things on our printers, and I think it's about time we learned
how they work and what's inside them.
Let's go.
So - This, is a stepper motor.
Obviously.
But so is this.
I would continue filling the desk with them but I only have these two types, in various
sizes.
These are the two dominant species of stepper, you will actually struggle to see many other
types in the wild these days, which is weird, but the left one is generally regarded as
the general purpose cheap everyday throwaway stepper, entirely I think due to the fact
you can buy them for a little more than a couple of pounds each including driver circuits
which is just crazy, and the right ones are the more serious equipment we recognise from
our printers, these ones tend to cost anywhere between a fiver and twenty quid, which to
non british people is between five pounds and twenty pounds.
What might surprise you though is that the cheapo 28BYJ stepper actually has a higher
resolution and for reasons we'll find out in a moment, a strangely high ability to not
slip in use.
Weird.
Before I get to the whole opening up the stepper part of the video I think its worth doing
some basic theory. Hello subtitle watchers, btw. Hah, an Easter egg.
All motors work by using the power of magnetism against itself.
In order to do that, you have to be able to command the power of magnetism itself, which
isn't a particularly common special power, so we have to use a bit of physics, and nobody
knows how this works less than I do, so I'll skim over it - but if you run a current through
a wire, you induce magnetism, it's not optional, it always happens, but we usually ignore it,
except when we purposefully make coils of wire with a lot of windings on them, this
essentially makes an electromagnet, a magnet we can turn on and off, and importantly, reverse
the polarity of.
Ordinarily a traditional motor will have one part that's a permanent magnet ie a normal
magnet, and the other part an electromagnet, but there's absolutely no reason why both
sides can't be electromagnets, this is a thing, we just won't be looking at it.
By the way while we're on this topic, you may have heard the phrase "brushless motor"
thrown around a lot lately, because they are getting very popular.
I might aswell explain it as stepper motors are kind of the same thing, well they literally
are the same thing - stepper motors are a special type of brushless motors.
A traditional brushed motor like these cheap ones here have the magnets on the outer edge
and they are stationary, with the electromagnets in the middle.
I actually managed to reassemble this, can you believe it? It's not hard to see that to get the electricity
to the electromagnet windings in the middle you need some kind of connection, this is
done by means of brushes that stay still, the advantage of these is that the motor will
propel itself because as the motor turns, the voltage reverses, so it's a pretty simple
way of doing it, the disadvantage being the wear on the brushes.
And I guess you can't control this spinning speed, it just kind of reaches a natural maximum
based on the friction I guess.
Brushless motors solve this electronically - if you put the permanent magnet in the center
instead, then the wiring is stationary and there's nothing to wear, but of course if
you think about it, sticking a battery ie dc voltage on that won't turn anything, the
magnetic field isn't changing.
So you have to drive that somehow.
With control circuitry, basically.
It makes a lot more sense, but of course, in order to become massively available, the
circuitry had to be cheap.
They are almost universally used in PC fans in case you're wondering why you feel like
you know about them already.
Anyway, that leads us into how steppers fundamentally work.
They have the same permanent magnet core, but round the edge you have direct control
of the magnetic coils and unlike a standard brushless motor, with steppers, you have to
drive the coils yourself directly through the motor's pins.
You have to send the waveform or signal that alternates the magnetic field, to make it
move.
One step at a time.
I can show you that.
Here's a stepper motor.
All I'm doing is supplying power to the coils inside.
If I switch the power around, the motor takes a step.
Switch again, another step.
Stepper motors have an unusual feature due to the way they work too, they spend a lot
of their time essentially what would be considered "stalled" for a normal motor, meaning they
are holding their position.
They are happy to do this, whereas most motors arent.
When you lock the axes on your printer, you are activating the steppers like this, supplying
the constant current to the coils and producing what's known as a holding torque or stall
torque.
And yes, they get hot doing this.
Surprisingly most steppers are actually OK to operate up to at least 90C which is why
they come with warning stickers.
So when you jump on reddit to ask if hot steppers are normal, well, if you can touch them at
all comfortably, the answer is almost certainly yes, it's normal.
Kind of.
See my previous video on belt tension for more on that, though.
I think it's about time we take this to bits.
Inside there's exactly, pretty much, what we expected to see. Shiny things.
There's a very heavy and strong magnetic core, and around the edge, coils.
I suppose I have some explaining to do here because there's only 8 coils here, so how,
is the motor not taking bigger steps, if you reverse the magnetic field, why does it jump
1.8 degrees around and not 360 divide by 8 which is about I dont know, 45 degrees.
That's kind of how a brushless motor works and you can feel it when you turn one by hand,
but look at the stepper's interface between the coils and core.
We have what's known as castellations.
These, and as far as I'm concerned magnetism is basically magic, but they actually break
up the magnetic force into tiny magnetic forces.
It really shouldn't work but apparently it does.
By using these castellations, each electromagnet becomes 6 magnets, and the core has, well
actually, I haven't counted them, but it doesn't quite line up, you might spot that.
There's reasons for all this.
So the center of the stepper is not one magnet, it's actually two.
On hybrid stepper motors like these, the top half is, arbitrarily, a north pole, and the
bottom is a south.
You can see they're offset, and that's clever.
Think about the castellations, when you charge one, it will attract one side of the magnetic
core, but repel the other.
So they're offset.
That works nicely.
Let's move it then while it's open.
I have a driver box here which is a standard off the shelf thing, these are quite cheap,
and pretty primitive ways of driving the steppers compared to how 3d printer drivers do it which
we will get on to in episodes 2 and 3.
This box is just taking a pulse in and turning it into the right kind of square wave for
the stepper.
Every time I press the button, the box will advance the stepper one step, I'll show you
the waveform in a moment from a cleaner source.
One press, one step.
You can see how the castellations align on two of the eight groups, and this travels
around with every step, this is how the motor propels itself.
The alternation of the voltage potential reverses the magnetic field between each step and the
logical thing for the motor to do is just go where it's pulled, to the next electromagnetic
pole along.
Very clever.
And that by the way is why there are more teeth round the edge than in the centre, to
create that imbalance that makes this work.
Normally you wouldn't drive a stepper motor one step at a time, in fact that's pretty
much exactly what you don't do.
They are incredibly accurate at taking a series of steps, to a location.
They don't have any way of knowing where they are which is why most printers have end stops
which they use to locate the stepper initially, and this is why every move of a 3d printer's
axes is done relative to the location of these initial stops, however they are worked out,
throughout the whole print, even if it's days long which is mind blowing, the printer can't
look up where it is but it knows where it is even days later, because what steppers
can do, is accurately move a specific number of steps.
This is done by sending a known amount of pulses, and I'll show you how they look now.
Of course, layer shifts are the natural result of the printer thinking it knows where it
is, but being wrong, but they're surprisingly uncommon.
Anyway, I have an arduino mega here, which I have programmed to output a stepper signal.
I'm powering the smallet stepper with this, because it has a driver that's more of an
amplifier than a driver per se, if I show you the pins here, these translate directly
to the stepper's coils, the so called driver boards on these things are just something
known as darlington driver arrays, it just takes your arduino signal and boosts the current
to drive the motor.
They also have really cool LEDs on here so if you step slowly enough you can watch the
sequence.
On the oscilloscope you can see the waveform.
This is a two channel oscilloscope so I can't show you all four pins at once, but you can
see the two separate coil signals out of phase with each other.
I should be able to do some trickery to show you all four or maybe I'll draw it, but on
the top you have one coil's signal, and on the bottom the other coil, by alternating
like this, you are sending a signal to tell the motor to slowly rotate one step at a time.
Before I close up this episode I will also show you inside these cheap motors because
they are quite clever.
Inside, you first have a set of gears.
This is important actually.
Below that, you have the same castellations as before, but you can see, I hope, I did
a pretty bad job of taking this apart, it's kind of turned on its side, with the coils
stacked and again the same magic applied to the magnetic field through these spikes which
stack on each other.
Counting the spikes tells you there's only 32 positions for these steppers, which is
why the gears are important.
They have a 1 to 64 ratio meaning for a full rotation, these motors don't do 32 steps,
but 32 times 64 which is 2048.
So they are effectively 0.175 degree pitch stepper motors, each step is 0.175 degrees,
which is crazy small.
It makes them slower, sure, but that's not an issue with most uses of these motors.
So that is it for this episode, next time, I know there's already some of you leaving
comments "but what about microstepping" - yes, next episode, don't panic.
Did I mess up the explanations?
Probably, I usually do, check the description for any corrections.
If you have anything else to say please do so in the comments, we will get on to more
specific info about driving these things in the next episode, so I will see you then.
Thank you for watching!