element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
Blog Stepper Motor Driver Kit + Motor - Stall Guard
  • Blog
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
  • Share
  • More
  • Cancel
  • Author Author: Workshopshed
  • Date Created: 26 Aug 2019 7:32 PM Date Created
  • Views 924 views
  • Likes 5 likes
  • Comments 0 comments
Related
Recommended

Stepper Motor Driver Kit + Motor - Stall Guard

Workshopshed
Workshopshed
26 Aug 2019

For my last part of this road test I'm looking at the stall guard function. This works by sensing the current through the motor coils so my first step was to look at the datasheet chapter 9 on sense resistors. Thanks to Jan Cumps for reviewing the schematic earlier in the roadtest and identifying that the evaluation board uses a 0.06Ω resistor. Note that there are two sense resistors, one for each of the motor coils.

imageimage

The motor current can then be determined with the following calculation and the parameters set in the registers:

imageimage

To simplify my testing I'll set the IRun and IHold values to be the same and set the IHold to zero. I also want to ensure that the motor current is well below what the motor capabilities.

To calculate the parameters I put the equation into a google sheet: https://docs.google.com/spreadsheets/d/1a_DELRjCXUpWIEZDAQksnYStvxky-kvp0BULAeh2S6I/edit?usp=sharing

 

My initial values were iRun = 15, Global Scaler = 3 which gives a current reading of 0.62A, slightly more that the readings I'd had from the power supply when I'd did the test for driving the stepper motor.

 

There was more reading to be done at this point as the stall guard was covered in Chapter 13.

 

There's another two paramters mentioned here. TCOOLTHR and TSTEP which are covered in 6.2.

Set TCOOLTHRS to a value above TSTEP and enable sg_stop to enable the stop on stall feature. Make sure, that the motor is safely stopped whenever it is stalled. Increase SGT if the motor becomes stopped before a stall occurs. Restart the motor by disabling sg_stop or by reading and writing back the RAMP_STAT register (write+clear function).

image

Stall Guard IDE

The sg_stop mentioned in the above text is found in the SW_MODE register an sgt (stall guard threshold) is in the COOLCONF register. These can all be viewed in the IDE via the register browser

image

The stall guard IDE provides access to configure these registers and provides a graphical display of the resulting outputs. I applied a simple load to the 3D printed drum by grabbing the outer rim. The sg_stop flag was also set. As the load was applied the graph moved down and as it went below the threshold the motor stopped. I reset the motor using the reset button but this did not re-enable the stop on stall. So I toggled sg_stop and that did result in the stop on stall being re-enabled.

The registers don't automatically update with the stallGuard2 settings. So you need to press the button to read out all the registers.

image

image

Note that when the motor is stopped the shaft will be locked depending on the value of the standby current (IHold). So a large load could back drive the motor if iHold is to low and the mechanical setup allows back driving.

I had initially thought that the dcStep wizard would also allow the tuning of the stallGuard2 functionality. However, that is a completely different piece of functionality and hence does not apply in this case.

dcStep is a new efficient stepper motor commutation scheme that focusses on utilizing most of the available output torque (ca. 80%) of the stepper motor. With dcStep, a stepper motor behaves like a DC motor if the load exceeds the motor output torque for the actual working point. It automatically adapts the motor velocity to the actual load by moving along the shape of the stepper motor torque curve. Due to this automatic load dependent deceleration and acceleration, the stepper motor does not lose any steps or stalls with the tradeoff of having a varying velocity. Nevertheless, it will arrive at the target position in any case without step loss. That is, dcStep keeps load and torque in balance.

Although the parameters are a little complex and scatter around the manual, the IDE screen does allow these to be easily configured and Stallguard does work as expected to protect the motor and systems from mechanical faults.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube