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.HSM-20G temperature & humidity analog sensor  Nokia5110 LCD

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:
Temperature in C = 281.583*1.0230^(1.0/R)*R^-0.1227 -150.6614HSM-20G temperature & humidity analog sensor  Nokia5110 LCD SchematicNext 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

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top