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.

Incremental encoder + eZdsp F28335

Other Parts Discussed in Thread: TMS320F28335, AM26LV32, SN65HVD30, DS8921

Hello,

I need to measure the rotor position and speed from an induction motor for my Master Thesis about DFIG's.

I have an eZdsp F28335 development board from Spectrum Digital and I have found that there is an eQEP module on the TMS320F28335 microcontroller in order to interface an incremental position encoder.  

Now I am searching the incremental position encoder. Most commonly used output signals are Push Pull, RS422 and open collector.

Which one is supported by the eQEP-module?
Which method is preferred?
Is it possible to directly connect the outputs from the incremental encoder(A, B, Index) to the inputs of the eZdsp (EQEPxA, EQEPxB, EQEPxI)?

Thanks in Advance! 
Pieter Gervoyse,
Master Student at the KU Leuven, Belgium 

  • Hi Pieter,

    Preferred physical layer is RS422, where three signals (quadrature A and B, and one pulse per revolution Z) are transmitted deferentially. On the side of a DSP you need RS422 to 3.3V TTL/CMOS receiver (I prefer AM26LV32).

    Encoders are usually supplied with 5 V. So even if you terminate its outputs correctly you can not connect them directly to the DSP. You will need a voltage translator. For 5V->3.3V I prefer logic from 74LVC series. Though if you do it this way you will loose decent amount of noise immunity. Which is usually not an option dealing with power electronics

    I don't know your exact application but for most DFIG applications one needs to know absolute position. Thus incremental encoder is not really an option unless you do not need to know the position during first revolution or you get that information some other way (sensor-less). 

    For absolute information I prefer RM44 encoder which has both serial absolute and incremental outputs (both RS422). Besides that, it is also easy to set up as it does not require any mechanical coupling. During initialization I use serial bus to get absolute position and during runtime I only use QEP as it gives you position information with less overhead and delay.

    Regards, Mitja

  • Thanks for the reply Mitja!

    I did some research and indeed, as you said, for my application I need the absolute rotor position so I need an absolute position encoder. 

    Can I also use the  AM26LV32 receiver to connect this absolute position encoder to the QEP inputs of my eZdsp?

    Thanks in Advance! 
    Pieter Gervoyse,
    Master Student at the KU Leuven, Belgium 

  • Hi Pieter,

    Depends on an encoder. If it has serial bus, you will need a RS422 driver. For that I use SN65HVD30.

    Though it is possible to get absolute rotor position if you measure stator and rotor voltages. But for development I would rather go with absolute encoder.

    Regards, Mitja

  • Indeed, to obtain rotor position it is possible to avoid the physical encoder by measuring the rotor and stator currents. Though I also prefer the physical encoder.

    In another topic (http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/21496.aspx) I read the possibility to use SSI interface in combination with the c2000's SPI module to couple an absolute encoder to an TMS320F28335.

    What else do I need to know before connecting an absolute encoder to my eZdsp F28335?

    Do I still need an RS422 driver? Do I need other drivers or external logic?

    Thanks in advance!
    Pieter Gervoyse,
    Master Student at the KU Leuven, Belgium

  • As I've said in order to interface through serial bus, you will probably need RS422 driver for clock and RS422 receiver for data. If the absolute encoder has serial interface based upon RS422.

  • Thank you very much for your support Mitja!

    Now, when choosing an absolute encoder I've also the choice between binary and gray output code. Gray code has the advantage that there coud be no misread during a position change.
    Is it possible to read both the binary and gray code with my eZdsp F28335 SPI-module?
    Which type of output code is preferred?
    How is the 'misread' solved by encoders with binary outpur code such as the RM44 you proposed earlier?

    So, in order to obtain rotor angle I need:

    • Absolute position encoder; SSI interface; single-turn; 13 bit; Binary/gray output code
    • Differential line tranceiver: e.g. the TI DS8921N ?
    • The SPI-module of my eZdsp F28335 (SPISOMI, SPISIMO, SPISTE, SPICLK)

    Thanks in Advance! 
    Pieter Gervoyse,
    Master Student at the KU Leuven, Belgium

  • The choice between binary and gray code is really application specific. If you want to add extra level of safety you need to have clear procedure what will happen with the drive once you detect invalid gray code. Using gray code you also have to guarantee that you will read angle value at least once before it changes. With high resolution encoder, high rotational speeds and low sampling frequency this might not be possible.

    If you have problems with transmission it is usually because of common mode noise generated with the power stage. At this point I found it is far better to reduce the noise, than to make your transmission more robust, since the noise affects your whole system (or even some other system nearby).

    You can certainly read gray code with C2000 SPI. Though you will have to decode it in SW.

    I prefer straight binary code for simplicity. Gray code of BiSS transmission (Binary with CRC) are preferred in high performance and/or high accuracy CNC machines or other high accuracy systems.

    With straight binary and without any error checking mechanism (CRC or plain check-sum)  the error is not detected at all so the SW is not even aware of misread code. Therefore this even can not even be handled.

    In automotive systems it is common that you have one sensor which transmits data in plain binary (or even quadrature) and you have "sensorles" algorithm running in parallel. If measured angle and estimated one differ too much, the you register a fault condition. What you do when this happens is really application specific.

    The proposed transceiver (DS8921) works only from 5 V supply. You will have to add a voltage translator between MCU and transceiver. I prefer SN65HVD30, which can be interfaced directly with MCU.

    Regards, Mitja

  • please i have some questions about encoder and using it with DSP. I know that there is a type of encoder gives three signals (A, B, and Z) and this type can be used with the eZdsp 28335 but when i went to the motor company, i found only motors with a built-in type of encoder gives (T+ and T-  signals) (as the seller said)

    i  dont know if thiis type can be used with the dsp or not and how can i use it

    i will use it to measure the speed and   initial postion of PMSM 

  • Hi,

    I think you will need to ask more information about the T+/T- signals that come from the encoder.  I am not familiar with this interface.


    Thank you,
    Brett