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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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
Community Hub
Community Hub
Member Blogs Clem's Stepper Motor Puzzle!
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: mayermakes
  • Date Created: 2 Feb 2023 4:07 PM Date Created
  • Views 27529 views
  • Likes 16 likes
  • Comments 43 comments
  • stepper motor
  • puzzle
Related
Recommended

Clem's Stepper Motor Puzzle!

mayermakes
mayermakes
2 Feb 2023
Clem's Stepper Motor Puzzle!


Developing electronic circuits often feels like solving a puzzle. And solving this puzzle could win you a Multicomp Pro Tablet Oscilloscope!


And while finding the basic application to make an IC do its magic is often quite easy, some questions often remain.
Among the crucial skills of makers and engineers is interpreting a datasheet and this will come in very handy for the following puzzle:

This time we are looking at a staple of the 3d printing and CNC world:  the TMC2130 stepper motor driver.


imageimage

The photo and schematic show a basic circuit that allows the user to control the movement of a bipolar stepper motor with simple button pushes.
For practical reasons the built circuit has the enable pin(EN) pulled low to activate the circuit.  The Arduino is only used to pass on 12V, 5V and GND to the tmc2130, it has not other connections to the circuit.
Pulling the DIR pin high or low determines the direction of the motor movement.
Pulsing the STEP pin makes the motor move.
But how far does the motor move?

The pins MS1, MS2,MS3 (also known as CFG0,CFG1,CFG2) determine the movement settings; the most widely used configuration is to pull all 3 of them low.
CFG2 determines where to get the voltage reference from. Low level sets it to internal.
The other two pins are much more interesting.
By pulling MS1/CFG0 and MS2/CGF1 low, we set the driver to "Full step," no interpolation and spreadcycle mode.
The most common stepper motors need to do 200 steps per revolution (1,8° angle change per full step).
So for a full rotation we need to press the step button 200 times.

So far so good.

Here is the puzzle:
What happens if you just leave MS1/CFG0 and MS2/CFG1 floating (open) -- how often would you have to push the STEP button for a full rotation?

Or do you think the motor would just not turn at all?

You can find the solution in theory and practice!  We are interested in not only getting the answer right but in seeing the work you did to arrive at this answer.

Tell us if you tried you try it out practically (show us pictures). Or did you study datasheets or video tutorials (share the links you found helpful)?

The member who provides the best detail on how he or she solved the puzzle wins the prize!

Terms and Conditions  Multicomp Pro Tablet Oscilloscope

  • Sign in to reply

