Skip to content
Step by Step Internet 🌐 Guides for learning to surf the Net

What is and how to use the Arduino humidity sensor? step by step guide

UPDATED ✅ Do you want to know about Arduino humidity sensors and how to use them? ⭐ ENTER HERE ⭐ and Learn Everything ✅ FROM ZERO ✅

Currently, as far as the maker world is concerned, Arduino is one of the main drivers of this movement representing the culture diy globally. Since it is a hardware and software development company that offers numerous alternatives for develop projects of interest based on your different board models and your IDE.

This is why, today, more and more people are joining the extensive Arduino community who share numerous ideas, from the simplest to the most advanced. Taking into account that, with everything that Arduino offers, the only limit is your imagination and your desire to learn to start any project of electronics, mechanics, robotics, home automation, etc..

However, among the most important components to carry out these projects, is the famous Arduino humidity sensor that offers the possibility of making small prototypes with absolute quality. But, at this moment, many users are unaware what is it for and how is it usedso we will explain this information and more, below.

What is a humidity sensor and what are they for on Arduino boards?

In general terms, humidity sensors can be defined as those devices that they are able to measure the relative humidity or the level of liquid in a certain area. Thanks to that, they are ideal for tirelessly controlling air humidity and temperature. In general, the magnitudes computed by these sensors are converted into an electronic signal to simplify said measurement.

Now, in the different models of plates of Arduino, humidity sensors are responsible for calculate the humidity of the soil by the variation of its conductivity. In this way, they are applied to be able to detect the level of liquid contained in a tank and even, used in irrigation systems to control them in order to detect when the plants need watering and when not, for example.

What are the main uses of humidity sensors?

What are the main uses of humidity sensors?

While it is true, above, we provided you an appetizer of the usefulness that humidity sensors reveal at an integral level and thus, the different projects that they can facilitate. However, it is important to detail the main uses of these devicesin order to emphasize its importance when implementing ideas based on Arduino with these sensors.

Consequently, through this section of the post, we want to let you know the most important functions that humidity sensors have:

  • They are especially useful in humidity-adjustable mechanical ventilation systemsthanks to the fact that they manage to regulate the flow of renewed air depending on the ambient humidity.
  • Allow measure moisture in various materials. Such as: cement, coal, cereals, rice, plastic granules, biomass, coating masses, among others.
  • These sensors are essential for retain moisture in particular areasin order to meet certain specific objectives.
  • They provide the necessary features to build small prototypes with the help of the different plate models Arduino.
  • Help to control liquid level in production systems to ensure optimal operation.
  • They have the ability to domotize the homemaking use of some centralized control device.
  • They are also sensors that allow ensure the timely operation of air conditioning, heating and ventilation systemsboth privately and industrially.

Learn step by step how to use an Arduino humidity sensor from scratch

Before connecting a humidity sensor to Arduino, It is important to take into account some considerations. In view of that, some boards can present problems if they are powered by an inappropriate battery because they cannot supply the necessary voltage.

Thus, among these considerations, the most relevant refer to:

  • It is essential to make use of a specific resistor depending on the length of the cable to be used. For example, if you want to use a cable of up to 20 meters, it is advisable to use a 5 K Ohm pull-up resistor. So if you connect a larger cable, the pull-up resistor will have to be proportional to it.
  • The voltage with which the humidity sensor will be powered, must have an appropriate power cord so as not to cause a malfunction due to voltage drops.
  • So, for example, if it is fed with 3.5V, said cable must not exceed the 20 centimeters.
  • When taking action, it is recommended to do it every 5 seconds. Since, if a shorter or exaggeratedly longer period is taken into account, the data obtained will not be accurate.

Next, it is time to carry out the sensor connection through its output which is a 0 to 4.2v, as usual. Which allows the information it provides to be read as an analog signal. Taking into account that, to connect it, simply you must make use of one of the inputs of the Arduino board at the bottom.

Just as we show you in the image that we present here as an example:

Learn step by step how to use an Arduino humidity sensor from scratch

Apart from that, you must have at hand the code of the project to be carried out with the humidity sensorto insert it into the Arduino-IDE. This, initializing the serial port to see the result provided by the Arduino serial console that allows you to observe it in a quick way. In this case, use the function “start” to initiate communication with the serial monitor and use the function “print” to write each line.

Next, when you upload the code to the Arduino board in question, it is possible to see the serial monitor via the keyboard shortcut “Ctrl + Shift + M” or accessing “Tools/Serial Monitor”. After that, it is time to read the value of the analog port (generally, it fluctuates between 0 to 1024 to 10 bits in analog reading) and through the output value table, it will be possible to determine the humidity of the area under study.

The best Arduino projects with humidity sensors that you can do yourself

