EcoRenovator  

Go Back   EcoRenovator > Improvements > Conservation
Advanced Search
 


Blog 60+ Home Energy Saving Tips Recent Posts


Reply
 
Thread Tools Display Modes
Old 02-22-13, 10:17 PM   #41
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
Default Revisiting the 'stalled fan' issue...

I've been doing more experimenting with the 'stalled fan' issue mentioned previously.

My current solution is to add an integer number to the PWM_Value, this way when the CO2 level drops, as when I'm away from the house, the fans will be kept just barely turning. In the unusual event that a gust of wind happened to be exactly enough to stop the fan, I wanted the fan to be able to restart, at a very low speed, even when CO2 values were at their minimum, which means that I need a PCM_value of 92 minimum, which translates to a minimum duty cycle of 36%.

The range of CO2 ppm that is conveyed by the sensor's analog value is:
0 volt = 0 ppm
4 volt = 2000 ppm

... and this will yield the following PWM_Value in my Teensy:
0 ppm = 0 PWM_Value
2000 ppm = 256 PWM_Value

So, I set up the ratio:

(300 ppm) / (2000 ppm) = (x PWM_Value) / (256 PWM_Value)

Therefore:

(x PWM_Value) = ((300 ppm) * (256 PWM_Value)) / (2000 ppm)

So: x PWM_Value = 53.6 (when ppm is 300)


But the fans have a minimum start-up threshold of 90 PCM_value, so:

90 - 38.4 = 53.6 (rounding up to 54)

I'll 'pad' my PCM_value by adding 54, as in the code below:


Code:
int CO2_ReadPin = 38;                    // initialize pin 38 for analog voltage in
int PWM_WritePin = 14;                   // initialize pin 14 for PWM
int CO2_Value;
int PWM_Value;
int DutyCycle;
int ppm;
 
void setup()   {                         // BEGIN SETUP
  pinMode(PWM_WritePin, OUTPUT);         // Make PWM_pin (AKA: pin 14) an output pin
  int CO2_Value = 0;                     // variable set to zero
  int PWM_Value = 0;                     // variable set to zero
  int DutyCycle = 0;                     // variable set to zero  
  int ppm = 0;                           // variable set to zero 
  Serial.begin(38400);                   // Initialize Serial Monitor
}                                        // END SETUP

void loop()               
{                                        // BEGIN LOOP
  CO2_Value = analogRead(CO2_ReadPin);   // read Teensy input pin 38
  unsigned int ppm = ((unsigned long)analogRead(CO2_ReadPin) * 2500)/1024;  // calc ppm
  Serial.print("CO2 level     = ");      // print ppm to serial monitor
  Serial.print(ppm); 
  Serial.println(" ppm");
  PWM_Value = CO2_Value/4;               // Scale CO2_Value (range = 1024) to PWM_Value (range = 256)
  analogWrite(PWM_WritePin, (PWM_Value + 54));  // Write PWM_Value to PWM_WritePin
  Serial.print("PWM_Value is  = ");      // print val to serial monitor
  Serial.println(PWM_Value + 54);
  DutyCycle = (100 * (PWM_Value + 54) / 256);   // Calculate DutyCycle
  Serial.print("PWM DutyCycle = ");      // Print DutyCycle to serial monitor
  Serial.print(DutyCycle);
  Serial.println("%");

  Serial.println();                      // print null line to serial monitor

  delay(1000);			         // delay 1 second before repeating loop
}                                        // END LOOP
So far, I have tested it out for several days, and no problem.

Best,

-AC

__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
Old 02-23-13, 01:06 PM   #42
natethebrown
Apprentice EcoRenovator
 
Join Date: Aug 2012
Location: North Alabama
Posts: 167
Thanks: 0
Thanked 40 Times in 20 Posts
Default

I see the range specified, but are you going to calibrate the sensor? I would assume you could just use welding CO2 if you decided to calibrate it, correct?
natethebrown is offline   Reply With Quote
Old 02-23-13, 11:52 PM   #43
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
Default

