Enable Temperature and Humidity Analysis with a Humidity Sensor Circuit Design
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 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 theatres 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 theatres, 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:
Choosing the Right Sensor: Humidity sensors are 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 sensors.
Determine the range of humidity you need to measure.
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.
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.
Meaningful graphs generated from values acquired by the data logger.
Calibration: All humidity sensors experience 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.
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. It’s also important to maintain separate ground planes for both analog and digital .
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 sensors use a protocol like I2C to acquire the value. In that case, ensure the signals are routed in parallel. Professional PCB design software like Altium’s CircuitStudio® can help you optimize your layout.
Ready to start your own humidity data logger design? Get valuable tips from an expert at Altium.