element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sustain The World - Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Sustain The World - Design Challenge
  • More
  • Cancel
Sustain The World - Design Challenge
Blog coastal monitoring platform #2 testing the DPS368
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: cyberwizard
  • Date Created: 15 Sep 2020 2:10 PM Date Created
  • Views 653 views
  • Likes 2 likes
  • Comments 0 comments
Related
Recommended

coastal monitoring platform #2 testing the DPS368

cyberwizard
cyberwizard
15 Sep 2020

image

 

Measuring the temperature and pressure around the coastal water is necessary in order to understand the effects of climate change that affect are coral reef. The DPS368 offers a low power consumption solution to monitoring the coastal areas in a long term operational life span of the device.

 

testing setup

image

 

for reference:

https://github.com/Infineon/XMC-for-Arduino/wiki/XMC4700-Relax-Kit

https://github.com/Infineon/DPS368-Library-Arduino

 

The xmc4700 is the perfect microcontroller alternative to the arduino uno to communicate with the DPS368.

I used the i2c protocol for the data communication. It gives an accurate reading compared to the SPI channel.

 

I tested the DPS368's temperature reading by pinching the sensor softly to see changes in data.

NOTE: Please don't pinch the sensor to much as this will disrupt the i2c communication.

 

To test things further, i used a gas lamp for the sensor to read the data.

 

imageimage

 

NOTE: Please don't put the sensor too close to the flame.

 

I've compared the reading with my thermal camera and the DPS368.

 

imageimage

 

The test concluded that the DPS368 has an accurate temperature reading. This will help the platform get an accurate reading of the temperature in the coast above or under water. We can now code the XMC4700 to give a signal whenever a certain temperature threshold is reached. In this blog that example would be a LED turning on when the temperature reaches 30 degrees Celsius.

~~~~~~~~~~~~~~~~~~~~

 

code was taken from examples of DPS368 with slight modification by adding LED to turn on when temperature threshold is reached

 

#include // Dps368 Object
Dps368 Dps368PressureSensor = Dps368();

void setup()
{
  Serial.begin(9600);
  while (!Serial);
  //Call begin to initialize Dps368PressureSensor
  //The parameter 0x76 is the bus address. The default address is 0x77 and does not need to be given.
  //Dps368PressureSensor.begin(Wire, 0x76);
  //Use the commented line below instead of the one above to use the default I2C address.
  //if you are using the Pressure 3 click Board, you need 0x76
  Dps368PressureSensor.begin(Wire);
  Serial.println("Init complete!");
  pinMode(13, OUTPUT)
}
void loop()
{
  float temperature;
  float pressure;
  uint8_t oversampling = 7;
  int16_t ret;
  Serial.println();

  //lets the Dps368 perform a Single temperature measurement with the last (or standard) configuration
  //The result will be written to the parameter temperature
  //ret = Dps368PressureSensor.measureTempOnce(temperature);
  //the commented line below does exactly the same as the one above, but you can also config the precision
  //oversampling can be a value from 0 to 7
  //the Dps 368 will perform 2^oversampling internal temperature measurements and combine them to one result with higher precision
  //measurements with higher precision take more time, consult datasheet for more information
  ret = Dps368PressureSensor.measureTempOnce(temperature, oversampling);

  if (ret != 0)
  {
    //Something went wrong.
    //Look at the library code for more information about return codes
    Serial.print("FAIL! ret = ");
    Serial.println(ret);
  }
  else
  {
    Serial.print("Temperature: ");
    Serial.print(temperature);

  }

  //code to run when threshold is reached
  if (temperature >= 30)
  {
    digitalWrite(13, HIGH);
  }

  //Pressure measurement behaves like temperature measurement
  //ret = Dps368PressureSensor.measurePressureOnce(pressure);
  ret = Dps368PressureSensor.measurePressureOnce(pressure, oversampling);
  if (ret != 0)
  {
    //Something went wrong.
    //Look at the library code for more information about return codes
    Serial.print("FAIL! ret = ");
    Serial.println(ret);
  }
  else
  {
    Serial.print(pressure);
    Serial.println(" Pascal");
  }

  //Wait some time
  delay(500);
}

~~~~~~~~~~~~~~~~~~~~ Next step is to choose which temperature threshold is suited for the platform to monitor
Further details about this can be learned here: https://oceanservice.noaa.gov/facts/coralwaters.html
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube