Run BLDC motor in sensor (hall sensor)mode using TLE9879 EVALKIT

Announcements

Webinar: Integrated solutions for smaller, simpler low-voltage motor control design.
Join the webinar to experience!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Sayali234
Level 3
Level 3
25 sign-ins 25 replies posted First solution authored

Hello Team,

   we have TLE9879 EVALKIT . I have some doubt related to this.

1. Initially the driver is able to one of our motor with FOC sensorless code. but we are unable to run other motor . As the motor parameter of both motor are different this may the reason.

I tried to change motor parameter from config wizard for motix mcu but not sure that changes is been replication in keil while loading program in chip. can you guide me what step I need to perform for updating motor parameter in config wizard to keil.

 

2. I want to run BLDC motor in sensored mode using hall sensor connection.

but on evaluation kit there is not direct indication given for hall sensor connection.

can you please tell where should I connect hall sensor connection so that motor can run in sensor mode.

Below is snapshot of eval board

Sayali234_0-1647338637183.png

 

Regards,

Sayali

0 Likes
1 Solution
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @Sayali234,

Thanks! for posting in the Infineon community.

I tried to change motor parameter from config wizard for motix mcu but not sure that changes is been replication in keil while loading program in chip. can you guide me what step I need to perform for updating motor parameter in config wizard to keil.


Once you update the parameters in Config wizard and save the configuration( ctrl+s). New parameters will be updated in the source files. Ref to below picture with Yellow marking.

Krupashankar_0-1647412486537.png

You could also refer to the section Getting Started with Keil µVision5 in Getting Started with TLE986x/7x Evalboards and Evalkits 

I want to run BLDC motor in sensored mode using hall sensor connection.

but on evaluation kit there is not direct indication given for hall sensor connection.

can you please tell where should I connect hall sensor connection so that motor can run in sensor mode.


You can configure the input ports for the Hall sensor as shown in below picture

Krupashankar_1-1647413180199.png

Based on the pins configured you can connect the hall sensor.

 

Thanks,

Krupashankar

View solution in original post

0 Likes
34 Replies
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @Sayali234,

Thanks! for posting in the Infineon community.

I tried to change motor parameter from config wizard for motix mcu but not sure that changes is been replication in keil while loading program in chip. can you guide me what step I need to perform for updating motor parameter in config wizard to keil.


Once you update the parameters in Config wizard and save the configuration( ctrl+s). New parameters will be updated in the source files. Ref to below picture with Yellow marking.

Krupashankar_0-1647412486537.png

You could also refer to the section Getting Started with Keil µVision5 in Getting Started with TLE986x/7x Evalboards and Evalkits 

I want to run BLDC motor in sensored mode using hall sensor connection.

but on evaluation kit there is not direct indication given for hall sensor connection.

can you please tell where should I connect hall sensor connection so that motor can run in sensor mode.


You can configure the input ports for the Hall sensor as shown in below picture

Krupashankar_1-1647413180199.png

Based on the pins configured you can connect the hall sensor.

 

Thanks,

Krupashankar

0 Likes
lock attach
Attachments are accessible only for community members.
Sayali234
Level 3
Level 3
25 sign-ins 25 replies posted First solution authored

Hello Krupashankar,

  Thank you for detail steps, I am able to rotate slotted motor by changing motor parameter in config wizard.

but when I run slotless BLDC motor it rotate for fraction of second and then stop.

wanted to know about calculation of parameters which are there in config wizard, because even if I put motor resistance and inductance it does not rotate smoothly.

and what is range of inductance of motor this driver can accept, because our motor inductance is very small e.g 22mH and even 22mH value  the config wizard is also not taking.

it would be great if you share some doc related to calculation of config wizard parameters.

and this driver will support both motor slotless and slotted righ?

 

for reference I am attaching motor spec.

 

Regards,

Sayali

0 Likes
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @Sayali234,

You can refer to: How to Measure Motor Parameters 

Please let us know if you need further details.

 

Thanks,

Krupashankar

0 Likes
Sayali234
Level 3
Level 3
25 sign-ins 25 replies posted First solution authored

Hello Krupashankar,

  Thanks for that document, it helped to run other motors. can you help us to provide below details regarding config wizard.

1. Hall sensor mode.

Sayali234_0-1647859875291.png

In the above snapshot, we need to put Angle delay,speed control parameters etc. and also there are various option for TLE9879 peripherals , is there any document which describe all these parameters  ,how we need to select this , any calculation is there for this.

2. For FOC sensorless

Sayali234_3-1647860442072.png

In the above snapshot, for motor parameters you have shared document . Is there any document for  current control parameters, speed control parameters  ,acceleration ramp etc. and also there are various option for TLE9879 peripherals , is there any document which describe all these parameters  ,how we need to select this , any calculation is there for this.

3. Supply voltage - motor is sensored mode is working ok but upto 20V only , if we increase voltage above 20V it stop. is there any setting we need to change to rotate motor above 20V.

