基于工业自适应的多通道数据采集设备分析
2023-09-14郭浩天苏梦欣张祎冯晨付广春
郭浩天 苏梦欣 张祎 冯晨 付广春



摘 要:此设备由STM32主控、电压处理电路、电流处理电路、外部FLASH电路以及显示模块组成。该设备使用STM32作为主控,可以实现8个通道的12位电压数据采样和4个通道的电流数据采样,ADC采样周期可以达到10 μs以内。电压采集范围为-40~40 V,电流采集范围为4~20 mA。采集的数据准确且稳定,可以通过显示屏幕进行查看,并且此设备为外部FLASH移植了FatFs文件系统,可以很方便地通过电脑查看数据。
关键词:STM32;ADC;电压采集;电流采集;FatFs文件系统
中图分类号:TP273 文献标识码:A 文章编号:2096-4706(2023)13-0172-05
Analysis of Multi-channel Data Acquisition Equipment Based on Industrial Adaptation
GUO Haotian, SU Mengxin, ZHANG Yi, FENG Chen, FU Guangchun
(Henan Institute of Science and Technology, Xinxiang 453003, China)
Abstract: This device consists of STM32 main control, voltage processing circuit, current processing circuit, external FLASH circuit and display module. Using STM32 as the main control, the device can achieve 8 channels of 12-bit voltage data sampling and 4 channels of current data sampling, and the ADC sampling period can reach less than 10 us. The voltage acquisition range is from -40 V to 40 V, and the current acquisition range is from 4 mA to 20 mA. The collected data is accurate and stable, which can be viewed through the display screen, and this device has ported the FatFs file system for external FLASH, making it easy to view data through a computer.
Keywords: STM32; ADC; voltage acquisition; current acquisition; FatFs file system
0 引 言
此设备主要用于需要长时间采集数据的场景,使用此设备可以检测一个设备的长时间运行状态时,并且将其状态记录下来,可以根据记录的数据分析被检测设备的工作状态是否符合要求,也可以根据情况设置警报值,当数据异常时进行报警。在需要人工长时间检测一个设备时,使用该设备可以后,才可以解放检测人员,使用此设备检测还可以避免人为出现的检测错误。
1 系统总体框图
电压和电流信号分别经过各自的处理电路后输入STM32主控之中,STM32主控在接收到信号后对其进行处理,将处理过的数据存入外部FLASH,最后将采集的数据通过显示模块显示出来,系统总体框图如图1所示。
2 系统硬件设计
此设备由电源电路、电压处理电路、电流处理电路、储存电路和显示接口组成。电压处理电路实现对电压的自適应采集,采集的数据通过数据储存部分保存起来。
2.1 电源电路
电路在接入5 V供电后,使用低压差线性稳压电器AMS1117-3.3将接入5 V电压转换为3.3 V以供STM32主控芯片使用,如图2所示。……
