Module 3 – Arduino with AM2301 sensor

This post is part of a series on Arduino-based energy and climate monitoring.

The AM2301 is a humidity and temperature sensor. It is the packaged version of the DHT21 sensor. I connected it to a Arduino pro mini (3.3V) with a RFM12b tranceiver to record the ambient temperature and humidity in our bathroom.


Power is provided by connecting a rechargeable 18650 LiPo battery to VCC on the programming header of the Arduino. This battery provides nominally 3.7V, which in my experience is close enough for the board to work fine.

The AM2301 sensor occasionally returns extreme values outside of the normal range. To prevent these spikes from polluting my ThingSpeak channel, I repeat the measurement. If the voltage is stable within 0.1V, the temperature stable within 1 degree and the humidity stable within 5%, the values are transmitted by the RFM12b.

P1130983                  P1140004

The AM2301 is glued together with the Arduino and battery onto a piece of plastic, which allows for mounting it behind the wall mirror.

It performs a temperature reading every 63 seconds and transmits it to the central relay module. Between recordings it falls asleep to save power.

You can find the sketch for the Arduino here.

2 thoughts on “Module 3 – Arduino with AM2301 sensor

  1. Alvaro Daniel Soto

    Hi i’m student and i want know why you say that the Vcc with 3.7 Volts the arduino nano can work fine ?

  2. Robert Post author

    No, this is with an 3.3V Arduino pro mini and not with an Arduino Nano. As far as I know the Nano is always 5V, whereas the mini comes in 5V and 3.3V versions.


Leave a Reply

Your email address will not be published.