0

AM2320 and I2C commands
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

AM2320 and I2C commands

by ohnomrbill on Sun Mar 25, 2018 9:21 am

Set up AM2320 with 3.3VDC and 10k ohm pullup resistors. SDA is i2c2_SDA (P9-20) and SCL is i2c2_SCL (p9-19). ' i2cdetect -y -r 2' shows no response for address 0x5c. Is AM2320 a true i2c device and should it respond to i2c commands? 'i2cdump -y 2 0x5c' does not return any values.

ohnomrbill
 
Posts: 14
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 and I2C commands

by drewfustini on Tue Mar 27, 2018 11:17 pm

I would like to know more about the software installed on your BeagleBone.

Please paste the output of:
Code: Select all | TOGGLE FULL SIZE
sudo /opt/scripts/tools/version.sh

cat /boot/uEnv.txt

Please also post a photo of how the AM2320 is wired to the BeagleBone.

drewfustini
 
Posts: 850
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 and I2C commands

by ohnomrbill on Wed Mar 28, 2018 9:22 am

BBB.jpg
picture of circuit
BBB.jpg (814.45 KiB) Viewed 853 times


Picture of circuit attached. It is difficult to see the end of the 10k resister on pin 2. The grid of the AM2320 is facing the camera.



$ sudo /opt/scripts/tools/version.sh

git:/opt/scripts/:[2ce750d881941c5189db9e189af90517e11c079f]
hexdump: /sys/bus/i2c/devices/0-0050/eeprom: Connection timed out
eeprom:[]
dogtag:[BeagleBoard.org Debian Image 2017-08-31]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.09-rc2-00002-g7c9353]
kernel:[4.9.45-ti-r57]
nodejs:[v6.13.1]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20180322.0-0rcnee0~stretch+20180322]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]


---- cat /boot/uEnv.txt

#Docs: http://elinux.org/Beagleboard:U-boot_pa ... layout_2.0

uname_r=4.9.45-ti-r57
#uuid=
#dtb=


###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBon ... t_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=/lib/firmware/<file0>.dtbo
#uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.4.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo
###pru_uio (4.4.x-ti & mainline/bone kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks...
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 quiet video=HDMI-A-1:1024x768@60e

##Example v3.8.x
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=

##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
#cape_enable=bone_capemgr.enable_partno=

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

ohnomrbill
 
Posts: 14
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 and I2C commands

by drewfustini on Wed Apr 04, 2018 2:22 pm

Thanks for posting that information. I should be receiving the AM2320 Digital Temperature and Humidity Sensor (PID: 3721) by the end of this week so I can reproduce and fix the issue.

drewfustini
 
Posts: 850
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 and I2C commands

by drewfustini on Sun Apr 08, 2018 4:18 am

Sorry for the delay. I should have the part on Monday (April 9th) and then I can test.

drewfustini
 
Posts: 850
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 and I2C commands

by ohnomrbill on Tue Apr 10, 2018 9:17 am

thank you.....

ohnomrbill
 
Posts: 14
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 and I2C commands

by drewfustini on Wed Apr 11, 2018 12:43 pm

I have connected the AM2320 to the BeagleBone. I am observing an odd behavior where i2cdetect freezes when it gets to address 0x5c. This is the address of the AM2320. I'll investigate further and update.

drewfustini
 
Posts: 850
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 and I2C commands

by drewfustini on Thu Apr 12, 2018 11:46 am

I'm going to try to observe the i2c traffic when using the AM2320 with an Arduino Uno and then compare that to the traffic that I am seeing on the BeagleBone's i2c bus.

drewfustini
 
Posts: 850
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 and I2C commands

by ohnomrbill on Mon May 21, 2018 1:26 pm

Checking in for an update

ohnomrbill
 
Posts: 14
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 and I2C commands

by drewfustini on Tue Jun 05, 2018 12:57 pm

Hi, sorry for the delay. I have the sensor wired up to the BeagleBone again and I will revisit this issue tonight.

drewfustini
 
Posts: 850
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 and I2C commands

by ohnomrbill on Thu Sep 13, 2018 7:35 am

Any update?

ohnomrbill
 
Posts: 14
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 and I2C commands

by drewfustini on Thu Sep 13, 2018 3:39 pm

sorry, I must have failed to followup on this.

I'll need to setup the circuit again and see if I can reproduce the issue.

drewfustini
 
Posts: 850
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 and I2C commands

by jerryn on Thu Sep 13, 2018 5:07 pm

FWIW -- We ran into similar issues with the AM2320 in Circuitpython and if I recall correctly on the Raspberry Pi -- it has a funky "wake up" that may be missed by the i2c_detect -- but depending on the i2c read/writes, it may actually work fine. See the discussion at https://github.com/adafruit/circuitpython/issues/1053

Of course, your mileage may very ;-) -- Good luck

jerryn
 
Posts: 796
Joined: Sat Sep 14, 2013 9:05 am

Please be positive and constructive with your questions and comments.