2014-01-15 11:51 AM
Hi
I am trying to understand how to interface incremental encoders to stm32f407 ( 2 encoders) : my problems : Which pins can I connect to it; should I connect to the pins directly ? . How can I did detect the direction of the encoder? Thank you in advaned . Esat #qei2014-01-15 12:57 PM
What encoder? Provide a cite.
Does it generate a quadrature signal? You'll need one timer per encoder, a 32-bit timer will give you much better range.2014-01-16 02:43 AM
It have only A signal and B signal :PEC11-4225F:
I want to know if stm32 can detect the direction or do I need for external circuit . Thank you Clive2014-01-16 06:53 AM
In the QEI interface one phase counts steps while the other phase determines up/down direction. With a two phase encoder (and assuming 90 degree shift between encoder phases) you won;t need external circuitry to detect position.
However, without an index you won't have any calibration information. If you are measuring shaft angle or linear distance the QEI will only give you realtive change, not absolute position. Jack Peacock2014-01-18 03:12 AM
Dear
Encoders are devises witch can work on very wide of voltage (5-28). So, according of the chosen voltage for supply of encoder you must make divvy voltage with resistors. To be sure that your program works correctly you can use third output from encoder. It's signed with mark ''Z''. That signal Z is going to appear only once for full rotation of encoder. For ex: If you have encoder with 500 steps, for every 500 impulses on signal A or B you will have just one impulse on signal Z. Be careful with speed of impulses because that will be reason for mistake in counting of impulses. Regards, Perovic2014-01-18 03:29 AM
look at
the ICs
of this type
26LS33
As mentioned by
others
encoder outputs
configuration line
drive
-push pull
-open collector
?encoder output voltage range ?
encoder maximum count freqeuncy ?You could also
separate the encoder lines
from the input micro
with
optocouplers but
you have to
take into account the
maximum
frequency
....Uhm sorry RBR (Reply Before Read...) mistake.... The Encoder isn't an industrial rotary encoder but similar to a potentiometer easy to interface with two external interrupts See the waveform figure on thi sdocument http://www.adafruit.com/datasheets/pec11.pdf