Pages: [1]   Go Down
Author Topic: SHT15 problem by Data  (Read 1062 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi everyone
I use the sht15 sensor by Arduino , but output data feel Discontinuous ...What is the problem?
is't my data graphics.


i hope data graphics like it...


it is my code, it's simple example by sht1x
Code:
/**
 * ReadSHT1xValues
 *
 * Read temperature and humidity values from an SHT1x-series (SHT10,
 * SHT11, SHT15) sensor.
 *
 * Copyright 2009 Jonathan Oxer <jon@oxer.com.au>
 * www.practicalarduino.com
 */

#include <SHT1x.h>

// Specify data and clock connections and instantiate SHT1x object
#define dataPin  15
#define clockPin 14
SHT1x sht1x(dataPin, clockPin);

void setup()
{
   Serial.begin(38400); // Open serial connection to report values to host
   Serial.println("Starting up");
}

void loop()
{
  float temp_c;
  float temp_f;
  float humidity;

  // Read values from the sensor
  temp_c = sht1x.readTemperatureC();
  temp_f = sht1x.readTemperatureF();
  humidity = sht1x.readHumidity();

  // Print the values to the serial port
  Serial.print("Temperature: ");
  Serial.print(temp_c, DEC);
  Serial.print("C / ");
  Serial.print(temp_f, DEC);
  Serial.print("F. Humidity: ");
  Serial.print(humidity);
  Serial.println("%");

  delay(2000);
}


Any help is appreciated! Thanks!
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4702
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would start by not converting the value to an integer when printing it:

Code:
Serial.print(temp_c, DEC);

Try:

Code:
Serial.print(temp_c);
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I try
Code:
Serial.print(temp_c);
Results are as follows


Always fluctuate up and down..it is really?..the SHT15 characteristic, or my error...
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4702
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know this specific sensor. It has an accuracy of +/-0.3°C and a repeatability of +/-0.1°C. Looking at your values your hardware is either defect or you really have an ambient temperature that is drifting. I would try to activate the internal heater of the sensor and see if the temperature is rising about 5-10°C. If this doesn't happen, it's probably broken hardware.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi pylon
i have seven TH15 Sensor, it always same result.
Impossible to have a defect..maybe it is not suitable...

Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4702
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

On the picture I cannot see the pullup for the data line. Is there one on the board or have you installed one the Arduino side?

A missing pullup would explain the strange behaviour...
Logged

Pages: [1]   Go Up
Jump to: