CN210804406U - Auxiliary test device based on SPI simulation acquisition chip - Google Patents
Auxiliary test device based on SPI simulation acquisition chip Download PDFInfo
- Publication number
- CN210804406U CN210804406U CN202020022424.9U CN202020022424U CN210804406U CN 210804406 U CN210804406 U CN 210804406U CN 202020022424 U CN202020022424 U CN 202020022424U CN 210804406 U CN210804406 U CN 210804406U
- Authority
- CN
- China
- Prior art keywords
- pin
- test
- chip
- spi
- power supply
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 103
- 238000004088 simulation Methods 0.000 title description 2
- 230000006854 communication Effects 0.000 claims abstract description 34
- 238000004891 communication Methods 0.000 claims abstract description 32
- 238000000034 method Methods 0.000 claims abstract description 16
- 238000006243 chemical reaction Methods 0.000 claims description 36
- 230000009977 dual effect Effects 0.000 claims description 10
- 238000012544 monitoring process Methods 0.000 claims description 5
- 239000003990 capacitor Substances 0.000 claims description 3
- 238000012986 modification Methods 0.000 abstract description 10
- 230000004048 modification Effects 0.000 abstract description 10
- 230000006870 function Effects 0.000 abstract description 7
- 238000010276 construction Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 10
- 230000004044 response Effects 0.000 description 7
- 238000012795 verification Methods 0.000 description 5
- 239000000178 monomer Substances 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 238000009413 insulation Methods 0.000 description 2
- 238000010998 test method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000005284 excitation Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000004936 stimulating effect Effects 0.000 description 1
Images
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
本实用新型公开了一种基于SPI模拟采集芯片的辅助测试装置,属于动力电池及电动汽车技术领域。本实用新型的测试装置采用模拟采集芯片代替真实物理电路,直接对BAU输送测试信号,避免了物理电路在实际测试过程中出现的各种问题;同时本装置不需要复杂的电池连线,简化了测试环境的搭建过程;利用CAN通信总线,接收PC发送的寄存器修改值,并保存到存储器中,实现从PC端控制寄存器的功能,使自动化测试得以实现,提高了测试效率。该测试装置利用存储器RAM模拟采集芯片的寄存器,在未接收到PC发送的寄存器修改命令时BAU端读取到的电压值和温度值不变,提高了测试的稳定性,使该测试装置在一些边界条件的测试场合中发挥重要作用。
The utility model discloses an auxiliary testing device based on an SPI analog acquisition chip, which belongs to the technical field of power batteries and electric vehicles. The test device of the utility model adopts the analog acquisition chip to replace the real physical circuit, and directly transmits the test signal to the BAU, thereby avoiding various problems of the physical circuit in the actual test process; at the same time, the device does not need complicated battery connections, which simplifies the The construction process of the test environment; using the CAN communication bus, the modified value of the register sent by the PC is received and stored in the memory, so as to realize the function of controlling the register from the PC side, so that the automatic test can be realized and the test efficiency is improved. The test device uses the memory RAM to simulate the register of the acquisition chip. When the register modification command sent by the PC is not received, the voltage value and temperature value read by the BAU terminal remain unchanged, which improves the stability of the test and makes the test device in some Boundary conditions play an important role in testing occasions.
Description
技术领域technical field
本实用新型涉及动力电池及电动汽车技术领域,更具体地说,涉及一种基于SPI模拟采集芯片的辅助测试装置。The utility model relates to the technical field of power batteries and electric vehicles, in particular to an auxiliary testing device based on an SPI analog acquisition chip.
背景技术Background technique
电动汽车是一个复杂的电气系统,其电气系统分低压部分和高压部分,低压部分为车内电子设备(如灯光、雨刷、音箱等低压电气设备)供电,一般采用12V/24V电源,低压供电的负极跟车辆底盘直接相连;高压部分为车辆的动力系统(如电机控制器、车载DC-DC电源转换器等)供电;乘用车高压系统的动力电池工作电压一般在300V左右,通常是由多个电池串联组成,并使用专用的电池管理系统管理和控制。Electric vehicle is a complex electrical system. Its electrical system is divided into low-voltage part and high-voltage part. The low-voltage part supplies power to electronic equipment (such as lights, wipers, speakers and other low-voltage electrical equipment) in the car. Generally, 12V/24V power supply is used. The negative pole is directly connected to the vehicle chassis; the high-voltage part supplies power to the vehicle's power system (such as motor controller, vehicle-mounted DC-DC power converter, etc.); Each battery is formed in series and managed and controlled using a dedicated battery management system.
电池管理系统(简称BMS)通常由电池监控单元(简称BMU)和电池控制单元(简称BCU)组成;现阶段,BMS趋近于小型化、轻量化,因此在一些应用场景中会将BCU和BMU合二为一,组成一体式的BMS(简称BAU)。由于BAU仍需监控每一串单体电池的电压和温度,所以在验证电池管理策略时,需要外部提供等量的单体电压和单体温度。为达到激励系统进行验证的目的,通常的做法是使用专用HIL设备,或者自制测试台架,模拟电池电压和电池温度。针对单体电压的测试,需通过HIL设备或台架输出真实电压;针对单体温度的测试,需事先查询温度表,找到对应温度时的电阻值,然后调整滑动电阻器,通过万用表确认电阻值后将滑动电阻器接到温度采集电路中;或者使用一个复杂的电阻矩阵,通过继电器切换电阻开关,将事先准备好的电阻切换到温度采集电路中。但使用上述方法需要搭建真实的物理电路,电路复杂且存在问题:(1)模拟单体电压输出,存在精度低,响应速度慢的问题;(2)模拟单体温度输出,需要查询温度表,存在不能实时调温度和输出温度值不连续的问题;(3)受环境温度影响,电阻存在温漂问题,会影响测试结果。The battery management system (BMS for short) is usually composed of a battery monitoring unit (BMU for short) and a battery control unit (BCU for short). Combining the two into one, they form an integrated BMS (BAU for short). Since the BAU still needs to monitor the voltage and temperature of each string of single cells, it is necessary to provide the same amount of cell voltage and cell temperature externally when verifying the battery management strategy. For the purpose of stimulating the system for verification, it is common practice to use dedicated HIL equipment, or a self-made test bench to simulate battery voltage and battery temperature. For the test of the single voltage, the real voltage needs to be output through the HIL device or the bench; for the test of the single temperature, it is necessary to check the temperature table in advance to find the resistance value at the corresponding temperature, then adjust the sliding resistor, and confirm the resistance value with a multimeter Then connect the sliding resistor to the temperature acquisition circuit; or use a complex resistance matrix, switch the resistance switch through the relay, and switch the prepared resistance to the temperature acquisition circuit. However, using the above method needs to build a real physical circuit, the circuit is complex and there are problems: (1) simulating the voltage output of the monomer, there are problems of low precision and slow response; (2) simulating the temperature output of the monomer, it is necessary to query the temperature table, There are problems that the temperature cannot be adjusted in real time and the output temperature value is discontinuous; (3) Affected by the ambient temperature, the resistance has a temperature drift problem, which will affect the test results.
经检索,中国专利号ZL201410196149.1,发明名称为:一种BMS的验证监控系统及其方法,申请日为:2014年5月11日,该申请案公开的BMS验证监控系统,包括上位机和通过CAN总线分别与上位机连接的单体电压模拟单元、温度模拟单元、绝缘电阻模拟单元、总电流模拟单元、数字量模拟单元、过欠压检测单元;该申请案公开的BMS验证监控方法,包括单体电压测试步骤、温度测试步骤、数字量I/O测试步骤、电池组绝缘电阻测试步骤、系统过压测试步骤和总电流模拟测试步骤;该申请案可测试BMS的综合性能,并验证其功能;但在温度测试时,该申请案仍需搭建真实的物理电路,无法解决真实物理电路在测试中会出现的问题;同时该申请案为测试BMS不同的功能,设置多个测试单元,使系统结构复杂,不便于搭建。After retrieval, the Chinese patent number is ZL201410196149.1, the name of the invention is: a BMS verification and monitoring system and its method, the application date is: May 11, 2014, the BMS verification and monitoring system disclosed in the application includes the host computer and A single voltage analog unit, a temperature analog unit, an insulation resistance analog unit, a total current analog unit, a digital analog unit, and an overvoltage and undervoltage detection unit connected to the host computer through the CAN bus respectively; the BMS verification monitoring method disclosed in this application, Including single voltage test steps, temperature test steps, digital I/O test steps, battery pack insulation resistance test steps, system overvoltage test steps and total current simulation test steps; this application can test the comprehensive performance of BMS and verify Its function; however, in the temperature test, the application still needs to build a real physical circuit, which cannot solve the problems that may occur in the test of the real physical circuit; at the same time, the application sets up multiple test units to test different functions of the BMS. It makes the system structure complex and inconvenient to build.
发明内容SUMMARY OF THE INVENTION
1.实用新型要解决的技术问题1. Technical problems to be solved by the utility model
鉴于现有技术中对BAU的测试一般使用专用HIL设备或自制测试台架,需要搭建真实的物理电路,而现有真实电路在对BAU测试时,存在模拟单体电压输出精度低、响应速度慢,模拟单体温度输出不能实时调温度、输出温度值不连续,受环境温度影响,电阻存在温漂,导致测试结果不准确的问题,本实用新型提供了一种基于SPI模拟采集芯片的辅助测试装置,利用模拟采集芯片代替真实物理电路,直接对BAU输送测试数据信号,避免了物理电路在实际测试过程中出现的各种问题。In view of the fact that the testing of BAU in the prior art generally uses special HIL equipment or self-made test benches, it is necessary to build a real physical circuit, and the existing real circuit has low output precision of analog monomer voltage and slow response speed when testing BAU. The temperature output of the simulated monomer cannot adjust the temperature in real time, and the output temperature value is discontinuous. Affected by the ambient temperature, the resistance has temperature drift, which leads to the problem of inaccurate test results. The utility model provides an auxiliary test based on an SPI analog acquisition chip. The device uses the analog acquisition chip to replace the real physical circuit, and directly transmits the test data signal to the BAU, avoiding various problems of the physical circuit in the actual test process.
2.技术方案2. Technical solutions
为达到上述目的,本实用新型提供的技术方案为:In order to achieve the above object, the technical scheme provided by the present utility model is:
本实用新型的一种基于SPI模拟采集芯片的辅助测试装置,包括控制模块、试验模块和信号采集模块,所述的控制模块与试验模块电连接,监控试验模块状态;所述的信号采集模块分别与控制模块和试验模块电连接,接收控制模块和试验模块传输的指令并做出反馈;所述的信号采集模块包括SPI电平转换电路、嵌入式微处理器MCU和CAN通信电路,所述的嵌入式微处理器MCU通过SPI电平转换电路与试验模块电连接,同时通过CAN通信电路与控制模块电连接。The utility model is an auxiliary testing device based on an SPI analog acquisition chip, comprising a control module, a test module and a signal acquisition module. The control module is electrically connected with the test module to monitor the state of the test module; the signal acquisition modules are respectively It is electrically connected with the control module and the test module, receives the instructions transmitted by the control module and the test module and gives feedback; the signal acquisition module includes an SPI level conversion circuit, an embedded microprocessor MCU and a CAN communication circuit, and the embedded The type microprocessor MCU is electrically connected to the test module through the SPI level conversion circuit, and is also electrically connected to the control module through the CAN communication circuit.
更进一步地,所述的控制模块采用PC机,通过USB-CAN转换设备分别与试验模块和信号采集模块连接。Further, the control module adopts a PC, and is connected to the test module and the signal acquisition module respectively through a USB-CAN conversion device.
更进一步地,所述的SPI电平转换电路包括一片电压电平转换芯片U1;该电压电平转换芯片U1的Vref_A引脚与3.3V电源连接,A1、A2、A3、A4引脚分两路,一路分别经电阻R4、R3、R2、R1连接至3.3V电源,另一路分别经电阻R5、R6、R7、R8连接至MCU;Vref_B引脚与5V电源连接,B1、B2、B3、B4引脚分两路,一路分别经电阻R9、R10、R11、R12连接至5V电源,另一路分别经电阻R14、R15、R16、R17连接至BCU;EN引脚经电阻R13连接至5V电源,GND引脚接地。Further, the SPI level conversion circuit includes a voltage level conversion chip U1; the Vref_A pin of the voltage level conversion chip U1 is connected to the 3.3V power supply, and the A1, A2, A3, and A4 pins are divided into two channels. , one way is connected to 3.3V power supply through resistors R4, R3, R2, R1 respectively, the other way is connected to MCU through resistors R5, R6, R7, R8 respectively; Vref_B pin is connected to 5V power supply, B1, B2, B3, B4 leads The pins are divided into two channels, one is connected to the 5V power supply through the resistors R9, R10, R11, R12, and the other is connected to the BCU through the resistors R14, R15, R16, R17; the EN pin is connected to the 5V power supply through the resistor R13, and the GND leads feet grounded.
更进一步地,所述的SPI电平转换电路还包括两片双电源总线收发芯片U2和U3;双电源总线收发芯片U2上,VCCA引脚接3.3V电源,VCCB引脚接5V电源,引脚A连接至MCU,引脚B连接至BCU,GND引脚接地,DIR引脚经电阻R18连接至双电源总线收发芯片U3的VCCB引脚;双电源总线收发芯片U3上,VCCA引脚接3.3V电源,VCCB引脚接5V电源,引脚A连接至MCU,引脚B连接至BCU,GND引脚接地,DIR引脚经电阻R19接地。Further, the SPI level conversion circuit also includes two dual power bus transceiver chips U2 and U3; on the dual power bus transceiver chip U2, the VCCA pin is connected to the 3.3V power supply, the VCCB pin is connected to the 5V power supply, and the pin is connected to the 5V power supply. A is connected to MCU, pin B is connected to BCU, GND pin is grounded, DIR pin is connected to VCCB pin of dual power bus transceiver chip U3 through resistor R18; on dual power bus transceiver chip U3, VCCA pin is connected to 3.3V Power supply, VCCB pin is connected to 5V power supply, pin A is connected to MCU, pin B is connected to BCU, GND pin is grounded, and DIR pin is grounded through resistor R19.
更进一步地,所述的CAN通信电路包括CAN收发器芯片U4,该芯片上,TXD引脚和RXD引脚均连接至MCU,VCC引脚连接3.3V电源,GND引脚接地;引脚Rs经电阻R20接地;CANH、CANL、VRef引脚分别经电容C3、C2、C1接地,同时,CANH和CANL引脚分别经共模电感L1的1、2端和3、4端接入USB-CAN转换设备。Further, the CAN communication circuit includes a CAN transceiver chip U4, on which the TXD pin and the RXD pin are connected to the MCU, the VCC pin is connected to the 3.3V power supply, and the GND pin is grounded; Resistor R20 is grounded; CANH, CANL, VRef pins are grounded through capacitors C3, C2, and C1, respectively. At the same time, CANH and CANL pins are connected to USB-CAN conversion through
更进一步地,所述的信号采集模块还包括存储器RAM,用于存储控制模块传输的数据;该存储器RAM与嵌入式微处理器MCU电连接。Further, the signal acquisition module further includes a memory RAM for storing data transmitted by the control module; the memory RAM is electrically connected with the embedded microprocessor MCU.
更进一步地,所述的电压电平转换芯片U1型号为LSF0204PWR;所述的两片双电源总线收发芯片U2和U3型号为SN65HVD230QD;USB-CAN转换设备型号为USBCAN-II;CAN收发器芯片U4型号为SN65HVD230QD。Further, the model of the voltage level conversion chip U1 is LSF0204PWR; the model of the two dual-power bus transceiver chips U2 and U3 is SN65HVD230QD; the model of the USB-CAN conversion device is USBCAN-II; the CAN transceiver chip U4 The model number is SN65HVD230QD.
3.有益效果3. Beneficial effects
采用本实用新型提供的技术方案,与已有的公知技术相比,具有如下显著效果:Using the technical solution provided by the present utility model, compared with the existing known technology, has the following remarkable effects:
(1)鉴于现有技术中对BAU的测试需搭建真实的物理电路,会存在模拟单体电压输出精度低、响应速度慢,模拟单体温度输出不能实时调温度、输出温度值不连续,受环境温度影响,电阻存在温漂,导致测试结果不准确的问题,本实用新型提供的一种基于SPI模拟采集芯片的辅助测试装置,采用模拟采集芯片代替真实物理电路,直接对BAU输送测试数据信号,避免了物理电路在实际测试过程中出现的各种问题;同时本装置不需要复杂的电池连线,大大简化了测试环境的搭建过程,降低了测试成本。(1) In view of the fact that a real physical circuit needs to be built for the BAU test in the prior art, there will be low output precision of the analog cell voltage, slow response speed, the temperature output of the analog cell cannot be adjusted in real time, and the output temperature value is discontinuous. Due to the influence of ambient temperature, the resistance has temperature drift, which leads to the problem of inaccurate test results. The utility model provides an auxiliary test device based on an SPI analog acquisition chip, which adopts the analog acquisition chip to replace the real physical circuit and directly transmits the test data signal to the BAU. , which avoids various problems in the actual testing process of the physical circuit; at the same time, the device does not require complicated battery connections, which greatly simplifies the construction process of the testing environment and reduces the testing cost.
(2)鉴于现有的采集芯片与BAU内部程序不匹配,如使用采集芯片需对BAU内部程序重新编程,使用过程复杂,耗费时间和人力,本实用新型的辅助测试装置利用SPI电平转换电路、嵌入式微处理器MCU和CAN通信电路代替采集芯片,接收BAU发送的采集指令,并响应所述采集指令,使用过程简单,节省了工作成本。(2) in view of the mismatch between the existing acquisition chip and the BAU internal program, if the acquisition chip is used, the internal program of the BAU needs to be reprogrammed, the use process is complicated, time-consuming and labor-intensive, the auxiliary test device of the present utility model utilizes the SPI level conversion circuit , embedded microprocessor MCU and CAN communication circuit replace the acquisition chip, receive the acquisition instruction sent by the BAU, and respond to the acquisition instruction, the use process is simple, and the work cost is saved.
(3)本实用新型的辅助测试装置利用CAN通信总线,接收PC发送的寄存器修改命令,并将修改值保存到存储器中,实现从PC端控制寄存器的功能,使自动化测试得以实现,从而优化了测试方法,提高了测试效率。(3) The auxiliary test device of the present utility model utilizes the CAN communication bus to receive the register modification command sent by the PC, and save the modified value in the memory, so as to realize the function of controlling the register from the PC end, so that the automatic test can be realized, thereby optimizing the The test method improves the test efficiency.
(4)本实用新型的辅助测试装置利用存储器RAM模拟采集芯片的寄存器,在未接收到PC发送的寄存器修改命令时,寄存器的值始终保存不变,即BAU端读取到的电压值和温度值不变,使测试数据可控,提高了测试的稳定性,尤其在一些边界条件的测试场合中,发挥重要作用。(4) The auxiliary test device of the present utility model utilizes the memory RAM to simulate the register of the acquisition chip, and when the register modification command sent by the PC is not received, the value of the register is always kept unchanged, that is, the voltage value and the temperature read by the BAU end The value remains unchanged, which makes the test data controllable and improves the stability of the test, especially in some test occasions with boundary conditions, it plays an important role.
附图说明Description of drawings
图1为本实用新型测试装置的模块框图;Fig. 1 is the module block diagram of the utility model testing device;
图2为本实用新型测试装置的数据通信示意图;Fig. 2 is the data communication schematic diagram of the utility model testing device;
图3为本实用新型中SPI电平转换电路图;Fig. 3 is the SPI level conversion circuit diagram in the utility model;
图4为本实用新型中CAN通信电路电路图;Fig. 4 is the CAN communication circuit circuit diagram in the utility model;
图5为本实用新型中SPI通信接收处理流程框图;Fig. 5 is the flow chart of SPI communication receiving and processing in the utility model;
图6为本实用新型中SPI通信命令执行流程的执行控制命令程序流程框图;Fig. 6 is the execution control command program flow diagram of the SPI communication command execution flow in the utility model;
图7为本实用新型中SPI通信命令执行流程的写配置寄存器程序流程框图;Fig. 7 is the write configuration register program flow diagram of the SPI communication command execution flow in the utility model;
图8为本实用新型中SPI通信命令执行流程的读配置寄存器程序流程框图;Fig. 8 is the read configuration register program flow diagram of the SPI communication command execution flow in the utility model;
图9为本实用新型中SPI通信命令执行流程的读采集数据寄存器程序流程框图;Fig. 9 is the program flow diagram of reading and collecting data register of SPI communication command execution flow in the utility model;
图10为本实用新型中SPI发送缓存处理流程框图;Fig. 10 is the SPI transmission buffer processing flow block diagram in the utility model;
图11为本实用新型中CAN通信程序流程框图。FIG. 11 is a block diagram of the CAN communication program flow in the utility model.
具体实施方式Detailed ways
为进一步了解本实用新型的内容,结合附图和实施例对本实用新型作详细描述。In order to further understand the content of the present utility model, the present utility model is described in detail with reference to the accompanying drawings and embodiments.
实施例1Example 1
本实施例提供一种基于SPI模拟采集芯片的辅助测试装置,用于解决目前验证BAU时,激励信号难以精确控制的问题。This embodiment provides an auxiliary test device based on an SPI analog acquisition chip, which is used to solve the problem that the excitation signal is difficult to accurately control during the current BAU verification.
结合图1,本实施例的辅助测试装置包括控制模块、试验模块和信号采集模块,所述的控制模块与试验模块电连接,监控试验模块状态。所述的信号采集模块分别与控制模块和试验模块电连接,接收控制模块和试验模块传输的指令并做出反馈。其中,105为试验模块,即被测试的BAU设备;106为控制模块,本实施例中使用PC机作为控制模块。控制模块通过USB-CAN转换设备107和108分别与信号采集模块和试验模块连接。USB-CAN转换设备的型号为USBCAN-II。Referring to FIG. 1 , the auxiliary test device of this embodiment includes a control module, a test module and a signal acquisition module, and the control module is electrically connected with the test module to monitor the state of the test module. The signal acquisition module is electrically connected with the control module and the test module respectively, receives the instructions transmitted by the control module and the test module and gives feedback. Among them, 105 is a test module, that is, the BAU device to be tested; 106 is a control module, and a PC is used as the control module in this embodiment. The control module is connected with the signal acquisition module and the test module respectively through the USB-
所述的信号采集模块包括SPI电平转换电路、嵌入式微处理器MCU、存储器RAM和CAN通信电路,其中,101为支持SPI通信和CAN通信的嵌入式微处理器(MCU);102为SPI电平转换电路;103为与嵌入式微处理器MCU电连接的存储器RAM,用于存储控制模块传输的数据;本实施例中,存储器RAM为MCU片内随机访问存储器;104为CAN通信电路。所述的嵌入式微处理器MCU通过SPI电平转换电路与试验模块电连接,同时通过CAN通信电路与控制模块电连接。本实施例的辅助测试装置利用SPI电平转换电路、嵌入式微处理器MCU和CAN通信电路代替ISL78600采集芯片,接收BAU发送的采集指令,并响应所述采集指令,使用过程简单,节省了工作成本,避免了使用ISL78600采集芯片所产生的与BAU内部程序不匹配的问题。The signal acquisition module includes an SPI level conversion circuit, an embedded microprocessor MCU, a memory RAM and a CAN communication circuit, wherein 101 is an embedded microprocessor (MCU) supporting SPI communication and CAN communication; 102 is an SPI level Conversion circuit; 103 is a memory RAM electrically connected to the embedded microprocessor MCU, used for storing data transmitted by the control module; in this embodiment, the memory RAM is an on-chip random access memory of the MCU; 104 is a CAN communication circuit. The embedded microprocessor MCU is electrically connected with the test module through the SPI level conversion circuit, and is electrically connected with the control module through the CAN communication circuit. The auxiliary test device of this embodiment replaces the ISL78600 acquisition chip by using the SPI level conversion circuit, the embedded microprocessor MCU and the CAN communication circuit, receives the acquisition instruction sent by the BAU, and responds to the acquisition instruction, the use process is simple, and the work cost is saved , to avoid the problem of incompatibility with the BAU internal program caused by the use of the ISL78600 acquisition chip.
结合图3,本实施例的辅助测试装置中由于所用MCU逻辑电平为3.3V,而BCU的逻辑电平为5V,两者之间需要进行逻辑电平转换,为实现3.3V电平与5V电平的相互转换,采用SPI电平转换电路对电平进行转换。由于ISL78600芯片总共使用了6个信号,因此本电路使用一片电压电平转换芯片LSF0204PWR完成SPI信号电平转换,另外两路DREADY信号和EN信号,由两片双电源总线收发芯片SN74LVC1T45完成电平转换。Referring to Fig. 3, in the auxiliary test device of this embodiment, since the logic level of the MCU used is 3.3V, and the logic level of the BCU is 5V, the logic level conversion needs to be performed between the two, in order to realize the 3.3V level and the 5V level For the mutual conversion of levels, the SPI level conversion circuit is used to convert the levels. Since the ISL78600 chip uses a total of 6 signals, this circuit uses a voltage level conversion chip LSF0204PWR to complete the SPI signal level conversion, and the other two DREADY signals and EN signals are completed by two dual power bus transceiver chips SN74LVC1T45 complete the level conversion .
SPI电平转换电路包括一片电压电平转换芯片U1和两片双电源总线收发芯片U2、U3。所述的电压电平转换芯片U1型号为LSF0204PWR;两片双电源总线收发芯片U2和U3型号为SN65HVD230QD。其具体电路如下:The SPI level conversion circuit includes a voltage level conversion chip U1 and two dual power bus transceiver chips U2 and U3. The model of the voltage level conversion chip U1 is LSF0204PWR; the model of the two dual-power bus transceiver chips U2 and U3 is SN65HVD230QD. Its specific circuit is as follows:
电压电平转换芯片U1的Vref_A引脚与3.3V电源连接,A1、A2、A3、A4引脚分两路,一路分别经电阻R4、R3、R2、R1连接至3.3V电源,另一路分别经电阻R5、R6、R7、R8连接至MCU;Vref_B引脚与5V电源连接,B1、B2、B3、B4引脚分两路,一路分别经电阻R9、R10、R11、R12连接至5V电源,另一路分别经电阻R14、R15、R16、R17连接至BCU;EN引脚经电阻R13连接至5V电源,GND引脚接地。双电源总线收发芯片U2上,VCCA引脚接3.3V电源,VCCB引脚接5V电源,引脚A连接至MCU,引脚B连接至BCU,GND引脚接地,DIR引脚经电阻R18连接至双电源总线收发芯片U3的VCCB引脚。双电源总线收发芯片U3上,VCCA引脚接3.3V电源,VCCB引脚接5V电源,引脚A连接至MCU,引脚B连接至BCU,GND引脚接地,DIR引脚经电阻R19接地。The Vref_A pin of the voltage level conversion chip U1 is connected to the 3.3V power supply. The A1, A2, A3, and A4 pins are divided into two channels. One channel is connected to the 3.3V power supply through the resistors R4, R3, R2, and R1. Resistors R5, R6, R7, R8 are connected to MCU; Vref_B pin is connected to 5V power supply, B1, B2, B3, B4 pins are divided into two channels, one is connected to 5V power supply through resistors R9, R10, R11, R12, and the other is connected to 5V power supply. One way is connected to the BCU through resistors R14, R15, R16, R17 respectively; the EN pin is connected to the 5V power supply through the resistor R13, and the GND pin is grounded. On the dual power bus transceiver chip U2, the VCCA pin is connected to the 3.3V power supply, the VCCB pin is connected to the 5V power supply, the pin A is connected to the MCU, the pin B is connected to the BCU, the GND pin is grounded, and the DIR pin is connected to the resistor R18. The VCCB pin of the dual power bus transceiver chip U3. On the dual power bus transceiver chip U3, the VCCA pin is connected to the 3.3V power supply, the VCCB pin is connected to the 5V power supply, the pin A is connected to the MCU, the pin B is connected to the BCU, the GND pin is grounded, and the DIR pin is grounded through the resistor R19.
结合图4,本实施例的CAN通信电路包括CAN收发器芯片U4,CAN收发器芯片型号为SN65HVD230QD。该芯片上,TXD引脚和RXD引脚均连接至MCU,VCC引脚连接3.3V电源,GND引脚接地;引脚Rs经电阻R20接地;CANH、CANL、VRef引脚分别经电容C3、C2、C1接地,同时,CANH和CANL引脚分别经共模电感L1的1、2端和3、4端接入USB-CAN转换设备。Referring to FIG. 4 , the CAN communication circuit of this embodiment includes a CAN transceiver chip U4, and the model of the CAN transceiver chip is SN65HVD230QD. On this chip, TXD pin and RXD pin are connected to MCU, VCC pin is connected to 3.3V power supply, GND pin is grounded; pin Rs is grounded through resistor R20; CANH, CANL, VRef pins are connected to capacitor C3, C2 respectively , C1 is grounded, at the same time, the CANH and CANL pins are connected to the USB-CAN conversion device through the 1, 2 and 3, 4 ends of the common mode inductor L1 respectively.
结合图2,本实施例的辅助测试装置的通讯流程为:BAU通过SPI发送操作指令201,读取205中寄存器1的值。MCU读取数据后,通过SPI向BAU发送应答数据202,即205中寄存器1的值。在测试时,PC通过CAN发送修改命令203,修改205中寄存器1的值。MCU修改数据成功后,通过CAN向PC发送应答数据204,表示205中寄存器1的值修改成功。205是本实施例存储寄存器值的一块存储区,即存储器RAM的一部分。Referring to FIG. 2 , the communication flow of the auxiliary testing device in this embodiment is as follows: the BAU sends an
在实际测试中,BAU启动之后会开启采集任务,通过SPI对MCU发出采集命令201。MCU接收到采集命令201后,对协议内容进行解析,解析后的命令为读取205中寄存器1的值,随即MCU从存储器RAM中寄存器1值,并将寄存器1的值打包到应答数据202中,通过SPI发送给BAU,由此BAU读取到寄存器1的值。其中寄存器1可以是电压寄存器、温度寄存器、故障寄存器,操作方式与上述方式一致,此处不再赘述。In the actual test, the acquisition task will be started after the BAU is started, and the
为了按照测试要求对电压值和温度值等数据进行调整,在本实施例中,控制模块PC机通过CAN通讯向MCU发出修改寄存器1的请求203,MCU接收到所述请求数据时,对协议内容进行解析,解析后的命令为修改205中寄存器1的值,MCU将解析后寄存器1的值存储到存储器RAM中,并将命令执行的结果打包到应答数据204中,通过CAN通信经发送给PC机。由此,PC机完成修改寄存器1值的命令,其中寄存器1可以是电压寄存器、温度寄存器、故障寄存器,操作方式与上述方式一致,此处不再赘述。同时,PC机通过CAN通讯读取BAU的实时状态,进而判断其策略是否符合预期。本实施例的装置实现了一个测试逻辑闭环。具体实施案例如下:In order to adjust data such as voltage value and temperature value according to the test requirements, in this embodiment, the control module PC sends a
验证BAU在单体电压为3.8V时是否断开继电器的功能,首先将修改单体电压为3.8V的命令按协议打包,然后通过CAN通讯发送给MCU,MCU在接收到所述修改命令后将电压寄存器的值修改为3.8V,在BAU的下一个采集周期到来时,BAU通过SPI向MCU发送读取电压寄存器的指令,此时MCU将已经生效的电压寄存器的值,按协议打包后通过SPI发送给BAU。BAU在接收到新的电压值后,经过内部一系列的逻辑运算,最终断开继电器,由此判断此功能符合预期。To verify whether the BAU disconnects the function of the relay when the cell voltage is 3.8V, first package the command to modify the cell voltage to 3.8V according to the protocol, and then send it to the MCU through CAN communication. After the MCU receives the modification command, it will The value of the voltage register is modified to 3.8V. When the next acquisition cycle of the BAU arrives, the BAU sends an instruction to read the voltage register to the MCU through SPI. At this time, the MCU will package the value of the voltage register that has taken effect according to the protocol and then pass the SPI through the package. Sent to BAU. After receiving the new voltage value, the BAU finally disconnects the relay through a series of internal logic operations, thus judging that this function is in line with expectations.
本实施例嵌入式软件的工作流程可以划分为两个部分:SPI通信和CAN通信。其中SPI通信分为以下几个主要的流程:The workflow of the embedded software in this embodiment can be divided into two parts: SPI communication and CAN communication. The SPI communication is divided into the following main processes:
1、SPI接收处理流程(参看图5);1. SPI reception processing flow (see Figure 5);
2、SPI命令执行流程:a、执行控制命令(参看图6);b、写配置寄存器(参看图7);c、读配置寄存器(参看图8);d、读采集数据寄存器(参看图9);2. SPI command execution flow: a. Execute the control command (see Figure 6); b. Write the configuration register (see Figure 7); c. Read the configuration register (see Figure 8); d. Read the acquisition data register (see Figure 9) );
3、SPI发送缓存处理流程(参看图10)。3. SPI send buffer processing flow (see Figure 10).
结合图11,CAN通信流程为CAN收发器芯片在接受到信号后,依次判断该命令是否为:电压修改命令、电流修改命令、排线故障修改命令或均衡状态读取命令,判断完成后将信号传输给MCU继续进行下一步动作。With reference to Figure 11, the CAN communication process is that after the CAN transceiver chip receives the signal, it sequentially judges whether the command is: a voltage modification command, a current modification command, a cable fault modification command or a balanced state reading command, and after the judgment is completed, the signal is It is transmitted to the MCU to proceed to the next step.
本实施例的一种基于SPI模拟采集芯片的辅助测试装置采用模拟采集芯片代替真实物理电路,直接对BAU输送测试数据信号,避免了物理电路在实际测试过程中出现的各种问题;同时本装置不需要复杂的电池连线,大大简化了测试环境的搭建过程,降低了测试成本。同时利用CAN通信总线,接收PC发送的寄存器修改命令,并将修改值保存到存储器中,实现从PC端控制寄存器的功能,使自动化测试得以实现,从而优化了测试方法,提高了测试效率。该测试装置利用存储器RAM模拟采集芯片的寄存器,在未接收到PC发送的寄存器修改命令时,寄存器的值始终保存不变,即BAU端读取到的电压值和温度值不变,使测试数据可控,提高了测试的稳定性,使该测试装置在一些边界条件的测试场合中发挥重要作用。An auxiliary test device based on an SPI analog acquisition chip in this embodiment adopts an analog acquisition chip instead of a real physical circuit, and directly transmits test data signals to the BAU, thereby avoiding various problems arising from the physical circuit in the actual test process; at the same time, the device There is no need for complicated battery connections, which greatly simplifies the construction process of the test environment and reduces the test cost. At the same time, the CAN communication bus is used to receive the register modification command sent by the PC, and the modified value is saved in the memory to realize the function of controlling the register from the PC side, so that the automatic test can be realized, thereby optimizing the test method and improving the test efficiency. The test device uses the memory RAM to simulate the register of the acquisition chip. When the register modification command sent by the PC is not received, the value of the register is always kept unchanged, that is, the voltage value and temperature value read by the BAU terminal remain unchanged, so that the test data It is controllable, improves the stability of the test, and makes the test device play an important role in the test occasions of some boundary conditions.
以上示意性的对本实用新型及其实施方式进行了描述,该描述没有限制性,附图中所示的也只是本实用新型的实施方式之一,实际的结构并不局限于此。所以,如果本领域的普通技术人员受其启示,在不脱离本实用新型创造宗旨的情况下,不经创造性的设计出与该技术方案相似的结构方式及实施例,均应属于本实用新型的保护范围。The present invention and its embodiments have been schematically described above, and the description is not restrictive, and what is shown in the accompanying drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. Therefore, if those of ordinary skill in the art are inspired by it, without departing from the purpose of creation of the present invention, without creative design of the structure and embodiment similar to the technical solution, all should belong to the present invention. protected range.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202020022424.9U CN210804406U (en) | 2020-01-06 | 2020-01-06 | Auxiliary test device based on SPI simulation acquisition chip |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202020022424.9U CN210804406U (en) | 2020-01-06 | 2020-01-06 | Auxiliary test device based on SPI simulation acquisition chip |
Publications (1)
Publication Number | Publication Date |
---|---|
CN210804406U true CN210804406U (en) | 2020-06-19 |
Family
ID=71232962
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202020022424.9U Active CN210804406U (en) | 2020-01-06 | 2020-01-06 | Auxiliary test device based on SPI simulation acquisition chip |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN210804406U (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114002585A (en) * | 2021-11-03 | 2022-02-01 | 弘正储能(上海)能源科技有限公司 | BMS analog front-end acquisition chip performance testing device and method |
-
2020
- 2020-01-06 CN CN202020022424.9U patent/CN210804406U/en active Active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114002585A (en) * | 2021-11-03 | 2022-02-01 | 弘正储能(上海)能源科技有限公司 | BMS analog front-end acquisition chip performance testing device and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107272663B (en) | A fast calibration device for 1553B bus-type servo system test equipment | |
CN117075571B (en) | Test method, test system, test equipment and readable storage medium | |
CN101752617A (en) | BMS demarcating module based on CCP protocol | |
CN206388062U (en) | Controller of new energy automobile test system | |
CN112034410B (en) | A detection tooling module for a multi-core modular electric energy meter | |
CN109471373A (en) | Hardware-in-loop simulation test system and device of bidirectional charger controller | |
CN205483578U (en) | Hardware that no key got into start -up system is in ring testing system | |
CN101778007B (en) | System and method for automatically testing I/O pin of CAN bus control module | |
CN106502749B (en) | The method and system of program are write with a brush dipped in Chinese ink based on CAN bus multimachine | |
CN107656207A (en) | A kind of dynamic testing method of vehicle fuel battery engine in power assembly loop | |
CN114756008A (en) | Fault injection system, automatic test system and method for automobile hybrid bus integrated rack | |
CN107994278A (en) | A kind of battery balanced device, method and unmanned plane | |
CN210804406U (en) | Auxiliary test device based on SPI simulation acquisition chip | |
CN117827559A (en) | Verification board and chip verification system | |
CN109979292A (en) | A kind of half actual loading test platform of energy mix electric propulsion system peculiar to vessel | |
CN103944782B (en) | Multifunctional motor-driven automobile CAN-bus mobile unit simulator | |
CN203405731U (en) | An off-line service life testing system of an electric vehicle controller | |
CN205809692U (en) | New automobile electronic test circuitry automatic configuration box | |
CN208077394U (en) | A kind of the communication test plate and communication test system of concentrator communication module | |
CN202339497U (en) | Verification system of satellite-bone integrated service unit | |
CN202120623U (en) | Embedded static random access memory (SRAM) testing structure based on institute of electrical and electronic engineers (IEEE) 1500 | |
CN101551769B (en) | Agglomeration method and device of configurable firmware | |
CN111708661A (en) | A stress testing system and method suitable for central gateway | |
CN209486510U (en) | Electronic control unit test setup based on partly real load signals | |
CN203909780U (en) | Vehicle remote upgrading device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 230601 area 01, 2 / F, C2 building, maker space, Hefei enlightenment science and Technology City, Hefei Economic and Technological Development Zone, Anhui Province Patentee after: Anhui Youdan Technology Co.,Ltd. Country or region after: China Address before: Room 308, Building D, Huayi Science Park, High tech Zone, Hefei City, Anhui Province Patentee before: ANHUI UDAN TECHNOLOGY CO.,LTD. Country or region before: China |