Quadrature Encoders

Поділитися
Вставка
  • Опубліковано 25 січ 2025

КОМЕНТАРІ • 34

  • @Komal_1989
    @Komal_1989 3 роки тому +1

    Brilliant video and explanation. As others have noted, the outcome needs to be changed to match the table... Then it works flawlessly:
    outcome=[0,1,-1,0,-1,0,0,1,1,0,0,-1,0,-1,1,0]

  • @donaldduck5731
    @donaldduck5731 3 роки тому +1

    Thanks, exactly what I wanted to know, short, sweet and easy to understand

  • @boharihamen
    @boharihamen 4 роки тому +1

    Thank you. Very clear video on how rotary encoders works.

  • @dieselmakesmehappy
    @dieselmakesmehappy 5 років тому +1

    Very simple explanation. Much appreciated.

  • @szocsszilard111
    @szocsszilard111 3 роки тому +1

    Thank you so much for the amazing presentation and the code! It helped me a lot with my encoder!

  • @zilmara5862
    @zilmara5862 4 роки тому +1

    Thank you sooo much this really helped me understand how encoders work!

  • @samadhistate9637
    @samadhistate9637 2 місяці тому

    If my motor has 64 cpr (400 per revolution of the gearbox output shaft) how do i determine my logic table, or is it the same (ie. quadrature) just more times the signal is generated.

    • @outofthebots3122
      @outofthebots3122  2 місяці тому

      The measurement is in ticks then you can convert ticks to degree to radians

  • @ace.mccloud5425
    @ace.mccloud5425 Рік тому

    Hi,
    Is it possible to make this work on a Motor which is ripped off from a PSP UMD Drive using any Microcontroller? There are 4 Pins. Can someone help me with the Pin Connections?

  • @pramodmyakal6875
    @pramodmyakal6875 4 роки тому

    Wonderful and super simple explanation

  • @archit_shah
    @archit_shah 5 років тому +2

    There seems to be an error in your list outcome.
    shouldn't it be
    outcome=[0,1,-1,0,-1,0,0,1,1,0,0,-1,0,-1,1,0]
    instead of
    outcome=[0,-1,1,0,-1,0,0,1,1,0,0,-1,0,-1,1,0] ???
    The Values at outcome[1] and outcome[2] needs to be interchanged I guess

    • @jps1
      @jps1 4 роки тому

      I'm getting [0,1,-1,0,-1,0,0,1,1,0,0,-1,0,-1,1,0] too. He made a mistake in the video.

  • @eddiesheeran5791
    @eddiesheeran5791 5 років тому +1

    Awesome explanation! Thank you sir.

  • @Micha-ni5xv
    @Micha-ni5xv 4 роки тому

    What if I stop the motor? Or what if I reduce the speed? Or waht if I reduce the speed and then increase the speed? Or what if I change the direction from forwards to backwards?

    • @outofthebots3122
      @outofthebots3122  4 роки тому

      well the count will change to reflect the speed and direction it is turning

  • @TonyLing
    @TonyLing 4 роки тому

    Brilliantly explained, thank you

  • @MetalRobotics
    @MetalRobotics 3 роки тому

    best explaination

  • @capiberra4118
    @capiberra4118 4 роки тому

    Interesting stuff. Thanks!

  • @beni5154
    @beni5154 5 років тому

    Huh, that's some simple code, thanks. ☺

  • @nfcradio4622
    @nfcradio4622 2 роки тому

    It will be slow i will like to use logic gates and D Flip flop to get quadrature pluses and direction signal.

  • @ericninthala6394
    @ericninthala6394 5 років тому

    does this work for all quadrature encoders?

    • @outofthebots3122
      @outofthebots3122  5 років тому

      yes

    • @ericninthala6394
      @ericninthala6394 5 років тому

      Out of the BOTS I tried it with one of my motors with a raspberry pi 3 b+ and the program would read values but keep incrementing even when I don’t turn my motor. And when I stop the program and start it over again, it just reads 0 and stays that way even when I turn the motor.

  • @thegarginator
    @thegarginator 6 років тому

    this video is awesome! thank you!

  • @patricklaqua5590
    @patricklaqua5590 5 років тому +1

    THANK YOU!

  • @wizardOfRobots
    @wizardOfRobots 4 роки тому

    Awesome...thanks!

  • @robots225
    @robots225 4 роки тому

    i like it. Thanks

  • @DevineIshaq107
    @DevineIshaq107 5 років тому

    Very nice , please write it in c code for ardunio thanks

    • @outofthebots3122
      @outofthebots3122  5 років тому +3

      If you watch the video then it will not be difficult to write this simple code yourself in C. My videos are intended to educational so that people can write their own code :)

    • @Readycent
      @Readycent 5 років тому

      I rushed this code, so you'll have to modify it slightly according to your needs. Also, it's in python man. If you know Arduino, you should be able to easily translate it into C code.
      It's gonna be something like this, mate.
      #include "RPI.GPIO.h" // or whatever the library file is. optional: import as another name
      using namespace std;
      A_PIN = 21;
      B_PIN = 20; // may vary depending on your setup
      void setup() {
      RPI.GPIO.setmode(GPIO.BCM);
      GPIO.setup(A_PIN, GPIO.IN);
      GPIO.setup(B_PIN, GPIO.IN);
      int outcome = new int[16];
      outcome = [0, 1, -1, 0, -1, 0, 0, 1, 1, 0, 0, -1, 0, -1, 1, 0];
      lastAB = 0b00;
      counter = 0;
      }
      void loop() {
      int A = GPIO.input(A_PIN);
      int B = GPIO.input(B_PIN);
      int curr_AB = (A

  • @sdevane75
    @sdevane75 5 років тому +2

    Raspberry products inaccurate results as it misses encoder pulses

    • @sdevane75
      @sdevane75 3 роки тому

      @@idkEngineering there's no dedicated quadrature so motor pulses are missed. You need dedicated HW to capture all pulses as the raspberry died this in SW its accuracy will be determined by how utilised the cpu with other tasks

  • @furkankasku9603
    @furkankasku9603 5 років тому

    Thank you!