mateus_guilherme
Posts: 20
Joined: Sat Feb 15, 2020 6:36 pm

read quadrature encoder with raspberry

Tue Jul 07, 2020 12:44 am

Hello

I would like to know if it is possible to read a quadrature encoder (chanel A, B) identifying the direction of rotation of two motors like these: (https://www.banggood.com/CHIHAI-MOTOR-6 ... rehouse=CN) using rasberry pi and python? What would be the best way to do this? Would anyone have an example to provide?

thanks

vffgaston
Posts: 6
Joined: Wed May 13, 2020 3:33 pm

Re: read quadrature encoder with raspberry

Tue Jul 07, 2020 8:14 am

Hi,
How many pulses per second?
Regards

User avatar
joan
Posts: 14997
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: read quadrature encoder with raspberry

Tue Jul 07, 2020 9:36 am

Specs say 823.1PPR and 100 RPM max. So 1372 pulses per second max. Pi will have no problem.

Here is one Python example.

http://abyz.me.uk/rpi/pigpio/examples.h ... encoder_py

mateus_guilherme
Posts: 20
Joined: Sat Feb 15, 2020 6:36 pm

Re: read quadrature encoder with raspberry

Wed Jul 08, 2020 1:11 am

I'm still testing the code, apparently it's working well, including on the raspberry pi 4

thank you very much

Return to “General discussion”