Introduction: Connecting AM2320 With Arduino

Hi guys. This is my first instructable. I decided to tell you how to connect a humidity and temperature sensor AM2320 to Arduino board.

This sensor is very accurate and sensitive so it's great for high precise measurements. However it's a new sensor and there is almost nothing about it. You must notice that AM2320 is not a DHT series and it requires I2C connection. This is very useful if you are using it for a weather station along with BMP180 which is also I2C.

I tried several libraries with no success until I made it. So if you want to buy an AM2320 here is how to use it with Arduino.

Step 1: What You'll Need

Part list:

1. Arduino pro mini or compatible board.
2. USB to Serial adapter a.k.a. FTDI (just in case you are using pro mini)
3. AM2320
4. Some wires.
5. Arduino IDE

Some other things:

1. Solder.
2. Cutting tool or knife.
3. Some basic skills.

Step 2: Soldering the Wires

You'll need to solder some wires to the AM2320 pins because they are very thin to use DuPont connectors directly. However I'm still using DuPont wires but cut in half. Just grab your solder and do it.

Now all you need is to connect everything and use some code of course.

Step 3: Connecting...

Well this is the easiest part. Just grab the wires and connect them until there is no open wire left.

I'm unable to make a circuit design at this moment so I'll describe the connections.

AM(1) -- 5Vcc
AM(2) -- A4
AM(3) -- Gnd
AM(4) -- A5

Step 4: Library and Codding

This is the crucial step. I searched a lot and tested a lot and finally I succeeded to put this sensor to work. I found the library in the comments of a Russian blog post. This is how deep I searched for a proper solution :-)

Here is the link for the library at GitHub: AM2320-master

The code is as an example inside so just download and install the library.

Step 5: Final Tests

As you can see in the screenshot it works. And also you may note that the humidity went more than 99% when I breathed to the sensor.

And that's all. Don't be afraid to test this awesome sensor and share your experience.

I hope you enjoyed my first instructable and sorry for my non-native English :-)


อริยะแ (author)2017-05-31

Can I connect AM2320 more than 1?


Yes you can but with some additional hardware. There are two things you can try:

1. You can use an i2c multiplexer module which lets you to use up to 8 i2c sensors with the same address. You can find one here:

2. You can use a logic switch to power up only one sensor at a time as described in this post:

I prefer the first solution as it's cheap and stable.

I'll be happy if you try and reply with the results. Good luck! :-)

gmannz (author)2017-03-25

Thanks for the clear and simple instructions. The library proved very useful. After checking around various resources on the internet, it is still up to date. One note, I could not get this to work on the Genuino 101, only the uno.

sffaf (author)2016-09-01

Hi, большое спасибо! i needed this, i have a problem, i added the library and opened one of the examples, and without modifying anything it would not compile, i get this error:

am2320_I2Clcd2.ino:11:2: error: 'AM2320' does not name a type

am2320_I2Clcd2.ino: In function 'void loop()':

am2320_I2Clcd2.ino:30:13: error: 'th' was not declared in this scope

Error de compilación

any idea why?

fumble (author)sffaf2016-10-11

Try another version of Arduino-IDE - this should help...

hexadec. (author)2016-06-07

Great job, saved me some work and searching. Thanks

Your English is very good too. :-)

StanKaravelikov (author)hexadec.2016-06-07

Thank you! I'm happy to know that my efforts helped someone :-)