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.
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
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【GD32E503 Review】 Test screen display characters
- AM5708 platform transplants Ubuntu system and docker container
- Microchip Live FAQ|Manufacturing Logistics Challenges of Secure Key Provisioning: Advantages of Discrete Secure Elements
- Show the screen of E-coin exchange
- What exactly do you earn from a 5-yuan PCB proofing?
- Teach you to write microcontroller timer interrupt program
- Compilation warning: last line of file ends without a newline
- CC2541 Bluetooth Learning - General I/O Port Interrupt
- The waveform is distorted in the positive half cycle when the op amp amplifies it by 10 times
- 【Competition Information】Document download: RSL 10_add profiles & RSL 10_IDE_installation