Images are loading.
Please wait.
[Esc] Exit
[Esc] Exit

Dew point ventilation controller


  1. 1 The story
  2. 2 The installation
  3. 3 The controller: hardware
  4. 4 The controller: software
  5. 5 Results: sensor data
  6. 6 Building your own ventilation system

1 The sto­ry

We live in a house with a very damp base­ment. As a re­sult, items that we stored were rust­ing or mold­ing. A de­hu­mid­i­fi­er did not prove very ef­fec­tive but con­sumed a lot of en­er­gy (about 500W, or 3kWh ev­ery night)—not very en­vi­ron­men­tal­ly friend­ly. To solve this prob­lem, I built a dew point ven­ti­la­tion con­troller, which sys­tem­at­i­cal­ly ven­ti­lates the base­ment when the air out­doors is dri­er than in­side.

A hy­grom­e­ter nor­mal­ly dis­plays the rel­a­tive hu­mid­i­ty of the sur­round­ing air. How­ev­er, since the amount of wa­ter va­por that air can hold varies great­ly with tem­per­a­ture, the rel­e­vant pa­ram­e­ter is the ab­so­lute hu­mid­i­ty of the air. This phys­i­cal quan­ti­ty has the unit kg/m³ (a typ­i­cal mag­ni­tude would be 10 g wa­ter in 1 m³ air), but it can also con­ve­nient­ly be ex­pressed by a tem­per­a­ture: the dew point. The wa­ter va­por in air with a giv­en dew point will start to con­dense when the air is cooled down to the dew point tem­per­a­ture.

The con­troller is in essence a sim­ple reg­u­lat­ing de­vice: when the dew point out­side is low­er than in­side, a fan is pow­ered which brings fresh air in­to the base­ment. Oth­er­wise, the base­ment is kept iso­lat­ed from the hu­mid air out­side. There are a few oth­er as­pects (eg. the base­ment should not cool down too much in win­ter, even though freez­ing air is won­der­ful­ly dry) which are de­tailed be­low, but the ba­sic mech­a­nism is very sim­ple: when a room is ven­ti­lat­ed at the right times, this will de­hu­mid­i­fy the air ef­fec­tive­ly.

Some of the con­troller's de­ci­sions might seem coun­ter­in­tu­itive at first. A rainy night in fall might feel very moist—and in­deed, rel­a­tive hu­mid­i­ty might be close to 100%—but the out­side tem­per­a­ture is of­ten low enough so that the out­side dew point is be­low the in­side dew point and ven­ti­la­tion is ben­e­fi­cial. On the oth­er hand, the out­side dew point in sum­mer of­ten re­mains high for many days, even if the heat makes peo­ple feel dry, so the right thing to do is in fact to keep the base­ment win­dows com­plete­ly shut dur­ing such a pe­ri­od. Since our per­cep­tion of hu­mid­i­ty does not cor­re­late well with the ab­so­lute quan­ti­ty, it is best to let the con­troller de­cide based on the phys­i­cal mea­sure­ments.

I built the con­troller based on a Rasp­ber­ry Pi mi­cro­com­put­er. Be­low, I de­scribe all com­po­nents, par­tic­u­lar­ly with re­gard to mak­ing the sys­tem re­pro­ducible. Since this in an en­er­gy-sav­ing so­lu­tion, I en­cour­age ev­ery­one with a sim­i­lar prob­lem to con­sid­er this op­tion. There are also com­mer­cial prod­ucts avail­able. In case you want to build your own ven­ti­la­tion sys­tem, let me know if you need more in­for­ma­tion about a spe­cif­ic top­ic.

At last, many thanks to our land­lords, who trust­ed in the project, paid for the hard­ware, and sup­port­ed the mod­i­fi­ca­tions to their prop­er­ty. It was not clear whether the sys­tem would work be­fore two walls were drilled through for the air ducts and ev­ery­thing was in op­er­a­tion. Hence, thanks for the faith and for tak­ing this risk! As it turned out, the sys­tem works quite ef­fec­tive­ly: see the da­ta plots.

2 The in­stal­la­tion

The full ven­ti­la­tion sys­tem con­sists of the fol­low­ing items:

The sit­u­a­tion

Floor plan
(Click to en­large.)

