Humifand – Intelligent Cellar Air Condition

The Challenge

Most of my project are build in my private “Werkstatt” which is located in the cellar of an old building. Like most of the old buildings in Cologne, the cellar was build around 1900 without any attempt to isolate it. The consequence is typically a too high humidity, especially when it was raining for a few days.

The common solution (despite heating, which is not feasible) is air condition. But air conditioning cellars is very difficult. You are only allowed to blow it from the outside in, if the absolute humidity of the outside air is lower than the absolute humidity of the inside air. So just a fan makes it even worse.

The Solution

There are product available on the market, measuring inside and outside conditions and controlling fans accordingly. This is what you need, but there is a drawback: price. Most of these control units are around 500€-1000€ (without the fans and installation), which is a huge invest for a private “Werkstatt”.

The idea

Instead of buying a control unit the idea came up to build one. As I never found a project for a Raspberry PI I selected this device (a new B+ one) this time: inexpensive, powerful, easy to program and easily connectable to external hardware.

For measuring inside and outside conditions I selected the SHT15 sensors and used the Sparkfun breakout module to avoid SMD soldering (available via Watterott Electronic in DE). A cheap relay card from amazon and a (dismounted) 5V switching power supply were the remaining components.

The sensor without case First connection of PIUSV and Raspi

In order to make the PI more “outdoor” compatible, I equipped it with a USV module called PIUSV (http://www.piusv.de). The module invokes a graceful shutdown of the raspi when the power goes down and bridges this with a package of standard batteries.

The software

Of course in this project, the software does most of the trick. I created a linux daemon which uses the two sensors to measure inside and outside humidity and temperature and calculate from these values the absolute humidity (which is the value we need) and the dew point (just for fun).

It is highly configurable and allows you to specify maximum runtime per day for the fans, timeframes when fans are allowed and when not (Sunday in the night?). The values are stored into a RRD database to give you nice and fancy graphics about the environmental conditions, provided to you via a simple web interface. The box gives you a daily report per mail and notifies you about special conditions (such as power failures).

New Ajax style UI

In detail:

  • Mail notification with daily status
  • Extensive RRD database with monthly and daily statistics of humidity, temperature, dew point and absolute humidity
  • Fully configurable behavior (via config file)
    • Blocked time zones for fan running
    • Maximum run hours per day
    • Minimum inside temperature
    • Minimum outside temperature
    • Minimum inside relative humidity
    • Specify absolute humidity hysteresis (on / off threshold)

Here is an example config:

# -------------------------------------------------------------------
# --- general system options
# -------------------------------------------------------------------

log_file = /var/log/humifand.log
pid_file = /var/run/humifand.pid

# -------------------------------------------------------------------
# --- rrd database
# -------------------------------------------------------------------

rrd_file = /var/local/humifand/humifand.rrd

# -------------------------------------------------------------------
# --- fan control options
# -------------------------------------------------------------------

# minimal inside temperature. Stop fans if it gets below this value

min_inside_temp = 12

# minimal outside temperature. If it is more cold outside, do not start the fans 

min_outside_temp = 0

# this is the difference in g/m3 between outside and inside absolute humidity
# if a_humi_outside+humi_diff_on < a_humi_inside --> start fans
# if a_humi_outside+humi_diff_off > a_humi_inside --> start stop
# humi_diff_on - humi_diff_off is the hysteresis

humi_diff_on = 3
humi_diff_off = 2

# we will stop the fans if we get below this relative humidity (in %RH)

min_inside_rh = 55

# the maximum number of minutes the fan is allowed to run per day (example:2h). Duration is set to zero at midnight.

max_daily_fan_runtime = 120

# only if we are within one of these time spans, the fans will start (max: 5)

active_time_1 = 9:00-13:00;MoTuWeThFr
active_time_2 = 15:00-18:00;MoTuWeThFr
active_time_3 = 10:00-13:00;Sa
active_time_4 = 13:00-16:00;Sa

How to use / build

The software package is freely available for private usage (for commercial usage, please ask for a license) and can be downloaded here.

To install, please follow the instructions in the “README BUILD” file of the source code tree. The pin layout for the sensors and the relay cards is contained in the file “CONNECTIONS”.

Please be aware that the software is still in Beta stage, the “final” test is still in progress.

The installation

In used two axial fans ‘connected’ to the cellar windows. On blowing in and one blowing out. The fans are controlled by the raspi and create a circulating air stream efficiently exchanging the wet inside air with dry outside air. See the pictures for more details!

Does it work?

it works

In the picture above a typical case is depicted. As you can see the inside humidity is raising quite quickly (very heavy rain here in Cologne) as the walls of the cellar are not isolated. The issue begins right after the rain, as the outside humidity get lower fast, but because of a lack of air exchange, the inside humidity remains high. Without fans these level stays for days and weeks.

As you can see the situation changes dramatically when the fans start and force the air to be exchanged. The absolute humidity is coming down rather quickly. Please note, that the fans did stop because of a time duration rule (see config files above).

So yes, it works.

Picture Gallery