MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
Stepping Motors
they must be good for something
DSCN1996.JPG
Tuesday, 29 September 2009HI
Many of you know that I have an unhealthy interest in Stepper Motors and doggedly persist in
using them to drive my Mice.
Stepper driven Mice generally have large and heavy batteries but does this have to be?
Stepping Motors seemed to be a good choice, particularly as they were easily available
and not partcularly expensive.
As an electronics engineer, I felt that I might be able to design a drive system that was
both small in size and low in power requirements.
This presentation describes some of that work - which is incorporated. into Isambard I.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
2
What’s Coming Up
• Wisdom• Stepping Motor Basics - How They Work• A Motor Drive System - Defining the Problem• A Possible Solution and a Prototype• A Practical Version
01
Tuesday, 29 September 2009WISDOM We’ll take a light-hearted look at some of the various opinions regarding Stepping Motors.
S. M. BASICS A very brief introduction to Stepping Motors:- How They Work Introduce main issues concerned with their operation.
DEF. THE PROB A Quick look and the Aims and Requirements for a Motor System as required by a Mouse.
POSSIBLE SOLN Look at a possible Solution and see if it Works.
PRACTICAL VERS Finally we’ll look at a Real-Life implementation of the Method.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
3
Conventional Wisdom
• Big• Ugly• Heavy• Expensive• Power Hungry
• and worst of all - Slow
Conventional Wisdom has it that Steppers are:-
02
Tuesday, 29 September 2009BIG Certainly are bigger than some miniature DC motors.
UGLY Never.
HEAVY Perhaps.
EXPENSIVE You can buy useful ones for about £25 each.Lot less than some people spend on DC motors.
P/HUNGRY Can be.
SLOW We’re here to suggest otherwise.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
4
Not-So Conventional Wisdom
• Small (ish), Neat and Precision Engineered• Beautiful - once you get used to them!• Light• Easy to Obtain and Cheap to Buy• Easy to Drive
• and best of all - Fast
Not-So Conventional Wisdom thinks Steppers are:-
03
Tuesday, 29 September 2009SMALLISH Precision engineered component built into a useful sized frame eg:-
Size 17 = 42mm square.Size 14 = 35mm square.
BEAUTIFUL Beauty is in the eye of the beholder.
LIGHT I’m joking - but their weight is not necessarily a handicap.
EASY TO BUY You can buy them from RS or Farnell-in-One using your Credit Card.
EASY TO DRIVE Their big advantage is the direct relationship between the drive signals and the distance travelled.
FAST They can be persuaded to rotate quickly - honest.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
5
What’s Coming Next
• Wisdom• Stepping Motor Basics - How They Work• A Motor Drive System - Defining the Problem• A Possible Solution and a Prototype• A Practical Version
04
Tuesday, 29 September 2009S. M. BASICS Motor Construction.
Why They Consume PowerWhy They are Slow
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
6
Basic Uni-Polar Stepping Motor
Construction Diagram
Consists of:• 4 Windings on 4 ‘Poles’
- energise > electromagnet• Armature ‘Points’ to the
Energised Winding• Energise in Sequence ...• Creates Rotation
- in ‘steps’ of 90 degrees
05
Tuesday, 29 September 2009Construction of a basic Stepper Motor is shown in the figure and illustrates the
Frame, the Windings and the Rotor.
MOTOR TYPES Uni-Polar and Bi-Polar.
Pro and Cons - Power Output, Efficiency and Drive Electronics.Uni-Polar type during this talk.
4 WINDINGS Usually 4 windings wound on the Stator - the fixed frame.Shown as A-B-C-D in diagram.Each forms an electromagnetic ‘Pole’ when a current flows.
ARMTUR POINTS Electromagent attracts the permanent magnet Rotor and forces it to align with the Stator winding.
SEQUENCE Passing current through each winding in turn, as shown in orange, causes the Rotor to align with successive Stator windings and creates…
ROTATION Simplistic example - Step Angle is 90 degrees.(rather coarse - needs reduction gearbox to be of any practical use)
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
7
Hybrid Uni-Polar Stepping Motor
Wiring Diagram
Consists of:• 4 Separate Windings• Poles arranged in Sets
- typically 50 per set• Number of Poles in Set
determines Step Angle• 4 Windings of 50 Poles
- step angle = 1.8o
06
Tuesday, 29 September 2009Diagram shows the electrical circuit of a 4-Pole Uni-Polar Stepping Motor,
each with a switch to energise each winding.
HYBRID MOTOR Hybrid Stepping Motor - Development of Basic Stepper Motor.
WINDINGS Typically, it too consists of 4 windings wound on the Stator.
POLE SETS But the Poles are interleaved.Run round Stator - A-B-C-D-A-B-C-DTypically 50 Poles per Set - complex.
What’s the advantage?
No. OF POLES All Poles form electromagnets butRotor only turns to point to the nearest one.
4 x 50 POLES Typical Hybrid Steppers have 50 Poles on each winding.Total of 200 (4 x 50) PolesYields a Step Angle of 1.8 degrees - 360/200.
MOVING ON: Lets look at why Steppers have a bad reputation?
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
8
Why are Steppers Power Hungry?
• What is V/R? V/R = I (current) - Basic Ohms law
• Mouse Movement requires Work to be done More Acceleration requires more Torque More Weight requires more Torque
• Motor Torque is proportional to Winding Current Current proportional to voltage - more “V” = more “T” Current inversely proportional to resistance - less “R” = more “T”
It’s all down to V/R
07
Tuesday, 29 September 2009WHAT IS V/R Voltage divided Resistance = Current.
This simple equation relates
MOUSE MOVE Everyone knows
MOTOR TORQUE For a given Motor:-Electromagnetic attraction-force of Stator Windings determined by Winding Current.We can obtain more Torque by:-- Running at a higher voltage.- Choosing lower resistance Motor.leads to higher power consumption.
Of course, another way to get increased Torque that need not sacrifice Power Consumption is to choose a Motor with a larger diameter - the Rotor is longer and so has better ‘leverage’.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
9
Why are Steppers Slow?
• What is di/dt? di/dt is the ‘rate of change of current with time’
• Stepper Motor Windings are:- Coils of wire wound on a metal former They have Inductance - Inductance limits di/dt More Inductance means lower di/dt Less Inductance means lower resistance
The Real Catch is di/dt
08
Tuesday, 29 September 2009REAL KILLER: This is the real culprit to the limit on Stepper Motor performance.
WHAT IS di/dt: ‘Rate-of-Change of Current with Time’.On previous slide - Torque proportional to the Winding Current.
Note:If Current has a ‘Rate-of-Change’ then:-- not just ‘there’ immediately- must ‘build-up’ to its final value.Therefore, the Torque isn’t immediately available at its maximum.We’ll see a graphic of this in action on the next slide.
WINDINGS ARE: Coils of wire:-- have Inductance, which limits di/dt.More L means lower di/dt- longer for the Torque to build.Less L means higher di/dt- faster Torque build-up- usually Lower R and hence higher power consumption.
MOVING ON: Lets now look at a few pictures showing all this.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
10
Static di/dt
• Current rises at a rate inversely proportional to Winding Inductance
di/dt = V/L
• Current limits at a value inversely proportional to Winding Resistance
I = V/R
Torque vs Time
09
Tuesday, 29 September 2009Graph shows Winding Current (or Torque) against Time for two different Stepper Motors;
A High Power type with low L and R.A Low Power type with high L and R.
CURRENT RISES quickly in High Power Motor due to low L.limits at a high value due to low R.
slowly in Low Power Motor due to higher L.limits at a lower value due to higher R.
Torque available from each Motor rises as the current rises until the winding resistance limits the current.
BIG NOTE: At this point, if the motor has ‘stepped’, and is not working against an external force, the Torque is no longer required and so the current flow is wasted.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
11
Dynamic di/dt
• At ‘Natural Step Rate’- winding current reaches V/R value as next step starts
• Below Natural Step Rate- rises at the same rate- winding current saturates- power wasted
• Above Natural Step Rate- peak current reduced- torque reduced- acceleration limited
Torque vs Time at 3 RatesCompetitive Mouse requires a Step Rate Ratio of > 100:1
10
Tuesday, 29 September 2009Diagram shows the dynamic situation with a coil being energised at 3 different Step Rates:-
NATURAL RATE At ‘Natural Step Rate’ Winding Current just builds up to the level determined by V and R when the next Step occurs and de-energises the winding.A motor run under these conditions is at its best- producing maximum Torque at minimum waste.
< NAT. RATE Good Torque and Acceleration but Wasted Power.
> NAT. RATE Low Power Consumption but Poor Acceleration Rate
NOTE Artistic licence in the graphic showing current building up linearly.In fact, due to the Winding Resistance, the current rises exponentially starting quickly - rate determined by applied V and the winding L - and leveling off toward the top.
STEP RATIO Graphic shows a Step Rate Ratio of about 3:1.Consider a real Mouse that’s even remotely competitive.You will need a Step Rate Ratio of at least 100:1- say 50 Steps/Sec to 5000 Steps/Sec
Conflicting requirements of a high di/dt and low power consumption.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
12
Dynamic di/dt in Action
• Region A Low Step Rates Constant Torque Wasted Power
• Region B Increasing Step Rates Ever Reducing Torque Reduced Power Requirements
Torque vs Step Rate
11
Tuesday, 29 September 2009REGION A Is characterised by:-
Low Step Rates - up to perhaps a few hundred Steps per SecondGood Torque availability.
REGION B Is characterised by:-Ever reducing Torque as Step Rate is increased.
If you are happy operating in Region A then what comes next will not interest you.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
13
What’s Coming Next
• Wisdom• Stepping Motor Basics - How They Work• A Motor Drive System - Defining the Problem• A Possible Solution and a Prototype• A Practical Version
12
Tuesday, 29 September 2009DEF. THE PROB What it Needs to Do
Ideally, what it would consist of.What the Design Challenges are.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
14
The Ideal Motor Drive System
• Provide RPM - for acceptable Speed• Provide Torque - for good Acceleration• Be Efficient - to reduce Power Wastage• Be Simple to Drive - to reduce H/W and/or S/W• Be Small - so the Mouse can fit between Walls
Needs to:-
13
Tuesday, 29 September 2009PROVIDE RPM The wheels need to be able to rotate at enough of a rate to move the Mouse at a reasonable speed through the Maze.
Speed is, of course, determined by wheel RPM and wheel diameter.
PROV. TORQUE Acceleration is important - possibly more so than top-speed.In a wheelchair configuration, you have two Motors and therefore the torque required by each Motor can be reduced.
EFFICIENT You start the design with a Chassis and Motor arrangement that has a certain weight and can accelerate at a specific maximum rate. You then add a pile of batteries and the weight goes up.Your maximum acceleration rate just went down so you re-design using larger Motors giving better Torque but which weigh more and consume more Power.So you replace the batteries with a bigger set …. and so on!Wasted Power means bigger and heavier batteries so a slower Mouse.
SIMPLE DRIVE It’s a good idea to make the Motor interface as simple as possible:-- simple hardware generally means less board space.- in S/W , the Motor interface is often handled in an Interrupt Service routine and these are best kept short - particularly if you have two Motors to deal with.
SMALL This is probably the most important factor - you won’t win any races if your Mouse won’t fit in the Maze!
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
15
The Ideal Motor Drive System
• Small Motor(s) + Low Weight and Inertia - Low Power and Torque
• Small Battery Pack + Low Weight and Inertia - Low Peak Current Capability - Limited Endurance
• Small Electronics + Low Weight and Inertia - Heat Dissipation Problems
Consists of:-
14
Tuesday, 29 September 2009SMALL MOTOR Plus: Smaller Motors are generally lighter and therefore have less inertia which is good for acceleration
and cornering.Minus: However, in general the smaller the Motor, the less Power it can deliver. Smaller Rotor diameter also means lower Torque.You can add a gearbox but you’ll lose RPM.
SMALL BATTS Plus: As above, generally lighter and impart less inertia.Minus: Generally though, they can supply less peak output current.Additionally, you need enough capacity in order to complete the job
SMALL ELECTS Plus: Lighter and less inertiaMinus: However, one of the problems with physically small devices is that they are not good at dissipating heat.
Could use a heatsink - more Weight and Inertia.
Better option - design a drive system that doesn’t waste any power - also benefits size of the battery pack required.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
16
The Challenge
• Maximise Power and Torque from Small Motors Time in Maze is Short
- operate motors outside specification
• Optimise Battery Capacity Utilisation Search Phase is Long and Slow:
- don’t need maximum speed or acceleration Run Phase Short and Fast:
- requires all the mouse has got - but only for a few seconds
• Minimise Power Wastage in Drive Electronics Select Switches with Low On-Voltage or On-Resistance
Is to find a way to:-
15
Tuesday, 29 September 2009MAX P & T Mechanical are based on an expected lifetime - several 1000 hrs.
Don’t care about longevity so we can over-run the Motor- we all know that if you run a 3V motor on 12V it goes like stink but the bearings don’t last long!
OPT BAT. CAP. Mouse operates in two Phases - Search and Run.Search Phase:- is long.- maybe maximum speed and acceleration not needed.Can we find a way to reduce the Drive System power requirements during this Phase and so reduce battery capacity requirements.Run Phase:- is short.- but fast.Need to provide enough capacity to ensure that power is available for the high speed dash at the end.
MIN P. WASTE Previous slide showed 4 windings and associated switches.Any voltage remaining across a closed switch, due to On-Resistance, reduces the voltage across the Motor.This has two negative effects on performance:-- it reduces current flowing in the coil and hence Torque available.- it heats up the switch, which wastes Power.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
17
What’s Coming Next
• Wisdom• Stepping Motor Basics - How They Work• A Motor Drive System - Defining the Problem• A Possible Solution and a Prototype• A Practical Version
16
Tuesday, 29 September 2009POSS SOLUTION Look at a possible Solution
The Inspiration behind the Idea.We build a Prototype and Test the Method.Look at some of the ResultsAnd Discuss what we have learnt.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
18
The Big Idea ...
• Solenoids Are Electromagnetic Devices that move Armatures Are Power Hungry
• Operate a ‘Work and Hold’ Basis High Voltage to move Armature
- high power but short duration Low Voltage to hold Armature
- low power to conserve energy and reduce heat
Source of Inspiration:-
17
Tuesday, 29 September 2009SOLENOIDS Electromagnetic devices - just like Stepping Motors.
Have a coil of wire that, when energised, creates a magnetic field and attracts a permanent magnet - the armature.Just like Stepping Motors they are Power Hungry.Technique used to overcome this limitation is to operate the device on a ‘Work and Hold’ basis.
Work voltage is high - maybe up to 5x rated voltage:- armature moves quickly to its ‘Home’ position doing the work.
Hold voltage is low - maybe down to 0.3 rated voltage:- reduced need for force - reduces power consumption.
MOVING ON: Let’s look at a diagram of how this might be done.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
19
… In a Nutshell
18
Tuesday, 29 September 2009DESCRIPTION Step Pulse input drives:-
Integrated Drive IC consisting of:- Step Sequence Translator. 4 off Power Output Stages.Monostable:- Produces a ‘Switch Energisation’ pulse of fixed width at each Step.
At each Step, Motor sees High Voltage across its windings:- produces a high di/dt- winding current ramps up quickly moving the Rotor - the WORK.
Once the Rotor has moved, HV supply is switched off.Coil powered from LV Supply and draws less current - the HOLD.
Ratio of HV to LV might be between 3:1 and 5:1.
Generate LV supply using SMPSU:- save even more energy- reduce battery capacity requirements.
SMPSUs are POWER - rather than VOLTAGE - conversion devices 5V @ 1A Out can be provided by 15V @ 0.33A In
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
20
We Need a Prototype ...
Simplified Schematic and Veroboard Implementation
DSCN1988.JPG
19
Tuesday, 29 September 2009BUT does it work?
We need to get the Soldering Iron out and build a prototype.
Slide shows simplified schematic and veroboard prototype used to evaluate the principle.
The chip complement is:-UCN5804B Stepper Motor Translator/Driver.LM555CN Timer - wired as a monostable with adjustable period.MTP2955V P-Channel MOSFET.
The UCN5804B has 3 control inputs that permit selection of:-Forward/Reverse Rotation.Drive Sequence - Wave Drive or 2-Phase.Step Size - Full or Half.
These are wired to jumper links to allow selection of the various modes.
Two Bench PSUs provide the HV and LV Supplies and allow various combinations of
each voltage to be easily assessed.
Diode prevents the LV PSU being ‘back-driven’ when the MOSFET is On.
The Motor type is RS Order Code 440 - 420.Size 17 - 42mm square5V / 0.5A / 10R / 6mHProvides up to 70mNm of Torque
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
21
… That Gets Results
Full Step - No Bi-DriveNatural Step Rate 400 S/S
LV PSU Current 400mA
Torque OK
Max. Step Rate 800 S/SLV PSU Current 130mA
Full Step - Bi-Drive @ 250usMax. Step Rate 1700 S/SLV PSU Current 200mAHV PSU Current 90mATorque @ 1200 S/S GoodTorque @ 1500 S/S OK
Final Settings:-HV PSU 14VLV PSU 4.3VMono Period 250usDrive Mode 2 Phase
Half Step - Bi-Drive @ 250usMax. Step Rate 10k hS/SLV PSU Current 0mAHV PSU Current 130mATorque @ 1000 hS/S GoodTorque @ 5000 hS/S GoodTorque @ 10000 hS/S Poor
20
Tuesday, 29 September 2009FULL STEP-No BD Very limited maximum step rate - mainly due to resonances.
Mechanical resonances were both audible and evident in Torque capability at higher step rates.Adding a fly-wheel helped and inertia of mouse would help further.
FULL STEP - +BD Improved maximum Step rate - about twiceMuch improved Torque at mid-speeds.Mechanical resonances still evident.
HALF STEP - +BD This is the one!OK, they are half-steps but the increase in Rotational Speed is still significant - about 3x on a pro-rata basis.Torque is still Good at 5000 hS/S and usable up to about 8000.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
22
So - What Did I Learn?
• The Basic Bi-Drive Idea Works:- Useful Extra Torque at High Speeds
- bi-drive high voltage provides torque to move armature Considerable Power Savings at Low Speeds
- reduced ‘hold’ voltage once armature has moved
• Half-Stepping Sorts Mechanical Resonances:- Requires 2x Step Pulses for a given Rotational Speed
- means greater S/W overhead Reduced Torque in Half-Step position
- can be mitigated by increasing operating voltage Doubles Positional Resolution
- 0.4mm with 52mm wheels
21
Tuesday, 29 September 2009The Basic Bi-Drive Idea works:
EXTRA TORQUE Much Improved Torque at High Speeds.Power reduced at Low Speeds compared to ‘Normal’ drive because:- Bi-Drive HV provides Torque at High Speed.- Means a Reduction in LV Voltage is possible with consequent reduction in Coil Current and therefore Power.
HALF-STEPPING Overcomes Mechanical Resonances- but 2x Step Rate means greater S/W overhead.
Only provides about 50% Torque in each Half-Step position.
On the up side we get greater Positional Resolution - about 0.4mmwith standard off-the-shelf 51mm diameter wheels.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
23
But There are Problems !
• It Wastes Power UCN5804B Output Stages are Darlingtons with Vsat of 1V
- output stage dissipation about 800mW LV PSU has to be higher to compensate
- leading to a ‘double-inefficiency’
• It Has Many Parts The UCN5804B requires 4 back-EMF diodes It uses a Monostable plus its associated parts It Requires Significant PCB Real Estate
- you need two
The Prototype Design is not Perfect:-
22
Tuesday, 29 September 2009WASTES POWER BiPolar Darlington O/P Stage has:
- VCEsat approx 1V- Pdiss per Switch approx 400mW- 2 switches on gives about 800mW wasted!
LV PSU needs to be 1V higher to compensate.
MANY PARTS A ‘quirk’ of the UCN5804 is that it requires external diodes to prevent internal substrate diodes from conducting - 4 devices.
The Monostable and FET circuitry comprises many parts leading to
PCB AREA Bear in mind that you need two of these!
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
24
What’s Coming Next
• Wisdom• Stepping Motor Basics - How They Work• A Motor Drive System - Defining the Problem• A Possible Solution and a Prototype• A Practical Version
23
Tuesday, 29 September 2009PRACTICAL VERS Prototype was a useful stepping stone.
Discovered what’s good and what’s not so good.Need to design a Mouse-Friendly version.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
25
The Plan ...
• Maze Time Limited to 15 mins - mostly Searching• Search Parameters:-
Run on LV Only - Bi-Drive not Utilised to Conserve Power Modest Maximum Speed - 0.5 m/s (1250 hS/S) Modest Acceleration - 1m/s2
Rest-to-Rest Cell Traverse Time - 0.85s
• Run Parameters Engage Bi-Drive Acceleration - 1m/s2
Unlimited Maximum Speed - 1.65 m/s Full Straight Traverse Time - 3.3s
24
Tuesday, 29 September 2009MAZE TIME 15 minutes max, much of which is spent learning the Maze layout - the so-called Search Phase.
SEARCH PARAMS In order to conserve Power try not to use the Bi-Drive system and operate the Motor on the LV only so:-- Limit Maximum Speed to 1250 S/S - 0.5m/s- Limit set because not using Bi-Drive systemSet a modest Acceleration Rate - 1m/s/s - also Bi-Drive limited.Settings provide a Rest-to-Rest Cell Traverse Time of 0.85s.
RUN PARAMS Enage Bi-Drive - you can just hear Jean-Luc Picard!!Acceleration still 1m/s/s due to single Acceleration Table.No Specific Limit on max. Speed:- Peak Speed on Full Length Run - 1.65m/s- Traverse Time - 3.3secs
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
26
Its Implementation ...
25
Tuesday, 29 September 2009In principle a very similar Circuit to the Prototype but with a few Important Changes:-
PIC16C505 To off-load responsibility from Host CPU the PIC handles:-Half-Step Sequence Translation using:-- Fwd/Rev Input.- Left/Right Input (allows same PIC code to do both Motors)250us Bi-Drive Pulse Generation when required.Motor Enable/Disable - to conserve Power when Mouse stationary.All the Host has to do for each step is provide a 10us Step Pulse.
DUAL FETs 2 N-Channel FETs in an SO8 Package is small.40mR On-Resistance - Pdiss is about 4mW per Device - 8mW.- compared to 800mW with UCN5804.
BSP452 High-Side Logic-Level Controlled Switch. Simple, Small and Easy.Downside is ‘Activate Time’ of about 50us but PIC S/W caters.
10BQ015 Similar to previous Diode but lower Vf and hence lower Pdiss.
SMPSU Based on 150kHz Nat. Semi. Simple Switcher range.3.8V at 1A Out. Efficiency about 80%.Single PSU for both Motors.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
27
… And Testing
Trace Description
Slow Step Rate 500 S/SR1: Coil DriveR2: Coil Current - 200mA/div
Current Topping-Out at V/R
Motor Winding Waveforms
Fast Step Rate 2500 S/ST1: Coil DriveT2: Coil Current - 200mA/divCurrent Never Makes Maximum
26
Tuesday, 29 September 2009This slide shows actual waveforms taken from a second Veroboard Prototype built to test
the PIC based circuit and shows our old friends V/R and di/dt in action.
UPPER TRACES Show the Coil Drive voltage produced by the PIC and the resulting Coil Current for a low Step Rate - 500 S/S.The Current builds up exponentially, as discussed earlier, and settles at a value dtermined by V/R - in this example about 350mA.NOTE: the little kink at 2ms is as a result of the next Step and may be termed ‘crosstalk’ from an adjacent winding.
LOWER TRACES Show exactly the same thing but at a Step Rate of 2500 S/S.The current builds up, starting rather late, to a peak of about 150mA before the winding is de-energised.NOTE: the negative-going ‘spike’ just before each ‘Step’ is also due to inter-winding crosstalk.
MOVING ON: Having checked the basic drive system we can now move on the Bi-Drive System.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
28
The Bi-Drive System in Operation
Trace Description
Step Rate 1000 S/ST1: Coil DriveR1: Coil Current - Bi-Drive Off - eventually rises to 300mA
Bi-Drive System Waveforms
T2: Bi-Drive Pulse - 290usR2: Coil Current - Bi-Drive On - quickly rises to 400mA
Current Waveforms: 200mA/div
27
Tuesday, 29 September 2009This slide shows various waveforms at a Step Rate of 1000 S/S with the Bi-Drive System
first disabled and then enabled.
TRACE T1 Shows the Coil Drive voltage produced by the PIC as before.
TRACE R1 Shows the resulting Coil Current building up slowly- it eventually reaches 300mA but only reaches 120mA as shown.
TRACE T2 Shows Motor Voltage as a result of the Bi-Drive pulse.It ‘idles’ at about 4V before the Step and is pulled to 15V for the duration of the Bi-Drive pulse and then back to 4V.NOTE: Bi-Drive switch has a short turn-on delay of about 30us.To maximise benefit from Bi-Drive, PIC S/W is written to turn on the Bi-Drive switch, wait 30us for it to work and then issue the next Step.
TRACE R2 Shows Coil Current building rapidly to about 400mA, as a result of increased Coil Voltage, stepping the Motor onward.After Bi-Drive pulse the Coil Current decays to its ‘Holding’ level.
MOVING ON: With the Steady-State performance checked and behaving as one would expect we can now turn to the Dynamic Operation and this can best be done using Acceleration Profiles.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
29
Search Phase Acceleration Profile
Search Phase Parameters• Acceleration: 1m/s2
• Max. 1-Cell Speed: 0.425m/s• Max. 1-Cell Step Rate: 1062S/S• 1-Cell Traverse Time: 0.85s
Mouse Parameters• Wheel Diameter: 52mm• Half-Steps per Rev: 400• Distance per Step: 0.4mm• Steps per Cell: 450
Acceleration Profileproduced by Sweep Generator
28
Tuesday, 29 September 2009MOUSE PARAMS Using Off-the-Shelf wheels at 52mm diameter and Half-Stepping gives:-
Distance per Step of about 0.4mmTherefore Steps per Cell is 450 - calculated from 180/0.4.
SEARCH PARAMS From the earlier slide we have:-Acceleration of 1m/s/s which leads to:-Maximum Single-Cell speed of 0.425m/s (1062 S/S).Traverse Time of 0.85s - Accel for 0.5Cell and Decel for 0.5Cell.
This can be tested without writing any S/W by using a Sweep Generator. Configure it:-
Start Frequency: 35Hz - NOTE: Duration of first Step in a 1m/s/s Acc Table is 28ms
Stop Frequency: 1062Hz
Sweep Time: 0.85s
Spacing: Linear
Mode: Up/Down
Pressing the ‘GO’ button on the generator makes the Motor ‘move’ 1 Cell. The Torque
can be tested by gripping the Motor shaft - There’s Plenty - it works a treat!.
Of course, using this technique ANY Acceleration Profile may be Bench Tested.
Just calculate the generator settings, program them in and away you go - so what will it do?
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
30
Run Phase Acceleration Profile
Run Phase Parameters• Acceleration: 3m/s2
• Max. 15-Cell Speed: 2.846m/s• Max. 15-Cell Step Rate: 7114S/S• 15-Cell Traverse Time: 1.897s
Mouse Parameters• Wheel Diameter: 52mm• Half-Steps per Rev: 400• Distance per Step: 0.4mm• Steps per Cell: 450
Acceleration Profileproduced by Sweep Generator
29
Tuesday, 29 September 2009MOUSE PARAMS Using Off-the-Shelf wheels at 52mm diameter and Half-Stepping gives:-
Distance per Step of about 0.4mmTherefore Steps per Cell is 450 - calculated from 180/0.4.Therefore Steps per Full Straight is 6750 - 15x180/0.4
RUN PARAMS Acceleration of 3m/s/s which leads to:-Maximum Full-Stright speed of 2.85m/s (7114 S/S).Traverse Time of 1.90s - Accel for 7.5Cell and Decel for 7.5Cell.
Configure generator:-
Start Frequency: 60Hz - NOTE: Duration of first Step in a 3m/s/s Acc Table is 16ms
Stop Frequency: 7114Hz
Sweep Time: 1.90s
Spacing: Linear
Mode: Up/Down
Pressing the ‘GO’ button makes the Motor ‘whizz’!
The system will actually do more than 3m/s/s - up to just over 4 is OK.
MOVING ON: We have proved that the Bi-Drive System performs well but what about the Battery Pack - is it going to be huge?Some more testing is needed.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
31
Energy Needs in Search Phase ...
Current Draw vs Step Rate
Bi-Drive System Disabled
Trace DescriptionOrange: Measured LV Supply CurrentBlue: Calculated Battery Current
Calculate Capacity From• Average Motor Speed: 500 S/S• Average LV Current Drain: 400mA• Average Battery Current: 125mA• Search Duration: 10 mins
Calculated Battery Capacity: 42mAh
30
Tuesday, 29 September 2009This slide shows Current Requirements vs Step Rate for speeds typical of Search Mode.
GRAPH SHOWS Orange: measured MOTOR LV Current vs Step Rate in Search Mode.Blue: calculated BATTERY Current per Motor based on HV = 15V and LV = 3.8V.
To calculate the required capacity for the Search Phase we assume: Average Speed: 500 Steps/Second - from 1060 S/S Max. Step Rate. Average Battery Current Drain per Motor - 125mA 10 Minutes Search Duration.
Battery Capacity required: 42 mAh !!
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
32
… And Run Phase
Bi-Drive System Enabled
Current Draw vs Step Rate
Trace DescriptionOrange: LV Supply CurrentGreen: HV Supply CurrentBlue: Calculated Battery Current
Calculate Capacity From• Average Motor Speed: 2000 S/S• Average LV Current Drain: 270mA• Average HV Current Drain: 280mA• Average Battery Current: 380mA• Run Duration: 30 seconds
Calculated Battery Capacity: 6mAh
31
Tuesday, 29 September 2009This slide shows Current Requirements vs Step Rate for speeds found in Run Mode.
GRAPH SHOWS Orange: measured MOTOR LV Current vs Step Rate in Run Mode.NOTE:- it drops to Zero at about 4000 S/S.- due to Bi-Drive Pulse being 250us long and powering Motor entirely at Step Rates above 4000 S/S.Green: measured MOTOR HV Current vs Step Rate in Run Mode.Blue: calculated combined BATTERY Current per Motor.
To calculate the required capacity for the Search Phase we assume: Average Speed: 2000 Steps/Second - worst case current draw. Average Battery Current Drain per Motor - 380mA 30 Seconds Run Duration - any longer and you don’t stand a chance!
Battery Capacity required: 6.3 mAh !!
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
33
Battery Specification
Voltage Requirements• Nominal: 15V• Maximum: 17V• Minimum: 13V
Capacity Requirements• Search Phase: 84mAh• Run Phase: 12mAh• Ancillary Power: 4mAhTotal Capacity Needed: 100mAh
The Final Selection• 4 LiPo Cells in Series
Nominal Output: 15.5V Capacity: 180mAh Dimensions (mm): 30x20x5 Total Volume (cc): 12.0 Total Weight(gms): 18.0
• Surplus Capacity Gives 1 Hour Maze Time - Testing Higher Peak Output Current
32
Tuesday, 29 September 2009VOLTAGE REQs From previous slides we have a Nominal HV Voltage of 15V.
A sensible spread on this would be ±2V.
CAPACITY REQs Search Phase: 84mAhRun Phase: 12mAhAncillary Power 4mAh (CPU Sensors etc)Total: 100mAh
FINAL CHOICE 4 Lithium Polymer Cells at 180mAh- 4years ago these were the smallest I could easily obtain- they were expensive!However, the extra capacity does provide:-- Increased duration which is useful when testing.- Increased ability to supply the peak currents required by the Motors.
SURPLUS CAP. If anyone is any doubt that these calculations are too complex to be correct, or too optimistic, then let me say that I have had Isambard I running around in a maze for well over an hour between charges.
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
34
In Summary
• Stepping Motors can be Fast Step Rate up to 10000 Half-Steps per Second
- 4m/s using off-the-shelf 52mm diameter wheels Acceleration up to 3 m/s2 - approx 0.3 g
- maximum speed of 2.8 m/s on 15-cell straight
• Stepping Motors can be Efficient 1500 mWh Total Power Consumption
• Stepping Motors can need a lot of Attention! Minimise Host Processor Involvement
- offload the more complex drive functions to a co-processor Write Efficient Interrupt Service Routines
- 2 motors going at 2.8m/s generate an interrupt every 70us!
33
Tuesday, 29 September 2009So, what have learnt?
FAST Can operate at up to 10k S/S- using Off-the-Shelf 52mm diameter wheels gives a speed of 4m/s.- Not too Shabby.
Accelerate at up to 3m/s/s- giving a top speed on a Full Striaght of 2.8 m/s.- Not bad.
EFFICIENT Can do all of this without a battery the size of a planet- a pack occupying a mere 12cc and weighing 18g will more than do the job.
ATTENTION At these speeds they do a LOT of ATTENTION so offload most of the functionality to a Co-Processor and write your ISRs really carefully.
But all that is the subject of another Presentation!
MINOS ‘07
by Martin Barratt
Stepping Motors - they must be good for something!
Stepping Motors
They are more than just door-stops !
Tuesday, 29 September 2009That’s all
Folks.