Summary of HSM-20G temperature & humidity analog sensor + Nokia5110 LCD
This article details a hobbyist project interfacing an HSM-20G analog temperature and humidity sensor with an Arduino, displaying data on a Nokia 5110 LCD. Unlike the digital DHT11, the HSM-20G outputs voltage and resistance values requiring curve fitting equations for conversion. The setup connects the sensor to the microcontroller and uses a specific SPI library to drive the low-power display screen.
Parts used in the HSM-20G Temperature and Humidity Monitor:
- HSM-20G analog temperature and humidity sensor
- Arduino microcontroller
- Nokia 5110 LCD
- Nokia 5110 LCD PCB
- SPI interface library by Henning Karlsen
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.6614
Next 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
- How does the HSM-20G differ from the DHT series?
The HSM-20G is an analog sensor that converts ambient parameters to voltage outputs, whereas the DHT series are digital sensors. - What type of component measures temperature inside the HSM-20G?
A thermistor is built inside the sensor rather than a semiconductor for measuring temperature. - Why is software needed to process the HSM-20G data?
The output plots are not linear but have a curve-like nature, requiring software like Matlab to generate conversion equations. - What equation calculates relative humidity from voltage?
The formula provided is RH=31*volts-12. - Which pins connect the Nokia 5110 to the Arduino?
The control lines connect SCLK to Pin 8, DN to Pin 9, DC to Pin 10, RST to Pin 11, and SCE to Pin 12. - How is the LED pin powered on the Nokia 5110 setup?
The LED pin is connected directly to 5V. - Who created the library used for the Nokia 5110 LCD?
Henning Karlsen created the library which includes examples for the Nokia 5110 LCD. - What interface does the Nokia 5110 LCD use?
The Nokia 5110 LCD has a SPI interface with 5 control lines.
