文档介绍:基于 LM331 和单片机的压力数据采集
翟彦
(昆明理工大学信息工程与自动化学院,云南昆明 650051)
摘要: 介绍一种基于单片机 AT89C51 和 V/F 转换器 LM331 的压力数据采集系统,该系统以 AT89C51 单片机为核心,实时测量
由压力传感器 MPXV5004G 检测的压力。与传统电路设计相比较,其外部硬件电路少,结构简单,无较大的时延。只要对
其功能进行扩展,能够实现相应控制。
关键词: 压力传感器,V/F 转换器,单片机,频率测量,LM331
中图分类号:TP212 文献标识码:A 文章编号:1006-6977(2009)03-0095-03
Data acquisition of pressure based on LM331&MCU
ZHAI Yan
(School of Information Engineering and Automation Kunming University of Technology, Kunming 650051, China)
Abstract: A the pressure data acquistion system based on AT89C51 MCU and LM331 V/F converter is introduced.
The system uses AT89C51 MCU. as a core. The system real-time measures the pressure which is deteded by
pressure sensor MPXV5004G. Compared with the traditional circuit, it has less external hardware circuit, simple
structrue and less time delay. Processing speed is fast with the high stability. As long as expanding the funtions
of the system, it controls the object timely.
Key words: pressure sensors, V/F converter, MCU, frequency measurements, LM331
1 引言用光电耦合器将频率信号传输到单片机,利用单片机内部
的定时/ 计数器测量信号频率,采用单片机强运算功能,根
A/D 转换器广泛应用于单片机控制数据采集的模拟信
据电压与频率的线性关系计算压力值。图 1 为系统结构框图。
号转换。而对于长距离数据传输,高精确度应用,使用一
般 A/D 转换器则存在诸多缺点,可使用 V/F 转换器代替
A/D 转换器。V/F 转换器与单片机的接口只需一个 I/O 端口,
输入频率信号,且接口简单,占用硬件资源少。以单片机
图 1 系统结构框图
和 V/F 转换器为核心的数据采集系统,能够实时测量由传
[1]
感器检测的压力,并满足系统测量精度要求。 3 系统硬件设计
2 系统基本原理结构 4/2!