I don't think pigpio works on a Pi 5, so if you go that route you'd have to replace pigpio if you moved to a Pi 5 later.
If your quadrature chip asserts an interrupt, then I am guessing pigpio will work by capturing the interrupt and sampling the GPIO. There will be some indeterminate latency, but the Pi is probably fast enough that it won't matter. The author of pigpio sometimes posts here, so may see this and help.
Otherwise, an Arduino or Pi Pico would be a good choice. Cheap, deterministic, easy to use. You could keep a running total of the encoder position and supply it on request from the host, or send a message each time it changes.
It would also be worth doing a quick back-of-an-envelope calculation of the expected pulse rate, given it's a 600 pulse encoder and the input will be turning at some rate. It helps put bounds on the problem, and whether a proposed solution will actually work.
If your quadrature chip asserts an interrupt, then I am guessing pigpio will work by capturing the interrupt and sampling the GPIO. There will be some indeterminate latency, but the Pi is probably fast enough that it won't matter. The author of pigpio sometimes posts here, so may see this and help.
Otherwise, an Arduino or Pi Pico would be a good choice. Cheap, deterministic, easy to use. You could keep a running total of the encoder position and supply it on request from the host, or send a message each time it changes.
It would also be worth doing a quick back-of-an-envelope calculation of the expected pulse rate, given it's a 600 pulse encoder and the input will be turning at some rate. It helps put bounds on the problem, and whether a proposed solution will actually work.
Statistics: Posted by ame — Tue Sep 10, 2024 1:14 am