The CPS120 is a high-quality, low-cost capacitive absolute pressure sensor solution with a compensated digital pressure and temperature output for low-pressure applications, such as barometric sensing. A robust sensor design (single crystal silicon structure and backside pressure port) makes the CPS120 suitable for extreme temperatures and harsh environments.
Today we will be demonstrating how to monitor the data of CPS120 over Web Server using ESP8266. ESP8266 offers a complete and self-contained WiFi networking solution, it can be used to host the application or to ofﬂoad WiFi networking functions from another application processor.
SO, let’s get started.
Step 1: What We Need !!
Step 2: Hardware Connections
Take ESP8266 and gently push it over the USB Programmer. Then connect the one end of I2C cable to the CPS120 sensor and the other end to the USB Programmer. And you are done.
With the help of the ESP8266 USB Programmer, it is very easy to program ESP. All you need to do is plug the sensor into the USB Programmer and you are good to go. I prefer to use this adapter because it makes it a lot easier to connect the hardware. Without this plug and play USB Programmer there is a lot of risk of making a wrong connection. Bad wiring can kill your wifi as well as your sensor.
Note: While making connections please make sure the brown wire of the connecting cable is connected to the ground terminal of the sensor and the same for USB Programmer.
Step 3: Code
The ESP8266 code for CPS120 can be downloaded from our GitHub repository.
Before going on to the code, make sure you read the instructions given in the Readme file and setup your ESP8266 according to it. It will take just 5 minutes to set up the ESP.
Now, download (or git pull) the code and open it in the Arduino IDE. Compile and upload the code and see the output on the Serial Monitor.
Note: Before uploading, make sure you enter your SSID network and password in the code.
Copy the IP address of ESP8266 from the Serial Monitor and paste it in your web browser.
You will see a web page with pressure and temperature reading. The output of the sensor on Serial Monitor and Web Server are shown in the picture above.
Step 4: Applications and Features
CPS120 Sensor has various industry-level applications like Portable and Stationary Barometers, Altimeters, Weather Stations, GPS Applications, Hard Disk Drives (HDD), Industrial Equipment, Air Control Systems, Vacuum Systems.
Step 5: Conclusion
With the help of ESP8266, we can take CPS120 to a whole new level. We can collect and manage the data over the Internet or control our Home Appliances over the Wi-fi Network, use them in Home Automation or build a Sensor Network or use it in Wearable Electronics or WiFi Location-aware Devices and many more like this.
For more information about CPS120 and ESP8266, check out the links below: