首页|液位检测实验装置的CAN总线通信系统设计

液位检测实验装置的CAN总线通信系统设计

扫码查看
为了实现多个液位传感器能够同时给上位机进行数据的传输,并且对于数据进行分析后可对仪器进行标定,该文设计了一个基于CAN总线和虚拟仪器LabVIEW的液位检测的实验装置.选用STM32F107单片机作为微处理器,利用单片机内部的AD转换电路设计模拟信号与数字信号的转换,加入TJA1050作为CAN收发器,设计了CAN总线的通信接口.系统使用USB-CAN分析仪将硬件与PC机相接,使得可以使用LabVIEW设计人机交互界面进行数据的接受与分析,从而准确检测出实时液位高低与电压电流大小.由于传感器会受到环境因素的影响,另外还有人工测量的误差和仪器本身的误差,所以在系统中还使用了Matlab对数据进行拟合,达到了对仪器进行标定的目的.CAN总线与LabVIEW相结合,使得设计的系统可以同时连接多个传感器,并且可以方便的连接不同的传感器进行测量.
Design of CAN Bus Communication System for Liquid Level Detection Experi-mental Device
In order to realize the data transmission of multiple liquid level sensors to the host computer at the same time,and to calibrate the instrument after analyzing the data,this paper designs an intelligent sensor liquid level measurement and control system based on CAN bus and virtual instrument LabVIEW.STM32F107 single chip micro-computer is used as the microprocessor,the AD conversion circuit inside the single chip microcomputer is used to design the conversion of analog signal and digital signal,and TJA1050 is added as the CAN transceiver to design the communication interface of CAN bus.The system uses the USB-CAN analyzer to connect the hardware to the PC,so that the human-computer interaction interface can be designed by LabVIEW for data acceptance and analysis,so as to accurately detect the real-time level of the liquid level and the voltage and current size.Because the sensor will be affected by environmental factors,in addition to the error of manual measurement and the error of the instru-ment itself,Matlab is also used in the system to fit the data and achieve the purpose of calibrating the instrument.The combination of CAN bus and LabVIEW makes the designed system can connect multiple sensors at the same time,and can easily connect different sensors for measurement.

CAN busvirtual instrument LabVIEWSTM32F107 MCUTJA1050

彭斯媛、卓旭升

展开 >

武汉工程大学 电气信息学院,武汉 430000

CAN总线 虚拟仪器LabVIEW STM32F107单片机 TJA1050

2024

自动化与仪表
天津市工业自动化仪表研究所 天津市自动化学会

自动化与仪表

CSTPCD
影响因子:0.548
ISSN:1001-9944
年,卷(期):2024.39(5)
  • 7