To conclude, we believe it is of great interest to show and detail which are some of the main Arduino projects that have been implemented with the help of humidity sensors. Well, based on them, you will be able to undertake your own projects in the maker world and make the Arduino board of your choice very useful.

Therefore, below, we will mention 5 Arduino projects using humidity sensors:

an advanced gardener

an advanced gardener

It consists of a planter It has a built-in microcontroller Arduino that runs inside the garden and exhibits the ability to watering plants whenever they need it (when they are thirsty) and even, manages to turn on some artificial lights that fulfill the function of natural sunlight. Additionally, it can also alert the owner if the temperature drops below a healthy level for plant life.

Thus, it refers to a self-contained garden system based on a plate Arduino that operates with several sensors, among which is the humidity sensor and these make use of a thermistor (for temperature), a cheap photocell (for light) and a couple of galvanized nails (for humidity).

By means of which, users should not worry for not complying with the regular schedule to water the plants and expose them to light when required. Taking into account that it is a project that is economical, given that does not require more than 150 euros and thus, it controls the humidity, the temperature and the light that the planter receives automatically.

On the other hand, to start with this project, you must have the microcontroller at hand and proceed to plant your garden as is done conventionally. Subsequently, make the humidity sensors and connect them to the Arduino board to proceed to upload the sensor test code. Next, it is time to link the light and temperature sensor to connect the corresponding relays in the power cables and attach an LED to the Arduino. Finally, configure the irrigation and lighting system.

virtual pool monitor

virtual pool monitor

This is a project that facilitates the control of the state of a swimming pool When calculating the pH and temperature of the water in this. Since it is a pool monitor that stays connected by measuring the quality of the water and exporting the data in real time for send wireless updates to users. That way, people will know when to add pool chemicals.

Luckily, this project made with the help of the humidity sensor in Arduino eliminates the need to use test strips or even guess when the pool water is clean or not.

For this, the virtual pool monitor must make use of the following components or materials:

  • a sensor of humidity.
  • a temperature sensor Permanently.
  • a pH probe and an ORP probe.
  • An Arduino microcontroller which is the core of the system.
  • an LCD screen showing the current status of the water quality.
  • A local web servera WiFi or a Bluetooth to send wireless updates to the user.

Automated urban garden

Automated urban garden

It refers to a project similar to that of the advanced planter, given that, takes care of watering the plants of an urban garden automatically by collecting data from it to know when it is appropriate to do so in order to maintain your healthy life. Thanks to this information, you will be able to maintain a garden with less dedication and in the most appropriate way possible. For which, mainly, an Arduino board is needed to control the entire system.

For its part, this urban garden also requires multiple soil moisture sensors that help control the state of the gardens at all times. Thanks to the fact that they have the ability to compute the conductivity from the soil matrix, taking into account different environmental factors (temperature, dissolved solids in the water and soil pH). Through these sensors, the analog inputs of the Arduino They will detect the drop in voltage in order to know the status of the orchard and water it as long as necessary..

A meter of environmental conditions

A meter of environmental conditions

Starting from an idea to be able to measure environmental conditions, this project was created based on a circuit that focuses on computing humidity, temperature, barometric pressure, luminosity, and relative height. In that sense, the meter shows the data collected through an LCD screen in real time so that each person knows the conditions of the environment that surrounds him at a given instant.

In this way, the environmental conditions meter emerges as the prototype of a series of projects based on census data through environmental conditions so that people can handle the information provided with great utility.

Now, in order to carry out this idea, several materials are required, such as:

  • An Arduino Nano board.
  • a sensor temperature DHT22.
  • a sensor of quality moisture.
  • a sensor barometric pressure gauge BMP180.
  • a photoresistor LDR.
  • A battery of 9 volts.
  • a potentiometer of 10K.
  • A plate Universal perforated.
  • two resistors of 10K.
  • an LCD screen 16×2.

Weather Station

Weather Station

with a plate ArduinoNano that is based on the ATmega328 microcontrollerusers can develop this project that is a device that achieves display humidity, temperature, air pressure, UV index, amount of rain, wind behavior and time in the form of a weather station that is completely eye-catching. This being one of the projects Arduino linked to the most important environment.

Mainly, to specify said device, LCD screen required that shows the different data obtained, as well as one HH10D humidity sensor (consisting of a capacitive sensor, a capacitive CMOS converter and an internal EEPROM), a Bmp180 atmospheric pressure and temperature sensor (to calculate atmospheric pressure and temperature)

Also a bluetooth (HC-06) and other additional electrical components that connect to the board in order to obtain a high quality result. Added to this, in terms of software, it is necessary to make use of the Arduino IDE, Inventor 2 Android Mobile App, and Notepad++ which is a programming-oriented text editor.

Hardware