03-19-13, 08:03 AM | #71 | |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
|
Quote:
If you click on my AC_Hacker hyperlink that is on the upper-left of this post, it will take you to a page that will allow you to send an email to me. I will then send an email back to you with a proper return email address. Thanks very much! -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... Last edited by AC_Hacker; 03-19-13 at 08:21 AM.. |
|
03-19-13, 08:12 AM | #72 |
Lurking Renovator
Join Date: Mar 2013
Location: UK
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
|
Unfortunately, as a new forum member that function doesn't work until I've made 20 posts, it seems. I've attached the file to this post, so hopefully you'll be able to get it this way.
Hope it's of use, it seems that it makes this sensor a whole lot more useful being able to use the UART or SPI interface to talk to it. I've emailed this document to All Electronics in Van Nuys, CA, USA, as that's where I bought my sensors from and thought they might like to make this data sheet available in addition to the basic one on their website. Jeremy |
The Following User Says Thank You to JSHarris For This Useful Post: | AC_Hacker (03-19-13) |
03-22-13, 01:00 PM | #73 |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
|
New LCD Display (16x2)
I looked through my Geek Trove and found another LCD display that was soldered into an assemble. So, I spent a few careful hours extracting the display without wrecking it (listening to calming music).
To integrate the larger display onto my proto board, I needed to move several parts around, which wasn't too much of a problem, but again I was listening to calming music. The 8x2 LCD display and the 16x2 LCD display are very similar in terms of pinout and also they share the same library, so that made life much easier. There were only very minor changes I had to make to my sketch, such as indicating that I was now using a 16x2 display instead of a 8x2 display. The rest was just a matter of positioning the beginnings points for my text and variables. Piece of cake! Here's a photo of the LCD attached to the proto board... ...and here's a closeup photo of the new display. It even has an LED back-light that I have yet to implement. Code:
/* The circuit: * LCD RS pin to digital pin 12 => Teensy 5 * LCD Enable pin to digital pin 11 => Teensy 4 * LCD D4 pin to digital pin 5 => Teensy 23 * LCD D5 pin to digital pin 4 => Teensy 22 * LCD D6 pin to digital pin 3 => Teensy 21 * LCD D7 pin to digital pin 2 => Teensy 20 * LCD R/W pin to ground * 10K resistor: * ends to +5V and ground * wiper to LCD VO pin (pin 3) */ //Celsius to Fahrenheit conversion double Fahrenheit(double celsius) { return 1.8 * celsius + 32; } //Celsius to Kelvin conversion double Kelvin(double celsius) { return celsius + 273.15; } // dewPoint function NOAA // reference: http://wahiduddin.net/calc/density_algorithms.htm double dewPoint(double celsius, double humidity) { double A0= 373.15/(273.15 + celsius); double SUM = -7.90298 * (A0-1); SUM += 5.02808 * log10(A0); SUM += -1.3816e-7 * (pow(10, (11.344*(1-1/A0)))-1) ; SUM += 8.1328e-3 * (pow(10,(-3.49149*(A0-1)))-1) ; SUM += log10(1013.246); double VP = pow(10, SUM-3) * humidity; double T = log(VP/0.61078); // temp var return (241.88 * T) / (17.558-T); } // delta max = 0.6544 wrt dewPoint() // 5x faster than dewPoint() // reference: http://en.wikipedia.org/wiki/Dew_point double dewPointFast(double celsius, double humidity) { double a = 17.271; double b = 237.7; double temp = (a * celsius) / (b + celsius) + log(humidity/100); double Td = (b * temp) / (a - temp); return Td; } // include the library code: #include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(5, 4, 23, 22, 21, 20); #include <dht11.h> dht11 DHT11; #define DHT11PIN 2 // Define pins for CO2 Sensor 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() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. //lcd.print("ACHacker"); // Setup for CO2 Sensor 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 } void loop() { int chk = DHT11.read(DHT11PIN); Serial.print("Read sensor: "); switch (chk) { case DHTLIB_OK: Serial.println("OK"); break; case DHTLIB_ERROR_CHECKSUM: Serial.println("Checksum error"); break; case DHTLIB_ERROR_TIMEOUT: Serial.println("Time out error"); break; default: Serial.println("Unknown error"); break; } // Loop for CO2 Sensor 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 = "); // Write 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 = "); // Write val to serial monitor //Serial.println(PWM_Value + 54); DutyCycle = (100 * (PWM_Value + 54) / 256); // Calculate DutyCycle //Serial.print("PWM DutyCycle = "); // Write DutyCycle to serial monitor //Serial.print(DutyCycle); //Serial.println("%"); //PRINTING TEMPERATURE // set the cursor to column 0, line 0 // (note: line 0 is the first row, since counting begins with 0): %column, row% lcd.setCursor(0, 0); // print the Temperature title lcd.print("Temp"); // set the cursor to column 5, line 0 // (note: line 0 is the first row, since counting begins with 0): lcd.setCursor(5, 0); // print the Temperature valie lcd.print(Fahrenheit(DHT11.temperature), 0); // set the cursor to column 7, line 0 // (note: line 0 is the first row, since counting begins with 0): %column, row% lcd.setCursor(7, 0); // print the Temperature 'F' lcd.print("F"); //PRINTING RELATIVE HUMIDITY // set the cursor to column 10, line 0 // (note: line 0 is the first row, since counting begins with 0): lcd.setCursor(10, 0); // print the Relative Humidity title lcd.print("RH"); // set the cursor to column 13, line 0 // (note: line 0 is the first row, since counting begins with 0): lcd.setCursor(13, 0); // print the Relative Humidity value lcd.print((float)DHT11.humidity, 0); // set the cursor to column 15, line 0 // (note: line 0 is the first row, since counting begins with 0): %column, row% lcd.setCursor(15, 0); // print the Relative Humidity percent sign lcd.print("%"); //PRINTING CO2 READINGS // set the cursor to column 0, line 1 // (note: line 0 is the first row, since counting begins with 0): lcd.setCursor(2, 1); // print the CO2 title lcd.print("CO2 "); // set the cursor to column 6, line 1 // (note: line 0 is the first row, since counting begins with 0): lcd.setCursor(6, 1); // print the CO2 value lcd.print(ppm); // set the cursor to column 11, line 1 // (note: line 0 is the first row, since counting begins with 0): %column, row% lcd.setCursor(11, 1); // print the CO2 'ppm' lcd.print("ppm"); delay(2000); } // // END OF FILE // Best, -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... |
03-23-13, 03:16 PM | #74 |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
|
'CO2 Bubbles' in Still Air...
It is interesting how instrumentation can give us an awareness of previously unseen things.
My desk is set at a wall, facing out through a window. I generally do my Internet work there as well as small electronic projects, such as my CO2 sensor. Having a CO2 monitor on my desk now for several weeks has been a real awakening to the CO2 bubbles we create around ourselves if we are in still air. I know this because I have another CO2 monitor hanging on the wall about ten feet away, and I compare the results of both monitors several times during the day. When I have the ceiling fan on low speed, gently stirring the air, the readings from the two sensors are usually within 3% or so. But, I am amazed at the CO2 bubble that is created when I don't have the ceiling fan running. The difference can easily reach 30%, and in a well sealed house, this could mean local CO2 concentrations sufficient to cause discomfort, irritability and even reduced mental functioning. So what I'm seeing not only points to the need for fresh air and the need for HRV, but additionally to the need for air movement. If we have a central air system, this takes care of dispersing any local CO2 bubbles , but if we're going for mini-splits or even more so, radiant heating in a well sealed house, some gentle stirring of the air would be to our benefit. -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... |
03-27-13, 10:26 PM | #75 |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
|
Ventless Heater...
It's always really chilly in my cellar in the wintertime, too cold to go down and do any interesting work on projects.
So a couple of days ago I bought a new Ventless Heater. Today I installed it and what a warm and wonderful difference it made, having the basement being tolerably warm! A while later, I started to become concerned when I noticed that the CO2 reading in the livingroom was 1953 parts per million! I didn't know it would go that high. Then I put a CO2 monitor in the basement to check things out: 3451 parts per million! And this reading is with two basement windows open! I never would have known that this was a problem prior to my CO2 controlled HRV project. Looks like there's going to be an HRV in the basement, too. -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... Last edited by AC_Hacker; 03-27-13 at 10:29 PM.. |
03-28-13, 03:32 AM | #76 |
Helper EcoRenovator
Join Date: Dec 2012
Location: Venice, Italy
Posts: 89
Thanks: 15
Thanked 41 Times in 19 Posts
|
Ac is this a kerosene or a lpg heater?
|
03-28-13, 06:50 AM | #77 |
Steve Hull
Join Date: Dec 2012
Location: hilly, tree covered Arcadia, OK USA
Posts: 826
Thanks: 241
Thanked 165 Times in 123 Posts
|
AC - good observation on how "ventless" heaters are dangerous. Sadly, the national appliance alliance has labelled many appliances as "ventless". These include not only small heaters, but appliances like ovens that use natural gas or propane.
Several years ago, I testified against this practice and was amazed when they brought out data from the 50's on air exchange in homes. Their contention is that even in a tight home (defined as one exchange per hour) the addition of people opening/closing exterior doors would mitigate the CO2 development in the home. One exchange per hour as tight! They also touted the "efficient" combustion and how little carbon monoxide is produced. People need to understand that ANY heat produced by combustion gives off CO2 and contrary to what Rep Michelle Bachman says, CO2 certainly IS bad. Any ventless combustion heater (propane, diesel, kerosine, etc) gives off lots of CO2. It is called basic chemistry. I love the efficiency and the lower carbon impact of using gas in certain appliances, but my ovens are electric. BTW, you can't even find a vented home use gas oven anymore. They are all "ventless". AC lives in an unusual situation (no kids, small house, "tight"), and he is correct that the issue is magnified in a basement without a means to ventilate with a forced air HVAC system. Steve
__________________
consulting on geothermal heating/cooling & rational energy use since 1990 |
03-28-13, 07:18 AM | #78 |
Less usage=Cheaper bills
Join Date: Nov 2010
Location: Minneapolis, MN
Posts: 939
Thanks: 41
Thanked 116 Times in 90 Posts
|
CO2 and CO are different too. CO being more dangerous and the one component that we install alarms in houses for. This isn't directed at AC, more for the people who visit this thread because some don't catch the difference between Carbon Dioxide and Carbon Monoxide(this is the one known for killing people in their sleep).
|
03-28-13, 07:28 AM | #79 |
Steve Hull
Join Date: Dec 2012
Location: hilly, tree covered Arcadia, OK USA
Posts: 826
Thanks: 241
Thanked 165 Times in 123 Posts
|
You are correct, carbon monoxide (CO) is by FAR more of a danger than carbon dioxide (CO2).
Carbon monoxide binds to hemoglobin with 200 times the strength (affinity) of oxygen. It binds in the same place as oxygen and the red blood cells turn pink, just like they do when supplied with oxygen. But no oxygen is transported and delivered to the brain. So even if oxygen is given by mask, it takes time (hours) to displace the carbon monoxide. And the brain does not have that time (minutes). Emergency treatment is use of an oxygen hyperbaric chamber - but how many of those are at our local hospitals? If ANY appliance uses combustion, even if out in the garage, then the home needs a CO monitor. Steve ps - thanks for your note as this is REALLY important
__________________
consulting on geothermal heating/cooling & rational energy use since 1990 |
03-28-13, 08:40 AM | #80 |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
|
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... |
|
|