Enable Temperature and Humidity Analysis with a Humidity Sensor Circuit Design

Created: March 20, 2018
Updated: October 16, 2020
Cloud with routing droplets moving upward logo

Living in a country with temperature averages of 35°C all year long, I have excellent heat tolerance. It’s the humidity that gets me all hot and bothered. I come from a small and peaceful town at the base of a hill. It sounds nice but is arguably the most humid town in the whole country.

I remember showering at least fives times per day, unable to stand the high concentration of water vapor in the air. When I wasn’t drowning out the heat, I was trapped in my air-conditioned room. Knowing the exact amount of humidity wasn’t relevant to me, in this case. However, in many industries, humidity data acquisition and control is critical for operation.

The Importance of Humidity Data Logging

Humidity is the amount of water vapor content in the air. A expression used in measuring the parameter is relative humidity, which is expressed in RH or %. Humidity control is critical in industries like pharmaceutical, foods, and paper. A resistive humidity sensor can help when working on this. A high concentration of water vapor in the air can seriously affect vital processes.

Two of my early humidity data logging projects involved food packaging and operating theaters at hospitals. In food packaging, high humidity increases the risk of microorganism growth and contamination, which poses a direct health risk to consumers. In operating theaters, relative humidity has to be regulated at around 60% to prevent exposed tissues from drying.

A humidity data logger helps in alerting operational personnel of any anomalies in the regulated humidity. Besides that, the availability of historical data allows for a professional audit to be performed as required.

How to Design a Humidity Data Logger

Designing a humidity data logger isn’t too complicated. However, you still need to get it right to ensure accuracy and long-term storage capability. Here are some important considerations:

  1. Choosing the Right Sensor: A humidity sensor (different than a temperature sensor) is available in many shapes and types. You’ll need to select the right humidity sensor to measure the required range of humidity. Depending on the nature of your applications, you may need to select a humidity sensor with high accuracy. The method of acquiring the humidity value may differ between the sensor.

Humidity sensor
Determine the range of humidity you need to measure.

  1. Microcontroller, Memory, and RTC: Unless it involves heavy data processing, an 8-bit microcontroller will suffice for a humidity data logger design. It needs to have the required analog or digital port to receive the incoming humidity value from the sensor. When designing a humidity data logger, you need to get the right non-volatile memory like Flash or FRAM to store the humidity value readings. The size of the non-volatile memory is defined by the number of records that need to be safely stored in the datalogger. A timestamp is normally required, which calls for a Real Time Clock to be included in the design as well.

  2. Data Retrieval: To enable graphical visualization of the humidity values, the stored records need to be transferred to a computer. This often called for communication interfaces like RS232 or USB to be integrated to the humidity data logger. A data retrieval module needs to be implemented in the firmware to facilitate the data transfer.

Using an iPad to record data from instruments anywhere
Meaningful graphs generated from values acquired by the data logger.

  1. Calibration: Every humidity sensor experiences drift over a period of time. This is why it’s important to include a calibration function to offset the value acquired by the sensor. It saves you from having to replace the humidity sensor regularly.

  2. Power Options: Depending on the applications, you can either power the humidity data logger with a switching power supply or a battery. If it’s designed for a handheld application, the battery capacity needs to be sufficient for the duration of usage in the field.

Optimal PCB Layout for a Humidity Data Logger

best design practices apply for a humidity data logger PCB layout. If you’re using an analog humidity sensor, you need to ensure that the track connecting the output of the sensor to the microcontroller is protected from any high-speed signals. Both the microcontroller and humidity sensor require stable voltage to function optimally. It helps to place bypass capacitors near the positive supply pins of both components. Some humidity sensor protocols use I2C to acquire the value. In that case, ensure the signals are routed in parallel.

When you need the best layout tools for humidity sensors and other components, look to the complete set of PCB design features in Altium Designer®. As you build your design and place connectors for peripherals, you'll have the routing features you need to move signals between components and implement your needed functionality. When you’ve finished your design, and you want to release files to your manufacturer, the Altium 365 platform makes it easy to collaborate and share your projects.

We have only scratched the surface of what’s possible with Altium Designer on Altium 365. Start your free trial of Altium Designer + Altium 365 today.

most recent articles

Back to Home