AM2315 I2C Not working with BBB

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Sopwith
 
Posts: 14
Joined: Wed Mar 19, 2014 9:50 pm

Re: AM2315 I2C Not working with BBB

Post by Sopwith »

I spent a lot of time and aggravation getting the AM2315 to work for me. I wrote up my findings including a step-by-step guide with screen-shots to assist others.
You can find the document here: http://sopwith.ismellsmoke.net/?p=46

Hope this helps end some agony.

Sopwith

mmm_ny
 
Posts: 12
Joined: Mon Feb 24, 2014 6:35 pm

Re: AM2315 I2C Not working with BBB

Post by mmm_ny »

OK, then...still trying to make this work. Could you please explain to me the i2c address of the am2315? The code above (the one I am trying to use) has the i2c address as 0x5C. The datasheet talks about the address being 0xB8. Neither are in the range that the BBB i2cdetect -r 1 checks (0x03 to 0x77)??? I can't i2c detect the am2315...could the address be the problem? Thanks!

Sopwith
 
Posts: 14
Joined: Wed Mar 19, 2014 9:50 pm

Re: AM2315 I2C Not working with BBB

Post by Sopwith »

The data sheet is incorrect. Newer versions of the device are at i2c address 0x5C. The data sheet did not get updated. The AM2315 needs to be awakened before you can detect it on the i2c bus. Run i2cdetect -y 0 (rev-A board) OR i2cdetect -y 1 (rev-B) twice in quick succession. The board will not show up in the first run but will show up in the second run if you have it wired correctly.

I strongly recommend you brew a strong cup of coffee and then read this document http://sopwith.ismellsmoke.net/?p=46. If you invest the time to read it - it will save you hours of frustration. There is a clear explanation why the i2c libraries do not work well with the AM2315.

Sopwith

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: AM2315 I2C Not working with BBB

Post by adafruit_support_mike »

That's a nice writeup.. thank you for sharing the link.

mmm_ny
 
Posts: 12
Joined: Mon Feb 24, 2014 6:35 pm

Re: AM2315 I2C Not working with BBB

Post by mmm_ny »

Sopwith,

Thank you very, very much for the information.

I installed python3 and everything on the BBB per your great information in the document above . All went well. I can python3 gettemp.py with no errors. Unfortunately, I get 999,999,1 each time with a MAXTRYS of 5...so no go. The only progress I've made is if I take the bi directional level splitter (bdls) off and run the sensor at 3.3v I can detect the 0x5c address by running i2cdetect -r 1 twice quickly. With the bdls on the i2cdetect is so slow that I could never even try it fast. Should I give up? Or any other ideas? Thanks for all your help!

Sopwith
 
Posts: 14
Joined: Wed Mar 19, 2014 9:50 pm

Re: AM2315 I2C Not working with BBB

Post by Sopwith »

I do not have any experience with the BBB. A quick review of the Adafruit Bi-Directional converter docs makes me think it should work. I agree with the previous post. Go back and review the solution proposed by joshs85 on page 1. He got the device to work. Maybe he can elaborate more on how he wired up the device. The fact that you have to send a 'wake-up' to the AM2315 is inconvenient, but it ensures the device maintains accurate humidity readings.

Never give up. If you do, the electrons win and you will never know the answer. Neither is tolerable.

Sopwith

mmm_ny
 
Posts: 12
Joined: Mon Feb 24, 2014 6:35 pm

Re: AM2315 I2C Not working with BBB

Post by mmm_ny »

Sopwith - Thanks - I'll keep trying
joshs85 - How did you wire the AM2315, bdls, and BBB?

I have tried putting additional pull ups on the HV side of the bdls...any other suggestions?

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

Return to “Beagle Bone & Adafruit Beagle Bone products”