Silicon ChipUsing Stepper Motors - February 2020 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Publisher's Letter
  5. Feature: The Fox Report by Barry Fox
  6. Feature: Techno Talk by Mark Nelson
  7. Feature: Net Work by Alan Winstanley
  8. Project: Audio DSP by Design by Phil Prosser , Words by Nicholas Vinen
  9. Project: Motion-Triggered 12V Switch by Nicholas Vinen
  10. Project: USB Keyboard and Mouse Adaptor for Micros by Tim Blythman
  11. Project: Stamp-sized digital audio player by Jim Rowe
  12. Project: Colour Maximite Computer
  13. Feature: Circuit Surgery by Ian Bell
  14. Feature: Practically Speaking by Mike Hibbett
  15. Feature: Using Stepper Motors by Paul Cooper
  16. Feature: Max’s Cool Beans by Max the Magnificent
  17. Feature: AUDIO OUT by Jake Rothman
  18. Feature: Make it with Micromite by Phil Boyce
  19. Feature: Electronic Building Blocks by Julian Edgar
  20. PCB Order Form
  21. Advertising Index

This is only a preview of the February 2020 issue of Practical Electronics.

You can view 0 of the 80 pages in the full issue.

Articles in this series:
  • Techno Talk (February 2020)
  • Techno Talk (February 2020)
  • Techno Talk (March 2020)
  • Techno Talk (March 2020)
  • (April 2020)
  • (April 2020)
  • Techno Talk (May 2020)
  • Techno Talk (May 2020)
  • Techno Talk (June 2020)
  • Techno Talk (June 2020)
  • Techno Talk (July 2020)
  • Techno Talk (July 2020)
  • Techno Talk (August 2020)
  • Techno Talk (August 2020)
  • Techno Talk (September 2020)
  • Techno Talk (September 2020)
  • Techno Talk (October 2020)
  • Techno Talk (October 2020)
  • (November 2020)
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
  • Techno Talk (June 2025)
  • Techno Talk (July 2025)
  • Techno Talk (July 2025)
