适用于MS5611的SPI接口设计
2017-03-21崔璨邓圣代航阳张杨杨泰波
崔璨++邓圣++代航阳++张杨++杨泰波
摘 要:MS5611是瑞士MEAS推出的新一代高分辨率的气压传感器,广泛应用于移动高度计/气压计系统、自行车电脑、智能手表、GPS、智能手机、无人机高度测量系统等。MS5611体积小,内部集成了气压传感器、温度传感器、24位ADC、128位PROM、数字滤波器、SPI和I2C接口。针对MS5611的SPI接口,选用输入输出资源丰富,配置灵活的FPGA作为微控制器,并设计相应的SPI接口电路;采用Verilog编写具有MS5611五种指令的SPI接口模块,并进行了时序仿真验证。仿真结果表明,基于FPGA的SPI接口模块能很好地对MS5611进行控制,并实现数据的读写,在基于MS5611的气压测量设备上有很好应用。
关键词:气压测量 MS5611 SPI 时序仿真
中图分类号:TP361.1 文献标识码:A 文章编号:1674-098X(2017)01(a)-0031-04
Design of SPI for MS5611
Cui Can Deng Sheng Dai Hangyang Zhang Yang Yang Taibo
(Nuclear Power Institute of China, Chengdu Sichuan, 610094, China)
Abstract:The MS5611, which is a new generation of high resolution pressure sensor from MEAS(Measurement Specialties) Switzerland, is widely used in mobile altimeter/barometer system, bicycle computer, smart watch, GPS(Global Positioning System), smart phone, unmanned aerial vehicle height detection system and so on. The MS5611 is small, and pressure sensor, temperature sensor, 24 bit ADC (Analog-Digital Converter), 128 bit PROM (Programmable Read Only Memory), digital filter, SPI (Serial Peripheral Interface) and I2C(Inter-Integrated Circuit) interface are included in. The FPGA (Field-Programmable Gate Array), which has abundant input/output resource and can be configured neatly, is used as the microcontroller for the SPI of MS5611, and corresponding SPI circuit is designed also. The SPI module based on five commands of MS5611 is designed with Verilog, and it is timing simulated for verification. The simulation result presents that SPI module based on FPGA can control MS5611 well, and realize data reading and writing. It can be applied well in pressure measurement device based on MS5611.
Key Words:Pressure measurement; MS5611; SPI; Timing simulation
氣压和温度一直都是很多实验室和工业生产中的重要环境参数,需要对其进行实时检测,以实现对实验室环境和工业生产环境的控制,达到实验预想效果,生产出高品质产品[1]。例如:在机房设备监测系统中,通过气压传感器对气压进行监测,当波动较大时,可通过短信通知机房负责人[2]。
而对于登山爱好者来说,非常关心海拔高度,可通过测量气压来计算海拔高度,其测量精度远比全球定位系统(Glo bal Positioning System, GPS)高,在原有GPS基础上增加气压测量功能,可使三维定位更加准确。另外,在使用导航时,GPS信号常被地形、地物遮挡,导致精度大大降低,甚至不能使用。尤其在高楼林立的城区和植被茂密的林区,GPS有效率仅为60%,为弥补这一不足常常采用气压传感器辅助测量海拔高度[3]。
如今被广泛应用的小型无人机,具有成本低廉、体积小、重量轻、机动性强、续航时间长等特点,而其高度测量系统就是通过海拔高度和压力大小关系计算出来[4-5]。……
