基于以太网的质谱仪通讯系统设计毕业论文
2021-11-05 19:29:01
摘 要
中国经济快速发展的形势下,国内对质谱仪的需求日益增长,但国内现在使用的质谱仪大多进口,且性能达不到要求,因此,开发一套高性能的质谱仪系统的任务已经刻不容缓。
负责将大量的质谱数据传输到上位机的就是质谱仪通讯系统,它的工作效率对质谱仪性能有很大影响。而传统的数据传输方式,如串口、USB等已经不能满足质谱仪对数据传输速度、传输距离等的要求,因此本文使用高速网口搭建质谱仪通讯系统,利用其标准化的高速接口实现仪器的便携式、网络化及高性能要求。
本文首先分析了国内外质谱仪通讯系统设计现状,指出了开发一套基于以太网的质谱仪通讯系统的重要意义。随后从以太网通讯结构入手,提出了两种通讯方案,综合性能成本选出适合本系统的通讯方案((MCU MAC)主芯片 PHY芯片),并完成了系统总体设计。之后进行了硬件平台选择及嵌入式软件详细设计,最后系统联合调试及测试,测试结果显示系统已达到要求。本次设计的通讯系统选用了节能型以太网PHY芯片,降低了功耗;软件上引入了FreeRTOS操作系统,可以更好的实现多任务调度;以太网传输使用了UDP传输同时辅以自定义的应用层协议,保证了数据传输的快速性和可靠性;且该系统不仅可以用于质谱仪中,也可使用在其他仪器的数据采集与处理部分,具有通用性。因此,此系统对实现仪器的便携式、网络化及模块化有重要意义。
关键词:以太网;LwIP协议栈;FreeRTOS操作系统
Abstract
With the rapid development of China's economy, the number and performance of mass spectrometers are in increasing demand in China. However, mass spectrometers are still mainly dependent on imports, and the performance demand can not meet the requirements. Therefore, developing a high-performance mass spectrometer system is a task which brooks no delay.
The working efficiency of the communication system, which is responsible for transmitting the mass spectrometry data collected by the lower computer to the upper computer for processing and display, has a great impact on the performance of the mass spectrometer. However, the traditional data transmission methods, such as serial port and USB, can not meet the requirements of mass spectrometer for data transmission speed and distance The communication system of mass spectrometer is built with high-speed network port, and the portable, networked and high-performance requirements of the instrument are realized with its standardized high-speed interface.
This thesis analyzes the current status of the design of mass spectrometer communication systems at home and abroad, and points out the importance of developing an Ethernet-based mass spectrometer communication system. Then, starting from the Ethernet communication structure, two communication schemes were proposed, and the communication scheme ((MCU MAC) main chip PHY chip) suitable for the system was selected based on the comprehensive performance cost, and completed the overall design of the system. After that, hardware platform selection and embedded software detailed design were carried out. Finally, the system was jointly debugged and tested. The system reached the requirements. In the design of Ethernet based communication system, energy-saving Ethernet PHY chip is selected in hardware to reduce power consumption; FreeRTOS operating system is introduced in software to better achieve multi task scheduling; Ethernet transmission used UDP transmission, and was supplemented by a custom application layer protocol to ensure the speed and reliability of data transmission; the system can be used in the data acquisition and processing part of other instruments besides mass spectrometer. Therefore, this system is of great significance to realize the portable, networked, modular and low energy consumption of the instrument.
Key Words:Ethernet;FreeRTOS;Protocol stack of LWIP
目 录
第1章 绪论 1
1.1 课题研究的目的及意义 1
1.2 国内外研究现状 1
1.3 课题主要研究内容 2
第2章 通讯系统总体设计 3
2.1 以太网技术介绍 3
2.2 以太网通讯方案选择 4
2.3 系统功能分析及总体设计 5
第3章 通讯系统硬件设计 7
3.1 系统硬件总体设计 7
3.2 微处理器选型 7
3.3 以太网PHY选型 7
3.4 硬件开发平台介绍 8
3.4.1 电源模块 8
3.4.2 ST-LINK模块 8
3.4.3 以太网模块 9
3.4.4 SRAM模块 10
第4章 通讯系统软件设计 11
4.1 软件开发环境简介 11
4.2 系统软件框架 11
4.3 STM32CubeH7固件包介绍 12
4.4 FreeRTOS操作系统的移植 13
4.4.1 操作系统的选择 13
4.4.2 FreeRTOS操作系统简介 14
4.4.3 操作系统的移植 15
4.5 LwIP协议栈的移植 16
4.5.1 协议栈的选择 16
4.5.2 LwIP协议栈的简介 17
4.5.3 协议栈的移植 18
4.6 驱动开发 19
4.6.1 外部SRAM驱动开发 19
4 6.2 以太网驱动开发 21
4.7 系统应用层任务设计 21
4.7.1 以太网发送任务 23
4.7.2 自定义应用层协议任务 24
4.7.3 读取外部SRAM任务 26
第5章 功能测试 27
第6章 总 结 33
参考文献 34
附录A 程序源码 35
附录B 硬件原理图 36
致 谢 37
第1章 绪论
1.1 课题研究的目的及意义
质谱仪是利用电磁学原理,使带电的样品离子按质荷比进行分离,进而对物质做定性定量分析的仪器,因其灵敏度高、分析速度快等特点,在食品安全检测、环境监测、安检、航天领域及军事领域均得到广泛应用[1]。
国内现在使用的质谱仪大多进口,且进口的质谱仪并不能满足国内市场对质谱仪的功能需求,因此,为适应中国经济快速发展的形势下国内市场对质谱仪日益增长的需求,开发高质量的国产质谱仪的任务已经刻不容缓[2]。