🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Trouble w/ Stepmotor Driver Module v1.1 & UiFlow2

    Modules
    1
    2
    333
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cristian.spiescu
      last edited by

      Hello,

      The sample code didn't work for me out of the box. W/ the following modifications, it kind of works:

      66ed57ed-222c-455a-9548-1756f7602125-image.png

      1/ I needed to switch this to disable (or eliminate the line). Really curious. You give the command "please enable", and it does the opposite. In my opinion this is a bug.

      2/ It took a lot of trial and error to understand the purpose of setting the PWM freq. I was wondering myself whether it reduces the voltage like in a H-bridge/normal DC motor? Or it controls how much increments per time unit (sec?)? In my case (a NEMA 23 motor). I understood that its the later.

      • 1000 (1kHz) is way too much.
      • 100: the motor spins, but quite un-smooth
      • 300: the motor spins smoothly
      • 1: an increment each second

      My question is the following: how can I use precise movement? If I tell it "please rotate w/ 50 increments per second", it does the work. But how can I know when those increments finished? Using a timer doesn't seem the right thing to do. I saw that other libs, have this kind of "feedback". Or I'd need an API where I say: please move X increments (instead of saying please move at a rate of Y increments per second).

      C 1 Reply Last reply Reply Quote 0
      • C
        cristian.spiescu @cristian.spiescu
        last edited by

        My findings:

        1/ I needed to switch this to disable (or eliminate the line). Really curious. You give the command "please enable", and it does the opposite. In my opinion this is a bug.

        I'm pretty sure we are talking about a bug. I.e. that boolean is somehow interpreted negated.

        My question is the following: how can I use precise movement?

        I'm pretty sure the answer is NO (using this lib). I struggled a bit and wrote myself some code. But I ended using another lib. More info in this post.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post