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.

TIDEP-01032: Several problems running the demo application

Part Number: TIDEP-01032
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hello support team, 

I am working with the TIDEP-01032 demo application from the AM243x Motor Control SDK 09.02.00. As hardware setup I have two identical motors with 18-bit single-turn EnDat 2.2 encoders. 

I have several problems when running the demo application. First is the EnDat master: If I use the default setting in SysConfig with both channels (0 and 2) + loadsharing, the EnDat master initialization runs into an error (function endat_wait_initialization gets no response from the master).

After I configure only channel 0 + loadsharing, the initialization runs through and the encoder is read out correctly.


However, the problem then arises that the motor does not run at 120 RPM. It turns at about 60 RPM and it is not a proper speed control. When I put my fingers on the motor shaft, the direction of rotation changes. In addition, both DRV fault LEDs light up on the booster pack. The 24V power supply is not in its current limit. 

I have adjusted the following point in the code:

  • In the pruEncoderIrqHandler, I changed the pole pair number to 5 when calculating the electrical position. I have not changed anything else except UART logging. 

I have selected the following jumper settings on the booster board:

  • J11 / J13 / J26 are on pins 2-3.
  • J19 and J21 are selected for 5V encoder power supply 
  • J17 is on pin 1 - 2
  • J22 / J23 are not in use
  • J24 / J25 are also not in use
  • I am not sure about J27 and J28. I did not understand the function of these jumpers in the user guide. I have tested all combinations and none of them have the motor turning at 120 RPM or allows both encoder channels. 

I have already tried to debug some things in the case only one motor is configured:

  • I checked if both encoders are supplied with the 5V. 
  • I took a quick look at the Endat transmission -> the interrupt triggers a 50 kHz transmission (compare below picture: first 5 signals from above)
  • The SD modulator is supplied with 20MHz and it delivers a bitstream to the Sitara (See signal SD CLK SOC / SD Clock Feedback. Custom 7 is one SD Modulator bitstream)
  • All three motor phases have a sinusoidal current curve.
  • The software behaves the same regardless of whether I flash in debug or release mode 
  • When replacing the motor and encoder cable, the system also behaves the same.

Now to my questions:
1. what are the correct jumper settings when using two EnDat 2.2 encoders and the AM243x?

2. why does an error occur in the EnDat master when configured with two motors?

3. why does the motor not rotate at 120 RPM? Do any parameters other than the number of pole pairs need to be adjusted? How can the code be extended, for example to be able to change the control parameters via Twincat? Maybe the actual parameters doesn't fit at all to my motor. 


Kind regards, 
Nico 

  • Hi Nico,

    Are you setting the switch sw6 of the AM243X board for booster pack pin routing? To route channel 2 pin for booster pack you have to set SW6 in booster pack mode as mentioned in the Am243x LP user guide. AM243x LaunchPad Development Kit User's Guide (Rev. F) (ti.com)

    what are the correct jumper settings when using two EnDat 2.2 encoders and the AM243x?

    The settings you are doing are correct only. J27 & J28 are used to switch BP mode from am243x to am263x, so no need to use for am243x. 

    why does an error occur in the EnDat master when configured with two motors?

    It is because of second encoder is not getting initialized

    You can check below mentioned things 

    • SW6 of am243x board should be in servo BP single position mode
    • encoder2 should get 5V power 
    3. why does the motor not rotate at 120 RPM? Do any parameters other than the number of pole pairs need to be adjusted? How can the code be extended, for example to be able to change the control parameters via Twincat? Maybe the actual parameters doesn't fit at all to my motor. 

    I will check on this and get back to you

    Thanks & Regards,

    Achala Ram

  • Hi Nico,

    can you check which version of am243x board you are using? Not all am243x boards have 2 channel support, The board which has switch SW6 & written PROC109A on it, supports both channels.

    Thanks & regards,

    Achala Ram 

  • Hi Achala, 

    your advice with the switch was correct - thank you. I didn't know about the SW6. It would be very helpfull, if all instructions regarding the dual motor example would be in one file. 
    Now both encoders are initialized. So my first two questions are answered.

    Current situation: Both motors are turning at about 60 RPM, but still it is not a proper speed control. 

    My hardware setup is the Heidrive HMD06-011-048 48V motor with 18 Bit singleturn encoder ECI118 (https://www.heidrive.com/fileadmin/user_upload/2020-12_heimotiondynamic_en.pdf p.27) 

    Kind regards, 
    Nico 

  • Hi Nico,

    The number of poles in your code is correct; if they weren’t, the motor wouldn’t be spinning. The discrepancy is due to the encoder format. The encoder in TIDEP-01032 is a 25-bit multi-turn, while yours is an 18-bit single-turn. It seems like one bit is missing from your position value.

    Best regards,
    Masoud