This is a floor plan of our base­ment. The to­tal area is about 55 m². There are three rooms to be de­hu­mid­i­fied (“Room 1”, “Room 2”, “Laun­dry”). In or­der to min­i­mize ef­fort, one sin­gle fan is in­stalled in the laun­dry, which draws air from two rooms via an air duct. The air en­ters in the third room (Room 1) through the win­dow so that fresh air is rout­ed through all three rooms and the cor­ri­dor.

The con­troller

Control unit

The con­troller is built around a Rasp­ber­ry Pi. The case con­tains the pow­er sup­ply, the com­put­er, a small dis­play, re­lays for the fan and win­dow mo­tor, and but­tons for us­er con­trol. Since the Rasp­ber­ry Pi has suit­able in­put/out­put ports, lit­tle ad­di­tion­al cir­cuit­ry is need­ed—most­ly wiring.

The sen­sors

The hu­mid­i­ty sen­sors are two high-pre­ci­sion sen­sors SHT75 from Sen­siri­on. One sen­sor is mount­ed in­doors in the laun­dry, and the oth­er out­doors on the north face of the build­ing close to the air in­take.

Naked temperature/humidity sensor

Each sen­sor is en­cased in a sin­ter fil­ter against dust:

Sensor with sinter filter

The unit is then mount­ed in a plas­tic case with holes to pro­tect the sen­sors from rain and me­chan­i­cal dam­age:

Indoor sensor

Here is the mount­ed out­door sen­sor:

Outdoor sensor

The fan

There is a sin­gle fan which moves all air. In or­der to vent the en­tire base­ment, the fan draws air both from the laun­dry and through an air duct from the ad­ja­cent stor­age room. The fan is a Vor­tice Li­neo 150 V0. The pho­to be­low shows the in­stal­la­tion in the laun­dry.

Laundry panorama

Be­low is a close­up of the fan with the laun­dry in­let. The aper­ture of the in­let valve can—in prin­ci­ple—be ad­just­ed to dis­trib­ute the air flow even­ly be­tween the two in­lets. Since I do not have any means to mea­sure air flow ex­act­ly, the valve is left wide open since there is an ad­equate air stream at both in­lets in this con­fig­u­ra­tion.

Fan and laundry inlet

Air duct

There is a sin­gle, straight air duct across two rooms to out­side. The di­am­e­ter is 150 mm. See the pic­tures above for the part in the laun­dry. The hole in the wall was cut with a core drill. We had this step done by a ma­son. For the ad­ven­tur­ous, core drills can also be rent­ed (eg. at Bauhaus in Switzer­land and Ger­many). The open­ing in the stor­age room is pro­tect­ed with a piece of wire fence.

Storage room inlet


The laun­dry also got a new wall open­ing to out­side. Here, we have an out­let with shut­ter to pre­vent wind from blow­ing in­to the base­ment and an­i­mals from en­ter­ing when the fan is off. (There is also a check valve in­side the tube be­tween fan and out­let to seal the open­ing even bet­ter. I am not sure whether it is nec­es­sary.)



The win­dow in the third base­ment room serves as the in­take. I back­fit­ted a mo­tor to open and close it au­to­mat­i­cal­ly.

Motorized window

