Ventilation controller - multiple DHT22's - is this doable?

Positive pressure fan controller

My aims (in order of priority):

  1. Tell a 240V fan to turn on and draw outside (less humid) air to basement and turn off if the outside air is more humid than the basement
  2. To be able to change the speed of the fan depending on the level of humidity
  3. To be able to view and adjust logic parameters on my Android phone

Inputs

  1. User override (off/vary speed)
  2. Outside humidity & temperature
  3. Room humidity & temperature

Output

  1. to control the potentiometer (that comes with fan) on a 240V AC fan – either ‘off’ or 25-100% of power
  2. wirelessly display inputs & output on Android app
  3. wirelessly control output & logic on Android app

Logic

  1. If outside humidity > room humidity = fan off
  2. If outside temp > 1.5x higher than room temp = fan off
  3. If room humidity >80% + outside humidity < room humidity = fan 100%
  4. If room humidity >50% <80% + outside humidity < room humidity = fan 25% to 99%
  5. If room humidity <50% + outside humidity < room humidity = fan 25%
  6. If time = 14:00 to 20:00 = fan 25% (or fan off (depends on other logic state))

Is this doable?

Do I just need (for the very basic 'control only' system):
1 x Arduino board (which one!?)
2 x DHT22 sensors
1 x electronic potentiometer
1 x power supply

Will the logic work? Can this be easily programed?

Is there a way to use my Android handset to control it (change the logic parameters) via Wi-Fi?

Is there a way to log the inputs/outputs to a networked PC?

Can I add other sensors to monitor other rooms or use for extra logic inputs?

Basically I can solder, and that’s about all I have in terms of skill…

thanks!

I think it is all doable, it is essentially just fan speed controlled by humidity. I think it is simpler, and a lot cheaper to use bluetooth between Android and Arduino, but I'm sure it is possible with WiFi.

It is quite feasible to log to a network PC.

The DHT22 uses a proprietary one-wire bus, hence you can use a swag of them on one pin.

I would suggest a Mega for this job. More than just for reading the sensors, it has sufficient memory to handle the things you will probably want to add, but haven't thought of yet.

OK thanks!

the only reason I was thinking Wi-Fi controller is so that it could lo the data to a PC.

but I guess logging data is "stage 3" right, I need to get to stage 1 first (having control of the fan) then stage 2 (controlling the controller with android app)

btw - this is the controller for the fan:

http://eng.blaubergventilatoren.de/files/downloads/CDTЕ-E1-8-en.pdf

it says it is a thyristor based controller - so I am assuming it just has a nice little potentiometer under that dial that I can removed and connect the output of the electronic potentiometer... once I remove the pot, I will be able to measure the resistance of it and work out its range etc?

I also seem to be reading I could use a PWM output to replicate the potentiometers range? is that possible?

but anyway - to start off with I need:

Mega + 2 sensors + 5V power supply + electronic pot??

the thing I am most daunted by is actually writing the program to control it?

I guess I will just grab the above parts, and jump in and try to swim?

The DHT22 uses a proprietary one-wire bus, hence you can use a swag of them on one pin.

Not true! It is a kind of one wire bus but those sensors don't have IDs, like Dallas chips, so you can't have more than one on a single line. To connect more of those to arduino ( or any other micro..) you have to use separate pins .

But that won't be a problem will it?

But that won't be a problem will it?

No :slight_smile: If you use DHT library, you just have to remember to create two instnces od DHT object and assign separate pins to each one. If you'll have trouble with this, I can help .

humidity is not relevant.

look up enthalpy.

find and learn about a psychrometric table.

if it is 72 degrees outside and 50% humidity,
and your basement is 50 degrees and you bring in the outside air.
that outside air will cool and at 50 degrees, will be below the dew point and the water will condense.

since humidity is relative, 72/50 converted is 50/100%

what you want to do is very possible, but you will need to calculate the humidity at the new temperature.
if you calculate enthalpy of both air streams, you will find your answer.

waski:

The DHT22 uses a proprietary one-wire bus, hence you can use a swag of them on one pin.

Not true! It is a kind of one wire bus but those sensors don't have IDs, like Dallas chips, so you can't have more than one on a single line.

Oh Boy, that sounds just like the one wire bus everybody needs. Never mind, if you use a Mega, I guess you will have room for about forty.

dave-in-nj:
if it is 72 degrees outside and 50% humidity,
and your basement is 50 degrees and you bring in the outside air.
that outside air will cool and at 50 degrees, will be below the dew point and the water will condense.

Oh ok! This system is to reduce conditions conducive to mold growth so more water in the room would be a disaster!

So arduino would be able to measure both temp & humidity then calculate the dew point and then decide the fan speed?

Seems I also need a pressure sensor too? Would that be right?

Also is the dht22 accurate enough?

These psychrometric equations look complicated and a poor input value could lead to big output errors?

What is the best sensor/s to look for?

My hand held humidity reader has relative humidity, wet bulb and dew point function, should I find out what sensor it uses?

