HSM-20G temperature & humidity analog sensor + Nokia5110 LCD

Temperature and humidity measurement are always a nice addition to hobbyist projects. In my previous post, I’ve discussed the DHT11 sensor, which is capable of measuring both temperature and humidity. They are digital sensor and provide calibrated outputs with temperature and relative humidity. I’ve also demonstrated how to interface with Arduino and display it on 1602 LCD. Unlike DHT series, HSM -20G is analog sensor that converts the two ambient parameters to voltage outputs. There is a hobbyist who has shared their method of interfacing HSM-20G to Arduino with a Nokia3310 LCD working together.
http://www.instructables.com/id/Arduino-Nokia-LCD-Sensors/

HSM-20G is analog sensor unlike DHT series. If you go through the HSM-20G datasheet, you will find that they have given us a peripheral circuit to microcontrollers or multimeter.

And they also provide us output voltage for certain humidity value and they have plotted a graph. Because there is thermistor built inside rather than semiconductor for measuring temperature, they have provided the resistance value at various temperature. As you may notice that the plot is not linear but rather has curve-like nature, you can use matlab or other software to get a equation for the plotted curve.

The curve fit for the data is:
RH=31*volts-12
Temperature in C = 281.583*1.0230^(1.0/R)*R^-0.1227 -150.6614Next step is to interface to the circuit. Nokia 5110 is a basic graph LCD screen for lots of application. It was intended for as cell phone screen. This one is mounted on the easy to solder PCB. The Nokia 5110 LCD has a SPI interface and has 5 control lines. These 5 control lines occupy many outputs of the Arduino.

SCLK – Pin 8
DN   – Pin 9
DC   – Pin 10
RST  – Pin 11
SCE  – Pin 12
LED  – 5V

Henning Karlsen has created a library for Nokia5110 LCD. Examples are also included in this library.

For more detail: HSM-20G temperature & humidity analog sensor + Nokia5110 LCD