4. How we can change direction of motor.

 

Regards,

Sayali

 

 

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @Sayali234,

Thanks for your patience!!

1) We are checking with internal teams for the documentation for Config Wizard parameters. We will update you as soon as we get the information.

2) For changing the direction of the motor, give negative reference speed.

3) For supply voltage settings I will check and update you.

Please, let us know if you need further clarification.

 

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hello Team,

   thank you for updates.

currently in sensored mode speed of motor is control by potentiometer available on eval kit , as you to change direction of motor I need to give negative reference speed. can you please suggest where can I give provide negative input , is there any specific pin on eval kit.

regards,

Sayali

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @Sayali234,

1) For supply voltages above 17.3V, you need to adapt some settings such as:
-ADC2->TH0_3_UPPER.CH2 (VSD overvoltage threshold)
-ADC2->TH0_3_UPPER.CH1 (VS overvoltage threshold)
-MF->VMON_SEN_CTRL.VMON_SEN_SEL_INRANGE (attenuator factor for VDH monitoring)

The equations for the desired thresholds can be found in the TLE987x User Manual.

Since VDH is monitored by ADC1, the reference voltage for the calculation of VLSB is VAREF (not VBG). The data width also needs to be adapted accordingly ( 8 or 10 Bit width).

2) To make it turn in the other direction, replace 'Emo_setspeedreferenz(mV / 2)' with Emo_setspeedreferenz(-mV / 2) in main.c inside void Poti_Handler(void).

Please, let us know if you need further clarification.

Thank you

Best Regards

Raj Chaudhari

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Team,

  Thank you for reply.

1. Direction change-

By changing Emo_setspeedreferenz(-mV / 2) in main.c inside void Poti_Handler(void)  the direction of motor is changing . 

2. High operating voltage

the setting which you suggested for making change in ADC setting is not working .

motor is rotating upto 20V only if I increase voltage above 20V it stop and even the speed of motor at 20V is not upto spec . As per spec motor speed at 20V should be 40000 rpm but with this kit I am getting 4000 t0 500 rpm which is very less.

what setting I need to make to increase speed of motor and also supply voltage rating

for reference I am attaching ss of ADC ,motor setting.

please revert asap.

 

Regards,

Sayali

0 Likes

Hello Team,

  waiting for your reply , without this we cannot move for further testing.

 

 

Regards,

Sayali

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @Sayali234,

1) In Addition to the previous changes, can you please try the following changes to the ADC1 for the operation above 20V.

Raj_JC_0-1648621720619.png

Please, also ensure that after making changes you are saving the config wizard and rebuilding the code.

2) To increase the speed try making the following changes to the poti_handler()

       Emo_setspeedreferenz(mV * 8); // 5000 * 8 = 40000 rpm

Please, let us know if these changes helps you.

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hello Raj,

  1. Thanks for input, by above setting the motor is rotating at 24V.

2. Speed - But the speed is not as per spec ,it is rotating at 27000 rpm instead of 42000 rpm.

3. kindly suggest solution for above speed problem.

 

Regards,

Sayali

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @Sayali234,

Thanks for letting me know that the recommended settings worked. For debugging the issue with speed please follow these steps:

1) Check if the supply voltage is coming to be exact 24V.

2) Check if the supply's current is limited.

3) Is there a delay in a hall signal?

4) Try to increase the gain in the Emo_setspeedreferenz(mV * Gain);

Please, let us know if the issue gets resolved.

 

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hello Raj,

   I already tried to increase the gain , but it has not effect after value 8.

I checked the supply current is 24V and even it is not in current limit.

is there any other setting for gain and speed in config wizard.

 

waiting for your reply.

 

Regards,

Sayali

 

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @Sayali234,

I have one suggestion, please try it.

Goto definition of >>  Emo_SetRefSpeed() >> definition of sint16. Or go to types.h file

Raj_JC_0-1648791374089.png

Change: typedef int16_t sint16; to typedef int32_t sint16;

Then try  to increase the gain in the Emo_setspeedreferenz(mV * Gain);

Please, let us know if this works.

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hello Raj,

   By changing above value it does not have any effect in speed.

 

Regards,

Sayali

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @Sayali234,

Can you please enter into the debug mode? Try to analyze the reference speed set at max potentiometer input.

Thank you

Best Regards

Raj Chaudhari 

0 Likes

Hello Raj,

    1.can you please elaborate how to check in debug mode.

2.Is it possible to give analog speed command externally, if yes how can we do that and by what range we can vary speed externally (0 to 5V) or (o to 3.3V) ?

3. when we run motor beyond 20V it runs for some duration and stop and motor heats up. is this is due temp trigger, can we disable this trigger.

 

 

Regards,

Sayali

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @Sayali234,

1) Adding to the previous reply did you rebuild the code and programmed it again?

If yes then follow these steps. If you haven't, try rebuilding it and program it.

2) Put a breakpoint in the code in Keil and click on the debug. Follow this blog for more information. Do not change debugger settings.

