Software and hardware design of high-precision intelligent transmitter using TMS320F2812

Publisher:masphiaLatest update time:2013-08-18 Source: 21icKeywords:TMS320F2812 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Sensors are often used to measure parameters in industrial applications, but sensor signals are generally weak and not suitable for long-distance transmission. In addition, the nonlinear effect is not ideal and cannot meet the high accuracy requirements. This paper applies DSP and eCAN (enhanced controller area network) bus technology to smart transmitters, uses TMS320F2812 as the core controller, and communicates data reliably through the CAN bus to design a high-precision smart transmitter.

  1 System composition

  The intelligent transmitter based on eCAN fieldbus technology consists of a host computer and intelligent measurement and control nodes. The host computer located at the monitoring site uses a general-purpose computer (PC) or industrial control computer (ICP), and uses a bus communication adapter card in the ISA expansion slot to enable the host computer to have bus communication function; while multiple intelligent measurement and control nodes located at the industrial site collect field data. Directly facing the production process. Figure 1 is a block diagram of the system composition.

  2 Hardware Design of eCAN Intelligent Transmission Node

  The intelligent transmitter node has the functions of field data acquisition, control and communication with the CAN bus. The node is based on the TMS320F2812 DSP and uses its internal integrated eCAN module for communication. Its hardware circuit consists of four parts: single-chip microcontroller circuit, data acquisition circuit, communication interface circuit and field monitoring circuit. Its main application circuit is shown in Figure 2.

  TMS320F2812 is connected to MAXl400 through the SPI serial interface. After the data is processed, the isolation protection of the CPU unit is realized through photoelectric isolation and power isolation, thereby improving the anti-interference ability of the communication process.

  2.1 Single-chip microcontroller

  The core device of this device is TMS320F2812. TMS320F2812 DSP has an internal integrated eCAN module, which is fully compatible with CAN2.0B protocol. It is a new generation of 32-bit internal structure advanced CAN controller of TI. The device also integrates a variety of advanced peripherals, providing a good platform for applications in the control field. TMS320F2812 DSP improves the calculation accuracy (32 bits) and the processing power of the system (up to 150 MI/s). This series of devices also integrates 128 KB Flash memory, 4KB boot ROM, mathematical operation table and 2 KB OTPROM, which greatly improves the flexibility of application.

  2.2 Data Collection

  The sensor module is one of the communication terminal devices that realize eCAN communication. After the control command information of the host computer is processed by the microprocessor, the sensor is used to collect data or set parameters. Usually, the signal amplitude of the input sensor is very small, and it is mixed with interference signals and noise. In order to facilitate subsequent processing, the signal must first be shaped into a waveform with optimal characteristics, and sometimes the signal needs to be linearized. This device can be directly connected to various sensors on site, and then bidirectional data is transmitted with the host computer through a shielded twisted pair cable.

  Semiconductor piezoresistive sensors are used in debugging. In order to increase the full-scale output, reduce zero drift and improve linearity, the piezoresistive resistors are usually connected to form a Wheatstone bridge, and the resistance of each bridge arm is relatively large, generally 2 kΩ. Constant current source power supply is used. The advantage of this method is that the output of the bridge is independent of the bridge arm resistance. At the same time, dual power supply is used, so the impact on the nonlinearity of the sensor and the output sensitivity of the temperature sensor can be further reduced.

  In terms of analog-to-digital conversion, the internal A/D converter of TMS320F2812 is not used. An instrument amplifier with adjustable gain and an A/D converter with a resolution of at least 14 bits are required to amplify and convert the sensor signal to analog-to-digital, so as to meet the design requirements of high precision, automatic range adjustment, and large range of intelligent transmitters. For any intelligent transmitter, it is also necessary to sample various sensors to compensate for the field data measurement values ​​of various sensors and improve the measurement accuracy of the full range. In this way, a multiplexer is also required to switch between channels. If discrete components are selected, considerable power consumption will inevitably be introduced. The MAXl400 device is used here. This device is a low-power, multi-channel, ∑/△, 18-bit A/D converter with SPI synchronous serial port.
 

 

  2.3 Communication interface

  TMS320F2812 has an internal integrated eCAN, which can be easily connected to the CAN bus system. Therefore, in the design, there is no need to add an external CAN controller to implement the CAN bus underlying protocol. You only need to connect the CAN bus driver externally to implement the CAN interface.

