More reliable relative humidity measurements?



  • Hello,

    I am playing with a few DHT22 sensors, and I find them very inaccurate. The spec says they're +/- 0.5C and +/- 2%RH but I find that to be false. And they don't even all agree with the measurements even when put in the same spot and checked at the same time.

    What alternatives are there for a sensor that reliably measures RH and temperature (all in one package if possible, and battery friendly)?

    I'd like to use it to monitor the inside of a fridge, and inside rooms.


  • Mod

    SHT31 are pretty accurate, there are also Si7021 or SHT21



  • You can try also Bosch BME280 - all in one sensor for temperature, humidity and pressure


  • Hardware Contributor

    @robosensor +1 for BME280

    Another way might to either see if you have a offset you can adjust or compensate for in the software. If the readings are all over the place you could take an average for some time also in the software.



  • I wouldn't know what to offset for, I have 5 sensors and they all have different offsets. What's more, the offset varies with temperature and RH, i.e. it's not a linear offset.



  • @nerukam I'm also using the BME280 with good results for the moment. I say "for the moment" because there are reports around saying that these sensors tend to drift/fail after 2-3 years because of sensitive element degradation or dirt accumulation.

    I never calibrated mine but the readings it provides seem ot be consistent with other weather stations around, considering that humidity measurement should not be expected to be a high accuracy measurement type.

    Some users recommend protecting them with a sheet of PTFE - if I remember correctly, Bosch sells a variant which includes a PTFE protection filter as an option, to protect the sensor when used outdoors or close to saline environments for example.



  • The BME280 looks interesting and costs 2$ on eBay. Any experience running it on batteries?



  • Mine has been running on batteries since day 1.


  • Mod

    with sensors with a +/- 0.5°C error I bet measurements are all over the place, that's is why I suggested the SHT31as it should help you narrowing down the errors for the other sensors. The BME280 is one of the most power hungry (when it is measuring) of the sensor I mentioned, so all depends on how often you read data



  • @gohan Good to know, thanks. I was thinking once or twice an hour maybe. It looks like I'd have to use a 3.6V 18650 type of battery, or 3x AAA to get the 3.3V required by this, correct?


  • Mod

    If you use more than 3.6V you need a voltage regulator. I'd suggest to go with LiFePO4 batteries that are 3.2V and you don't need any regulator at all.



  • @nerukam Mine wakes up every 15 minutes. I'm using a Li 16340 battery with 700 mAh capacity (measured) and a MCP1733 LDO - may move to LiFePo4 but for the moment the setup is solid and consumption is very low. Just so you can get an idea, I installed the battery with a charge around 60% about 6 months ago and is today showing 51%. I'm using the Adafruit library with the takeForcedMeasurement() function, which takes care of sleeping the sensor and waking it up for the minimum time required for the reading.

    The sensor supports various reading modes with correspondingly differences in consumption. In sleep mode, it consumes 0.1uA. In normal reading mode at 1 temp+hum+press measurement per second, it consumes 3.6uA. This will be lower if you only need to use 2 or 1 sensors. The accuracy of the humidity sensor is +-3%.

    The [datasheet](https://cdn.sparkfun.com/assets/learn_tutorials/4/1/9/BST-BME280_DS001-10.pdf provides all the details on modes, consumption and accuracy. I'm not familiar with other sensors so can't comment but yes the SHT31 gets good reviews too - so compare and make your own decision.



  • @manutremo Does the battery have undervoltage protection built-in, or do you have separate circuitry to handle it? And how do you recharge the battery?



  • @nerukam I use batteries with builtin protection routinely as a precaution since they are not exactly cheap. However the sketch also measures the battery voltage and reports it to the controller. The scale is 0%-100% corresponding to 3.0v-4.2v, so the nominal 3.6v-3.7v equals to around 50%-60%, where it stays for the majority of time since the discharge curve is quite flat in that area. I get a first warning from the controller at 20%; I try to remember replacing the battery at around 10%-15% even though there is still some margin (the arduino would be the first device to stop working at 2.8v - I think the battery protection would kick in at around 2.4v); however in that area the discharge curve is quite steep and 10% may last for maybe around 1 week (my experience from other similar nodes).

    This particular node is easily reachable so I didn't include any batt charging circuitry.



  • The key to accuracy is repeatability. If you get the same reading from the same sensor for the same conditions over and over, you can calibrate and have great success.

    +- .5°c means 1° of range, is that relative to the actual reading? Or the variability of the readings time ove time? The first one is correctable, the second sucks.



  • @gohan There are BME280 breakout boards with voltage regulators on this. I guess they'll draw a bit more current than those without, but the current draw is pretty darned low.

    It draws so little current that it could be powered by a pin of the microcontroller, so it could be powered off instead of being put into sleep, although it draws so little in sleep I doubt it matters.


  • Hardware Contributor

    @Craig-Thom said in More reliable relative humidity measurements?:

    It draws so little current that it could be powered by a pin of the microcontroller, so it could be powered off instead of being put into sleep, although it draws so little in sleep I doubt it matters.

    It would be a bad idea I think, you need time with CPU active to wake up and initialize the sensor, during that time you consume probably more than 10 000 times what the bme280 is using in sleep mode, so except if you're checking temperature at very low frequency you will waste more power.



  • I'm not sure about the last statement, since the CPU needs to wake-up to make the measurement and send the result even though you use the sensor's own sleep mode. However I've never made that kind of measurement so can't really support this with numbers.

    That said, in my opnion the solution of feeding the sensor from a pin on the arduino makes sense when the sensor doesn't include its own sleep mode... in that case, it may be fed from a pin, or from an external transistor or mosfet device... if it has its own sleep mode, it seems more reasonable using it.


Log in to reply
 

Suggested Topics

  • 87
  • 7
  • 3
  • 8
  • 1
  • 5

76
Online

11.4k
Users

11.1k
Topics

112.7k
Posts