3) I don't recommend the third step from your previous response.

Please, let us know if you need further clarification.

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hello Raj,

1.With all above setting below are observations.

a. As I increase voltage form 15 to 24V motor rotates at required speed and it does not  stop at 24 V . Even current is also less at per spec. voltage current waveform  all are good.

b. when I start motor directly at 21V, 22V, 23V 24V it does not rotating.

can you please guide us how can we solve above problem

 

Regards,

Sayali

 

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @Sayali234,

Were you able to achieve the max desired speed?

Best Regards

Raj Chaudhari

0 Likes

Hello Raj,

     Yes I am able to achieve desired speed at 24 V and also by tuning KP/KI the motor is able to start at 22 to 24V.

Regards,

Sayali

0 Likes

Hello Raj,

  1.  I want to control speed of motor externally , for that I have removed JP6 and provided external voltage (0V to 5V) to P2.4  , as I change the voltage the speed of motor is changing.

2. In our end application we will be giving PWM pulse to control speed of motor.

for this I tried to give PWM pule with from arduino but motor rotate for fraction of second and then it stop. Is there any specific setting to control speed of motor from PWM. what frequency range it can accept.

3. To change direction of motor we need to make setting in code but is there any other option to change direction of motor in hardware.

Regards,

Sayali

0 Likes

Hello Team,

   Kindly guide us how give PWM externally to control speed of motor.

waiting for your reply

Regards,

Sayali

0 Likes

Hello Team,

  Reply awaited.

Regards,

Sayali

0 Likes

Hello Team,

  Kindly reply asap.

 

Regards,

Sayali

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @Sayali234,

For controlling the motor using the PWM signal as an Analog signal you can implement the following techniques:

1) Arduino RC Circuit: PWM to Analog DC

    Here, we convert the PWM signal of 0 to 5V amplitude to a DC signal. Refer to the blog for further details.

2) Implement a GPIO detection code with a timer and measure the time duration of Ton and convert it to the reference signal.

 

For the rotating motor in the reverse direction, you can give an external signal as a reference for direction (0 = CW & 1 = CCW)  and detect it and implement the logic for reference speed.

Please, let us know if you need further support.

 

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hello Raj,

   1. For generating PWM signal to control speed of motor is there any sample code or document of it. on which pin we need to give PWM pulse .

2.As you said implement a GPIO detection code with a timer and measure the time duration of Ton and convert it to the reference signal . can you please elaborate more on this.

3.Is there any direct sample code for pwm speed control.

 

Regards,

Sayali

 

0 Likes
Raj_C
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi @Sayali234,

1) For PWM code refer to the Arduino example for generating PWM signals (if you are using Arduino) and make it to the equivalent of desired speed. 


1) Arduino RC Circuit: PWM to Analog DC

    Here, we convert the PWM signal of 0 to 5V amplitude to a DC signal. Refer to the blog for further details.

 


Use this method and give the output of this RC circuit to the same potentiometer ADC of EVALKIt.

2) Configure a GPIO pin to read the external PWM signal. When the external signal is high turn on the timer of the device and stop it when it falls low. Measure this time duration and according to that take speed as a reference in a linear function.

I hope this helps.

 

Thank you

Best Regards

Raj Chaudhari

0 Likes

Hello Raj,

   Thanks for details.

1. If I give PWM from Arduino to pin P2.4 directly it is not working, so I connected external RC network with cut off frequency of 1K . Output from Arduino to RC and then RC to eval kit . As I changed duty cycle the motor speed is varying and it is giving required output .

2. I am giving PWM of 31Khz . wanted to know what is frequency range it can accept.

3. If I run motor  with load it is not working as per requirement.  Do I need to tune KP KI for this.

4. To generate PWM from Keil and config wizard, I got one sample code of PWM with CC6 , but I cannot see how can I changes frequency and duty cycle.

 

Regards,

Sayali

0 Likes

Hello Raj,

  1. To above queries, to run motor with load I tried to tune KP and KI but any combination is not working properly. It takes high current and our load is blower.

2. I run the motor with motor with another driver at 30% duty cycle , its current is 0.47AA at 25V. But when we tried to run at same condition with Infineon driver it is not working at 24V so I reduce voltage to 15V and kept duty cycle same but current is 2.5A which is much higher as to other driver .

waiting for your inputs.

Regards,

Sayali

0 Likes

Reply awaited

0 Likes
Sayali234
Level 3
Level 3
25 sign-ins 25 replies posted First solution authored

Hello team,

  Any update.

 

Regards,

Sayali

0 Likes
Sayali234
Level 3
Level 3
25 sign-ins 25 replies posted First solution authored

Hello Team,

  please provide input asap, because of this our further testing is pending.

 

Regards,

Sayali

0 Likes
Sayali234
Level 3
Level 3
25 sign-ins 25 replies posted First solution authored

Hello Team,

  reply awaited.

Regards,

Sayali

0 Likes