1 Introduction
As a control center for the small temperature environment of the car, the air conditioner is self-evident. Because the past automotive air conditioning detection system is not necessary to use the integrated detection platform because of the monotonous control strategy, even if there is control process detection, most of the expensive acquisition devices such as data acquisition cards are used, and the communication method is mainly based on serial port communication. Access to the vehicle environment for monitoring [1]. In view of this situation, the detection system designed and developed in this paper mainly analyzes and analyzes the four engineering physical quantities in the operation process of electric vehicle air conditioner: the voltage and current of the fan, the high pressure and low pressure of the compressor port. This topic is derived from the design of the detection system required in the development process of a car air-conditioning system. It is mainly used to make the implementation of the control strategy of the air-conditioning system more transparent and intuitive, and provide a digital basis for the optimization of the control strategy; Development provides a reliable guarantee.
This article refers to the address: http://
2 acquisition system design
2.1 Overall design
As shown in Figure 1, in the system, the software design of the DSP part mainly completes the following tasks: data acquisition cycle setting, AD conversion, data correction and filtering. And it can receive the acquisition start command sent by the host computer through the CAN bus to open the acquisition or close the acquisition function. After the acquisition starts, the four signals are sampled and software corrected according to the requirements. After the calibration is completed, the collection result is saved in the CAN mailbox. The CAN control module transmits. In this system, the voltage and current acquisition period is 50ms, and the high and low voltage sampling periods are 200ms.
2.2 Hardware section
TI's TMS320F2812 is the core of the four-channel data acquisition system. This DSP chip is a member of TI's 2000 series, with a maximum frequency of 150MHz and powerful digital signal processing capability [2]. The on-chip 12-bit AD converter has 16 channels with a conversion rate of 12.5MSPS (the ADC clock is 25MHz), which meets the design requirements of the system in terms of acquisition speed and accuracy. Moreover, the AD module can be triggered in a variety of ways to meet different mission needs. The analog signal input to the 2812AD terminal is obtained by sensor acquisition and transformation. The sensor output signal used in this system is a current loop signal of 4-20 mA, and the AD analog input range is a 0~3V voltage signal.
CAN is the abbreviation of Controller Area Network (ControlAreaNetwork), which was first introduced by German BOSCH Company. It is used for data communication between internal measurement and execution components of automobiles. Its bus specification has been developed into an international standard by ISO international standards [3]. . It is widely used in automotive electronics and industrial control. Its signal transmission medium is ordinary twisted pair, and the communication speed is up to 1Mbps. The CAN bus has strong anti-interference ability. The system adopts the CAN bus communication mode, which also facilitates the access of the whole vehicle debugging.
2.3 Software part design
2.3.1 DSP Software Section
This part of the software mainly consists of two parts: AD conversion of analog signals and CAN bus communication. Because the TMS320F2812 has a built-in 12-bit AD converter, the conversion part can be divided into AD module configuration and data conversion processing; while the AD module configuration mainly includes work and channel selection. In this system, the continuous conversion mode is selected; the analog quantity to be collected is four, and the A and B channels are each configured with two correction input ports, so a total of eight analog input ports are required.
The 50ms200ms set period is, the high and low voltage sampling periods are. Some configuration procedures are as follows:...
AdcRegs.ADCTRL1.bit.SEQ_CASC=0;//Double sorting occurs
AdcRegs.ADCTRL1.bit.CONT_RUN=1;//Continuous conversion method
AdcRegs.ADCTRL1.bit.CPS=0;//The division factor is 1
AdcRegs.ADCMAXCONV.all=0x0055; / / There are 12 conversions, the sample value is taken 2 times, the standard value is 1 time
AdcRegs.ADCCHSELSEQ1.all=0x1100;//conversion sequence
CAN bus communication mainly includes the definition of eCAN module mailbox in TMS320F2812 and the setting of mailbox interrupt subroutine [6].
Some configuration procedures are as follows:
ECanaMboxes.MBOX0.MSGID.all=0x003FFFFF;//mail0:00F
ECanaMboxes.MBOX5.MSGID.all=0x0FFFFFFF;//mail5:3FF
//ConfigureMailboxes0-3asTx, 4, 5asRx
ECanaRegs.CANMD.all=0x00000030;//EnableMailboxes
ECanaRegs.CANME.all=0x0000003F;//Specifythat2bitswillbesent
The CAN module has two types of interrupts, one is a mailbox-related interrupt, and the other is a system interrupt, which is used to handle errors or system-related interrupt sources [4]. In this system, communication between CAN and host computer is mainly realized by mailbox interrupt.
The interrupt procedure of CAN mailbox is as follows:
Interruptvoidcan_send(void)
{
If(((int)ECanaRegs.CANGIF1.all)<0)&&(ECanaRegs.CANGIF1.bit.MIV1==4))
{IER|=M_INT1;}if((((int)ECanaRegs.CANGIF1.all)<0)&
(ECanaRegs.CANGIF1.bit.MIV1==5)){IER=M_INT9;
PieCtrlRegs.PIEACK.bit.ACK9=0x1;
}
Taking high voltage as an example to illustrate the corresponding tasks of the system in data acquisition, data conversion and transmission.
Pre_High=ADCRegs.ADCRESULT6>>4+AdcRegs.ADCRESULT7>>4;Pre_High=Pre_High<<1;//High voltage value Pre_High=Ave_cur*CalGain-CalOffset*CalGain;ECanaMboxes.MBOX2.MDL.word.LOW_WORD=Pre_High; ECanaRegs.CANTRS.all=0x0000000C;
While(ECanaRegs.CANTA.all!=0x0000000C){}ECanaRegs.CANTA.all=0x0000000C;
The actual operation proves that the execution result meets the design requirements, indicating that the part of the program design fully meets the expected task scheduling plan, and can work well with the hardware platform.
2.3.2 PC software part
This part of the software uses object-oriented programming technology. The hardware operation function of CAN232 interface card has been packaged in ControlCAN.dll. In Visual C++ project, two library files and header files, ControlCAN.lib and ControlCAN.h, are added. Convenient to call in the program. Set the corresponding parameters of CAN232 in the compiled application and start the acquisition process. Each time the collected data is written to the data file and sent to the data buffer to realize data sharing between the acquisition module and the display module. The flow chart of this part is shown in Figure 2:
In this project, you can use VC's own property page dialog box and set the corresponding four property pages to easily switch and observe the collected data waveforms, data statistics, data frames, and statistics of collected events. The display module uses MeasurementStudio's display controls (CNiGraph). MeasurementStudio is a tool developed by National Instruments for testing and control, seamlessly integrating powerful data acquisition and analysis into the Visual Studio environment. MeasurementStudio provides users with intuitive measurement hardware interfaces, advanced analysis functions, scientific user interface controls, and measurement data networks that greatly enhance the development efficiency of data acquisition and analysis systems [5].
In this system. The amount of data is huge, and for this situation, an Access database file is created. Access is a typical relational database suitable for ordinary occasions. According to the design principle of relational database and the requirements of this paper, the operation of the database is transformed into the operation of the corresponding recordset, and the implementation language is implemented by SQL language. 3 is a waveform diagram of four-way data of an air-conditioning compressor. FIG. 4 is a statistical diagram of data values ​​corresponding to four-way data.
3 Conclusion
The acquisition system has undergone several software and hardware tests, which proves that the collection of relevant parameters of the automotive air conditioning compressor system can be well satisfied. The designed upper computer system can cooperate with the collection node to realize data display, storage, data recording, retrieval, etc. Function, multi-threading, critical amount and other programming techniques, combined with MeasurementStudio user interface control and analysis function library, realizes the data acquisition system conveniently and quickly in Visual C++ environment, effectively reduces the complexity of this kind of program development, shortens the The cycle of program development proves that the system has the advantages of real-time and scalability. The author of this paper innovates: Combining DSP and CAN bus technology into the online detection system, the anti-interference ability, reliability and accuracy of the system are guaranteed; the calculation speed and work efficiency are improved.
APM Variable Power Supply inherits the functional design and maintains the high power density characteristic.Standard communication interface includes RS232/RS485/USB/LAN,GPIB is optional.Users can choose the Switch Mode Power Supply that fits their testing requirements perfectly.
Some features as below:
- With accurate voltage and current measurement capability.
- Coded Knob, multifunctional keyboard.
- Standard RS232/RS485/USB/LAN communication interfaces, GPIB is optional.
- Remote sensing line voltage drop compensation.
- Equips with LIST waveform editing function.
- Use the Standard Commands for Programmable Instrumentation(SCPI) communication protocol.
- Have obtained CE certification.
150V Dc Source System,High Current Power Supply,Apm Tech Power Supply,150V Dc Power Source
APM Technologies (Dongguan) Co., Ltd , https://www.apmpowersupply.com