View previous topic :: View next topic |
Author |
Message |
[email protected]
Joined: 28 Jul 2014 Posts: 38
|
linear incremental scale |
Posted: Sat Apr 13, 2019 1:42 am |
|
|
I have connected an incremental linear scale in QEI module 1 of DSPIC33EP512MU810 controller. If i move the scale i am getting pulses in increment of 1 but my qei module is 4x.
Also the Repeat-ability of the pulses for a fixed linear distance is not same. It fluctuates by 4 to 7 counts.
If i connect the same scale to DRO of the scale manufacturer i am getting exact pulses of for the fixed linear distance.
I have attached the wave form of the linear scale.
Code: |
setup_qei(1,QEI_MODE_X4,QEI_FILTER_DIV_16,QEI_MODE_TIMER_INTERNAL,QEI_POS_LE_INT,QEI_POS_GE_INT);
|
[img]https://ibb.co/xs34dQ9[/img] |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9269 Location: Greensville,Ontario
|
|
Posted: Sat Apr 13, 2019 4:41 am |
|
|
You need to post the mfr/make/model of the scale or a link to it's datasheet. The scope view doesn't look like any encoder I've ever used. I've never used a PIC with internal QEI, used US Digital chips though.
edit: just saw/read the post below this one, SAME PIC ! Now I know there's a LOT of errata for this PIC, which leads me to believe it's a 'die' issue ( hardware ) that may not be fixable.
Jay |
|
|
Jerson
Joined: 31 Jul 2009 Posts: 126 Location: Bombay, India
|
|
Posted: Sat Apr 13, 2019 8:12 am |
|
|
With a caveat that I may be wrong, I am thinking your encoder signals are shorted together via some low value resistance like a winding or such. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9269 Location: Greensville,Ontario
|
|
Posted: Sat Apr 13, 2019 3:21 pm |
|
|
OK, I looked at the waveforms again and I can't understand the 'stepped' waveform. You should have clean 1' and 0's being 5 volt '1's and 0 '0's. Well if the PICs running at 5 volts which I think dsPics run at. Leads me to again asking for datasheet as maybe the sensor is really a 3 volt device ??
Generic 'mice' always give nice +5, 0V signals......BTW |
|
|
|