×

使用CPS120和Arduino Nano进行压力测量

消耗积分:0 | 格式:zip | 大小:0.02 MB | 2022-11-23

刘悌耀

分享资料个

描述

CPS120是一种高质量、低成本的电容式绝对压力传感器,具有全补偿输出。它消耗更少的功率,并且包括用于压力测量的超小型微机电传感器(MEMS)。基于sigma-delta的ADC也体现在其中,以实现补偿输出的要求。
 
在本教程中,说明了CPS120传感器模块与Arduino Nano的接口。为了读取压力值,我们使用了带有I2C适配器的Photon。该I2C适配器使与传感器模块的连接更容易、更可靠。

 

步骤1:所需硬件
 
实现目标所需的材料包括以下硬件组件:
 
1.第120页
2.Arduino纳米
3.I2C电缆
pYYBAGN68dCARea2AAD1QduoxKc125.jpg
 

4.Arduino Nano的I2C屏蔽

Step 2: Hardware Hookup

 
pYYBAGN68diAAacdAACEGnpCl9A884.jpg
 
1 / 2
 

The hardware hookup section basically explains the wiring connections required between the sensor and the Arduino Nano. Ensuring correct connections is a basic necessity while working on any system for the desired output. So, the requisite connections are as follows:

  • The CPS120 will work over I2C. Reference the example schematic demonstrating how to wire up each interface of the sensor.
  • Out-of-the-box, the board is configured for an I2C interface, as such we recommend using this hookup if you’re otherwise agnostic. All you need is four wires!

Only four connections are required: Vcc, Gnd, SCL and SDA pins. These are connected with the help of an I2C cable. These connections are demonstrated in the pictures above.

Step 3: Code for Pressure Measurement

 
poYBAGN68duADn5bAAB8TyQKAZo052.jpg
 

Lets start with the Arduino code now.

While using the sensor module with the Arduino, we include Wire.h library. The Wire library contains the functions which facilitate the I2C communication between the sensor and the Arduino board.

The entire Arduino code is given in the below Code section for the convenience of the user.

In the Wire library, Wire.write() and Wire.read() are used to write the commands and read the sensor output. Serial.print() and Serial.println() are used to display the output of the sensor on the serial monitor of the Arduino IDE. The output of the sensor is shown in the picture above.

Step 4: Applications

CPS120 has a variety of applications. It can be employed in portable and stationary barometers, altimeters etc. Pressure is an important parameter to determine the weather conditions and considering that this sensor can be installed at weather stations too. It can be incorporated in air control systems as well as vacuum systems.


声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !