Page 1 of 1

AM2320 temp/ hum sensor. Same as DHT22?

Posted: Wed Jan 31, 2018 8:28 am
by E*2Engineer
Hello,
This sensor appears to be just the ticket for the project I am working on, with its 12 bit
accuracy in both temp/hum. No need for calibration,price, and other features.

However, upon reading the datasheet for the AM2320, it appears to be a I2C device,
yet the only talk I have seen of it on the discussion boards treats it as a 1 Wire device.

I personally would like to use it as a I2C device, the macro for it shows no connection for the clock line.

I really could use some help getting started with some working sample code (Pic 16f1789, FC7, running clock at 19.660800Mhz)
A simple read/ write routine would be great, I can work out the math, and from a previous post that explains the data stream,
I think I can get going once I get a 2 finger grip on using this device. I will admit however that communications has not been
something I have much experience in. I am however willing to put in the research necessary to get this down pat.
This is a situation where I know what I don't know, and that is alot..

If anyone is successfully using this device, I would appreciate you sharing a simple as possible read/write routine. in FC6 or 7.
Thank You,
-Craig C

Re: AM2320 temp/ hum sensor. Same as DHT22?

Posted: Wed Jan 31, 2018 10:01 am
by LeighM
Hi,
I've not manged to find that device yet, but here are some links that should be of help...
https://www.matrixtsl.com/blog/simplifi ... c-and-spi/
http://www.matrixtsl.com/resources/file ... eation.pdf
Leigh

Re: AM2320 temp/ hum sensor. Same as DHT22?

Posted: Wed Jan 31, 2018 12:18 pm
by mnf
I have a simple program that reads all the data from a AM2320 sensor. It was written for the Arduino - but should work on PIC (you'll need pull-ups on the SDA and SCL lines)
am2320.fcfx
(13.96 KiB) Downloaded 352 times
Note that it reads a block of 8 bytes - First 2 mirror command (3, 4) and last 2 are CRC.
Humidity is at 2,3 and temp at 4, 5. The program just spits them out to UART with no attempt to convert them to anything meaningful...

The data sheet is at https://akizukidenshi.com/download/ds/aosong/AM2320.pdf and at first glance is a little confusing? (I wrote the above based on the Arduino AM2320 library)

Martin

Re: AM2320 temp/ hum sensor. Same as DHT22?

Posted: Thu Feb 01, 2018 8:58 pm
by E*2Engineer
Thank you both Leigh & Martin,

Between the info from the both of you, I was able to start using the AM2320.
This was more valuable to me right now than than you might imagine, as this is not
for just a "pass the time" project.

I appreciate the information from both of you.
-Craig C