The SN65HVD230 transceiver   is used here to improve the instantaneous anti-interference ability of the system, increase the communication distance, protect the bus, reduce radio frequency interference, and achieve thermal protection. The 6N137 series devices are high-speed optocouplers that achieve optoelectronic isolation between TMS320F2812 and the physical bus, reduce crosstalk caused by high common-mode voltages of different nodes, and even damage to the device, thereby improving the reliability of the system. Its communication rate can be as high as 10 Mbit/s, which can fully meet the communication needs of the CAN bus.

  Because the DSP is powered by +3.3 V, and the comparator inside the SN65HVD230 requires a 5 V power supply, R2 and R3 are connected at the receiving end to achieve level conversion.

  2.4 On-site monitoring circuit

  This circuit mainly displays the working status of the node and the measured value of the controlled object, and controls the controlled object according to the settings. The circuit is composed of a liquid crystal display, an output driver device, etc.

  3 System Software Design

  System software design is an important part of the whole device. The software design of this device is developed in CCS integrated development environment using C language. CCS is a powerful integrated development environment developed by TI, which can provide tools such as environment configuration, source file editing, program debugging, tracking and analysis, and complete editing, compiling, linking, debugging and data analysis in the software environment.
 3.1 Main program

  The main function software code of the smart transmitter is as follows:

  3.2 A/D conversion module software design


 

  When operating MAX1400, it should be initialized first. If it is not initialized and the A/D conversion data is directly read, MAX1400 will convert according to the default values ​​of its internal registers when it is powered on and reset. The program flow of InitMAX1400() is shown in Figure 3.

The software is used to control the states of the MAXl400's DRDY, CS, SCLK, DIN and DOUT pins respectively, so as to realize its operation. The reading and writing of MAXl400 are carried out in strict timing.

  In the main program, SPIRXINTA_ISR and SPIRXINTA_ISR are the SPI input and output subroutines respectively.

  The Measure() subroutine is the process by which TMS320F2812 processes the data collected by the A/D converter. When SPISTS. SPINTFLAG = 1, the CPU stores the value in SPIRXBUF into the Sci_VarRx[i] array. MAXl400 is an 18-bit processor, while TMS320F2812 is a 16-bit processor. Therefore, each sampled value takes up 2 storage spaces. The measurement result filtering adopts the median average filtering method, that is, each measurement value is sampled 10 times, the maximum and minimum values ​​are removed, and the arithmetic mean of the remaining 8 values ​​is taken.

  3.3 eCAN communication module software design

  Before using the eCAN module, its internal registers must be initialized. InitECan() includes: 1) To correctly configure the two pins CANTX and CANRX, because these two I/O ports are multiplexed ports. 2) Initialize the bit timer. The bit timer CANBTC includes the communication baud rate prescaler BRP, synchronization jump width SJW, sampling times SAM and TSEG1, TSEG2 of the CAN controller. 3) Initialize the mailbox. The mailbox initialization mainly sets the mailbox identifier, control field and assigns initial values ​​to the corresponding mailbox.

  4 Conclusion

  The intelligent transmitter based on eCAN technology, with TMS320F2812 and MAXl400 as the core, integrates conversion, calculation, communication and other functions, and has the characteristics of high precision, small size and low power consumption. Transmitting data to the host computer via the eCAN bus improves the reliability and flexibility of industrial instruments and provides a good hardware platform for centralized control of industrial sites.

Keywords:TMS320F2812 Reference address:Software and hardware design of high-precision intelligent transmitter using TMS320F2812

Previous article:Technology and application of high-speed analog cameras
Next article:Multifunctional streaming media recorder and player using CC1100

Recommended ReadingLatest update time:2024-11-16 21:38

Design of vector control system for asynchronous motor based on DSP
0 Introduction With the continuous development of modern control theory, microprocessing technology and power electronics technology, high-performance AC drive systems based on vector control have been widely used. The asynchronous motor is a multivariable, strongly coupled, nonlinear time-varying parameter
[Embedded]
Application of TMS320F2812 in digital three-phase variable frequency power supply
As an important part of the power supply system, the performance of the variable frequency power supply is directly related to the safety and reliability indicators of the entire system. Modern variable frequency power supplies are favored for their significant advantages such as low power consumption, high effi
[Power Management]
Application of TMS320F2812 in digital three-phase variable frequency power supply
Research on Inverter Power Supply Based on DSP Deadbeat Control
introduction With the emergence of high-performance DSP controllers, UPS power supplies using digital control have become a hot topic of research. Digital dual closed-loop control based on DSP can effectively improve the anti-interference ability of the power supply system, reduce noise, improve efficiency an
[Power Management]
Research on Inverter Power Supply Based on DSP Deadbeat Control
Analysis of the Analog-to-Digital Conversion Accuracy of the TMS320F2812 Chip ADC
TMS320F2812 is a high-precision DSP with fast operation speed, working clock frequency of 150 MHz, instruction cycle of less than 6.67 ns, and low power consumption (core voltage 1.8 V, I/O port voltage 3.3 V). It adopts Harvard bus structure, has powerful operation ability, rapid interrupt response and processing a
[Embedded]
Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号