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

    BALA2 Fire encoder question

    Arduino
    2
    6
    2.7k
    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.
    • S
      slavav
      last edited by

      The question is : how exactly many pulses produce encoder per 1 full revolve of the wheel ?

      C 1 Reply Last reply Reply Quote 0
      • C
        Cognitive5525 @slavav
        last edited by

        @slavav this one:
        https://docs.m5stack.com/en/app/bala2fire
        ?
        It seems not to appear on spec-sheet.

        If you have one in your possession, make a test-program to count it yourself ?

        1 Reply Last reply Reply Quote 0
        • S
          slavav
          last edited by

          i actually wrote test. And it produce surprisedly big number: ~400. It is pretty difficult to adjust wheel to exactly same position after 1 revolt. So the value vary like: 415, 410, 412 ...

          1 Reply Last reply Reply Quote 0
          • C
            Cognitive5525
            last edited by

            Are you counting incremental with both A and B pulses?

            1 Reply Last reply Reply Quote 0
            • S
              slavav
              last edited by

              I'm using just one wheel:
              // Get motor encoder value
              bala.UpdateEncoder();
              encoder = bala.wheel_left_encoder;

              1 Reply Last reply Reply Quote 0
              • C
                Cognitive5525
                last edited by Cognitive5525

                There is an A & B pulse from each wheel.
                I think you'll need to acquaint yourself with Quadrature Encoders.

                A quick check to do:
                Try to make two temporary but firm mechanical stops with say 100 degrees distance (not important to know the exact angle between them) and then repeatedly move the wheel between the stops. You should get the same two values (+/- 1 or 2) every time at each stop.

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