The pic­ture be­low shows a close­up of the mo­tor when the win­dow is open. The mo­tor is a Min­gar­di Lin­ea Mi­cro KIT. Im­por­tant cri­te­ria were that it works with nar­row win­dows (note the piv­ot­ed mount­ing to ac­com­mo­date the win­dow's small tilt­ing ra­dius) and has ad­justable stroke so that it does not dam­age the win­dow frame. Oth­er fac­tors like noise, de­sign or size of the mo­tor were unim­por­tant for a base­ment win­dow.

Window motor

The in­take win­dow is on the north face of the build­ing. The out­door sen­sor is mount­ed in prox­im­i­ty to the in­take, some­what above the ground, and par­tial­ly shel­tered from rain by the eaves of the neigh­bor­ing house. I in­stalled a wire mesh in front of the win­dow so that an­i­mals can­not en­ter the house or get trapped in the til­ted win­dow.

North face of the building

Even though the sen­sor is on the north face, it re­ceived di­rect sun­light dur­ing morn­ing hours in sum­mer, which heated the sen­sor up and dis­torted the mea­sure­ments. I la­ter added an ex­tra hous­ing made of high pres­sure lami­nate (HPL) to al­ways keep the sen­sor in the shad­ow.

Sensor housing Sensor housing, bottom view

Ra­dio clock re­ceiv­er

I also in­stalled a DCF77 time sig­nal re­ceiv­er. This part is op­tion­al since the con­troller in its cur­rent set­ting does not need to know the time of the day for prop­er func­tion. I use the time sig­nal on­ly for cor­rect log­ging time­stamps, even with­out net­work con­nec­tiv­i­ty. The re­ceiv­er is from Con­rad Elec­tron­ics.

Radio clock receiver

Net­work con­nec­tiv­i­ty

Even though the con­troller is de­signed to work as a self-suf­fi­cient unit, the Rasp­ber­ry has a USB WLAN con­troller to pub­lish da­ta on­line. Real­time data was pub­lished un­til July 2019, when we moved out.

3 The con­troller: hard­ware

The heart of the con­troller is a Rasp­ber­ry Pi 1 Mod­el B+. It has a sin­gle core CPU, which is enough for the task at hand, and con­sumes slight­ly less pow­er than the quad-core mod­els. The Rasp­ber­ry Pi 3, which was re­leased af­ter I start­ed the project, has a built-in WLAN in­ter­face, thus would save the ex­tra USB WLAN in­ter­face.

The pow­er sup­ply is a small switch­ing pow­er sup­ply (5 V, 2 A). These mod­ules are sold for a few dol­lars at ebay and shipped from Hong Kong. An­oth­er part which is mass-pro­duced and sold via ebay is the re­lays mod­ule. The fan needs one re­lay, and the win­dow mo­tor two more (on/off and di­rec­tion: open/­close).

All com­po­nents fit on­to two Eu­ro­cards (ie., 160×100 mm cir­cuit boards) and are stacked in a wall-mount­ed plas­tic case. The rear board is re­served for the 230 V com­po­nents, while the front board con­tains the low-volt­age com­po­nents. Here is a pic­ture of the high-volt­age lay­er:

Controller: high voltage board

In front of this is the low-volt­age board with the Rasp­ber­ry Pi, a dis­play, and con­nec­tors for but­tons, the sen­sors and the ra­dio clock re­ceiv­er.

Controller: low voltage board

The dis­play is a small col­or LCD screen: SainS­mart 1.8 ST7735R TFT LCD Mod­ule. It does not have any screw holes or oth­er pro­vi­sions for mount­ing, so it is sim­ply held in place by its pin head­er.

Here is a pic­ture of the con­troller case from above in its fi­nal state, with all ca­bles in­stalled:

Controller: controls and cables

The rear row are the 230V ca­bles (pow­er, fan, win­dow mo­tor) and the front row the low-volt­age ca­bles (two sen­sors, DCF77 re­ceiv­er).

I plan to draw the cir­cuit plan when I have time and pub­lish it here.

4 The con­troller: soft­ware

The Rasp­ber­ry Pi runs Arch Lin­ux as its op­er­at­ing sys­tem. The con­troller soft­ware is en­tire­ly writ­ten in Python. Even though the soft­ware is writ­ten for this spe­cif­ic project, it has a com­plete­ly mod­u­lar struc­ture, so that it can be adapt­ed to oth­er projects. Each mod­ule has a sin­gle re­spon­si­bil­i­ty (eg. tak­ing mea­sure­ments, dis­play, log­ging, DCF77 time sig­nal, us­er con­trols, de­cid­ing when to vent, driv­ing the re­lays), so mod­ules can be mod­i­fied, moved or added eas­i­ly. The cen­tral in­stance is a “mes­sage board”, over which ev­ery mod­ule posts, sub­scribes to, and queries in­for­ma­tion.

The con­troller soft­ware is pub­lished on GitHub: dmuell­ner/­fan­con­trol. See there for fur­ther doc­u­men­ta­tion.

I also de­scribe a few de­tails of the set­up on a sep­a­rate page.


Hu­mid­i­ty mea­sure­ments are tak­en ev­ery 10 sec­onds. In gen­er­al, a Rasp­ber­ry Pi with a Lin­ux op­er­at­ing sys­tem does not pro­vide any straight­for­ward op­tions for real-time pro­to­cols at its GPIO (“gen­er­al pur­pose in­put/out­put”) ports. For­tu­nate­ly, the hu­mid­i­ty sen­sors can cope with a com­plete­ly ir­reg­u­lar clock sig­nal for their da­ta line. There­fore, the sen­sor com­mu­ni­ca­tion pro­to­col can be done in Python, and short paus­es in the rou­tines (due to mul­ti­thread­ing and oth­er fac­tors) do not dis­turb the trans­mis­sion. The on­ly “real-time” pro­to­col is the DCF77 sig­nal. How­ev­er, the sig­nal is a pulse-width mod­u­lat­ed sig­nal with a fre­quen­cy of 1 Hz (one pulse ev­ery sec­ond), so even with the re­stric­tions of a mul­ti­thread­ed Python pro­gram on a com­par­a­tive­ly slow CPU, this sig­nal is easy to process (and it does not mat­ter if we miss it once in a while).


I ex­per­i­ment­ed with a few al­go­rithms to get the best per­for­mance in all sea­sons. There are two as­pects to con­sid­er: First, ven­ti­la­tion should hap­pen when the out­side dew point is low­er than the in­side dew point. How­ev­er, we do not want to per­ma­nent­ly blow cold air in­to the house even if it is dry. The cur­rent rules are the fol­low­ing (slight­ly sim­pli­fied):

  1. If the out­side dew point is high­er than in­side, do not vent.
  2. Oth­er­wise, if the out­side tem­per­a­ture is at least 15 ℃, ven­ti­late per­ma­nent­ly.
  3. Oth­er­wise, ven­ti­late for 20 min­utes, then make a break de­pend­ing on out­side tem­per­a­ture: the cold­er it is, the longer the break.

5 Results: sensor data

Sensor data is available from April 2016 to July 2019. Check the graphs page for different days to see how the controller behaves over the seasons.

6 Build­ing your own ven­ti­la­tion sys­tem

To build such a sys­tem is more than just a week­end project. also, ev­ery house is dif­fer­ent, so my de­scrip­tion can on­ly pro­vide hints for an in­di­vid­u­al im­ple­men­ta­tion.

There are also com­mer­cial prod­uct avail­able:

Here are in­struc­tions for a simi­lar DIY project: ArDewpoint.


One as­pect for di­men­sion­ing a fan is ob­vi­ous­ly the flow rate. Note that the max­i­mum through­put (eg., 500 m³/h) is on­ly achieved if there is no flow re­sis­tance. If there is a pres­sure dif­fer­ence, the flow rate drops more or less quick­ly, de­pend­ing on the type of fan. The fan specs al­ways show these di­a­grams (flow rate de­pend­ing on pres­sure dif­fer­ence). The way to go here is to make up your mind what through­put you want, plan the air­ways, ask an ex­pert how much pres­sure dif­fer­ence is rough­ly to be ex­pect­ed and then di­men­sion the fan (and maybe air ducts) ac­cord­ing­ly.

If one fan can­not gen­er­ate enough pres­sure or enough air flow, think about a push-pull con­fig­u­ra­tion with fans at both the in­let and the ex­haust. In my case, I chose a fan which is mount­ed be­tween two seg­ments of the air duct and can gen­er­ate enough pull. There are also (weak­er) mod­els with­out air ducts which can be mount­ed ei­ther through a win­dow or in­side a wall open­ing. Mount­ing a fan through a win­dow means cut­ting cir­cu­lar holes in the glass panes and fix­ing the fan case there. How­ev­er, mod­ern win­dows may have a spe­cial in­su­lat­ing gas be­tween the win­dow panes which would be lost if the panes were cut, so check your win­dows if you con­sid­er this op­tion.


These are the ex­perts who helped me:


The next step in mak­ing the de­hu­mid­i­fi­ca­tion even more en­er­gy-ef­fi­cient is to add a heat ex­chang­er. In my sys­tem, an un­known amount of en­er­gy is lost since cold fresh air en­ters the base­ment and warm air from in­side is blown out with­out re­gain­ing its ther­mal en­er­gy. Heat ex­chang­ers are sold in all sizes and flow ca­pac­i­ties, so they could be suit­able even for small sys­tems. Here is an ex­am­ple of a small in­te­grat­ed sys­tem with heat ex­chang­er, eg. for bath­room ven­ti­la­tion: www.bay­ern­

T­wo small things could be im­proved about the con­troller hard­ware if I built it again:

Rasp­ber­ry set­up

Spe­cif­ic tips for set­ting up the soft­ware com­po­nents on a Rasp­ber­ry Pi with Arch Lin­ux are writ­ten down on a sep­a­rate page.