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.

Matching encoder signals



Hi,

I want to connect an encoder signals (A,B,Z) to F28335. As I found out I have to connect phaseA to GPIO20, phaseB to GPIO21 and indexZ to GPIO23. My question is, should I connect an external voltage source 3.3V?

phaseA and B are a sine wave Vmax=560mV

 

  • Siamak,

    Firstly, the QEP peripheral will expect 0-3.3V square wave signals (one phase-shifted 90degrees from the other).  This square wave type of output is common, but it doesn't appear to be the output type of your particular encoder.

    Instead, your encoder appears to output sin/cos waveforms.  In order to have the C2000 decode the encoder outputs, it will probably be best to use the ADC module.

    As for the voltage source:  most encoders require the encoder to be powered by 5V or 3.3V or some voltage.  This and GND would most likely need to come from the system board which has the C2000 on it.


    Thank you,
    Brett

  • Thank you Brett for your respond,

    More question:

    Exactly my encoder is a sin/cos hiperface encoder. What do mean to use the ADC?, Do you mean that I have to connect A,B and Z signals to ADC connector?

     

    Thank you.

     

  • Siamak,

    Yes, one potential method would be to input the sin/cos quadrature encoded signals into the ADC pins of the device.  You could then use a number of methods to convert these waveforms into speed or relative position information:
    (1) You could use the ADC to sample the waveform and then use some digital method to measure the distance between "Period"s or a sequence of "Period"s.  This information along with a known ADC sample rate could give you the speed information.
    (2) For Piccolo devices (F2802x, F2803x, F2806x, etc) you'd have the option to also use the internal comparators if you desired. You could calibrate the Piccolo MCU to the encoder with a value so that it knew what the average value is for the waveforms.  The comparator could then be used to trigger interrupts based on the "zero-crossings".  The comparator interrupt would use a CPUtimer to find out the time information.  These two pieces of information together could be used to calculate speed.  (I do realize you're using the F28335 though :) )

    Alternatively, you could try to find a way to convert your analog sin/cos waveforms to 0-3.3V digital signals that could be used by the QEP peripheral (without using the ADC).  One potential way could be to use a zero-crossing methodology similar to suggestion (2) above, but have the comparators be external to the C2000 and have its outputs feed the QEP.

    Some experimentation will likely be necessary.  We have customers who use sin/cos encoders like HiPerFace on the C2000, but the C2000 group itself hasn't done much with these encoders internally (yet).

    Good luck on your project.


    Thank you,
    Brett

  • Thank you very much, very helpful.