Due to the U.S. Thanksgiving holiday, please expect delayed responses during the week of 11/22.

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.

How to convert quadrature encoder to analog tachometer

Other Parts Discussed in Thread: MSP430FR2000, C2000WARE

How to convert 3 quadrature encoders to analog tachometers

Max encoder frequency is around 2.5 MHz

  • David,

    In general, brushed motor and stepper motor are not often used on the position control. I didn't find an application note to convert quadrature encoder signals to analog tachometer voltage.

    What the quadrature encoder do you use?

    I saw a product can convert it: US Digital® | Products | ETACH2 | High Speed Encoder to Analog Tachometer

    Regards,
    Wang Li

  • Dear Wang

    Thx a lot for your kind reply

    ETACH2 is discontinued product

    The quadrature encoder we use is standard TTL level A/B digital encoder with no index 

  • David,

    After find the encoder device part number, you may get support from the vendor of that device.

    Regards,

    Wang Li

  • Wang

    It is general questions not related to the encoder vendor

    Why is it issue of encoder vendor to convert encoder to tachometer?

    I am looking general solution to convert encoder to tachometer with TI components

    I can think about few, but I would like to have professional advise from the forum which one of the TI components better suits for such an application  

  • Hi, David,

    We are studying this in further detail and will reply tomorrow.

    Best regards,

    Don

  • David,

    In motor driver device selection guide (Motor Drivers | Overview | TI.com), I cannot find encoder to tachometer. 

    But, there is an application note talking about  quadrature encoder.  https://www.ti.com/lit/an/slaa795/slaa795.pdf 

    "The MSP430FR2000 microcontroller (MCU) can hold a program implementing this state machine to take in the quadrature encoder input from a device and output the change in position through UART. Additionally, the internal real-time clock (RTC) can be used to provide rotational velocity information by outputting timestamps each time the position changes. This project has been optimized for smallest code size and robust handling of human interface device (HID) inputs. To get started, download project files and a code example demonstrating this functionality."

    Would you check that application note or post a question to MSP430 forum?

    Regards,

    Wang Li

  • Dear Wang

    Thx a lot for your assistance

    The code for MSP430 works for 200kHz of the encoder frequency

    I am looking the solution for up to 2.5MHz

  • Hi, Don

    Thx a lot for your kind reply

    Looking forward to hear from you

    Regards

  • Hi David,

    Some of Cortex M4/M7 MCUs on market have peripherals called quadrature decoder QDEC, some of them can process quadrature input signal directly into speed value that can be extracted later by any communication interface present on MCU, DAC or even PWM. Probably some of such QDECs are able to work at 2.5Mhz and beyond. I do not know portfolio of TI MCUs, maybe it would be worth to ask a question on TI Microcontroller forums.

    Regards,

    Grzegorz

  • Agree. It would be worth to ask a question on TI Microcontroller forums.

    Thanks,

    Wang Li

  • Meanwhile, realized that there are devices with QEP dedicated inputs, like C2000 & Piccolo devices

    Could you please let me know which one is the best choice to make 3 channels converter?

    Does it make sense to use one single device for 3 parallel channels to convert or it is better to use separated device for each one of the channels?

    Is it right forum to ask such kind of questions?

  • Hi, David,

    Let me re-assign your post to the c2000 team for their comments.

    Best regards,

    Don

  • Hello David,

    Yes, most of the C2000 device families have QEP peripherals integrated.  Some options would be:

    You can read about the eQEP peripheral and it's features in one of the device-specific TRM (technical reference manuals). These can be found on the product folders I listed above. 

    For example, F28004x refer to:

    • http://www.ti.com/lit/SPRUI33 - Section 21 - Enhanced Quadrature Encoder Pulse (eQEP).  This section also discusses estimating velocity from a eQEP module. 

    Our C2000Ware Software Development Kit (https://www.ti.com/tool/C2000WARE)  has getting started QEP examples including position/speed calculations.

    • C:\ti\c2000\C2000Ware_<version>\driverlib\<device>\examples\eqep

    Best Regards

    Lori

  • Hi, Lori

    Sorry for late reply - we had some national holidays and it took time to evaluate in details your answer

    Finally, we think that proposed by you TMS320F38075 MCU will do the job

    But we would like to kindly ask you few more questions to finally close the MCU selection issue:

    1. I will repeat again our task - we need to convert simultaneously 3 quadrature encoders to 3 tachometers analog signals and we have to do it for encoders with maxim frequency of each one of 2.5 MHz. We have to select the most appropriate MCU and of course the cheapest one. Could you kindly conform that this is the most appropriate MCU for our application?

    2. If this is the MCU, we made a search over TI site and did not found EVM for this specific MCU. We found 2 others that looks us as making an evaluation job:

    (i) https://www.ti.com/tool/LAUNCHXL-F28379D

    (ii) https://www.ti.com/tool/LAUNCHXL-F280049C

    Could you please, let us know which one better meats our evaluation purpose. 28379D is based on more powerful processor and has 2 encoder connectors only (like his small brother). Our question is if it will not be better to get the less powerful EVM to full approval of the performance?

    3. Last question is about the appropriate JTAG for our development. Do we need JTAG for the evaluation models defined above? If yes, which one can work better for us? We assume that we will need JTAG anyhow for our later phase when we will develop our own board based on the selected MCU. So, selection of the proper JTAG will move us forward anyhow.

    Looking forward to hear from you

    Thx a lot for your kind and professional advise

    David

  • 1. I will repeat again our task - we need to convert simultaneously 3 quadrature encoders to 3 tachometers analog signals and we have to do it for encoders with maxim frequency of each one of 2.5 MHz. We have to select the most appropriate MCU and of course the cheapest one. Could you kindly conform that this is the most appropriate MCU for our application?

    David,

    Yes, using the parametric table here (C2000 real-time control MCUs | Products | TI.com)

    for 3 QEP modules the only devices we have are:

    • F2838x - this is a 3 sub-system device (2 C28x + an ARM) - probably too much for what you want
    • F2837x - As you saw, this is the big-brother for the F2807x.  
    • F2807x - lowest cost - so this is the best recommendation if you are using only QEP.  

    One thing I realized I should have mentioned earlier - we have had some customers implement a simple QEP using the C2000 Configurable Logic Block.  This may open up the F28004x or F28002x as an option if it will work for your system.  

    2. If this is the MCU, we made a search over TI site and did not found EVM for this specific MCU.

    Yes, as you observed, we provide evaluation tools for the superset of the device families.  For the F2807x this would be the F28379D evaluation tools.  You could choose to clock the F28379D at a slower speed and make sure you are not using any peripheral not on the F2807x for initial evaluation. 

    The F28004x is very similar to the F28007x.  This application note discusses the F28004x and highlights some deltas between the two.  If you are ok with those deltas then an F28004x evaluation tool would work well for you. 

    The LaunchPads are the low-cost evaluation module.  There are also controlCards + docking stations available for these devices.  These allow you to get to all of the pins of the device.  These are listed under "full featured evaluation modules" on this page 

    3. Last question is about the appropriate JTAG for our development. Do we need JTAG for the evaluation models defined above? If yes, which one can work better for us? We assume that we will need JTAG anyhow for our later phase when we will develop our own board based on the selected MCU. So, selection of the proper JTAG will move us forward anyhow.

    The evaluation modules have a JTAG debug probe on-board.  

    On this page: 

    Scroll down to hardware / debug probes to see a list of available probes for when you develop your own board. 

    If you haven't already, you may find this guide helpful:

    Best Regards

    Lori

  • Dear Lori

    Thx a lot for your detailed answer

    Just before going forward with our final decision, I would like to clarify you option of using F28004x or F28002x mentioned by you in your answer on my question no. 1:

    ... we have had some customers implement a simple QEP using the C2000 Configurable Logic Block.  This may open up the F28004x or F28002x as an option if it will work for your system.

    Could you please, explain in more details what do you mean saying "simple QEP using C2000 configurable logic block"?

    Thx  a lot in advance and regards

    David

  • Could you please, explain in more details what do you mean saying "simple QEP using C2000 configurable logic block"?

    The Configurable Logic Block is a peripheral on devices such as F2837x, F28004x, F28002x.  I think of it as a toolbox of logic blocks - such as counters, finite-state machines and lookup tables.  These can be used to build up custom logic functionality or enhance logic already on the device.  

    A simple QEP quadrature counter module can be defined from CLB building blocks.  It supports QEP-A/QEP-B and QEP-I.  So it isn't as full-featured as the eQEP module, but if all you need is a count value it may work for your application.  

    If you do your evaluation using the F2837xD or F28004x tools, both of these have the CLB features needed so you could investigate this further to see if it meets your needs. 

    Regards

    Lori

  • Briefly going through the CLB materials, I understand your idea as:

    1. To consider F28004x or F28002x families that have 2 eQEP inputs only

    2. To use CLB peripherals as follows:

    - Use GPIO as CLB inputs

    - Implement the logic of QEP using FSM or LUT

    I understand that you think that our requirements of 2.5MHz for 3 channels of QEPs are not strict enough and we can use the lower family of DSPs for our purpose

    Do I understand well your proposal?

    Thx in advance and regards

    David

  • Yes this is my thinking.  The QEP implementation requires a counter, a couple of LUTs and a couple of FSM.  We have a prototype internally that I hope to release in 1Q into our collateral.  If you get to that point before then we can share more details. 

    Regards

    Lori

  • Perfect. Absolutely clear.

    We will start with purchase of couple of evaluation modules

    If you can share with us details about your internally working prototype we can test if CLB based implementation can work for us as well  

    Anyhow, I would like to appreciate your great detailed support

    With best regards

    David