I've had a few AM2315 sensors that will randomly show up as Not Present when rebooting my Pi or restarting the GroveWeatherPi program. I have to keep restarting or rebooting until it starts showing up. Usually I can run the test script and it reads the data fine even when this occurs but the GroveWeatherPi still has to be restarted before it will gather the data. Sometimes it just reports bad data altogether. I have seen this with 3 different sensors. Last night it randomly reported once to Weather Underground that it was 32F and -4F Dew Point when on either side of that data point it was 70F. I've attached an image of the Weather Underground graph. It usually does this when the sensor doesn't show as present or reports bad data. Sometimes it will go for a week without showing this issue. When I run the test script the CRC value is sometimes 1 instead of 0. Why is that?
My code block traps the CRC error (crc = -1), waits for 200 ms then attempts to read the sensor again. As SDL mentions in the above thread, the problem may be in the I2C driver logic (a timing problem with the AM2315?). Until that is addressed my replacement code should work for you.
I am having issues with my AM2315 on the WeatherPlus board. The temperature it is reporting is much higher than the actual temperature. I got the system up and running Saturday evening, January 20th. The data was good until yesterday, January 22, 2018 at about 6:48am. The outside temperature was in the low 50's F, but suddenly the AM2315 started reporting temp in the 70s. (F). It spiked to 78, then as the evening cooled down, the reported temperature went down as well, but 20+ degrees higher than normal.
The 2 drops in temps this morning were from when I rebooted the board. The first read or two were right, or close to right then the readings go back up.
I did notice this when I first put everything together, but when I installed it outside, the correct temps were being reported. Using the WunderStation iPad app, I did see 2 spikes about a half hour apart, but the temps went back to normal.
I am using the solar shield so no direct sunlight and the sensor has not been exposed to water. I actually ordered a 2nd AM2315 for a 2nd station and it was supposed to arrive today but it won't arrive until mid-day tomorrow. Once I have a 2nd AM2315 to test with, I can see if it is the sensor or if the issue is with something else.
I have rebooted the WeatherPlus board 5 or 6 times, leaving it off for 2 to 5 minutes before power on. The sensor is consistently reporting the higher, incorrect data now.
Lastly, I tried unplugging the sensor from the I2C hub and plugging it back in to ensure a good connection. I also tried plugging the AM2315 into the I2C1 port on the WeatherPlus board. Each test resulted in the same, invalid temperature readings.
Any help would be greatly appreciated.
Last Edit: Jan 23, 2018 6:58:14 GMT -8 by mcinflyre
This weather system is getting very very frustrating... I am trying to build 2 weather stations and the WeatherPlus board came in today for the 2nd build. As a test, I replaced my original WeatherPlus board with the new one to see if that would correct or improve the temp readings. I configured the new board with wifi and updated the firmware to 027 as the original board.
The current temperature is actually 53-54F degrees according to other weather stations in my area. Now mine is going back and forth between readings of 78-80F to 48-49F. Both are wrong.
I have another AM2315 on order for the 2nd weather station so when that comes in I can replace that and see if that changes anything. I have the AM2315 mounted on the side of the box and using the solar shield. I don't know what else I can do.
We had a similar problem when we were developing the board. We worked with the I2C interface to fix the sensor and made it VERY reliable. Over 100,000 readings with no problem. Now is this another situation? Not sure.
Your 48 - 49 degree readings might be fine. You may be different than the other stations. Get a thermometer and hold it next to yours to see.
Now, would you do me a favor to help me? I just checked that we are checking the CRC in the code, so that means its not bad transmission data (I was hoping)
Would you take a bad reading and compare it to the correct reading right after and before the bad read?
Do your calculations in degrees C. I'm looking to see if the difference (and we have to get a pretty good reading) is a power of 2.
Thank you for getting back to me on this. I'm pretty frustrated at this point. I've been watching the temps from other weather stations around me via Weather Underground. There is one within 1/4 mile from me and another about 1/2 mile. Many others are very close by as well. They are all consistently with in 2 to 3 degrees from each other, so I have a good sense for what the temp is, or should be for mine.
My station has stopped reporting to Weather Underground due to the invalid data. I've attached a screen shot from the Wonderboard app showing data for 24 hours. If I use the week view, you don't see the spikes as clearly.
I did check for temp changes in C and they do not appear to be a power of 2 issue. I will check again tonight when it fails. The behavior makes no sense at all. There are no clear external "things" close by to cause this that I can see. It works fine for a few hours during the day and then somewhere between 6-7pm (last night was around 10pm I believe) the temp spikes high, then back to normal, then high, then normal until it settles into more more continuous high reading. At some point in the early morning hours it spikes up and down again and then during the day it seems to be okay.
Lastly, when the temp drops back down, it seems to drop lower than it should, however, it seems closer to correct on the low side verses the high spikes.
As I've mentioned in the previous posts, I've replaced the Weatherboard Plus and the results are the same. I'm waiting on a new AM2315 to see what that does.
Sorry for the long response, I'm frustrated and to be very honest, on the verge of scraping the project and moving on. I've spent a lot of time and money on this.
I will check the differences tonight and report back what they are in C as well as put a normal thermometer next to it for comparison.
Thank you again for getting back to me.
Last Edit: Jan 26, 2018 7:52:49 GMT -8 by mcinflyre
Hi, sorry about your frustration. In any project kit like this, it's really hard to figure out what is wrong. Perhaps, this is a bad AM2315. We have more coming in on Monday so you should have yours next week. If it is the AM2315, we will be happy to replace it. I really need a bad one to figure out what is going on.
This happens on a few AM2315s but not on very many and we have not been able to duplicate in the lab.
BP looked at the code and it is checking the CRC so this seems it must be a sensor problem. The reason BP asked for the power of two thing, he means that a single bit has flipped and changes the reading. Would you give me your raw degrees C number and let me analyze it? We saw this about a year ago in a unit.
Again, sorry for your trouble, but this is what happens with handmade projects. Someone does something a little different and all hell breaks loose! Not saying you have done anything, but we do want to get to the bottom of this.
I have this issue running on two threads, which I apologize for. I believe I have found that the issue is related to the browser issue that locks up the board. I have let the system run for 48 hours now and the temp has been inline with what I’m seeing from stations around me. So unless the AM2315 just started working on Friday with no change, the only thing that has changed is me no connecting to the OurWeather Plus board via the OurWeatherHome website.
I did have a short spike today that I think is an anomaly. I want to let it run over night and until around noon tomorrow before I try to recreate the temp spikes.
I apologize For my frustration. I know this type of project will have issues which have to be worked through. There seemed to be no logic to what I was seeing and I could not think of anything else to try.
I have an AM2315 on order for you guys, so when that comes in, I will add that to the troubleshooting.
I think I may be seeing a temp spike tonight. My AM2315 was reading 52F (11.111C) then jumped to 82F (27.778C) which just happens to be a difference of 16.668C.
Now it’s reportng 80F (26.667C), a difference in C of 15.557.
Just dropped to 50F (10C), it didn’t drop 2 degrees in 5 minutes.
Just went back up to 78F (25.556) which is a difference of 15.556 if the previous 50F was correct.
The only thing I did today was unplug the system to move the box (AM2315) attached to the box to a location that has less sun exposure. I have not connected to the board via the OurWeatherHome site, so it looks like browser theory has been disproven.
Back to I have no idea. Hope it’s the AM2315 which I will test when I get one later this week.
The temps are changing again today and they are consistently right around a difference of 16C. Latest report is 78F, but then drops to 50F. The difference in C is 15.556. Does this get rounded up to 16 and mean that this is a bit flipping issue? If so, where would I go from here to correct it?
It’s been very odd... The dew point mirrors the temp very closely, but not exactly. Odd in that if there is an error, it’s affecting both. Or for those more educated than me, it might make perfect sense.
Hope you guys can find something. Thank you for your help.
Last Edit: Jan 29, 2018 21:01:20 GMT -8 by mcinflyre