BME280 and AM2315 not working together

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
earthres
 
Posts: 221
Joined: Fri May 28, 2021 10:48 am

Re: BME280 and AM2315 not working together

Post by earthres »

No, I have the older AM2315, not the AM2315C. I know for a fact based on the problem we're now discussing that even though the documentation said that pullups were required, that is not actually true even when this sensor is used by itself. Go figure...

Who knows if the same problem will exist with the AM2315C (I ordered one today, so I'll soon find out). The AM2315C is in the same physical housing, but it uses a different sensor, right? Since I have two AM2315s and they are very good T/RH sensors (much better than the BME280 for long-term outdoor use in weather stations, for example), I would REALLY like to get them working! Of course I don't HAVE to include a BME280 in a data collection system (it gives good pressure data), but it bugs me that something that SHOULD work without difficulty simply refuses to work!

User avatar
adafruit_support_bill
 
Posts: 88040
Joined: Sat Feb 07, 2009 10:11 am

Re: BME280 and AM2315 not working together

Post by adafruit_support_bill »

even though the documentation said that pullups were required, that is not actually true even when this sensor is used by itself. Go figure...
The i2c bus implements bidirectional communication cleverly by alternating between active LOW and high-impedance mode on the bus. Since nobody ever actively drives the bus HIGH, it can tolerate bus collisions without burning out any pins.

Without pullups, the state of the bus with all devices in high-impedance mode is 'undefined'. If 'undefined' is lucky enough to be HIGH, things will communicate normally. The pullups are there to ensure that it is.

Not sure why the AM2315s would not respond to the i2c scanner. I don't have one on-hand to test with. Please let us know how the AM2315C behaves in your circuit.

User avatar
earthres
 
Posts: 221
Joined: Fri May 28, 2021 10:48 am

Re: BME280 and AM2315 not working together

Post by earthres »

am2315_old.jpg
am2315_old.jpg (14.65 KiB) Viewed 116 times
What's especially strange about the problem I'm having is that a BME280 and AM2315 (not AM2315C) USED to work together. Here's an image from 2019 of output from an Adafruit packet radio weather station that was working until recently, when I tried to reload transmitter code with a couple of small (or at least I thought) changes. That led to the code I posted previously when I tried to figure out why there was a problem with the AM2315/BME280 combination. The code I replaced was originally created and uploaded with IDE 1.8.3 and as you can see the BME280/AM2315 sensors worked perfectly well together. (After some time the BME280 and AM2315 humidity values will diverge very significantly, but that's another story!)

I'm now using IDE 1.8.15 so now I'm wondering if it's POSSIBLE that there are compile differences that could be causing this problem?? Yes, I will let you know when I've gotten and tried an AM2315C. And just to reiterate, this problem is the same with an UNO, Metro Mini, and Nano.

User avatar
adafruit_support_bill
 
Posts: 88040
Joined: Sat Feb 07, 2009 10:11 am

Re: BME280 and AM2315 not working together

Post by adafruit_support_bill »

There have been several updates to the AVR core between 1.8.3 and 1.8.15. The one in 1.8.13 specifically mentions changes to the Wire library related to timeouts. https://www.arduino.cc/en/software/ReleaseNotes

Older versions of the IDE are available for download if you want to try re-compiling with the earlier version:
https://www.arduino.cc/en/software/OldSoftwareReleases

User avatar
earthres
 
Posts: 221
Joined: Fri May 28, 2021 10:48 am

Re: BME280 and AM2315 not working together

Post by earthres »

Yes, that makes sense. Considering, changes in the IDE may be the only reasonable explanation for the problem I've been having. I will try going back to a pre-1.8.13 version and see what happens. But, how about the new IDE 2.xx? I'm in no hurry to leave IDE 1.8.x, as I have used it for a long time and I'm used to it. But I might put 2.xx on a laptop to try it out. Also, just to point it out for anybody who might be following these postings... if you don't want to alter your desktop/laptop IDE installaion, you can create a portable version that will run from a pendrive -- see https://www.arduino.cc/en/Guide/PortableIDE.

User avatar
earthres
 
Posts: 221
Joined: Fri May 28, 2021 10:48 am

Re: BME280 and AM2315 not working together

Post by earthres »

I installed IDE 1.8.3 (portable version on a pen drive), what I used previously, and nothing has changed. I also tried 1.8.12, the version just prior to the one where there were changes to the Wire library. Now I wonder if there have been changes to the AM2315 software library that might be the problem

User avatar
adafruit_support_bill
 
Posts: 88040
Joined: Sat Feb 07, 2009 10:11 am

Re: BME280 and AM2315 not working together

Post by adafruit_support_bill »

There have been a number of changes to the driver over the years. That appears to include some tweaks to the 'wakeup' logic & timing on the read. It is possible that the new version behaves differently from the old one in this regard.

User avatar
earthres
 
Posts: 221
Joined: Fri May 28, 2021 10:48 am

Re: BME280 and AM2315 not working together

Post by earthres »

Presumably, when I updated my IDE I also had to reinstall software libraries for all my sensors. Does this mean that I have to just trash the two AM2315s I already have (which would be a pity!), or is it possible to get a library with the "older" drivers??

User avatar
adafruit_support_bill
 
Posts: 88040
Joined: Sat Feb 07, 2009 10:11 am

Re: BME280 and AM2315 not working together

Post by adafruit_support_bill »

I don't believe that an IDE update forces you to update the drivers.

Nevertheless, it is possible to revert to an older version: https://github.com/adafruit/Adafruit_AM2315/releases

User avatar
earthres
 
Posts: 221
Joined: Fri May 28, 2021 10:48 am

Re: BME280 and AM2315 not working together

Post by earthres »

BTW, the original code I posted, testing a BME280 and AM2315 side-by-side in a "one shot" measurement in the setup function (because I was going to use an on/off timer in a battery-powered pocket radio system to transmit these data at intervals of a few minutes) works just fine (IDE 1.8.15) if I substitute an SHT30 for the AM2315 . I won't bother with the code details here -- it's the same except for using an SHT30 (enclosed shell, ID 5064). So the problem really is with (I now assume) the software library for the AM2315.

User avatar
earthres
 
Posts: 221
Joined: Fri May 28, 2021 10:48 am

Re: BME280 and AM2315 not working together

Post by earthres »

You asked me to report on whether the problem with an AM2315 not working together with a BME280 went away if I used an AM2315C -- same physical housing but different sensor, right? There is no problem running the A2315C and BME280 together on the same system.

This is nice to find out, and I guess I will just use my two AM2315 sensors on systems where perhaps there won't be a problem. If anyone else has had (and solved?) this problem, please let me know!

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”