Introduction: Hygrometer

Introduction:

In this instructable we want to explain you how to build a simple hygrometer. A hygrometer measures the relative humidity in the air.

In short: we measure the normal temperature and the wet temperature. With this two measurements we can calculate the relative humidity. This is what we print on a LCD-screen.

What to use:

  • laptop/pc
  • arduino
  • usb cable
  • 1x plug (3-12V)
  • 2x low voltage temperature sensor (we used TMP36GZ)
  • ventilator
  • plastic bottle
  • plank (40x15 cm)
  • piece of wood (4x10x10 cm)
  • lcd-scherm (we used ADM1602K)
  • breadboard
  • acid-free kit
  • piece of cloth and yarn and needle.
  • 5 resistances of the same magnitude (around 10 kilo-ohm)

Step 1: Plastic Bottle

In this step we create the sensor which measures the wet temperature.

Plastic bottle: Cut the bottle 5 cm under the bottle cap. (See image). Make a small hole in the bottle cap and put the temperature sensor through it. (Sensor outside, connectors inside the bottle) Solder three weirs at the temperature sensor, so you can connect it to the bread-board, see also the circuit figure. This temperature sensor will measure the wet temperature. Put some acid-free kit at the hole so that no water can come from outside to inside. Make a piece of cloth around the temperature sensor with the yarn.

Step 2: Ventilator

Connect the ventilator to the plank in such a way that is blows on the temperature sensor which measures the wet temperature, ( the sensor which measures the wet temperature we made in the previous step, plastic bottle)

Use a separate connection, a different one than the one for the Arduino, to power the ventilator.

Step 3: Arduino and Bread-board

Here is explained how you have to connect everything. Look carefully at the image. In this image the red wires are connected to the 5V. The blue wires are connected tot the ground. Every other color is just to make it easier to separate all the wires.

This below can be skiped. If you skip this also don't place the resistances and leave the converting part AND the part which defines Aref out of the Arduino code. This is mentioned again in the code as comments.

There is a possibility to make the sensors more accurate. You can do this by using Aref. Here this is done with 5 resistances of the same magnitude. They are placed as shown in the figure, 2R is two of these resistances. The way to convert the new sensor values into temperatures is shown in the Arduino code.

Step 4: Plank

Connect everything (plastic bottle, ventilator, breadboard and arduino) to the plank. See image for an example.

Step 5: Code

Load the following code to your arduino.

Hopefully it works correctly!

When the temperatures are not stable enough you can change 'a=0.5' in for example 'a= 0.8'


/*

Psychrometer

Reads an analog input on pin 0 and on pin 1. Converts it to temperature. Converts temperature to a relative humidity.

And prints the result to the LCD.

*/

// include the library code:

#include

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

//give inital value's for the dry and wet temperature

float averagedry=20;

float averagewet=16;

//give a constant which determines the weight of the old values in detemining the new value

float a=0.5;

// the setup routine runs once when you press reset:

void setup() {

// this uses the voltage which comes in in Aref as a reference

// WHEN YOU LEAVE OUT THE RESISTANCES ALSO LEAVE OUT

analogReference(EXTERNAL);

// set up the LCD's number of columns and rows:

lcd.begin(16, 2);

// Print a message to the LCD.

lcd.print("RelativeHumidity");

// initialize serial communication with computer:

Serial.begin(9600);

}

// the loop routine runs over and over again forever:

void loop() {

// read the input on analog pin 0 and pin 1, this is the dry/wet temperature:

// the delay(1000) delays with a second, this is to stabilize the arduino

analogRead(A0);

delay(1000);

int sensorValuedry = analogRead(A0);

analogRead(A1);

delay(1000);

float sensorValuewet = (float) analogRead(A1);

// Convert the sensorvalue to a temperature

// The sensorvalue measured without a lower reference voltage is calibrated with a thermometer

// The sensorvalue measured with a lower reference voltage is corrected with 149.7/828.3.

// 149.7 is the sensorvalue without lower reference voltage

// 828.3 is the sensorvalue with lower reference voltage.

// These two values will probably be different with other resistants

// WHEN YOU LEAVE OUT THE RESISTANCES ALSO LEAVE OUT THE CONVERTING PART (149.7/828.3)

float temperaturedry= sensorValuedry*(149.7/828.3)*0.5304-53.926;

// Take a running average with weigthing factor a

averagedry=a*averagedry+(1-a)*temperaturedry;

// Convert the sensorvalue to a temperature

float temperaturewet= sensorValuewet*(149.7/828.3)*0.5181-50.889;

// Take a running average

averagewet=a*averagewet+(1-a)*temperaturewet;

// use formulas to determine the relative humidity

float Es = 0.61 * exp ((19.9 * averagewet)/(273 + averagewet));

float Ea = Es -0.067 * ( averagedry-averagewet );

float H = Ea / Es;

{

// set the cursor to column 0, line 1

// (note: line 1 is the second row, since counting begins with 0):

lcd.setCursor(0, 1);

// print the relative humidity:

lcd.print(H);

}

}

Step 6: Finishing

When you finished everything be sure that when you take measurments that the wet temperature-sensor (with the bottle) is wet. You can do this easily by taking a small cup and a small piece of cloth and hang the cloth in the cup and on the wet temperature-sensor.

If you already have an arduino, breadboard and other stuff you 'll have an hygrometer for free.

If you have to buy these things you will pay around 25 euros.

Good luck!

Comments

author
iam_maker_leo (author)2014-11-27

Well done....

Question...

Is it more accuracy than simple hygrometer like as DHT-11

author
Orngrimm (author)2014-11-27

Sounds like a modern implementation of a Psychrometer (wet and dry bulp-thermomether to calculate the rel humidity) especially a modified Sling psychrometer.

The basics can be found on Wikipedia under "Hygrometer".

Anyway: It is a cool and straight forward experiment and sensor. Great showcase for physics! :)

author
Fission Chips (author)2014-11-27

This looks like an awesome DIY sensor! Any idea how much this would cost in comparison to a commercially made hygrometer?

author

I have add a 6th step. Most things you 'll have at home (a plastic bottle, piece of cloth, plank etc.) There are very cheap commercially made hygrometers, so I think that you 'll only save money when you already have an Arduino and other stuff.

My opinion is: It's just cool if you can make your own hygrometer!