This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello,
I would like to know the exact information regarding the title. Please give me an answer.
Background:
I am developing a device that uses this MCU to make the motor reciprocate. Currently, when the motor passes through the origin (when it crosses the Z-Pulse), I am encountering a phenomenon where the eQEP value deviates from what I expected.
The settings for each device are as follows:
Encoder IC: ABZ pulse output method
* AB Direction: A leading B.
* Z Gating: Z at AB=10 (Z-Pulse is HI during the period when A-Pulse is HI and B-Pulse is LO.)
* Z Polarity: Z-Pulse is active hi.
MCU eQEP:
* Position Counter source: Quadrature-clock mode
* Resolution: 2x Resolution (Count rising and falling edge)
* Index pulse gating: Gate the index pin with strobe.
* Position counter mode: Reset position on index pulse.
* Maximum position: 131072 (20000h)
* Position Counter(QPOSCNT): 0
* QEP Capture Latch Mode(QCLM): On position counter read.
* Strobe Event Latch(SEL) : On rising edge with clockwise, on falling when counter clockwise.
* Index Event latch(IEL): On rising edge of index.
* Position Strobe Events(SEI): On rising edge with clockwise, on falling when counter clockwise.
* Position Index Event(IEI): On rising edge of index.
* Set software initialization position counter: checked.
* Position counter initialization value: 0
* Enable Position counter: checked.
The following is a graphical representation of the operation I envisioned.
When running clockwise, I would assume that the index event occurs on QCLK after the rising edge of Z-Pulse.
Question)
1) Is the timing of the index event correct for a clockwise operation?
2) What are the conditions for an index event to occur during counterclockwise operation?
3) Is there anything wrong with my setting of Z-Pulse gating with AB=10 (Z-Pulse is HI during the period when A-Pulse is HI and B-Pulse is LO.) in the ”Reset position on index pulse”?
Hi Teruhiko,
Are you starting off with any of our eQEP software examples from our SDK? When you mention that when the eQEP counter is reset with the index pulse, the value deviates from expected value, does it return 0? What is the value you're expecting?
Best,
RYan Ma
Hi Mr.Ryan,
Thank you for your quick response.
I did not use the eQEP sample code included in the SDK. I created a syscfg file and configured eQEP on that screen.
I use tilt sensor measurements to check the continuity of eQEP values. The principle is described below.
* Attach the mirror to the motor's rotary shaft.
* The tilt sensor is a measuring instrument that measures tilt, so if it is installed perpendicular to the mirror, the tilt will remain zero.
* Turning the motor's rotary axis to the left or right increases the tilt and creates a continuous trajectory like the red line of the expected motion.
However, in reality, when there is a Z-Pulse, the tilt value shifts at the origin (Z-Pulse detection) position, as shown in the rightmost graph.
If the Z-Pulse is shifted so that it is not detected during rotation, the tilt value will transition continuously.
I think the value is shifted by the reset action at the time of Z-Pulse detection.
Best regard. Teruhiko Ozuchi.
Hi Teruhiko,
I will be OOO till monday, but I am in touch with another colleage to see what may be happening.
Can you share the eQEP initialization setup?
Best,
Ryan Ma
Hi Mr.Ryan,
Attached is a capture of the eQEP settings from the syscfg screen.
#1
#2
#3
As mentioned earlier, the current Z-Pulse setting is “Z Gating: Z at AB=10 (Z-Pulse is HI during the period when A-Pulse is HI and B-Pulse is LO”.
(Settings in the leftmost figure below)
The Z-Pulse Gating can also be changed by setting the encoder IC as follows.
Best regard. Teruhiko Ozuchi
Hi Teruhiko,
I am looking into this with another expert. Apologize for the delay in response I will provide an update later today.
Best,
Ryan Ma