Top Comments

  • mayermakes
    mayermakes over 3 years ago +4
    https://youtu.be/4N-O1IzRSfc Lets go over the main aspekts of the entries for this competition and find out who is the winner!(TLD:DR skip to the end if you just want to know who won) The element14 community…
  • beacon_dave
    beacon_dave over 3 years ago +3
    The motor won't turn at all as Clem appears to have forgotten to plug the Arduino into a power supply...
  • misaz
    misaz over 3 years ago in reply to mayermakes +3
    Thank you for sending it. Yesterday it arrived and I am playing with it. Fundamental signals are well shown. More details I will post in blog soon.
  • misaz
    misaz over 3 years ago +2
    Hello Element14 community. Today I completed my practical part of this puzzle, and I would like to post my solution. In recent two weeks I did theoretical analysis and two practical experiments. The…
  • mayermakes
    mayermakes over 3 years ago +2
    thank you all for your Entries! it has been a blast seeing how this puzzle challenge played out with a lot of different approaches to finding the solution! We will carefully review all the entries, even…
  • Siana
    Siana over 3 years ago +1
    Trick question! Pololu does not manufacture a TMC2130 breakout. Pololu SKU 2130 is an entirely different thing, a brushed driver module. So that's a Waterrott 2130 stick there. The pins are connected…
  • rsjawale24
    rsjawale24 over 3 years ago in reply to dougw +1
    I would love to do the experimental analysis as theory often needs to be validated using experiments. But I do not have the resources and currently I'm running on a tight schedule. Maybe someone can do…
  • rsjawale24
    rsjawale24 over 3 years ago in reply to misaz +1
    Nice! I always love to see practical applications!
  • mayermakes
    mayermakes over 3 years ago in reply to misaz +1
    Hope you get great use out of your shiny new gadget!
  • rsjawale24
    rsjawale24 over 3 years ago in reply to misaz

    Nice! I always love to see practical applications!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • misaz
    misaz over 3 years ago in reply to mayermakes

    I originally also thought that numbering is shifted and MSx are numbered starting at 1 while CFGx are numbered starting at 0. But opposite is true. The MSx naming comes from original module containing A4988 driver.

    See original pololu module with A4988 driver (image from pololu website):

    image

    Pins from top to down are EN, MS1, MS2 and MS3.

    On TMC2130 module pins from top to down are CFG6, CFG1, CFG2 and CFG3:

    image

    CFG6 is Enable pin and CFG1 corresponds to equivalent MS1 pin and similarly for 2 and 3. Instead of reset pin there is CFG0 exposed. Interesting is unconnected pin 3 which have silkscreen label SDO but there is not SDO on TMC2130. It is most probably just for some compatibility with some other module here.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • misaz
    misaz over 3 years ago in reply to alex_richter

    dedge is not configurable in standalone mode and default value is 0 as far as I know and have experimentaly evaluated. The only way to configure dedge is using SPI write and we have no SPI in this puzzle.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mayermakes
    mayermakes over 3 years ago in reply to alex_richter

    oh someone found a thing....
    a thing that is indeed confusing  (but does not change which answer would be correct)
     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • alex_richter
    alex_richter over 3 years ago in reply to alex_richter

    I've been thinking about this Puzzle some more.
    The Price of this challenge is an oszilloskope, so maybe this Challenge is more about stuff you'd do with an oszi?
    Also there is a hint of only the Pullup on the Step Button beeing present  in the comments.

    So I took another look in the Datasheet. Indeed there is an internal Filter mentioned in it.

    at this time i don't have any new answers, so i am just writing down my thoughts.

    "Figure 16.1 shows the timing parameters for the STEP and DIR signals, and the table below gives
    their specifications. When the dedge mode bit in the CHOPCONF register is set, both edges of STEP
    are active. If dedge is cleared, only rising edges are active. STEP and DIR are sampled and
    synchronized to the system clock. An internal analog filter removes glitches on the signals, such as
    those caused by long PCB traces. If the signal source is far from the chip, and especially if the signals
    are carried on cables, the signals should be filtered or differentially transmitted
    "

    That made me remember, in my original Post i discovered something gegarding the Chopper. "So leaving it Open would set it to 332tclk"
    This from all possible settings is the slowest. - hmm this might have to do something with the puzzle.
    But reading the manual some more, i discover, it is a timing  setting for the Driver "TOFF" and shouldn't have anything to do with the Step dir inputs.

    - so probably not...

    As we can see in the following picture, there is some minimum time required to count an signal as a step.
    I actually encountered this in one of my 3D printers, where the Step frequency was to high for the driver to handle and i had to lower the speed a bit, otherwise the driver would just ignore some of my steps.
    image
    I think this is the only kind of thing, that would change the amount of Steps required that i could think of. Usually those drivers are connected to a mainboard and therefore no signal debounce is required. With this Button tho this is a different case.


    The problem is, debouncing is in my experience usually in the domain of ms, while this internal thing is only about a couple of ns.
    So a bouncing Button will be counted as valid input thus lowering the desired amount of Button pushes to a unreliable amount lower than expected.

    There is also the setting "dedge" wich, when set will use both, rising and fallign edge of the step signal. This would also half the required no of buttons presses.
    But no word about that in the description, So i don't think this is a clue.

    Taking a look for hints in the description:
    what i realise is the part, where the CFG Settings are described:
    "CFG2 determines where to get the voltage reference from. Low level sets it to internal.
    The other two pins are much more interesting.
    By pulling MS1/CFG0 and MS2/CGF1 low, we set the driver to "Full step," no interpolation and spreadcycle mode."

    But compared tho the datasheet this is wrong. CFG2 has nothing to do with where to get the voltage reference from. It defines the microstepping value together with the CFG1 Setting.
    -hm maybe this is where to look at.

    So in the datasheet of the tmc2130 the setting that is setting the voltage reference is actually CFG3.
    Maybe there is a different Naming sheme for the break out board? As others mentioned, there doesn't seem to be a tmc2130 related product by pololu. So i guess this is referencing the footprint originally designed by pololu. The Board in the picture provided seems to be the Board distributed by  Waterott.(https://shop.watterott.com/SilentStepStick-TMC2130-V2_1) There is no datasheet provided, but i found this schematic:

    image

    Interesting. Compared to the Pololu Pinout, the Pins Connected to MS1-3 would be CFG1-3. CFG0 is where the RST Pin was.
    So i think there is actually an error in the puzzle descritption.  Here is another screenshot clearly describing the functionality of CFG2 and CFG1.
    image
    So in the description :" By pulling MS1/CFG0 and MS2/CGF1 low, we set the driver to "Full step," no interpolation and spreadcycle mode." really means By pulling MS1/CFG1 and MS2/CGF2 low, we set the driver to "Full step,..."

    Also the question should be: "What happens if you just leave MS1/CFG1 and MS2/CFG2 floating (open) -- how often would you have to push the STEP button for a full rotation?

     We can look it up in the picture above. both open means x16 microstepping with interpolation to 256 microstepping.
    So the answer still is = Motor fullstep no (200) x 16 = 3200. Driven by mechanical button however there will be no calculatable, reliable answer because of button bouncing and i guess that is the clue about the puzzle and something you'd need the oszi for.

    Anyways, i read thorugh the other comments and i think it is amazing how much effort some of you spend into this. I am really wishing for this oszi, but i can also see you deserving it.
    So good Luck to all of us. I look forward to the solution of this riddle.
    Cheers,
    Alex

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<>
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 © 2026 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