Quote:
Originally Posted by natethebrown View Post
I see the range specified, but are you going to calibrate the sensor? I would assume you could just use welding CO2 if you decided to calibrate it, correct?
For the last week or so, I've had my Teensy (Arduino clone) sensor & fan sitting on my desk, where I spend a fair amount of time. I have noticed that it behaves as I would expect it to. In the early morning, the CO2 level is low (around 400 ppm) and the fan is turning quite slowly. If I spend any time at my desk, the sensor will react to the CO2 'bubble' I am creating. Also, during the day, the longer I am in the room, the higher the CO2 level goes... it can get as high as 900+ ppm (fan is really kicking over then). If I leave the house for a while, it begins to drop, but doesn't get back to 400 ppm, unless I'm out for the evening.

I'm really not so concerned with calibrating, since I can easily use software to tweak the ventilation rate to suit. Right now, the PCM duty cycle is varying linearly with respect to the measured CO2 level. I realize that I may need to shape the curve (log, linear, exponential) if need be. The box I put it in and the friction characteristics of my HRV core will have a big influence on how I need to shape the curve.

I didn't think I mentioned this before, but I bought two pairs of fans, one pair is about 5" in diameter, 12 volts & 400 ma. The other is maybe 6+" in diameter, 24 volts, 750 ma. I'll just have to see which pair works out best.

But returning to your question about calibration, I currently have two CO2 sensor rigs that I am running, one is a commercial assembly, the other I built myself, using the Teensy, both use the Telaire 6004. They're located in different parts of the room, but I have found that if the air is constantly stirred (ceiling fan) the two read within 3% of each other.

I'm pretty satisfied with that.

Best,

-AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
Old 02-25-13, 10:49 AM   #44
natethebrown
Apprentice EcoRenovator
 
Join Date: Aug 2012
Location: North Alabama
Posts: 167
Thanks: 0
Thanked 40 Times in 20 Posts
Default

3% is really close. I didn't realize you had two different sensors, so that makes complete sense not to even bother with calibration.
natethebrown is offline   Reply With Quote
Old 02-25-13, 01:52 PM   #45
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
Default Searching for humidity sensor...

I've been searching for a reasonable humidity sensor, and there are quite a few available.

Seems that Honeywell has quite a few, and Sparkfun & Adafruit have them in stock.

It could be useful to be able to measure temperature and humidity with the same sensor (many of the sensors do this), but I have several 1-wire temperature sensors in my parts kit and I trust their performance, so combined sensors is not by itself a deal-maker.

Looking over the specifications, I see that almost all of the humidity sensors require 3.5 volts. There are cheap surface mount voltage regulators available, but it's just more to do.

I do have a combined humidity/temperature sensor (Sensiron SHT-15) see photo below:


This is a full size photo on my computer screen, hold a penny to your screen, see if it works on yours...

But this sensor is really awfully small, and to use it will require micro-surgery and some kind of breakout board. Even though I recall that there is an Arduino library for this chip, it's a bit discouraging, even though I have the part I need.

Sparkfun & Adafruit do have sensors already mounted on breakout boards, so that's a plus right there.

But then I came across this on Ebay...


It's still pretty small, but no microsurgery required. It has a tiny adapter board already attached with the required resistors, etc. and the pin-out is VCC (5V), Ground, and signal. The language was a bit mincing, as though it had been run through a Chinese meat grinder, but I have a suspicion that this is a 1-wire device and that both the temperature and humidity information are available on the center pin. Things will get simpler if that's the case.

So, (...drumroll...), I sent $6.64 to China to see if I'm right... I do realize that this is a big gamble, but I guess I'm just reckless that way.

Best,

-AC
Attached Thumbnails
Click image for larger version

Name:	humidity sensor.jpg
Views:	1046
Size:	6.1 KB
ID:	3043   Click image for larger version

Name:	two-humidity-sensors.jpg
Views:	1202
Size:	11.4 KB
ID:	3044  
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
Old 02-25-13, 04:19 PM   #46
kostas
Helper EcoRenovator
 
