RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

【Introduction】A motor (English: Electric machinery, commonly known as “motor”) refers to an electromagnetic device that realizes the conversion or transmission of electrical energy according to the law of electromagnetic induction. It mainly uses the energized coil (that is, the stator winding) to generate a rotating magnetic field and acts on the rotor (such as a squirrel-cage closed aluminum frame) to form a magnetoelectric rotational torque.

There are many types of motors, such as AC motors, DC motors, etc. At present, the main role in the field of home appliances is the PMSM (permanent magnet synchronous) motor. Its drive block diagram is as follows:

RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

RX24T is a control chip specially designed by Renesas for motor control, 2.7-5.5V voltage, 80MHz, 153.6DMIPS RXv2 core, single-precision FPU, DSP instructions, 3-unit independent 12-bit AD (Unit1 with three-phase sample and hold), PGA , Comparator, and the hardware protection functions implemented by POE (Port Output Enable) are all tailored for home appliance motor applications.

In the block diagram, the RX24T drives the PFC (interaction compatible) and two motors. Among them, the motor drives are different according to their current feedback sampling methods, namely single resistance sampling (the upper motor) and 3 (2) resistance sampling (here 3 resistance sampling and 2 resistance sampling are the same, because 3 resistance sampling is also only used in them 2-way sampling value).

For each motor drive, including PWM output, IPM inverter circuit, phase current sampling circuit and protection circuit. Among them, we need RX24T to configure the timer module with PMW output, the AD module for phase current sampling and the POE module for protection.

This time, only the step-by-step configuration is performed for the drive mode of 3-resistor current sampling. The software used for configuration is CS+ for CC version 8.05, which comes with the Code Generator tool.

01 Create a new project, take R5F524T8AXFM as an example:

RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

02 Configure the clock

Select internal 32M, divide by 4 and then PLL multiplier to 80M

RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

03 Configure timer MTU3 module

MTU3 has a total of 9 channels, and each channel can be used as a separate timer. The two groups of channels 3, 4, 6, and 7 can also be combined to output 6 complementary PWM signals for motor control. Here, channels 3 and 4 are used. Configure as an example:

First select the mode

RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

There are 3 complementary modes, the difference is that the duty cycle and period values ​​are updated at different times. Mode 1 is updated at the peak, Mode 2 is updated at the trough, and Mode 3 is updated once for both the peak and the trough. This routine selects mode 2 and updates the duty cycle at the valley.

Then set the detailed settings in the MTU3 tab

RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

a) Whether this channel operates synchronously with others, this example does not need it.

b) The timing clock source of the timer. In this example, no frequency division is selected, so that the timing accuracy is better.

c) Whether the counter is cleared, choose not to clear. Because the complementary PWM mode is in the form of a triangular wave, the direction of increase and decrease of the count value will be automatically changed, and there is no need to set a trigger source for clearing. The counting method is as follows:

RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

d) PWM period value setting

e) Setting of dead time: The size of this setting value is determined according to the hardware parameters of the peripheral inverter, mainly to prevent the device damage caused by the direct connection of the upper and lower bridges due to the delay of turning on and turning off the IGBTs of the upper and lower bridges of the hardware.

f) These three are the initial comparison values ​​for the three-phase PWM duty cycle.

Note: This is a comparison value, not a percentage.

RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

These items are to set the output level, each output pin can be set individually, and can be set according to the actual circuit. In this example, all settings are active high.

RX24T Motor Drive Configuration: 3 Resistor Sampling (Top)

These items are used to set interrupts. This routine selects the underflow interrupt of channel 4, sets the interrupt priority to 10, and does not select the frequency hopping mode, that is, an underflow interrupt will be generated every cycle to process the algorithm.

Source: Renesas MCU Encyclopedia

The Links:   LQ10DH15 NL6448BC33-74