Quadrature Encoder
T Chap
Posts: 4,223
Hello. I have been searching for some code to count quadrature encoder inputs(2 pins), I heard there was an object but have not found one yet.
If you know of something please point me to it.
Thanks
Post Edited (originator99) : 10/3/2006 4:55:02 AM GMT
If you know of something please point me to it.
Thanks
Post Edited (originator99) : 10/3/2006 4:55:02 AM GMT
Comments
kelvin
What I mean is, if I tell the motor to turn 1 rev=200 pulses, the object returns the position as 800.
My understanding of the encoders operation from talking to US Digital is that you can decode it at 1x, 2x, or 4x, as there are 4 events per cycle. I'd prefer it to be 1x without having to divide it, but I am happy with this as is for now. If dividing down and there is an original value that is not a multiple of 4, then it is going to get messy.
Post Edited (originator99) : 10/3/2006 6:46:25 AM GMT
Graham
There are some IC's that have X1 or X2 or X4 resolution multiplier.
TC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
Actually they are not resolution multipliers, but reducers; the number of states available in a quadrature encoding scheme (four) are divided by a factor of 2 or 4, to become 2 or 1.
The Propeller can easily deal with the 4 quadrature levels..... downgrading the resolution is likely not desirable.
Cheers,
Peter (pjv)
TC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
Anyway here is is attached, it may be faster as it is less general. There is also a test program for TV output I was using today to read two encoders, at the moment I have to use a cog per encoder which is fine by me as I need lots of speed.
Graham