🤖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

    Scheduled Pinned Locked Moved Modules
    2 Posts 1 Posters 1.7k Views 1 Watching
    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 Offline
      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 Offline
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post