TMS320F241 in hybrid motor motor control applications

With the increasing pollution of urban environmental pollution, the control of automobile exhaust has received more and more attention. Many countries have carried out research on electric vehicles. However, electric vehicles have weaknesses such as short driving range and poor power performance. In addition, the cost is too high, and it is currently unable to be put into the market in large quantities. In order to balance the advantages of traditional fuel vehicles and electric vehicles, research on hybrid vehicles has begun at home and abroad.

This article refers to the address: http://

Since hybrid vehicles have two drive systems, the exchange and coordination of information between the drive system and the vehicle control unit (VCU) is particularly important. The CAN (Controller Area Network) bus is a serial communication network that effectively supports distributed control or real-time control. It belongs to the field bus field and has real-time performance, high reliability and strong anti-interference. The structure is simple, the operation is good, the price is low, and so on, so it is widely used in industrial control.

The TMS320X24X is TI's family of chips designed for digital motor control. Compared with the TMS320C240 or TMS320F240 of the same series, the TMS320F241 has a built-in CAN module in addition to the basic functions of the latter, so it is very suitable for the control of the hybrid motor motor drive system.

1 Main features of TMS320F241

Compared with the TMS320X240, the TMS320F241 has the following differences in addition to a CAN module:

• TMS320X240 has dual 10-bit A/D converters with 16 input channels and a conversion time of 6μs. The TMS320F241 has only one 10-bit A/D converter with 8 input channels and a conversion time of 1μs.

• There are 3 timer/counters, 4 capture units and 9 PWM outputs (6 Full PWM and 3 Simple PWM) in the event manager of TMS320X240. There are only 2 timers/counters in the event manager of TMS320F241. One capture unit and six PWM outputs (6 Full PWM), the counter is also counted in a single rising edge and single rising/falling edge modes.

TMS320F241 has 8K on-chip Flash, no extended RAM interface, debugging is not very convenient. But you can use the same series of TMS320F243EVM board for debugging, the program can be transplanted to the TMS320F241 chip with almost different modifications.

2 Brushless DC motor control system solution

Figure 1 shows the control diagram of the motor system, using switching and current double closed loop control.

Brushless DC motor control system solution

The rotor position is detected by the Hall element and is an overlap signal of three 120 degrees (electrical angle) and a pulse width of 180 degrees (electrical angle). The rotational speed can be obtained from the rotor position, and the calculated current value is obtained. The current sensor can detect the actual current, and adjust the duty ratio of the PWM signal according to the difference between the current set value and the actual value, and according to the current The rotor position triggers the corresponding power switching device to achieve the purpose of controlling the motor speed.

The inverter adopts IPM intelligent power module, which contains power switching device and driving circuit and detection circuit such as process voltage and over current. The switching device is IGBT.

The functional modules (including ASR, ACR, PWM, commutation logic and speed calculation) in the motor control strategy are implemented by the TMS320F241 chip.

3 TMS320F241 peripheral design

Figure 2 shows the main peripheral wiring diagram of the TMS320F241 chip. The relevant instructions are as follows:
Main peripheral wiring diagram of TMS320F241 chip

A 5MHz crystal is connected between XTAL1 and XTAL2 to provide the system clock.

The pins CAP1, CAP2, and CAP3 of the three capture units are connected to the output of the Hall element, and the position signal of the rotor is stored in the buffer of the capture unit, and the rotor speed is obtained through calculation.

In the 8-bit input channel of the A/D converter, five channels are used. The input quantities are DC bus current Idc, voltage Vdc, and motor three-phase currents Iu, Iv, Iw; the other three channels are grounded through the resistor.

The 6-channel PWM output is connected to the control terminals of the six switching devices of the inverter, wherein U+, V+, and W+ are connected to the bridge arm, and U- and VW- are connected to the lower arm. These six PWM signals control the switching device's turn-on and turn-off, which determines the current flow path.

The CAN module pins CANRX and CANTX of the TMS320F241 are connected to the transceiver 82C250 through the optocoupler device 6N137, and the transceiver 82C250 is connected to the CAN bus through the two pins CANH and CANL, thereby realizing communication between the TMS320F241 and the CAN bus. The communication medium is twisted pair. If the communication distance is within 40m, the maximum transmission rate can reach 1Mbps.

4 TMS320F241 CAN programming

The CAN module of the TMS320F241 is a FullCAN controller that can send and receive standard frames (11-bit identifiers) and extended frames (29-bit identifiers). It contains 6 mailboxes (Mailboxes) and 15 different 16-bit registers. These registers are divided into control registers, status registers, interrupt registers, and local receive mask registers, which map to the DSP's data address space from 0x7100h to 0x710Fh. There are two inboxes (numbered 0 and 1), two outboxes (numbered 4 and 5), and two mailboxes (numbered 2 and 3) that can be set as recipients as needed. Box or outbox. Each mailbox contains three parts: identifier, message length, remote frame transmission request, and data. The length of data sent or received is 8 bytes. The 6 mailboxes occupy the address space from 0x7200h to 0x722Fh.

CAN programming of TMS320F241

In order for the TMS320F241 chip to correctly send and receive information, the CAN module must first be initialized. The bit transfer time of each node on the CAN bus is programmable (by setting the baud rate), but it must be the same. When a node receives a frame, the receiver must be synchronized with the transmitter. The steps to initialize the mailbox are as follows:


(1) Disable mailbox

CANMDER=00000000000000000000b

(2) setting change data request

CANMCR=0000000100000000b (bit8CDR=1)

(3) Change the identifier, control word and data of the mailbox (only the outbox can change the data)

(4) Back to normal mode

CANMCR=00000000000000000000b

(5) Enable mailbox (ME=1)

After the CAN module is initialized, it can be sent and received with the correct configuration.

Figure 3 and Figure 4 are flow charts of CAN module transmission and reception, respectively.

As can be seen from the above introduction, the TMS320F241 is a DSP chip dedicated to motor control and embedded with a CAN module. It can easily realize the speed control of the hybrid electric vehicle (HEV) permanent magnet brushless DC motor, and with its embedded CAN module, it can pass the CAN bus (protocol specification CAN2.0) and the hybrid vehicle. The control unit (VCU) communicates. Therefore, it is very suitable for hybrid motor vehicle permanent magnet brushless DC motor control system.

5000W AC Power Supply

Variable AC Power Supply model SP300VAC5000W is switching mode single-channel output it adopts high speed DSP+CPLD control, high frequency PWM power technology and active PFC design to realize AC/DC stable output. This ac power source is featured with high power density, high reliability and high precision, meanwhile it possesses operation interface of touch screen and keys manually. It is able to analog output normal or abnormal input for electrical device to meet test requirements.

Some features of the ac source as below:


  • 5.6"large touch color screen
  • AC+DC mixed or independent output mode
  • Capable of setting output slope/phase angle
  • Built-in IEC standard test function
  • Built-in multiple protections
  • Built-in power meter
  • Support impedance function
  • Support for LIST/PULSE/STEP mode & Transient mode
  • Standard RS232/RS485/USB/LAN, Optional GPIB/multiphase card.
  • Support master and slave parallel mode to realize power extension
  • Support harmonics/inter-harmonics simulation and measuring function
  • Support for USB data import/export and scree nap from front panel
  • PWM technologies, with up to 86% efficiency
  • CE, CSA, UL, ROHS Certified


5000W AC Power Supply,3 Phase Ac Power Supply,Industrial Switching Power Supply,Ac Adjustable Power Supply

APM Technologies Ltd , https://www.apmpowersupply.com