Using Stepper Motors Part 5 | by Paul Cooper | technobotsonline.com Bipolar stepper motor driver modules I n this final part of our mini series on using stepper motors we will focus on the features of commercially available stepper driver modules suitable for home constructor use. The stepper drivers in this article are all manufactured from the US company pololu.com and are available in Europe from UK company Technobotsonline.com Before we delve into the more advanced stepper drivers available, we need to be sure we know how to select a hybrid stepper motor, as its characteristics may dictate the stepper driver required. Hybrid stepper motor characteristics In part 1, we briefly introduced the basics of choosing a stepper motor in terms of frame size (NEMA), shaft type, holding torque, speed and step size. However, the range of stepper motors available can be quite daunting and their differences may appear subtle. Nevertheless, understanding the features will help in finding the ideal match for your application. Let’s assume, as it is most likely to be the case, each stepper motor you look at has a step angle of 1.8° and microstepping will be used to get the resolution needed. The remaining two vital considerations are holding torque and angular velocity. It’s straightforward to work out the angular velocity or rotational speed (RPM) that your project needs, but holding torque is not always so easy to find. Holding torque is certainly of interest for building a steady cam for example, but for applications where torque is needed at high rotational speeds, beware that the torque available from a stepper motor decreases as its rotational speed increases. Table 8 compares the specification for four similarly sized NEMA 17 (42 × 42mm) hybrid motors. Table 8 highlights variations in motor performance, which is primarily due to the winding conductor size and which in turn relates to the number of turns on the winding. Motors with many turns of fine wire, such as for types 1 and 3 offer a reasonable holding torque (32 to 36 Ncm) for a phase current of 0.4 to 0.8A. However, many turns of fine wire results in a higher inductance; and a higher inductance translates into a lower peak rotational speed. Note how motor type 1 has about half the torque of type 2 at 450 RPM, even though their holding torques are similar. Type 3 cannot even reach 450 RPM; it will stall before it gets to that speed. If our application needs good torque at high speeds then we need a motor with a low inductance, such as types 2 and 4. Low-inductance motors have fewer turns of larger-gauge winding wire, but this comes at a cost of needing a higher phase current. The resulting lower operating voltage is a benefit in that we can easily overdrive the motor to further counteract the inductance, as described in the previous part of this series. Out of these four motors, you would choose type 4 for applications where you needed high torque at high speed and type 3 where low speed and low operating current were specified. Specialist suppliers can offer many hundreds of variants of stepper motors for optimum matching, but if your application is not so critical then many other electronics retailers offer a smaller range of motors. Case study Recently, I was involved in selecting hybrid motors for a CNC router. The x and y axes needed to move at 9m/min with a step size of 15µm, but the force needed was uncertain. Theory suggested a suitable NEMA 23 motor specification for the speed, but reality was quite different for the forces involved. It took three attempts to get the right motor specification. Each motor was tested by accelerating the y-axis with the gantry restrained by a spring balance on a tether. A point would be reached when the motor stalled and the corresponding maximum force was read off the spring balance. While each motor would work in terms of the 9m/min speed needed, two of the motors failed to provide adequate torque. The third was successful and was adopted for production. Terminology In describing stepper motors, we have used some engineering terms that may not be familiar to all readers, so let’s expand on a few of the more fundamental terms: torque, hysteresis and angular velocity. Table 8: Comparison of four NEMA 17 hybrid stepper motors 54 Type Motor depth (mm) Holding torque (Ncm) Voltage (V) Phase current (A) Phase resistance (Ω) Inductance (mH) Torque at 450 RPM (Ncm) 1 39 36 5.4 0.85 6.3 10 15 2 40 45 2.2 2 1.1 2.6 28 3 48 32 12 0.4 30 25 Stall 4 48 59 2.4 2 1.2 3 39 Practical Electronics | February | 2020 D T r 1 kg F Fig.35. Relationship between torque, force and distance. Torque First, torque, which is a turning force that causes rotation around an axis and has the SI unit of newton metres (Nm), although for the size of stepper motors we generally use, newton centimetres (Ncm, where 1Nm = 100Ncm) is more commonly used. A frequently asked question from customers at Technobotsonline.com is, ‘What size motor do I need to lift a small load?’. (This question equally applies to brushed DC motors as well as stepper motors) This enquiry is often missing any supporting customer data to allow a calculation to take place. Ultimately, it is torque at a particular RPM that we need to derive. For example, we require a stepper motor fitted with a 50mm-diameter pulley fixed to its shaft to lift a mass of 1kg a distance of 1m in 1s (see Fig.35). The force F due to the 1kg mass is given by: F = ma, where m is the mass and a is the acceleration due to gravity (g, so here, a = g = 9.8m/s2). Thus, we have: F = 1 × 9.8 = 9.8N (newtons). The torque (T) is the force (F) multiplied by the perpendicular distance from the point where the force acts to the axis of rotation, which for a circular pulley is simply its radius (r), or half its diameter (D). In other words, T = F × r = F × D/2. For the 50mm (0.05m) diameter pulley, T = F × D/2 = 9.8 × (0.05/2) = 0.245Nm (or 24.5Ncm). That’s fine for the holding torque but we need that torque at a certain RPM to lift the mass in the specified time period. The pulley circumference (C) is given by: C = D = 3.14 × 0.05 = 0.157mm. Therefore, we need 1/0.157 = 6.37 rotations of the pulley in one second or 6.37 × 60 rotations per minute, which is 382 RPM. It looks very much like only motor types 2 and 4 in Table 8 will manage the 24.5Ncm at 382 RPM, but there is another important consideration, and that is the acceleration required. The quicker you wish to accelerate the load, the more force and thus more torque required. Even maintaining a constant velocity will require more motor torque. Let’s see what effect this has on the stepper motor torque when we accelerate our 1kg mass to full speed in just 0.05s. The required acceleration from rest is calculated from: final velocity / time, where final velocity (m/s) = 1m/s and time = 0.05s, giving 1/0.05 = 20m/s2. The additional force due to accelerating the mass is again F = ma, which supplies 1 × 20 = 20N. Adding this additional force of 20N to the steady state force of 24.5N gives 44.5N, and thus a revised torque of T = 44.5 × (0.05/2) = 111Ncm. It is now becoming obvious that none of the motors in Table 8 will have sufficient torque to meet this criteria. If the application allows, rather than choose a different motor, reducing the rate of acceleration significantly could allow motor type 4 to be used. This demonstrates the importance of knowing the forces involved when sizing a stepper motor. The theoretical example above ignores any other losses such as friction, so as with most engineering designs, it would be prudent to add a safety margin to the calculated motor size. Hysteresis In the last article we discussed the problem of too small a step size resulting in the motor rotor not responding to a step change due to losses in the motor and the relatively small step change in the magnetic field. Thw result is a positional error caused by the magnetic hysteresis and/or mechanical friction. Put simply, if you push something and it moves, when you release it, does Table 9: Pololu.com motor stepper motor drivers comparison Driver chip Min operating voltage (V) Max operating voltage (V) Max continuous current per phase1 (A) Peak current per phase2 (A) Microstepping down to A4988 8 35 1 2 1/16 DRV8825 8.2 45 1.5 2.2 1/32 DRV8834 2.5 10.8 1.5 2 1/32 DRV8880 6.5 45 1 1.6 1/16 4.5 35 1.5 TB67S279 FTG 10 47 1.1 2 1/32 Auto Gain Control ADMD TB67S249 FTG 10 47 1.6 4.5 1/32 Auto Gain Control ADMD STSPIN 820 7 45 0.9 1.5 1/256 STSPIN 220 1.8 10 1.1 1.3 1/256 TB67S279 FTG 10 47 1.2 2 1/32 Auto Gain Control ADMD TB67S249 FTG 10 47 1.7 4.5 1/32 Auto Gain Control ADMD AMIS-30543 6 30 1.8 3 1/128 TB67S128 FTG 6.5 44 2.1 5 1/128 DRV8711 8 50 4 6 1/256 MP6500 Pot MP6500 Digital 2.5 2 Special feature AutoTune 1/8 Digital current control Digital current control SPI interface Low-EMI PWM Auto Gain Control SPI interface Back EMF fb ADMD Back EMF feedback 1. On Pololu carrier board, at room temperature, and without additional cooling. 2. Maximum theoretical current based on components on the board (additional cooling required). Practical Electronics | February | 2020 55 V 3 P 3 (o u t) adjusts the current decay time for the winding current to reduce ripple and switch to a fast decay in order to reach the next step quickly. It is also possible to configure the driver to have fixed slow, fast or mixed decays. Other features include over-temperature thermal shutdown, overcurrent shutdown, short-circuit protection and under-voltage lockout. A number of the drivers in Table 9 have auto gain control and ADMD like the TB67S279FTG (Fig.37). ADMD is the term Toshiba use to describe their Advanced Dynamic Mixed Decay architecture. ADMD is similar to the Texas mixed decay described above, although Toshiba claim theirs is able track input currents more closely than ‘conventional’ mixeddecay modes. D R V 8 8 0 0 E N A B L E V M M 1 G N D M 0 B 1 T R Q 1 B 2 T R Q 0 A 2 S L E E P A 1 S T E P F A U L T D IR G N D + M o to r p o w e r su p p l y ( 6 . 5 – 4 5 V ) 1 0 0 µ F V D D M i cr o co n tr o lle r G N D T O F F Auto gain control (AGC) L o g ic p o w e r su p p l y ( 1 . 8 – 5 . 3 V ) Fig.36. The Texas DVR8880 driver breakout board. (Image courtesy of Pololu.com). it return to the starting point? If not, it’s exhibiting hysteresis. Angular velocity Angular velocity is defined as the rate of change of angular position of a rotating body and is measured in angle per unit of time; for example, degrees or radians per second, or revolutions per minute (RPM). While RPM is not really a recognised way of describing angular velocity, RPM and angular velocity are used interchangeably, especially where motors are concerned. Advanced stepper motor drivers and current per phase for example. Let’s now look at some of the special features on selected drivers. DRV8800 Take the DRV8800 (Fig.36) for example. It has some rather nice extra features. The on-board potentiometer sets the maximum current just like on the A4988 from last month, but the digital inputs TRQ1 and TRQ2 can be used to scale the current limit to 25%, 50%, 75% and 100%. This allows you to reduce the winding current when full speed or torque is not required; for example, when the motors are idle. The second new feature to describe is the default mode of ‘Autotune’ (a trademark of Texas Instruments). Autotune automatically tunes stepper motors for optimal current regulation performance and compensates for motor variation and aging effects. Autotune automatically Auto gain control automatically optimises the motor current by sensing the load torque applied to the motor and dynamically reducing the current below the full amount. This allows it to minimise power consumption and heat generation when the motor is lightly loaded, but if the driver senses an increased load, it will quickly ramp the current back up to the full amount to try to prevent a stall. Stepper motors driven at their rated maximum current will most likely run hot, especially when idle, and they may even become be too hot to touch. AGC can help reduce the heat rise in the motor. Another feature of the Toshiba driver is yet another acronym, ACDS or Advanced Current Detection System. This can monitor the motor winding current without the need for external current-sense resistors. Over-temperature shutdown, over-current detection, motor load open are also standard in the driver chip but additionally, Pololu.com has added reverse-voltage protection up to 40V to the breakout board. L T H B O O S T F L IM C L IM 1 C L IM 0 56 A G C 1 A G C 0 In the last article, the A4988 driver was described because it offered the basic requirements of a bipolar stepper motor driver in terms of step, direction and microstepping. From this point on, we will differentiate between stepper motor drivers and stepper motor controllers. Drivers like the A4988 interface via their step and direction T B 6 7 S 2 x9 F T G V M lines, but generally need a G N D microcontroller for all but L o g ic p o w e r ( 5 V o u t ) V C C u s p p l y ( 5 V ) the most basic of applications V IN V R E F A – V R E F B that do not require positional M o to r p o w e r G N D D M O D E 0 su p p l y ( 1 0 – 4 7 V ) control. Stepper controllers G N D D M O D E 1 contain a microcontroller 5 V O U T B + D M O D E 2 on-board, allowing for other G N D O U T B – (D IR ) C W /C C W means of interfacing that do not 5 V M i cr o co n t r o l l e r O U T A – necessarily require an external (S T E P ) C L K microcontroller. O U T A + E N A B L E Table 9 details 15 different R E S E T stepper motor driver chips M O A t l e a st o n e D M O D E ( st e p that are all available as a r e so l u t i o n p i n m u st b e L O 1 co n n e ct e d t o l o g i c h i g h Pololu.com breakout board L O 2 ready for use in your project. Some of the differences between the drivers are selfexplanatory; minimum and maximum operating voltage Fig.37. The Toshiba TB67S2x9FTG series of driver breakout boards. (Image courtesy of Pololu.com). Practical Electronics | February | 2020 AMIS-30543 driver A M IS -3 0 5 4 3 V D D (5 V o u t) The AMIS-30543 (Fig.38) is a driver I O R E F we rather like at Technobotsonline. L o g ic p o w e r G N D su p p l y ( 5 V ) com because compared to others we V M O T N X T (S T E P ) have tried, motors run cooler and M o to r p o w e r G N D D IR quieter. It does have one significant su p p l y ( 6 – 3 0 V ) D O complication – before it can be used it 5 V M i cr o co n t r o l l e r M O T X P D I has to be initialised with an external M O T X N microcontroller over its SPI bus to C L K set its various operating parameters. M O T Y N C S Therefore, this controller cannot be M O T Y P C L R V D D used in a standalone application E R R G N D even though it does have step and P O R /W D direction pins; you will need a PIC S L A ( filte r e d ) or Arduino microcontroller. Pololu.com have provided an G N D V B B (o u t) Arduino library that takes care of the basic SPI interfacing as well as some of the more advanced Fig.38. The ON Semiconductor AMIS-30543 driver breakout board. (Image courtesy of Pololu.com). features. Setting the current limit, microstepping and enabling the driver TB67S279FTG driver described earlier. The driver chips are very limited in over SPI are required before you can Also on the controller breakout board is this regard, but with some additional use the driver, and these values are not a PIC18F45K50 microcontroller to take circuitry it is quite possible. Pololu. retained when power is cycled. In a care of the additional interfacing options com have a range of stepper controllers, forthcoming article we shall be using this and new features. which they call their ‘Tic family’. In driver for a 3-axis CNC controller, so we’ll In addition to the inherent features of addition to step/direction control, each provide a more in-depth explanation of the TBS67249FTG, with the Tic T249 of the controllers offers six additional this driver then. you have: means of interfacing: Features of the AMIS-30543 include n Adjustable acceleration and n USB (direct connection to a computer) thermal warning and shutdown, overdeceleration periods n TTL serial current detection, open-coil warning, n Maximum stepper speed: 50,000 steps n I2C serial for microcontrollers charge-pump failure and SLA. SLA (speed / sec; minimum speed: 1 step / 200 secs n RC servo pulses / load angle) is an output pin that provides n Digitally adjustable current limit n Analogue voltage (potentiometer / an output voltage that indicates the level n Input calibration and adjustable scaling joystick) of the motor back-EMF (BEMF) voltage. degree for analogue and RC signals n Quadrature encoder The SLA pin can be used for stall detection n Optional limit-switch inputs with or closed-loop control of the torque and homing capabilities Many of the settings in the Tic controllers speed based on the load angle. This is a n Optional kill switch input can be configured using a free utility more advanced feature, but does give an (for Windows, Linux and Mac) which indication of what is now being included I2C, USB and TTL are beyond the scope simplifies initial setup and allows for in modern stepper driver chips. testing and monitoring of the controller of an introductory article, but we hope to using a micro-B USB cable. cover them later; however, the other three options are certainly worth examining here. Stepper motor controllers All of the drivers described so far use Tic T249 the step and direction interface, but it One example of these stepper drivers is the Radio control Servo could be useful to have other interface Tic T249 (Fig.39) based on a TB67S249FTG, Many of us have dabbled with radio control options available for certain applications. which is a higher-rated version of the (RC) models and are likely to be familiar with servos connected to the RC receiver. Theses servos use an industry-standard S T E P D i r e ct d r i ve r signal with a pulse width in the range of a ce s D IR 1-2ms, where 1ms is 100% transmitter G N D U S B M i cr o - B R e ve r se - p r o t e ct e d stick down, 2ms is 100% stick up and co n n e ct i o n V I N a ce s V M 1.5ms is in the neutral or middle position. Traditionally, this pulse is usually updated E R R every 20ms. Connect your RC receiver to R S T the Tic (Fig.40) and the Tic behaves as S C L though it is a servo. Unlike a traditional I2 C S D A /A N V IN (1 0 V – 4 7 V ) servo, there is no positional feedback; G N D G N D it is open loop, although you can use a T X homing switch input. T T L se r i a l R X A 2 Using the configuration utility, you can M R C A 1 set the number of steps taken in either ( r e g u la te d o u tp u t) 5 V B 1 direction relative to the RC pulse width. G N D B 2 Another RC mode is available where the Tic acts like an electronic speed controller B i p o l a r st e p p e r m o t o r (ESC) but with a stepper motor rather than T IC T 2 4 9 a DC motor. This time the RC pulse width relates to the stepper motor speed, where Fig.39. Tic T249 stepper controller. (Image courtesy of Pololu.com) Practical Electronics | February | 2020 57 T ic T ic P o te n tio m e te r / a n a l o g u e j o yst i ck 5 V + S R C 4 r e ce i ve 3 2 – r 1 S + – R C 5 V (o u t) G N D Fig.40. Connecting an RC radio receiver to a Tic controller to act as a servo. (Image courtesy of Pololu.com). 1.5ms is stopped, 1ms is full reverse speed and 2ms is full forward speed. Analogue voltage In this mode, instead of the RC pulse input, you can use a voltage or potentiometer (Fig.41) to control the position of the stepper motor or the motor speed, just like the RC option. Encoder position Stepper motors are usually driven in open loop, which means there is no physical feedback of its actual angular position (which you would have in closed loop). CNC-type machines will have a home switch, the controller would on request 58 SCL S D A /A N G N D Fig.41. Connecting a potentiometer to the Tic controller. (Image courtesy of Pololu.com). a rotary encoder handwheel (Fig.42); for example this item: http://bit.ly/ pe-feb20-hand Like the RC servo and analogue modes, the encoder mode can be set up for either positional or motor speed control. Over these five articles, we have covered the various types of stepper motors and stepper drivers – from a basic controller you can build with simple components to advanced drivers and controllers. I hope some of the mysteries surrounding the use of stepper motors have now gone and you are already looking at how you can incorporate steppers into your next project. We shall be covering the build of a 3-axis CNC controller next, producing a system that is ideal for making a desktop router or similar. drive until the home position switch is reached, and this would reset the internal counters to its origin position. From there, the controller would keep track of how many steps it moves so it believes it knows where it is. If the motor is stalled T ic or loses steps then you will have a positional error. The trick here is to 5 V 5 V 100kΩ engineer the system so that the motor Q u a d r a t u r e e n co d e r (both) is never stalled or driven so quickly G N D /C O M /C GND that steps are lost. Alternatively, B T X encoders are available in both linear A R X and angle (rotary) varieties to give 5 V (o u t) (V C C ) feedback of mechanical position and hence enable closed-loop control. The Tic T249 is not capable of providing closed-loop motor control Fig.42. Connecting a quadrature encoder to a with encoder feedback but it can use Tic controller. (Image courtesy of Pololu.com). Practical Electronics | February | 2020