0

ADT7410 Temperature Inaccuracies
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ADT7410 Temperature Inaccuracies

by lunch_box on Thu Aug 08, 2019 4:19 pm

Hello,

Ive been running some tests with three ADT7410 temperature sensors linked to ESP8266 breakout boards. Everything I've read says that these sensors should be stable and accurate, but my testing has shown that they exhibit unpredictable but frequent spikes in measured temperature, as shown in the screenshot below. (Disregard the large spike around 7PM- this was a power cycle.)
Screen Shot 2019-08-08 at 4.04.39 PM.png
Screen Shot 2019-08-08 at 4.04.39 PM.png (149.43 KiB) Viewed 425 times

The overall trendline follows the AC cycle in the house. But I cannot come up with an explanation for the temperature spikes.
Any ideas would be greatly appreciated. I can't use these sensors in my project unless I can find a root cause.

Thanks

lunch_box
 
Posts: 20
Joined: Thu Aug 08, 2019 4:11 pm

Re: ADT7410 Temperature Inaccuracies

by adafruit_support_carter on Thu Aug 08, 2019 5:12 pm

Are these setup as one sensor per ESP8266? So 3 copies of the same thing located in different places?

Can you post the complete code for the program you are running on the ESP8266.

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: ADT7410 Temperature Inaccuracies

by lunch_box on Thu Aug 08, 2019 5:33 pm

adafruit_support_carter wrote:Are these setup as one sensor per ESP8266? So 3 copies of the same thing located in different places?


Yes. I built three identical boards, each with its own ESP8266. The intent is to place them throughout the house, but for testing they are all in the same location.
Full code posted.

Thanks!

temp_node_ADT7410_sanitized.ino
(4.02 KiB) Downloaded 8 times

lunch_box
 
Posts: 20
Joined: Thu Aug 08, 2019 4:11 pm

Re: ADT7410 Temperature Inaccuracies

by adafruit_support_carter on Thu Aug 08, 2019 5:45 pm

Try simplifying the loop and see if you get a similar behavior.
Code: Select all | TOGGLE FULL SIZE
void loop() {
  // ping adafruit io a few times to make sure we remain connected
  if(! mqtt.ping(3)) {
    // reconnect to adafruit io
    if(! mqtt.connected())
      connect();
  }

  // Publish data
  if (! temp_feed.publish(temp_sensor.readTempC()))
    Serial.println(F("Failed to publish temperature"));
  else
    Serial.println(F("Temperature published!"));

  delay(UPDATE_INTERVAL);
}

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: ADT7410 Temperature Inaccuracies

by lunch_box on Fri Aug 09, 2019 9:47 am

adafruit_support_carter wrote:Try simplifying the loop and see if you get a similar behavior.

OK, thanks for the suggestion. I'll experiment with this for a few days and let you know the results.

lunch_box
 
Posts: 20
Joined: Thu Aug 08, 2019 4:11 pm

Re: ADT7410 Temperature Inaccuracies

by adafruit_support_carter on Fri Aug 09, 2019 11:28 am

The idea is to reduce as much as possible it being something related to the intermediate formatting being done between the read and the posting to Adafruit IO. So just post the raw value straight up and see what happens. See if same general trend shows up again. At this point C vs F and forcing a specific precision does not matter.

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: ADT7410 Temperature Inaccuracies

by lunch_box on Fri Aug 09, 2019 10:02 pm

All right, here are the results. Unfortunately, the same behavior is still evident. In the image below, the blue line (TEMP-02) is the original code, which reports in deg F. The red and green lines (3 and 4) are the simplified code, which report in deg C. (The big drop in temp is when I updated the firmware.) The orange line (TEMP-01) is a fourth board I assembled with a DHT22 sensor, which shows a clear, stable temperature plot. Exactly what I expect from the ADT7410 sensors.
Screen Shot 2019-08-09 at 9.51.12 PM.png
Screen Shot 2019-08-09 at 9.51.12 PM.png (125.59 KiB) Viewed 365 times

lunch_box
 
Posts: 20
Joined: Thu Aug 08, 2019 4:11 pm

Re: ADT7410 Temperature Inaccuracies

by lunch_box on Mon Aug 12, 2019 3:45 pm

adafruit_support_carter wrote:The idea is to reduce as much as possible it being something related to the intermediate formatting being done between the read and the posting to Adafruit IO. So just post the raw value straight up and see what happens. See if same general trend shows up again. At this point C vs F and forcing a specific precision does not matter.


I also added a BMP833 sensor to the mix to see how it performs. Just like the DHT22, it's very stable. So something funny is definitely going on with the ADT7410s.

lunch_box
 
Posts: 20
Joined: Thu Aug 08, 2019 4:11 pm

Re: ADT7410 Temperature Inaccuracies

by adafruit_support_carter on Mon Aug 12, 2019 3:49 pm

I've setup a Feather ESP8266 with an ADT7410 and set it to post to an Adafruit IO feed using the simple sketch I posted above. I'll let this run for a while and see if I can recreate the behavior.

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: ADT7410 Temperature Inaccuracies

by lunch_box on Mon Aug 12, 2019 4:45 pm

adafruit_support_carter wrote:I've setup a Feather ESP8266 with an ADT7410 and set it to post to an Adafruit IO feed using the simple sketch I posted above. I'll let this run for a while and see if I can recreate the behavior.

Wow, thank you! Can't wait to see the results!

lunch_box
 
Posts: 20
Joined: Thu Aug 08, 2019 4:11 pm

Re: ADT7410 Temperature Inaccuracies

by adafruit_support_carter on Tue Aug 13, 2019 11:31 am

I'm not able to recreate this in my testing. I let this just sit on the desk for the most part. The one rise between ~3pm-6pm was when I moved it behind my PC so the exhaust fan hit it, so it saw some higher temps. Then I moved it back to just sitting in open air.

Let's check you hardware setup. Can you post a photo of one of the setups.

adt7410.png
adt7410.png (16.37 KiB) Viewed 271 times

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: ADT7410 Temperature Inaccuracies

by millercommamatt on Tue Aug 13, 2019 1:55 pm

The spikes in your data are often in phase across sensors and not random. It is likely an environmental issue.

millercommamatt
 
Posts: 481
Joined: Tue Jul 31, 2018 4:57 pm

Re: ADT7410 Temperature Inaccuracies

by lunch_box on Tue Aug 13, 2019 3:39 pm

millercommamatt wrote:The spikes in your data are often in phase across sensors and not random. It is likely an environmental issue.

If that's the case, why do the DHT22 and BMP388 not exhibit similar behavior? Though there does appear to be some correlation in the ADT7410 data streams.
Screen Shot 2019-08-13 at 3.39.55 PM.png
Screen Shot 2019-08-13 at 3.39.55 PM.png (118.05 KiB) Viewed 257 times

lunch_box
 
Posts: 20
Joined: Thu Aug 08, 2019 4:11 pm

Re: ADT7410 Temperature Inaccuracies

by adafruit_support_carter on Tue Aug 13, 2019 5:01 pm

In the above testing, is everything co-located?

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: ADT7410 Temperature Inaccuracies

by lunch_box on Tue Aug 13, 2019 5:10 pm

adafruit_support_carter wrote:In the above testing, is everything co-located?
Yes

lunch_box
 
Posts: 20
Joined: Thu Aug 08, 2019 4:11 pm

Please be positive and constructive with your questions and comments.