Thuleman
Posts: 8
Joined: Sat Apr 26, 2014 3:52 pm
Location: Massachusetts, USA

AM-2302 Accuracy?

Mon May 16, 2016 12:06 am

I have purchased two lots of AM-2302 humidity Temperature sensors from different sources. The first lot of 2 give similar humidity readings but are 14% lower than two different wet/dry bulb instruments. The second lot of 10 were all tested in the same ambient environment but the %RH readings vary as follows; 12, 30, 12, 29, 33, 31, 28, 19, 27, 30. These readings are repeatable. The actual humidity in the test area was 58% as measured with a sling psychrometer and another wet bulb instrument. The temperature readings of all devices are accurate and do meet spec. I am running all sensors on 5 volts connected to Pi GPIO's via level translators. The sample rate is slow at a one minute rate. Software is latest Rasbian "jessie", python, and the Adafruit_Python_DHT driver from GitHub. Does anyone have experience with the accuracy of these RH sensors? The AOSONG factory spec is +/- 2% ; I'd be happy with 5%. Comments/discussion please.

rzusman
Posts: 347
Joined: Fri Jan 01, 2016 10:27 pm

Re: AM-2302 Accuracy?

Mon May 16, 2016 12:10 am

RH is possibly the hardest common physical parameter to measure accurately.
I think the best you can hope for is decent repeatability, and just deal with calibrating each sensor.

klricks
Posts: 7449
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: AM-2302 Accuracy?

Mon May 16, 2016 12:47 am

Why 5V? The sensor can be run at 3V3 (<100cm) then you wouldn't need a level converter.
Do you have a 10K pull up on the data line?
The data sheet mentions a bypass capacitor can be used.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

Thuleman
Posts: 8
Joined: Sat Apr 26, 2014 3:52 pm
Location: Massachusetts, USA

Re: AM-2302 Accuracy?

Mon May 16, 2016 1:20 am

I understand RH is somewhat difficult to measure with a simple sensor, but I would expect multiple 'calibrated' sensors would yield much closer readings than I am seeing. I run these on 5 volts because they just don't work on a line longer than 5 meters using 3.3 volts. What good are a bunch of sensors if you can't put them on long wires and distribute around the house. They work just fine on the proto board at 3.3 v which is where all the examples show them. A Pi Zero at each sensor would solve that problem, but then you have to power each one.

klricks
Posts: 7449
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: AM-2302 Accuracy?

Mon May 16, 2016 1:52 am

How long are the actual wire runs? (20m is max).
Make sure the wire runs are not near any mains wiring especially not parallel to mains or through the same bore holes or conduit.
What type of wire? The data sheet suggests to use high quality shielded cable.
Data sheet is not real clear but it seems the pull up needs to be adjusted based on wire length.
http://akizukidenshi.com/download/ds/aosong/AM2302.pdf
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

Thuleman
Posts: 8
Joined: Sat Apr 26, 2014 3:52 pm
Location: Massachusetts, USA

Re: AM-2302 Accuracy?

Mon May 16, 2016 2:31 am

I'm currently testing 4 sensors. Three are on the proto board next to the Pi and one is on a 6 meter shielded cable. All have 4.7K pull-ups. I read each sensor once a minute to display on the terminal and log values to a file every 5 minutes. I will swap sensors between proto board and cable to see if there is any effect. I will also try a higher value pull-up. I'll post results of that test tomorrow. Some posts have indicated that the 2302 has an internal pull-up resistor, but I don't believe that is correct. I also plan to order a couple more sensors from a different source. I get the feeling the 10 that I ordered from China were factory rejects!

User avatar
joan
Posts: 15282
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: AM-2302 Accuracy?

Mon May 16, 2016 5:53 am

At 1 minute intervals you should read the sensors twice per reading (with a several second gap between each). Otherwise you will just pick up the reading from 1 minute ago. This is not your problem but may be a factor.

How are you reading them?

Ah,I see.

May I suggest you try http://abyz.co.uk/rpi/pigpio/examples.html#pdif2_DHTXXD

Thuleman
Posts: 8
Joined: Sat Apr 26, 2014 3:52 pm
Location: Massachusetts, USA

Re: AM-2302 Accuracy?

Mon May 16, 2016 9:41 pm

Today's testing results: The following changes had no effect on the sensor readings.
I swapped one sensor from proto board with one on long cable.
I changed pull-up resistor on two sensors to 10K. Slight increase in bad readings on long cable.
I added dummy reads before each real read with 5 second delay between each. I was already reading twice for log file reading which are at 5 minute interval.
I ran another test program that reads only one sensor per run.
None of these changes effected the erroneous but consistent readings from any of the sensors, so my conclusion is this group of sensors are factory rejects.
I have 4 more sensors coming from a different source and will test later this week.
Joan, I will try the pigpio software routine. It may be more robust detecting errors, but I don't expect it will change my readings.
Thanks for the suggestions.

Thuleman
Posts: 8
Joined: Sat Apr 26, 2014 3:52 pm
Location: Massachusetts, USA

Re: AM-2302 Accuracy?

Fri May 20, 2016 12:33 am

Purchased two DHT22 sensors from local electronics store. They stabilized at 41% and 42% while wet bulb reads 45%. These are OK while those that came direct from China are no good. :evil: Factory rejects, counterfeit, missed calibration ?? They will be returned. I have four more from a different source to test tomorrow.

Return to “Troubleshooting”