Join Date: Dec 2012
Location: Venice, Italy
Posts: 89
Thanks: 15
Thanked 41 Times in 19 Posts
Default

We just tested the DHT11 today, seems ok.
Here is a 2" cycle reading:

TEMP UMID
Requesting data...Got Data 20.70C 52.00%
Requesting data...Got Data 20.60C 51.90%
Requesting data...Got Data 20.70C 52.00%
Requesting data...Got Data 20.70C 52.00%
Requesting data...Got Data 20.60C 51.90%
Requesting data...Got Data 20.60C 51.90%

We'll gonna hook this up to a hot air solar panel soon to control the fans speed.
Stay tuned
kostas is offline   Reply With Quote
Old 02-25-13, 06:17 PM   #47
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
Default

Quote:
Originally Posted by kostas View Post
We just tested the DHT11 today, seems ok.
Here is a 2" cycle reading:

TEMP UMID
Requesting data...Got Data 20.70C 52.00%
Requesting data...Got Data 20.60C 51.90%
Requesting data...Got Data 20.70C 52.00%
Requesting data...Got Data 20.70C 52.00%
Requesting data...Got Data 20.60C 51.90%
Requesting data...Got Data 20.60C 51.90%

We'll gonna hook this up to a hot air solar panel soon to control the fans speed.
Stay tuned
Hey, this is really great news!

Do you have a schematic of your hook up?

Are you using an Arduino?

Wanna share your code?

I want to hear the details.

Best,

-AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
Old 02-26-13, 01:58 AM   #48
kostas
Helper EcoRenovator
 
Join Date: Dec 2012
Location: Venice, Italy
Posts: 89
Thanks: 15
Thanked 41 Times in 19 Posts
Default

I'll ask my buddy who's currently working on it as he doesn't speak English.
I my self know nothing about Arduino, all I can tell you for now is that we're trying to get the hottest air out of the solar panel. We were thinking of something like this (using one sensor inside the panel and another inside the house):
Panels inside temperature above 20°C: system ON
if the panel's inside temperature is higher than the house's: increase fan speed
if the panel's inside temperature is lower than the house's: decrease fan speed
if the panel's inside temperature equals the house's: maintain fan speed
Panels inside temperature below 20°C: system OFF
kostas is offline   Reply With Quote
Old 02-26-13, 08:28 AM   #49
NiHaoMike
Supreme EcoRenovator
 
NiHaoMike's Avatar
 
Join Date: Oct 2008
Location: Austin, TX
Posts: 1,154
Thanks: 14
Thanked 257 Times in 241 Posts
Default

Quote:
I'm really not so concerned with calibrating, since I can easily use software to tweak the ventilation rate to suit. Right now, the PCM duty cycle is varying linearly with respect to the measured CO2 level. I realize that I may need to shape the curve (log, linear, exponential) if need be. The box I put it in and the friction characteristics of my HRV core will have a big influence on how I need to shape the curve.
Look up PID control.
__________________
To my surprise, shortly after Naomi Wu gave me a bit of fame for making good use of solar power, Allie Moore got really jealous of her...
NiHaoMike is offline   Reply With Quote
Old 02-27-13, 09:47 PM   #50
theworldtrekker
Lurking Renovator
 
Join Date: Oct 2012
Location: Corvallis, Oregon
Posts: 19
Thanks: 1
Thanked 2 Times in 1 Post
Default

I've liked the DHT11 (aka RHT03) for household humidity measurements. But the spec sheet I have has shows that they 'want' a RH of 20%-90%. I'm not sure how they'd do in a condensing environment longterm, although it does say "* Avoid using the sensor under dew condition."

The spec sheet says its a resistive-type humidity measurement sensor. I'm guessing its not the salt kind, so conductive polymers most likely. Not sure what codensation would do to the sensor over time.

theworldtrekker is offline   Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Ad Management by RedTyger
Inactive Reminders By Icora Web Design