I would think that any sensor you have will have some tolerance. just stay outside of the tolerance envelope. (if it says withing 2% RH, then make sure you stay at least 2% away.

if you consider that your basement will be within a certain range and the outside air is also within a range, you can start by just picking a couple of ranges. pressure is not a major consideration as you are not in a high pressure duct or a lower pressure duct.

you might be able to create a simple table. look at the psychometric table. the curved bands are humidity, the vertical are temperature and you slide horizontally to the lower temperature.

you could assign values to your OA and just compare to your basement.

dave-in-nj:
I would think that any sensor you have will have some tolerance. just stay outside of the tolerance envelope. (if it says withing 2% RH, then make sure you stay at least 2% away.

OK, makes sense! and therefore sensor accuracy is not too much of a deal with this application.

if you consider that your basement will be within a certain range and the outside air is also within a range, you can start by just picking a couple of ranges.

yeah, I have been logging both zones (only RH & dry temperature), and the basement is 60'F to 70'F and humidity it goes from 75% to 99%

outside has a much larger range (generally warmer and less humid) but is season & weather dependent. but generally the only time the outside air has higher RH is during rain periods.

pressure is not a major consideration as you are not in a high pressure duct or a lower pressure duct.

great, one less thing to worry about!

you might be able to create a simple table. look at the psychometric table. the curved bands are humidity, the vertical are temperature and you slide horizontally to the lower temperature.

yeah, it seems to be a small region on the table, so that's a good thing

you could assign values to your OA and just compare to your basement.

I'm sorry, what is an OA?

thanks so much for your input everyone :slight_smile:

OA- outside air
RA - return air
EA exhaust air

OK, just plugged in my Mega and loaded it all up...

and i was like - really? this is what i was worried about?

so exciting, such a relief that it seems so much less frightening that it felt!!!

(but lets see how i feel after i plug some sensors in and start REALLY programing...)

Ok, just wondering if the fan motor is a "brushed AC capacitor run motor" will this be ok to control with the Mega?

OK, the basic duct and fan system is coming together coming together, but not yet got to the programming bit.

  1. for the Mega to turn the fan on and off according to time of day and day of week, do I need to add anything hardware-wise? or is the Mega capable of doing this with code?

  2. can I run one of the DHT22's on a 10m cable? does it need to be shielded?

  3. will I be able to control 2 fans with different parameters from the one set of environmental readings supplied by the DHT22's? so one fan reacts differently to changes compared to the other fan?

thanks!

You are likely to need a real time clock module, if you don't already have one. The Time and Time alarms libraries are likely to be what you need. I recall they are a pair of libraries that work together.

Wareemba:

  1. for the Mega to turn the fan on and off according to time of day and day of week, do I need to add anything hardware-wise? or is the Mega capable of doing this with code?

Wareemba:
yeah, I have been logging both zones (only RH & dry temperature), and the basement is 60'F to 70'F and humidity it goes from 75% to 99%

outside has a much larger range (generally warmer and less humid) but is season & weather dependent. but generally the only time the outside air has higher RH is during rain periods.

RH doesn't matter at all if you want to find out which air carries more water in it.

Just the calculated "dew point" ("saturation temperature") is relevant.

That air, that has the lower "dew point" temperature, carries less moisture with it.

jurs:
RH doesn't matter at all if you want to find out which air carries more water in it.

Just the calculated "dew point" ("saturation temperature") is relevant.

That air, that has the lower "dew point" temperature, carries less moisture with it.

thanks!

after the previous reply from dave-in-nj I have done more research and you are 100% correct!

I found that the full formula for converting RH & T readings to Td is:

Td = 243.04*(LN(RH/100)+((17.625T)/(243.04+T))) / (17.625-LN(RH/100)-((17.625T)/(243.04+T)))

can Arduino do this?

regardless - i actually have found a rough Td "approximation" that is apparently suited to >50% RH (my case) that is simpler:

Td = T - (100 - RH)/5

so i ask Arduino to:

get Ta and RHa from DHT22a and convert to Tda (basement dew point)

then

get Tb and RHb from DHT22b and convert to Tdb (outside dew point)

and if Tda > Tdb then switch fan on (with >10'C difference = 100% and <1'C difference = 20% fan)

I've also discovered that the potentiometer in the TRIAC speed controller that I want to control is a 500k seemingly logarithmic one, where 0 ohm is fastest speed and 500k is slowest speed...

I can just convert this 0-500000 range to a 0-255 range (is this right?) in the code can't I?

thanks - please correct my misunderstandings!

(plus - I've just received my DHT22's so will start breadboarding soon!)

Nick_Pyner:
You are likely to need a real time clock module, if you don't already have one. The Time and Time alarms libraries are likely to be what you need. I recall they are a pair of libraries that work together.

thanks Nick - yep, starting from 100% scratch, so I will get a RTC module...

found some for $3 on eBay, but 20 bucks on 'real' sites?

as a small difference in timing accuracy could cost us real dollars, how much should i worry about the RTC quality?