X10 Community Forum

🔌General Home Automation => Automating Your House => Topic started by: bkenobi on December 13, 2011, 12:42:29 PM

Title: Temperature/Humidity monitoring
Post by: bkenobi on December 13, 2011, 12:42:29 PM
I know there have been some threads about this in the past, but they seem to be aimed at an X10 device.  I am looking for a way to monitor temperature/humidity in my attic to better control the exhaust fans.  I currently have a thermostat/hygrometer hardwired in the system that is set to turn on if the temp exceeds xx°F or xx%RH.  What I'd like to do instead is to have a data logging system so that I can monitor the attic temp/hum as well as the outdoor temp/hum so I can do things a bit smarter.  If the outside humidity is at or above my set point, then running the fan does nothing beneficial.  This would also allow me to keep track of things throughout the day/year to see where things are sitting.

I know there are weather stations made that include USB output and also quite a few that allow for remote wireless stations.  What I haven't been able to discern is which of the lower cost units have these capabilities.  I'm not interested in spending $500 for this, so I may not be able to do what I want.

I know there are 1-wire setups that might work, but I don't think I have the capability to run the wire easily.  I'd really like to go wireless if possible.  If nothing like this is possible for a reasonable price, I'll probably just get one of the cheap Meade systems with a couple remote stations and tweak things that way.  That's not ideal, but at least I'd know if I'm chancing mold growth!
Title: Re: Temperature/Humidity monitoring
Post by: Tuicemen on December 13, 2011, 01:01:22 PM
Temperature/Humidity monitoring is an easy thing to do with a simple wireless weather station like the Oregon RMS300a (http://www.ambientweather.com/psrms300a.html)
The Oregon RMS300 comes with 1 outdoor temperature/humidity sensor has the ability to add 2 additional sensors that run on average of $25.
You may find it cheaper on e-bay.

You can use the free software that comes with to generate a CSV file.
From this you can pull info to do tasks you wish with PC Companion and the plug-in pack.
X10WeatherWatch part of the plug-in pack allows up to 16 conditions to be watched and acted on.
It has a variety of possible triggers using PC Companion or you could just send a X10 signal.
You could also build your own software if your inclined.
 >!
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on December 13, 2011, 03:49:47 PM
Awesome!  Thanks for the help.  Looks like that one will work.  I was looking for "Temperature USB" and found nothing.  Looks like "Data Logger" is a better term.  But, those Oregon units are pretty affordable and use the same remote stations that I've been seeing I believe.

 >!
Title: Re: Temperature/Humidity monitoring
Post by: Tuicemen on December 13, 2011, 04:25:12 PM
I use one myself infact it helped encourage me to create the WeatherWatch program.
There is even a water proof sensor for them for monitoring pools and/or spas.
another cool thing is I haven't changed the batteries in over a year so battery life is good. :)%
I've had other stations that required changing batteries every month  B:(
 >!
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on December 13, 2011, 04:33:06 PM
I have 2 sections of attic with 2 attic fans, so I certainly don't want to deal with monthly battery changes!  Yearly seems reasonable.  Any chance they can be wired in to power?  I have an easy access to power up there, so that would be ideal.
Title: Re: Temperature/Humidity monitoring
Post by: Tuicemen on December 13, 2011, 06:11:39 PM
I'm not sure it would be worth it they use 1 AA in the remote sensor.
2 AA in the base unit.
However if you could find a wallwart that supplied what they needed I guess you could mod it.
 >!
Title: Re: Temperature/Humidity monitoring
Post by: luke03 on December 13, 2011, 11:38:16 PM
One device I found amazing is called WebControl from Amazon.com. That device allow one hunidity sensor and 8 temoerature sensors. It can also directly control 8 optical isolated relays to turn on/off fans, humidifier. In addition, it can send you email or you can pull the data and log them into your server. The cost is $35 plus $5 shipping.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on December 14, 2011, 01:20:07 AM
That is a pretty amazing device.  The only down sides I see are that it isn't wireless, can monitor only 1 humidity, and doesn't allow for multiple zones easily (well, without running wires of course).  I really like the price, though.  I have a couple WRT capable routers sitting around, so it would actually be feasible to install one in each attic section and use the WRT routers as wireless bridges to connect the WebControl units.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on December 14, 2011, 05:51:33 PM
I'm having a tough time finding an Oregon Scientific RMS300a.  I found one place that sells the RMS600a through Amazon for $42, though.  Do the Meade TS33CM Thermohygrometers work with Oregon units?  Amazon has that unit for $16 which seems to be an excellent price!
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on December 15, 2011, 05:42:10 PM
In looking a little further, I noticed a setup that looks pretty cool, but I'm not sure how usable it is.  The version I'm looking at is branded La Crosse and is called a Weather Gateway (ERF-100).  It looks like this device plugs into your router and wirelessly connects to any sensors up to 200ft away.  The TX60U is the thermohygrometer that should work with it.  There are a couple issues that I see that may make it not worth the effort though.


Pros

Cons

Anybody have any thoughts?

Gateway on Amazon:
http://www.amazon.com/Crosse-Technology-Weather-Gateway-ERF-100-SET/dp/B003E46EUE

Kit on ebay:
http://tinyurl.com/d3bcpe2

Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on December 17, 2011, 03:38:26 PM
Well, I had the La Crosse gateway plugged in for ~1 hour before it broke.  The power cycled and even though the unit was plugged into a surge protector, it just sits there and buzzes at me (you know, that type of buzzing that sometimes happens after you let the magic smoke out of electronics).   If it's that poorly built that it can't last through a power cycle, that's just a bad design (or faulty product I guess).  B:(

When I returned that one, I picked up an Oregon Scientific BAR208HGA, which looks very similar to the RMS units (though the sensor is a model up since it has the local temp/humidity display).  It doesn't look like this one will connect to the PC, though.  If not, I'll have to take it back and try again but at least I'll know if that remote sensor has the range I need.

I found a similar unit on ebay this morning (Oregon I300) for a really good price ($20 shipped including 1 remote sensor).  Funny that the replacement sensor costs more than the package (~$25 shipped).  I may just buy 2 or 3 packages and resell the display and USB unit if I get it.

The main difference between this and the RMS unit appears to be that the RMS line has the display plug into the PC while the I series uses a USB dongle to communicate with the display.  Ideally I think the communication should go from the remote dongle, through the USB hub, out to the display.  That way I wouldn't need to have the hub turned on.  Oh well, I'll just use it for local display anyway until I determine if the old school temp/humidity stuff in the attic are sufficient.
Title: Re: Temperature/Humidity monitoring
Post by: Tuicemen on December 17, 2011, 03:50:27 PM
I've had nothing but good luck with my Oregon and have heard horror stories abut La Crosse before.
I wish mine had the USB dongle!  I guess it may be time for a upgrade!
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on December 18, 2011, 05:14:31 PM
Man is finding a weather system complicated.   B:(

I have been looking at the I300 or I600 and I'm having a heck of a time figuring out how many remote sensors these things can handle.  It looks like either one will use the 3- and 10-channel 3rd generation sensors, but I can't see where it says explicitly that it can handle more than one.  I see one place in the I300 documentation where it says "sensors" where it certainly implies multiple can be registered.  I guess I may just have to wait till tomorrow and contact Oregon Scientific support directly.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on December 21, 2011, 05:09:07 PM
What software do you use with your RMS300?  I've read that the software doesn't work well, so I assume you've found a 3rd party data dumper.
Title: Re: Temperature/Humidity monitoring
Post by: Tuicemen on December 21, 2011, 06:26:46 PM
I never had issues with the software that came with it.
 However I've use the free Weather Exchange from Ambientweather (http://www.ambientweather.com/weex1.html) as well.
Both I used just to get the info into a CSV file.
I then pull up with the PCC Plug-in X10WeatherWatch and set the values to watch for and how to trigger alerts.
 >!
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on December 21, 2011, 06:39:19 PM
Ahhh, ok.  I figured there would be something required to pull the data in from the weather station and into data file.  Parsing that file should be pretty simple, but, if it turns into a hassle, it's nice to know that the PPC plugin is there already.
Title: Re: Temperature/Humidity monitoring
Post by: Tuicemen on December 21, 2011, 08:36:45 PM
I've never looked into seeing if Oregon had a sdk for it. I guess I should! ::) :'
There are other programs out that will get the info but most aren't free.
Title: Re: Temperature/Humidity monitoring
Post by: luke03 on December 22, 2011, 04:28:16 PM
That is a pretty amazing device.  The only down sides I see are that it isn't wireless, can monitor only 1 humidity, and doesn't allow for multiple zones easily (well, without running wires of course).  I really like the price, though.  I have a couple WRT capable routers sitting around, so it would actually be feasible to install one in each attic section and use the WRT routers as wireless bridges to connect the WebControl units.

The humidity is measured as analog input. If you don't have need for other analog input measurement, you can hook up more humidity sensor to other analog inputs. However, analog inputs only give the voltage reading, you will have to convert that into relative humidity, like the board itself doing on the humidity sensor input.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 02, 2012, 09:17:29 PM
I ordered an Oregon Scientific RMS600A and after a week of waiting for an invoice, the Amazon seller finally responded by saying it wasn't available in their warehouse.  Now I'm back to square one since I can't locate any RMS300/600/900 and can't afford the full weather stations.

Has anyone played with an Arduino yet?  I see that they have 8 I/O channels and are capable of reading DHT11/22 humidity/temperature sensors as well as connecting to either PL513 or TW523 X10 controllers/modems.  The question I have is how much can an Arduino do?  Can I have one set up to monitor 2 or 3 humidity/temperature sensors AND send commands out via the PL513/TW523?  If so, that sounds like a nice solution.  I would have to program the Arduino to turn on the attic fan in either end of the attic with delta humidity over a certain tolerance and over a certain temperature, but that seems really simple.  It also seems like a neat little project to tinker with for a fairly small amount of cash!
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 03, 2012, 12:43:08 AM
Has anyone played with an Arduino yet? ...  It also seems like a neat little project to tinker with for a fairly small amount of cash!
I just started on an Arduino project of my own about a month ago.
I am using the Dallas OneWire temperature sensors (I'm not measuring himidity right now), but I'm not interfacing it with X10 at all (purely for data logging and monitoring through a connected PC).

It didn't take me all that long to get the Arduino working with the OneWire temperature sensors (Maxim-IC will actually send out free samples of the sensors if you request them on the website).
I also built a box that interfaces with the thermostat, so I can map the heat/cool/fan only cycles along with the temperatures (I am currently using 6 temperature sensors, which will eventually be placed around my house, and outside).
I've been tracking the temperatures for a few weeks now, and have been tracking the HVAC cycles for almost a week.
I'm sending the data to the Pc via RS232 (on the COM port that is assigned to the Arduino). A friend of mine is writing me a simple logger that will take the RS232 data, and dump it into an Access database. In the meantime I'm using RealTerm and a CSV file, with the data being displated using Dygraphs.
I tried (briefly) to connect the Arduino to the TW523 port on my XTB-IIR. I was able to see commands on the line (using whatever sample program I downloaded), but I didn't have the ability with that program to send commands.
However, the connection to the TW523/PSC05 is really simple.
If you think you can handle the programming side of it, I'd go for it. Even if you don't end up using it, the Arduino is neat enough, and you'll probably find some other use for it.

I bought myself the Mega 2560, because it can do so much more than the Uno. I figured I'd use that as my "prototyping" board, and then buy an Uno to replace it when I go "live" with it, so the Mega is freed up for the next project.

There are plenty of Arduino thermostat projects out there, as well as Arduino X10 projects, to use as examples. You just might have to kit-bash them together.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 03, 2012, 01:02:42 AM
I've been reading quite a few pages on Arduino this evening and am really intrigued.  The only issue I'm having is finding a source for the board for a reasonable price that won't take a month to arrive in the US.  Ebay has a number of different boards (which I also don't know what the difference is), but they are all shipped from Hong Kong.

Any thoughts on the "Arduino Duemilanove 2009 AVR ATmega328" for $17.50 shipped or "Arduino Duemilanove 2009 ATmega168-20PU" for  $16.99 shipped?  To me they look the same, but I'm not sure if I should be looking for something else.  YourDuino.com also has a few boards that look reasonably priced, but I'm still not sure which ones are basic but have enough features for what I need.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 03, 2012, 09:21:41 AM
I've been reading quite a few pages on Arduino this evening and am really intrigued.  The only issue I'm having is finding a source for the board for a reasonable price that won't take a month to arrive in the US.  Ebay has a number of different boards (which I also don't know what the difference is), but they are all shipped from Hong Kong.

Any thoughts on the "Arduino Duemilanove 2009 AVR ATmega328" for $17.50 shipped or "Arduino Duemilanove 2009 ATmega168-20PU" for  $16.99 shipped?  To me they look the same, but I'm not sure if I should be looking for something else.  YourDuino.com also has a few boards that look reasonably priced, but I'm still not sure which ones are basic but have enough features for what I need.
I ordered my Mega from Amazon. It arrived the day after they shipped it. (of course, it was around Thanksgiving, and for some reason it took them over a week to ACTUALLY get it out the door to me)
Title: Re: Temperature/Humidity monitoring
Post by: Tuicemen on January 03, 2012, 09:47:28 AM
Amazon reports they still have 16 Oregon i300 in stock.
http://www.amazon.com/Oregon-Scientific-I300-InstaForecaster-I/dp/B0013542AA/ref=dp_cp_ob_hg_title_2
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 03, 2012, 11:34:24 AM
Yeah, but the I600 (or I300) doesn't allow for more than 1 remote sensor as far as I can tell.  The manual shows that the sensors are 3 channel and the compatibility chart for both I300 and I600 show that they work with 3-/10-channel sensors.  However, I can't see anywhere in the documentation where it says that the USB hub can connect to more than the 1 sensor.  I contacted customer support at Oregon Scientific to ask, but I'm holding off till I know for sure.  If it worked as I hope (the USB hub connects to a bunch of stuff and the display can only show 1 sensor) that would be fine with me.  Even better if the display can show multiple sensor data but only 1 at a time.

If I go with the Arduino, I'm not seeing where Maxim-IC allows for 1-wire samples to be ordered.  I have ordered samples from them and TI in the past, but the 1-wire stuff seems to be either out of stock for samples or prohibited.

Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 03, 2012, 11:57:18 AM
Well, Oregon Scientific seems very helpful when it comes to recommending current products that they sell (hoping to make a sale of course).  However, when it comes to products that are no longer available from their own web site, they are of NO USE!  I asked a simple question (several times in different ways) about the capability of the IH800 (the USB hub) and they told me each time that they could not provide any support for a product that has been discontinued.  They also said that they do not provide web support for them either (so once it's discontinued, they basically remove any support documents).

I like that they are based out of the US, but with this kind of support, I think someone from Mumbai would have been more useful (they have in the past anyway)!   B:(

I'll have to look around online to see if anyone has used the I300/I600 (or IH800 usb hub) for any automation projects or weather stations to say whether it can connect to more than 1 remote sensor.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 03, 2012, 12:11:30 PM
If I go with the Arduino, I'm not seeing where Maxim-IC allows for 1-wire samples to be ordered.  I have ordered samples from them and TI in the past, but the 1-wire stuff seems to be either out of stock for samples or prohibited.
I'm using the DS18B20 and DS18S20 OneWire sensors.
When you go into the product page for the sensor, then click on "Ordering Info," there are "Sample" buttons for some of them (they don't offer samples for every single item, but they do for most of them).
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 03, 2012, 12:34:23 PM
I just found out that one reason I couldn't order samples anyway is that my account is under my yahoo email.  They require a fixed email to order, so I'll have to figure out what my DSL account is.   rofl

Also, I found that there is at least 1 more current model that uses the IH800 (I assume) USB hub and it is NOT discontinued in the UK anyway.  The WMR180 (which does look pretty nice if I could find it, albeit a bit pricey) includes a USB hub and a manual that's actually helpful.  It explicitly states that the sensors communicate with BOTH the USB hub and the display.  That means that (assuming the USB hub is identical), I should be able to get the I300 and disregard the display and just use the sensors.  I'll have to do a bit more reading, but so far, this looks like a very affordable option!

http://uk.oregonscientific.com/ulimages/manuals2/WMR180.PDF
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 03, 2012, 12:43:07 PM
This is why I'm confused with the compatibility:

http://www.weathershop.co.uk/images/pdf/oregon_sensor_matrix.pdf

That shows that the I300/I600 only support 1 channel.  BUT, the following info for the WMR180 states that the USB hub can receive data from sensors directly.  If so, then whatever it is compatibile with will be available on the PC regardless of the display.

http://www.weathershop.co.uk/shop/brands/oregon-scientific/full/oregon-scientific-wmr180-weather-station

Quote
Both units receive information wirelessly from a complete set of outdoor sensors at a range of up to 100m.

I guess for the price of one of those I300 units, I should just buy it and see if it will work.  Course, if it doesn't, that would have been the cost of an Arduino!   ;D
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 03, 2012, 01:11:02 PM
I just found out that one reason I couldn't order samples anyway is that my account is under my yahoo email.  They require a fixed email to order, so I'll have to figure out what my DSL account is.   rofl
Yeah, I ran into the same problem.
Luckily, I have another account that is NOT at one of the "free" providers, which then forwards to my Yahoo account.
I just used that one.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 03, 2012, 02:29:05 PM
After quite a bit of bruit force searching, I found the USB hub in the FCC database.  It's actually not an IH800 as far as I can tell.  It's actually an IH300 (unless there are multiple units...which is what I'm trying to determine).  Anyway, as of right now, the info that matters is that it's FCC ID is NMTIH300-01.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 04, 2012, 02:24:11 AM
It looks like I have 3 options to consider.  I don't know which way to go and the investment (both in $$ and time waiting for shipments) is causing pause.


Oregon Scientific I600 - Looks like the USB controller will be able to read at least 3 thermo/hygrometers.  It may be able to read up to 10 devices, but I'm not sure and don't really need to do it anyway.  The up side is it's already wireless and should allow for control via whatever language I want.  The down side is that I would have to keep the software running all the time to keep the data recording as well as a separate program to monitor that data and send commands.  I think I can get up and running with this for $60USD+shipping or less.  Another thing to consider is that I would need to have an X10 device on each of the fans.

Arduino - Fairly cheap, but I'd probably need 2 (1 for each attic).  The programming would allow this to run on its own and would not require a computer to run.  I would need to get a few sensors and a couple relay boards from the looks of it.  Alternately, I could send X10 commands if I were to connect it to a FireCracker or one of the RJ11 connection X10 devices.  How do I program an Arduino though?

WebControl w/ X10 enabled firmware - Looks like the PLC commands are a bit basic compared to the Arduino.  I think this option is basically the same as the Arduino but harder to write code for.  On the up side, programming is as simple as logging on to the web server and pasting the code into the window.  This one even has a guide on how to modify a FireCracker to work to send commands.  On the up side, just like the Arduino, the controller can be programmed and installed in the attic without needing a PC connection.  With the WebControl, I could potentially connect it to the network and monitor as well...if I wanted.  Also, if connected to the network, I could send email notification for whatever reason (humidity has been high for a while, temperature is WAY too hot may be a fire, etc).

http://www.cainetworks.com/products/webcontrol/WebControlX10.pdf
http://www.redhillnetworks.com/manuals/webcontrol/WebControlPLCUserGuide3-01-06.pdf

Can anyone comment on any of my unanswered questions?
Title: Re: Temperature/Humidity monitoring
Post by: systemdm on January 04, 2012, 09:13:14 PM
Noam,

You may want one of these for breadboarding.  Thinking about ordering one myself.

http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2151259_-1
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 04, 2012, 09:33:30 PM
Looks like a nice way to get all the components at once.  Obviously, the primary part of importance is the ATmega328P chip.  For now, I think I'm going to get a full sized Arduino Uno or Duemilanove 2009.  Looks like I can get either one for ~$20USD shipped.  If I remember correctly, Jameco is a bit steep for shipping on small orders.  The only thing that's keeping me from ordering right now is not knowing if there is a good reason to make sure I get an official Arduino or a clone.  The price isn't much different, but I can't see what the difference is at all.

I'm thinking I'll order a couple sample thermal sensors from Maxim-IC to play with before I step up to the DHT11/22.  I'll also be looking at getting some kind of relay setup to actually control the fans since it's both cheaper and more reliable than using X10 (especially since they aren't already set up that way).

Does anyone have any idea if the accuracy of the DHT11 is really that bad (+-2C and +-5%RH)?  If that's true, then I'll have no choice but to go with the DHT22.  If they aren't that precise, but they are accurate from one sensor to another, I'd probably be able to use the DHT11.  I'm looking at finding delta temperature and humidity from inside and outside the attic.  If they are accurate from one to the next, the delta would be consistent even if they weren't precisely reporting the correct humidity.  Temperature-wise, I could always just use the Maxim-IC temperature sensors which are pretty accurate.

FWIW, I'm thinking that I'll get one Arduino for testing and, once I get things working correctly, I'll get one or two more for the actual installation(s).  I'm thinking it would be much easier to install one at each fan location rather than trying to run wires from one side of the attic to the other (since they aren't connected and there's no easy passage).
Title: Re: Temperature/Humidity monitoring
Post by: systemdm on January 04, 2012, 09:56:29 PM
bkenobi,

Where are you seeing these for $20?  I found the Duemilanove for $27.00 on Amazon.

Thanks,
systemdm
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 04, 2012, 10:09:13 PM
I've been checking ebay.  Most of the cheaper prices are from Hong Kong.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 04, 2012, 10:58:00 PM
I just ordered an Arduino UNO R1 from Hong Kong for $18.30 shipped.  The primary down side is that it will take weeks to get state side.

Quote
Your item(s) should arrive between Jan 25 - Feb 07, 2012.

DOH!  I'll have to find something else to do in the mean time I guess...  :'
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 05, 2012, 12:09:53 AM
Noam,

You may want one of these for breadboarding.  Thinking about ordering one myself.

http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2151259_-1
I can't get the page to load. What is it?
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 05, 2012, 02:32:10 AM
It loaded for me fine earlier today.  Looks like the site is broken right now cause I can't even load the main page.
Title: Re: Temperature/Humidity monitoring
Post by: Brian H on January 05, 2012, 07:03:22 AM
May have been a server problem. The link is working again.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 05, 2012, 11:41:57 AM
One thing to note about that Jameco kit is that it may not have any Arduiono boot loader flashed to it.  If not, then you will need to have some way to flash the chip.  That's not difficult, but it's something extra to keep in mind.  There may be other kits that include a pre-flashed chip.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 05, 2012, 12:15:37 PM
Is that just a kit of parts to build your own Arduino on a breadboard?
Since I'm still pretty new to this, I'd prefer to use a pre-build Arduino, one that I can just slap a "standard" prototyping shield onto when I'm ready to move my circuit from the breadboard to "real life" use.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 05, 2012, 06:53:07 PM
Yes, that's a kit that doesn't appear to include any kind of perf board or anything.  I just found that Fry's sells Arduinos for a comparable price to the US ebayers (~$30).  The appear to even have several versions available.  These are not the official Arduino brand, but they should work fine.  If I had known they were available locally for just a bit more, I probably would have gone that route since I'm now sitting here twiddling my thumbs waiting for the slow boat from China...literally!

In the mean time, I've been doing some reading on the Arduino and weather stuff and have come to find several projects that capture the remote sensor data being transmitted over 433Mhz.  There are radios that are ~$10USD that can be hooked up that will allow for the prebuilt libraries to capture the data and display it to some compiled applications even!

http://www.practicalarduino.com/projects/weather-station-receiver
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 05, 2012, 10:23:58 PM
Yes, that's a kit that doesn't appear to include any kind of perf board or anything.  I just found that Fry's sells Arduinos for a comparable price to the US ebayers (~$30).  The appear to even have several versions available.  These are not the official Arduino brand, but they should work fine.  If I had known they were available locally for just a bit more, I probably would have gone that route since I'm now sitting here twiddling my thumbs waiting for the slow boat from China...literally!

In the mean time, I've been doing some reading on the Arduino and weather stuff and have come to find several projects that capture the remote sensor data being transmitted over 433Mhz.  There are radios that are ~$10USD that can be hooked up that will allow for the prebuilt libraries to capture the data and display it to some compiled applications even!

http://www.practicalarduino.com/projects/weather-station-receiver
Around here, both RadioShack and MicroCenter carry Arduinos now.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 05, 2012, 11:54:23 PM
My Radioshack's don't carry them normally, but they do offer a "ship to store for free" option.  The price is starting to get too expensive especially with ~10% tax, but it's a nice option in a pinch especially since they carry the current revisions (UNO Rev3).  The ones at Fry's are all knock offs (OSEPP brand).

Does anyone think using X10 for the actual fan control is a bad idea?  I don't think I've really had a problem with PLC signals for months (none since I installed the phase coupler).  The RF is a different story, but if I used a firecracker, it would be in the attic right next to the CM15A antenna.

One other thing about the DHT11/22/etc.  How would I weather proof one of these?  I was thinking that if I used these, I'd try to stuff it in an upside down pill bottle and cover the bottom with mesh of some kind (to keep bugs out).  I'm thinking it would be easiest to stick it out the fan louvers and just hang it at the end of the house or else re-purpose an unused hole for the old satellite dish coax.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 06, 2012, 12:35:02 AM
One other thing about the DHT11/22/etc.  How would I weather proof one of these?  I was thinking that if I used these, I'd try to stuff it in an upside down pill bottle and cover the bottom with mesh of some kind (to keep bugs out).  I'm thinking it would be easiest to stick it out the fan louvers and just hang it at the end of the house or else re-purpose an unused hole for the old satellite dish coax.

I did almost the same thing. I took a prescription bottle, and drilled a hole in the cap. I then drilled about 10 more holes around the sides of the bottle, to allow air to flow in and out. I fed the sensor (I'm using a Dallas OneWire DS18S20) through the hole in the cap, and put a foam spacer around it, to try and keep it centered in the bottle. That was fed out through a fresh-air vent, which has a screened "cage" outside. the bottle is sitting in the cage.

It worked fine overnight, but I noticed a rapid rise in temperature today at around 10 AM. the sensor I stuck in between the window and the storm window on that same wall also showed a dramatic temperature increase at that time. I think that's when the sun moved out of the shadow of the shed, and was hitting that wall. It is a brick exterior wall, and I know they radiate heat for a long time.

My eventual goal is to take an outdoor electrical box, and mount it to the wall. I would drill a serial of holes along the sides and bottom, and line them with some bug screen I had leftover. Then, it is "only" a matter of cleaning up the rest of the mess.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 06, 2012, 12:52:25 AM
Good call on the sun "cooking" the sensor.  I just thought about it and the side of the house I was planning on using is a south facing wall.  I'll have to think about whether that location would be a problem or not since it could possibly raise the temperature over the ambient significantly.  I suppose the best thing to do would be to get a 433mhz radio and a thermo-hygrometer and mount it on a different side of the house or just install the Arduino at the other end of the attic (facing north) which would avoid the problem entirely.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 06, 2012, 11:48:57 AM
For me, it probably would be all that much harder for me to install the outdoor sensor on the north wall. The current location is only temporary (so I can make sure it is working). If I do my modified electrical box idea, it wouldn't be all that noticeable, even. My biggest concern is the brick. I'm worried that it heats up enough, and continues to radiate heat after the sun goes down. I'm worried I'll still get inaccurate readings as a result.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 06, 2012, 12:19:37 PM
Fortunately (for this instance anyway), my house isn't brick so I don't have to worry about latent heat.  My old house had brick for the lower 4 feet in the front and I could definitely feel the temperature difference between the grass a few feet away to the cement walkway next to the bricks after dark (in summer)!  On the other hand, my deck in the back would get extremely warm after I stained it in the summer, but it would drop to ambient pretty quickly once the sun went down.  The thermal mass of wood and stone are obviously very different!   ;D
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 10, 2012, 12:42:11 AM
I decided to go with the Arduino approach, so I ordered an Arduino UNO, 4 DHT11 sensors (one extra just in case), and 4 relay modules (2 extras).  These are all out of Hong Kong since the price is ~1/4 of what it would cost anywhere else and maybe less after shipping (US domestic shipping costs more than shipping from China for some reason).

Ironically, I ordered the last of the required components this evening and just now I got a response back from Oregon Scientific on the capabilities of the I300 and I600.  This is what customer support responded with:


Quote
Thank you for contacting Oregon Scientific Customer Support.

Yes, I300 and I600 units are capable of having 3 remote sensors.

So, if anyone else is looking to use a weather station for monitoring temperatures/humidity, the I600 is a good choice.  It's available from at least one seller for ~$20 on ebay and includes a temperature/humidity remote sensor.  That's cheaper than the sensor costs on its own!
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 10, 2012, 09:55:35 AM
What are you planning on using the relays for?
I have found that the Dallas DS18S20 and DS18B20 temperature sensors are close to my other thermometers (I have two Vernier "GoTemp!" probes attached to the same machine, sitting side-by-side with two of my Dallas sensors), but they can be off by a few degrees.
I have a 4-pack of the DHT-11's on order (from a Chinese seller on eBay, of course). I want to see how they compare in terms of accuracy, as well as use them to track humidity in the house.

I think you'll find the Arduino pretty simple to use, once you get started. Once I had everything working on a breadboard, I bought a prototyping shield, and soldered it up. That was the hardest part for me. I've been soldering stuff for many years (as the son of an EE, I was taught how to do it early on), but I didn't really have any experience soldering on perfboard (I usually asked my dad to do that part).
In addition to soldering up the shield (during which I made one mistake - I switched the input and output pins, so I had to fix that in the software), I also soldered up the board for the thermostat interface.

My program in the Arduino is pretty basic (since I'm not a programmer, either).
It checks the status of the three thermostat lines (pulled low with a resistor if off, or pulled high by the relay if on). It then turns on or off the appropriate LED for each one (I did the LEDs in the program, mainly so I could see if it was properly detecting the Thermostat cycles - and I liked it enough to keep it that way). Next, it polls the six temperature sensors. It then outputs all the data in CSV format via the serial port. It loops every 10 seconds (or so).

On the PC side, I'm using RealTerm to capture the data to CSV, adding a time stamp at the beginning of the line. I use the DyGraphs Javascript graphing engine to display the data. I'm working on a data logger that will go to a database, but I'm not there yet.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 10, 2012, 10:48:39 AM
My setup will be independent of the PC once programmed.  I'm going to use the Arduino to watch the temperature and humidity in 3 locations.
1) Inside attic section 1
2) Inside attic section 2
3) Outside the house

I have 2 conditions that will be monitored by the Arduino:

My only concern is that the DHT11 is too low accuracy to use in this setup.  It says that it's ±4%RH.  That's means that the RH between two identical sensors sitting next to each other could be as much as 8%RH different, potentially.  If that's true, then I could see large differences in humidity and temperature from inside to outside that really don't exist.  I really don't know how much of a problem this will be, so I'm just ordering the parts in hopes that they will work.  The stuff I selected is all cheap enough that I'm not going broke if I don't use it.  The problem is that it could take a month to find out and another month to get a new set of sensors to try again.   B:(

On the up side, this is all capable of being prototyped, so there's no soldering/desoldering/soldering/desoldering.... to find a workable solution.  It'll simply be plug in and swap the library in the sketch!  I'm pretty confident that I can get a sensor of some kind that will work, but the guaranteed part is far too expensive (SHT75 is $75 on ebay...for ONE).
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 10, 2012, 11:16:58 AM
One thing I've seen done is to use a CD-ROM audio connector (or similar) for the DHT-11, so that you can easily swap it out if you want.  The pin spacing should be correct for the four pins.

As far as the humidity sensitivity goes, you might not be able to be as exact as you want, but a ballpark figure might be good enough. Just set a differential that is far enough apart to account for the error.
I wonder if using two sensors inside and two outside, and then averaging the reading from each pair would give you a more accurate number.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on January 10, 2012, 01:04:52 PM
I wonder if using two sensors inside and two outside, and then averaging the reading from each pair would give you a more accurate number.
Search using ADC Oversampling and ADC Dithering...
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 10, 2012, 01:48:13 PM
I wonder if using two sensors inside and two outside, and then averaging the reading from each pair would give you a more accurate number.
Search using ADC Oversampling and ADC Dithering...
  • http://www.bing.com/search?q=adc+oversampling+resolution&form=OSDSRC
  • http://www.bing.com/search?q=adc+dithering&form=OSDSRC
That would probably only help if the accuracy of the sensors is random. If the sensors ALWAYS seem to read high or ALWAYS seem to read low, then taking an average of a number of readings probably won't help all that much.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 10, 2012, 05:17:18 PM
That's why I'll have to do some testing to see if these will be accurate enough.  If their readings match from one to the next, then I can use the readings as they are.  If there is a delta from one sensor to the next that is inconsistent when they are sitting next to each other, I'll have to re-evaluate if these sensors will work.  DHT22 are another option, but they are close to 4x as expensive.  The next step up is considerably more (~10-20x more than the DHT11 based on what I've found so far).
Title: Re: Temperature/Humidity monitoring
Post by: systemdm on January 10, 2012, 10:28:37 PM
Thought you guys would find this tutorial interesting on temperture sensing using the Arduino.


http://www.ladyada.net/learn/sensors/tmp36.html
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 10, 2012, 11:44:01 PM
I think I've read that page before.  I'm not too worried about temperature since there are plenty of cheap (or free samples) temperature sensors with great accuracy.  The problem is that there aren't many options for humidity.  And, the available sensors all seem to be digital which limits accuracy to whatever the circuit is designed for.  An analog humidity sensor would potentially provide better accuracy, but they seem to be more expensive by orders of magnitude for some reason.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 25, 2012, 12:38:56 PM
I now have my Arduino and the relays from Hong Kong.  I'm just waiting for the DHT11 modules before I can start playing with code.

FWIW, I ran across a humidity module yesterday that seemed really affordable and is analog, but since it's just a capacitive module, the accuracy is questionable.  I read a project page where someone used it with a 1-wire setup and he seemed to have good results.  The downside was that it was complicated to build the circuit (his words).  He also indicated that the accuracy was questionable since it was not calibrated against anything.  He is using it for the same purpose I am planning though (delta humidity of inside and outside).  As such, as long as it's being used in a duplicate circuit, the results should at least be consistent.

The sensor is a Humirel HS1101 which, according to parallax has an accuracy of 5% but reports an analog value, so it can output values as precise as your A/D converter can handle (10 bit for Arduino).  Here's the info parallax has on this module:

http://www.parallax.com/Portals/0/Downloads/docs/prod/sens/27920-HS1101-v1.0.pdf

They include a simple circuit schematic and some code to get things up and running with a BASIC Stamp controller. 

Here's an implementation and documentation:

http://www.stillhq.com/arduino/000007.html

The modules seem to be ~$5/ea.  I suppose at that price and the fact that there's other stuff involved in getting it up and running (1 circuit/module), it'd probably be quicker, easier, and even cheaper to go with DHT22 for similar accuracy.  Just wanted to post an analog solution.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 25, 2012, 01:02:06 PM
I got my four DHT11's the other day, and I hooked them all up on the same breadboard, for initial testing.
they seemed to be within 1 or 2 percent of each other, but I didn't have a way at the time to calibrate that against a known humidity value.

I only hooked one up at home, but I also have a separate humidity monitor in that room (one of the wireless ones I bought at RadioShack about 6 years ago). The two of them seem to agree within 1% or so, which is close enough for my application.
Next, I have to figure out how to mount the DHT11 and a DS18B20 (or DS18S20) on the wall in my upstairs hallway. I need the installation to look nice, but still allow airflow to the sensors to be able to get an accurate reading. I was thinking of mounting them inside a surface-mount phone jack, but that would look odd at eye-level in the middle of a wall, with nothing nearby.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 25, 2012, 01:55:12 PM
Hang a picture and install them just above the frame?

I'm planning on playing with the DS18B20 temperature sensors, but what value do you see in installing them in the same location as the DHT11?  The DHT11 reports both temperature and humidity with only the 1 module.  Obviously, the spec sheets indicate that the DS18B20 is more accurate than the DHT11, so perhaps that's your reason.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 25, 2012, 02:52:11 PM
Depending on the frame, I might even be able to place them BEHIND the picture. I'll have to see if I have something that wouldn't look out of place on that wall.

I was already using the DS18B20 and DS18S20 sensors for temperature, before I got the DHT11's.
The specifications certainly indicate the DHT11 is less accurate, and It isn't very hard to run both of them through one CAT5 cable.

I was thinking of running the wire up into a shallow plastic wall box, and then all I'd need is some sort of vented cover-plate to allow the sensors to read the air temperature in the hallway. If I insulate the box (haven't figured out the best way to do that yet), then I have a better chance of getting a reading from the hallway, and not the interior of the wall. Finding the right type of cover for the box might prove to be very tricky, though.

I wonder if I could mount the two sensors right behind the grille of the return duct, which is also in that hallway. It certainly gets airflow (especially when the HVAC system is running), and nobody would notice it (unless they look for it). I'd probably have to place the DHT11 with the "holes" facing the inside of the duct, to try and minimize dust buildup.
What do you think of that?
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 25, 2012, 03:12:49 PM
That sounds like a good solution to me!  The air return duct would get you a pretty accurate sense of what conditions in the hallway really are.  If you put the sensor on the wall, as you mentioned, you run the risk of sensing wall temperature.  Since there's a pretty slow flow rate there, the boundary layer at the wall will probably be somewhat elevated.  I don't know how that would affect humidity since that's driven by diffusion.  But, the air return would solve the problem fairly effectively.

As for dust, you could probably just wrap a layer of speaker foam or fabric around the sensor if you noticed a build up.  I'd probably leave it in the open for a while to see if it's a real issue as you may slow readings significantly by installing such a filter.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 25, 2012, 03:26:32 PM
Another advantage of installing it behind the return duct grille is that I don't need to worry about punching a hole in the wall, and cleaning it up afterward.
The question is, could placing the sensor in the stream of the airflow in the duct cause an inaccurate reading, as compared to what the "real" thermostat is sensing on the opposite wall? I suppose I'd have to try it to be sure.
I used up my spool of CAT5, so I'll have to go buy another one before I can wire this up.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 25, 2012, 05:27:22 PM
The question is, could placing the sensor in the stream of the airflow in the duct cause an inaccurate reading, as compared to what the "real" thermostat is sensing on the opposite wall?
I'd actually ask that question the other way around. 
Quote
Could placing the sensor in the stream of airflow in the duct create a more accurate reading than what the "real" thermostat is sensing.
I'd say that the sensor in the air stream is going to be much more accurate than the thermostat.  It won't precisely match the value of the thermostat, but that's primarily because the thermostat is correctly reading what it sees at it's installed location.  That will not match the average conditions in your house.  If you want the average conditions, the best thing you can do is to use the air return duct...assuming you have enough spread throughout the home to provide correct central heating performance.

In my last house, we had a tri-level with a single return duct in the lowest floor.  It returned air from the entire house and caused a very large delta between upstairs and downstairs conditions.  In my current home, there are 5+ return ducts.  If I wanted to find the most accurate average temperature/humidity in the home, I'd put the thermohygrometer in the return duct where all the ducts meet at the furnace itself.

If, on the other hand, what you want is to see what the conditions are in a single room, you might be better placing the sensor(s) somewhere near the center of the room volume.  If there's any air flow, the distance from the center becomes less critical.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 26, 2012, 08:36:27 AM
The question is, could placing the sensor in the stream of the airflow in the duct cause an inaccurate reading, as compared to what the "real" thermostat is sensing on the opposite wall?
I'd actually ask that question the other way around. 
Quote
Could placing the sensor in the stream of airflow in the duct create a more accurate reading than what the "real" thermostat is sensing.
I'd say that the sensor in the air stream is going to be much more accurate than the thermostat. 

What I was getting at, is would the moving airflow throw off the temperature sensors, the way you feel cooler when there is a fan blowing on you?

We have a two-story house (main floor and basement), with one return on each floor. We have a forced hot air gas furnace, with central air. My one thermostat controls both systems (and can actually switch between the two to keep the house within a predefined temperature range). My idea was to put temperature sensors behind each return grille, and an additional one just before the air enters the furnace (which should give me a mix of the two temperatures). There isn't much I can do to fix airflow issues without a major reworking of the ductwork, but I'm curious to chart the difference between the upstairs and downstairs, especially as we move from winter into summer.
I also plan to put a sensor in the plenum just above the furnace, so I can compare the inlet and output temperatures  and make sure the A/C and furnace are doing their jobs properly.

I'm having an energy audit done next week, and I'm hoping the auditor will find the data I already have to be somewhat helpful.
I can already look at how fast the temperature drops when the system is turned down to "away" mode, and chart that against (slightly inaccurate) outdoor temperature.

I have to figure out how to get the sensor into the return duct now. The grille is painted to the wall, and I really don't want to mess that up by removing the grille. My dad suggested dropping a string with a weight on it down through the grille, and pulling the wire with the sensors attached back up. If I make a hook out of a paper clip, I should be able to carefully hook it onto the inside of the grille. I can get the wire out of the return duct at the bottom pretty easily.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 26, 2012, 12:13:53 PM
Ahhh, I see what you are asking now.  No, measuring the temperature in still versus moving air should give you the same results.  I work in aerospace with fluid flow (CFD primarily), and the differences between moving and static air are important and looked at using total and static air temperatures.  In your case, you are looking at flow speeds so small that there will be no significant pressure difference thus there should be no issues.

I just replaced my furnace last month because it was really old and did not provide sufficient heat.  The furnace would provide air through the registers at up to 70°F, but because the air was moving fairly quickly it felt more like 50°.  The obvious issue comes down to convection.  Our bodies are 99.5°F nominally at the core and 98.6° measured orally.  Skin temperature is lower and depend on location on the body as well as time of day relative to activity level (and lots of other things).  In any case, the skin temperature will certainly be much higher than 70°.  In order for the air to feel warm, the air must be warmer than skin temperature such that the delta temperature between the air and skin drives heat into the skin.  70° air moving at any speed will feel cold.  90°+ air will feel warm.  Oil furnaces can provide air at over 100° easily and are considered the most comfortable for that reason.

In any case, the point is that the sensors that you are using do not take this convection into account and simply report the air temperature itself.  In short...you should be fine.


EDIT:  I just found this site that has a cool plot with different body temperatures at different ambient temperatures.  I'm a geek engineer, so I'm gonna post it!   rofl

http://www.healthyheating.com/Definitions/facts_about_skin.htm
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 26, 2012, 03:27:32 PM
Thanks for the info.
That explanation made a lot of sense to me (and also better explains why I could heat up a sensor by pinching it between my two fingers (which are warmer than room temperature), but I couldn't get it below room temperature by aiming a fan at it. I WAS able to cool it slightly below room temperature by clipping on a copper clip, that had been cooled in a cup of ice water. Of course, the effect only lasted a few seconds.

I need to find the time (and more wire) to wire up the sensors on a long enough wire to run up through the return duct.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 27, 2012, 10:43:32 AM
One thing I forgot to mention about temperature measurement that may be important here depending on your furnace's design.  There are 2 types of thermocouples generally used for measuring temperatures (shielded and unshielded).

Thermocouples can be used to measure both surface and fluid temperatures.  When the temperature of the surface/fluid is around the same as the surrounding, it is acceptable to use unshielded sensors.  If, on the other hand, there are large variances in temperature between the area of interest and it's surrounding surfaces, the sensor can (and likely will) see a radiation component.  Think about standing in the sun on a cold day with no wind.  If you face the sun, your face might feel warm, but your back will be cold...radiation!  I can go on and show the physics, but basically here's the gist...make sure the sensor is not facing anything hot (like the burner or heating elements).  If the installation location can see this location, just make sure you have something blocking the device's view.  The DHT11/22 has a plastic case that probably works fine for this since the sensor is on a PCB inside the shell.  The DS18B20 and DS18S20 do not have a shield, so it might be advisable to consider where they are installed.

Since radiative heat transfer is 4th order (Tsurf1^4 - Tsurf2^4), the hot surface needs to be very warm to make a significant difference.  You could probably just install both the DHT11 and DS18S20/DS18B20 and see if they report different values.  If they are, consider making a simple change.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 27, 2012, 12:06:03 PM
Thanks for the tip.
I found one more long scrap of CAT5 in my wiring box last night.
I cut up a DC-ROM audio cable, to get the 4-pin sockets from the ends. These are perfect for both the DSB1820 and the DHT11, allowing me to swap out sensors if need be, without having to solder more.
I put both connectors onto a small piece of perfboard (I still have to hot-glue them in place or something), and wired them to the end of the cable. A little white electrical tape will make it less noticeable once it is inside the vent (of course I can't tape over the sensors themselves).
I hope to have time this weekend to pull the wire up through the duct, and hang it from the inside of the return grille. Then, I have to wire it up to the arduino and test it.

I'm still trying to figure out the best way to interface all this with the Arduino.
I have a prototyping shield, that already has my status LEDs, and all the needed resistors for the inputs and outputs. I have a set of 4 wires that go to a terminal strip where I connect the wires from the furnace/thermostat interface. I have another set of wires going to a second terminal strip, where I have the wires from most of the DS18B20 and DS18S20 sensors coming in. I also have wires going from there to a small breadboard where I have two more DS18B20's. It is a good place to add stuff for testing, without disturbing the screw terminals on the terminal strip. Another set of jumpers temporarily goes from the Arduino to that same breadboard for the DHT11 at the moment. I just have to pull the shield off the Arduino, and solder in a more permanent set of interface wires for the DHT11 (I might add a second data channel wire while I'm at it, for future expansion).
Eventually, I'll replace the Arduino Mega with the Uno that I bought. I have a few of the "Really Useful Boxes" (from Office Depot), which are the right size to make an easy enclosure. I'm not sure how to do the external connections, though. I want to be able to disconnect the wires coming in relatively easily, if I need to take the system apart to move it or make changes. I was thinking of attaching a screw terminal strip to the box, and connecting everything that way. I can join the DS18B20/DS18S20 wires together at a point closer to where they diverge to go all over the house, and have that be a bit neater, too.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 27, 2012, 02:31:30 PM
Is this going to be a permanent setup?  Since you are having a HVAC person come into your home and he will know about this setup, he is going to tell you that you need to use plenum grade wires if they are installed in the HVAC.  If it's temporary, I wouldn't worry about it.

Otherwise, this looks like it will work out nicely!  I'm itching to get my DHT11's and temp sensor samples!
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 27, 2012, 02:56:37 PM
Is this going to be a permanent setup?  Since you are having a HVAC person come into your home and he will know about this setup, he is going to tell you that you need to use plenum grade wires if they are installed in the HVAC.  If it's temporary, I wouldn't worry about it.

Otherwise, this looks like it will work out nicely!  I'm itching to get my DHT11's and temp sensor samples!
I don't know about permanent, but certainly long-term.
I don't have an HVAC person coming - I'm having a Home Energy Audit done.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 27, 2012, 05:26:29 PM
Ahhh, ok.  Plenum grade wires are designed to go inside plenums (HVAC ducts).  The difference is that these wires have insulation that won't create a toxic cloud if burned.  It's something that needs to be considered when installing in buildings and would definitely be better in your case.  However, since no one will ever check, it's not really a huge deal.  I can't say for sure how much better it is to breath smoke from plenum grade wire bundles vs standard.  I personally would avoid breathing in either one!
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 29, 2012, 12:30:10 PM
My DHT11's showed up yesterday.  WOHOOO!  I dug out some CDROM audio cables, but they generally seem too loose fitting on these very thin connectors.  I found a couple power y-adapters (standard molex to standard molex + disk drive molex) and they fit very snugly.  I bet this is the type of cable i can order from Hong Kong for $0.30USD shipped.   rofl
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 29, 2012, 01:25:07 PM
My DHT11's showed up yesterday.  WOHOOO!  I dug out some CDROM audio cables, but they generally seem too loose fitting on these very thin connectors.  I found a couple power y-adapters (standard molex to standard molex + disk drive molex) and they fit very snugly.  I bet this is the type of cable i can order from Hong Kong for $0.30USD shipped.   rofl
I found a few that were too loose, but I also found a few that seemed perfect, when I pushed the DHT11 all the way in.
I don't know if it helps, but they were the kind with the same type of "CD-ROM" connector (with the little latch) at both ends.

I pulled the wire up through the return duct last night, but I pulled it out after about an hour. I wasn't seeing a real difference between the upstairs and downstairs temperatures (there probably isn't much, AND the DS18B20 probably isn't sensitive enough to matter for this application). Also, the DHT11 was reading way off (about 10% high). I think one of mine was off my more than the others, and I'll bet that was it.

I think I can do without measuring both upstairs and downstairs temps, certainly for now.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 29, 2012, 01:52:39 PM
Interesting details.  I just placed an order at allelectronics.com last week for a few supplies to tinker with (potentiometers, push buttons, etc).  I wish I had realized that the cdrom cables I have won't work that well.  Those guys have 4-pin connectors that look perfect and have a 10" lead on the end for soldering/whatever.  $1.35 each, but shipping is a flat $7.  DOH!   rofl
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 29, 2012, 03:00:39 PM
Interesting details.  I just placed an order at allelectronics.com last week for a few supplies to tinker with (potentiometers, push buttons, etc).  I wish I had realized that the cdrom cables I have won't work that well.  Those guys have 4-pin connectors that look perfect and have a 10" lead on the end for soldering/whatever.  $1.35 each, but shipping is a flat $7.  DOH!   rofl
Have they shipped yet? If not, perhaps they would be willing to add the items to your order, even if it pushed the shipping date back for the rest of the order.
Title: Re: Temperature/Humidity monitoring
Post by: Brian H on January 29, 2012, 07:01:15 PM
That is what usually happens to me.
Study the sales page and catalog for a real long time.
Pick out what I want.
Place the order and two days later an added project is thought of and I needed more parts.  ???
Title: Re: Temperature/Humidity monitoring
Post by: beelocks on January 29, 2012, 08:17:57 PM
It normally happens to me about 20 minutes after shipment has left the building  rofl
Title: Re: Temperature/Humidity monitoring
Post by: Noam on January 29, 2012, 09:00:44 PM
We seem to have gotten a little off-topic, from our original digression (didn't this thread start as a question about using X10 to monitor temperature and humidity?), but I wanted to post an update (for those following my project, at least. Maybe I really should be blogging this or something - that is, if I had a blog to post it on...).
Today I made some major strides toward actually finishing this project.

I moved the code from the Arduino Mega 2560 that I'd started on (and purchased to be a "development" board for future projects) to the Uno that I bought once I got a working system. I make a box for it out of a "Really Useful Box" I bought at Office Depot. I had seen a post about using those boxes somwehere, and the smallest size is actually perfect for the Arduino. However, since I wanted room for some interface jacks, I went with the next size up. I cut holes in one end for the USB and power jacks (although I'm powering it off the USB), and then cut holes in the lid for three snap-in CAT5 jacks. I wired one jack up to the input wires on the Arduino for the signal from the thermostat, one jack for the OneWire bus, and one jack for the DHT11. On that jack, I added a second "data" wire, in case I decide to add a second DHT11 in the future.
I was already using CAT5 with an RJ45 on it coming from the furnace, since I tied that to the office through my patch panel. I took two other CAT5 cable ends (I have a pile that came off an old equipment rack at work - they just cut all the cables when they took it apart), wires one to the terminal strip that ties my OneWire sensors together, and connected the other one to the breadboard where the DHT11 lives for now. It looks really nice, and the clear box (they come in various translucent colors, too) makes it easy to see the three "status" lights on the board.

A little work with the P-touch, and it looks pretty good!

I still have to do the following:
1. Install OneWire temp sensors in the return duct (right before the filter), and the plenum (above the A-coil). I can then remove the probe I have sitting in front of the vent in the office.
2. Find a location to mount the DHT11 (possibly with the DS18B20 in the return duct).
3. Run a new set of CAT5 cables to tie everything back into the project box neatly.
4. Look into improving my data logging. My current PERL script works, but I've been told that Python would be better. I just need to learn enough Python to do it.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on January 31, 2012, 11:39:26 AM
The order from AllElectronics.com arrived yesterday.  I'm glad I ordered a variety of potentiometers since half of them were not exactly as pictured.  They match the picture, but since they are all listed as "PCB mount", I couldn't tell physically how big they are (no dimensions provided nor stating pin spacing/size).  As a result, I have 1 set that are perfect, another set that will probably work ok, and 2 other sets that are near useless.  Oh well!

Anyway, when I was browsing their catalog that was included, I found that they sell the Sensirion SHT-75 for only $15USD.  Everywhere else I've seen this unit it's 3-4x that price.  In any case, I may move up to that sensor if the DHT11 doesn't provide sufficiently accurate results.

http://www.allelectronics.com/make-a-store/item/THS-75/TEMPERATURE/HUMIDITY-SENSOR-W/LEADS/1.html

And, here's a set of code that should make them work with the Arduino (haven't done any digging to check that, or even finished reading the thread yet).
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1223311726/0
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 01, 2012, 12:33:10 PM
I took a few minutes last night to see if I could read some data off the DHT11 via the Arduino using the cookbook code from arduino.cc.  Turns out I failed.   ;D

http://arduino.cc/playground/Main/DHT11Lib

I simply copied the 3 blocks of code over to a sketch, hooked up the DHT11 on a breadboard with power, ground, and data (with 10k pullup resistor).  The code refuses to compile, so I must be doing something wrong.  I was able to get a few digital and analog input sketches to work fine, so this must be a problem with the way I'm including the code.

Does anyone have a sketch that they could post that works so I can see why I'm doing it wrong (a zip of the sketch directory would be best).  Thanks!
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 01, 2012, 12:42:59 PM
One more search found a potentially helpful page.  I'll give this a try and beg for more help if it fails.    :'

http://www.ladyada.net/learn/sensors/dht.html
Title: Re: Temperature/Humidity monitoring
Post by: Noam on February 01, 2012, 01:44:44 PM
What errors did you get when you compiled?
Did you install the DHT library in your Arduino folder?
You might have an older version of the DHT library (pre-Arduino IDE version 1). In that, case, some of the file names have changed. Look for a newer version of the library.  I'm using a library, which I think is called "dht11_lib," which is from December 2011.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 01, 2012, 02:10:27 PM
I thought the DHT library needed to be in the sketch folder.  Maybe that's the issue.  They need to be placed in a library directory in the Arduino IDE program directory?
Title: Re: Temperature/Humidity monitoring
Post by: Noam on February 01, 2012, 02:21:02 PM
I thought the DHT library needed to be in the sketch folder.  Maybe that's the issue.  They need to be placed in a library directory in the Arduino IDE program directory?
I don't know for sure, but I've always made sure to put them in the Library directory. That way, they are available to multiple sketches as well.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 01, 2012, 03:36:09 PM
I reread the tutorial and it does actually say that it needs to be in the <arduinohome>\library directory.  I was putting it in the mydocuments\arduinocode (or whatever) directory.  That's probably what's going on.  I'll move it and try again.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 02, 2012, 01:42:31 AM
Figured it out!  I need to verify, but it looks like the 4 sensors do not report the same values sitting in the same location.  That's difficult to say since i had to hold them in my hand when installing which changes the temp and thus RH.  I'll have to wire all 4 up and switch the data line back and forth.  Or, maybe I can get 2-4 hooked up at the same time and record the values simultaneously.  Should be interesting.

Next, I need to get the relays tested.  I was hoping to get a verification of the pinout from the ebay seller.  Unfortunately, the seller didn't know anything.  I think I've figured out the pins, so it just comes down to testing!
Title: Re: Temperature/Humidity monitoring
Post by: Noam on February 02, 2012, 09:42:08 AM
I found something similar (although I was only testing humidity levels at the time).
I ended up writing a test program just to check the four sensors.
I wired up all four at once on a breadboard (using 4 separate data lines), and let the numbers settle down for a little while.
They were still not all reading the same, which I think is just a function of the design of the part. The cheaper you go with these things, the less accurate (or consistent) they seem to be.

You may want to do something similar, hook them all up at once, and just let them sit like that for an hour or two. Perhaps the sensors take longer to recover than the Dallas OneWire ones do.

I wish Maxim made a OneWire sensor for humidity. That would simplify my project a whole lot.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 02, 2012, 11:39:08 AM
Yup, that's exactly what I was planning.  I hooked the first one up on a breadboard, so I'll just duplicate that and connect the other lines up to other data pins.  I'm proficient enough with programming that I feel comfortable digging into the code to simply output all the data at once.  Should be simple enough!
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 08, 2012, 03:49:20 PM
I was struggling with getting the 4 DHT11's working at the same time on my Arduino last week.  I thought I would have it licked over the weekend, but then I had my development laptop stolen.  I'll have to start over from whatever code I still have on the backup flash stick.   B:(

At least there was nothing important taken and I have backups of the majority of my code!
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 26, 2012, 12:23:53 PM
I've been monitoring the 4 DHT11 sensors hooked up to my Arduino for the last day and a half.  It appears that they all follow a trend pretty well, but they certainly aren't calibrated particularly well.  Here's the output I'm seeing from these 4 all lined up in a breadboard.

Quote
DHT11 test!
T1 (F)   T2 (F)   T3 (F)   T4 (F)   H1 (%)   H2 (%)   H3 (%)   H4 (%)
66.20   62.60   66.20   66.20   43.00   42.00   47.00   45.00

As you can see, T1, T3, and T4 are pretty good.  T2 seems to have an offset that's always around 4°F lower than the rest.  For reference, my DMM reports that the actual temperature is 67.5°F.  H1, H2, H4 are reasonably close with a slight offset that's consistent.  H3 is always off by a couple %RH.  These modules are spec'ed to ±2°C and within 5%RH.  At that rate, I guess these are within margins for the manufacturing specs.  If they are simply offset consistently, I think I'd be pretty well off as I could just label them and make sure they get installed in the slot where I apply a similar offset.

If this error remains consistent, I doubt I'll be investing in the DHT22 or SHT75 until these DHT11's start to die.

Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 26, 2012, 12:39:41 PM
I just found this thread regarding SHTxx and found the results very interesting.  If the results on typical units is really that close, I may switch over after all!  Granted, mine cost ~$2.50USD each and the best price I can find the HST-75 for is $15.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1223311726/15
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on March 08, 2012, 12:25:30 PM
I wrote some code for the Arduino that should do what I need, but unfortunately the gap in readings may cause me enough issues that this won't work.  As reported before, the offset between sensors for both temp and humidity are relatively large.  The only way I can be sure that the delta is consistent is to vary the temperature and record the differences.  I guess I'll have to get a long extension for my USB and move the sensor to different parts of the house and outside (perhaps in the refrigerator and/or freezer as well.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on December 29, 2012, 08:17:06 PM
I'm reviving my old topic to ask a higher level question directly related to this implementation.  I live in the pacific northwest which means highly wet winters.  I currently have a temperature and humidistat wired up in parallel. If the temperature or humidity exceed the set point, the fan turns on until both set points are relieved.  The problem is that 60%RH is what I've heard is good for an attic to avoid mold issues. If I set the humidistat to 60 and it's 60+ outside, I'm pulling in air that's at least as wet as is already inside AND I have the fan running indefinitely.

I'm going to use a sensor inside and outside to only pull in cooler air (for summer) or less humid air if under 60.  I was wondering if 60 is a good value though?  Also, is it better to have moving humid air or just let it stagnant since I can't reduce humidity anyway?

Any thoughts?
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 20, 2013, 01:32:10 PM
I completed the project and thought everything was going to work great.  Well, I have an issue that I never expected and am not sure how to resolve.  For reference, my full CM15A setup can be viewed in this thread:

http://forums.x10.com/index.php?topic=22657.msg143881#msg143881

Basically:

CM15A (f-connector modded) -> amplifier power inserter -> 3ft RG6 coax -> gold 90° connector -> Wall plate (zinc? coupler) -> RG6 coax to basement structured media box -> in-line amp (ebay) -> RG6 coax to attic -> in-line amp (RS) -> Coax-to-SO239 adapter -> Antenna (RS 20-176)

Now, I have my attic fan controller which consists of an Arduino Uno, 3 DHT11 sensors wired remotely (1 in each attic + 1 outside), CM17A.  The controller is located in the same attic as the CM15A antenna so I assumed even if there's some problem with the Arduino's power output to the CM17A, it should still be able to transmit 5-10ft.  Well, it appears that there is a range problem...it's too close!  I have tested with a palm pad remote (HR12A).  I can get inconsistent results if I place the remote in various locations, but I need much better accuracy than what I'm seeing.

The options I'm seeing currently are:
I don't want to move the controller since the location it's currently in is much easier to access and obviously I'd have to redo the sensor wiring to some degree (small inconvenience).  I would prefer not to install an ethernet shield since I'm not positive on the wiring availability of network cable in the attic.  Also, I don't want to rely on the HA computer for the fan.  That's the whole point of the Arduino.  If I was going to use the PC, I could have just purchased some wireless Oregon sensors and moved on.  I'm hoping someone here will have some advice on the antenna situation.  If not, I guess I'll be buying a wired transmitter.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 20, 2013, 01:43:16 PM
A bit more info:

I did a bit of testing with both location of the fan controller (CM17A) as well augmenting with a TM751.  When I used a TM751 in the attic, no matter where the controller was placed, the fan would work.  Without the TM751, I was able to find one location that I thought was very reliable, but it turned out not to be (~5ft above and 8ft away from the RS antenna).  The cheapest and easiest thing I could do would be to just install the CM751 in the attic, but that's dumb to have an antenna right next to an antenna.  It will likely cause signal collisions which would reduce the overall system reliability.  I also thought about adding a second antenna for the CM15A in the other attic to increase overall range but I'm concerned how that would react to seeing the same signal fractions of a second apart.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on February 20, 2013, 02:09:26 PM
I suspect you have a frequency alignment problem. The CM17A is LC tuned, the CM15A has a superheterodyne receiver which is very narrow-band but also LC controlled. The TM751 is LC controlled but is a very wide-band superregenerative design so it may hear signals to which the CM15A is deaf.

A solution might be to use a SAW controlled transmitter (would require recoding your Arduino app) and to replace the RF receiver in the CM15A with a ceramic resonator controlled wideband superheterodyne design.

If you'd like to try it, I'll give you a 310MHz SAW controlled transmitter (4-pin module like shown in the URL below) and RX310SH-WB receiver. You pay Priority Mail Postage.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 20, 2013, 02:44:56 PM
I have some receivers on order on a slow boat, but no transmitter.  I was thinking of modifying the cm15a already, so now might be a good time to try.  Yeah, if you have the recommended pair already, I'd gladly pay postage.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on February 20, 2013, 03:05:18 PM
Check your Private Messages.

BTW, RF travels at near lightspeed so you'd be hard pressed to measure any difference in reception time for two receivers within range of any X10 RF transmitter.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on February 20, 2013, 03:44:49 PM
I guess I was thinking the RF transmission would be the same 60Hz signal as the PLC.  Now that I think about it, that would be silly.  I suppose I could consider an extra antenna, but that's going to be a last resort.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on March 06, 2013, 01:09:14 PM
I moved the fan controller down to my work bench in the basement to check wiring etc.  While I was down there, I realized that I have a XTBM sitting there that could have been used in the attic to see if ANYTHING was being seen by the CM15A and converted to PLC.  When the fan controller sends a command, it appears that sometimes it's not being received as expected.

For instance, I send a C3 Bright command and the XTBM displays "Cxx BRT".  I need to check the log in AHP to see what was actually received.  I wonder if the commands are actually being sent but are being broken by something in the setup or by some other interference.  This will take some testing!

FWIW, I pulled the controller and disassembled as I found that with no DHT11's plugged in, the controller worked perfectly.  When I plugged 2 or 3 in, it did not.  I was given the suggestion on the arduino.cc forum that perhaps the voltage was dipping for some reason on the 5v rail.  It does not change at all no matter what the controller is doing and stays at a consistent 5.08v the entire time.  I don't know how to adjust the averaging time on my DMM, but I would have expected a flicker if there was an issue...and there is none.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on March 06, 2013, 02:33:51 PM
I assume your Arduino sends X10 RF codes via the Firecracker. This is rather goldbergian.

If you look at the X10 RF Protocol (http://davehouston.org/rf.htm), the data pulses are only 0.005 seconds wide. Missing one of them would invalidate or change the code, causing the CM15A to ignore it. And, while the Firecracker is very forgiving in terms of timing, it is critical that one of the handshaking lines remain high at all times - if not, the Firecracker resets. And, the PIC in the Firecracker needs a certain voltage level on its pins to be seen as "logic high".

IOW, you have a very complicated data chain and you really need much more sophisticated diagnostic gear to see what's going on. You need to be able to record the voltage on the Firecracker handshaking lines and also monitor the RF transmissions directly using an independent RF receiver.   

My own preference would be to ditch the Firecracker and rewrite the Arduino code to utilize a standalone 310MHz RF transmitter. That greatly simplifies things, making it much easier to troubleshoot.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on March 06, 2013, 04:16:14 PM
When I used a TM751 in the attic, no matter where the controller was placed, the fan would work.
Can you clarify this a bit? Were you using your Arduino/Firecracker setup to send RF to the TM751? That's how I interpreted your post but now I want to be sure.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on March 06, 2013, 04:21:08 PM
By chance, I do have a standalone 310MHz RF transmitter  :'

I was considering doing that, but since I already have the proto shield wired up and seemingly good to go, I was hoping to use it that way.  If it doesn't look like that will work out, my choices are either use a different RF device (like the one you sent), or just purchase a PSC04 or PSC05 and communicate via PLC.

I wasn't able to get the CM17A->CM15A to work reliably so I dug out a TM751.  I was able to use the CM17A->TM751 and it worked correctly as I recall (it was a while ago).  The CM15A was still connected at the time of that testing.  I simply added a TM751 to see if that would work better.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on March 06, 2013, 10:11:11 PM
In my own setup, I'm connecting the Arduino right to the TW523 port of my XTB-IIR. It works just fine for me every time. However, it isn't using RF, so there is no chance of RF reception problems.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on March 07, 2013, 05:38:20 AM
I think a PL513/PSC04 might be the best way to go.

I'm suspicious of the Firecracker timing. A long time back I  tested the TM751 & RR501 and found both very forgiving in terms of the length of pulses/spaces in the RF bitstream (I tested to ±20% with no problems.) but I never tested the CM15A in this way - it may test the bitstream in a different way, making it more sensitive to variations.

One other factor may be the way you power the Arduino. I have never been a fan of the Arduino power scheme. I assume you are using an external power supply and not the USB connector.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on March 07, 2013, 09:36:04 AM
I'm not sure the problem is the firecracker at this point.  I read the documentation in the firecracker arduino library again and found that the bright command is executing as designed.  The command is only sending the command part of the signal and not the house and unit code first.  So, that's not an issue after all.

I hooked everything back up in the attic again and found that if I unplug the north attic sensor, everything works fine.  I can connect other sensors to that one's spot, so the arduino is good.  I have a long run to that sensor and it's next to other cables, so perhaps there's some interference, a bad cable, or a bad sensor.

I'm getting closer!
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on March 08, 2013, 05:22:47 PM
In my own setup, I'm connecting the Arduino right to the TW523 port of my XTB-IIR. It works just fine for me every time. However, it isn't using RF, so there is no chance of RF reception problems.
My XTB-IIR is in the basement too far from the attic sensors unfortunately.  But, Since I already have one and it would be a reasonable test to program the arduino to use it, do you have any links or documentation on using the XTB-IIR as a TW523?  Maybe the port is exactly the same so I just need to build an adapter?
Title: Re: Temperature/Humidity monitoring
Post by: Noam on March 11, 2013, 01:01:58 PM
If I remember correctly, the port on the XTB-IIR *is* exactly the same as on the TW523.
However, the documentation I found for interfacing the Arduino with the TW523/PSC501 was inconsistent. Some of it had the wrong pinout.
I don't have my own notes in front of me, but I think I needed two pins on the arduino, plus +5v and gnd. There is a resistor somewhere between two of the pins, too.
My arduino is connected to the XTB-IIR with a modular phone cord (regular flat 4-wire), about 70 feet long. I haven't had any issues with it.

I am only using the TW523 port on the XTB-IIR for sending commands right now. My plans for a multiple input/output Arduino-based PowerFlash/Universal Module device are still stuck in the planning phases. I haven't figured out how to deal with momentary button pushes (since it takes longer to actually send the commands than to press the button, so I'd need to queue up the detected button pushes). It has been a very low priority for me, so I haven't spent much time on it lately.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on March 11, 2013, 01:08:11 PM
That sounds consistent with what I found regarding Arduino-TW523 setup.  I saw one schematic that appeared to gfound the middle 2 pins on the TW523 and another that didn't. I think the difference was whether the Arduino was just sending commands or if it was receiving them as well.
Title: Re: Temperature/Humidity monitoring
Post by: Brian H on March 11, 2013, 02:12:33 PM
The TW523 has one common pin {2}  for all three signals. Zero Crossing, Received Data and Transmitter control.
The PL513 has a separate common pins {2&3} for Zero Crossing and Transmit Control.
http://software.x10.com/pub/manuals/technicalnote.pdf
On a TW523 tying 2-3 would connect the received data pin #3 to common pin #2  but if you are not using it. That maybe what they wanted. As it is optoisolated and a open collector output.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on March 11, 2013, 03:11:30 PM
You need a 4.7K pullup resistor (i.e. to +5V) on pins 1 (ZC) and, if using it, pin 3 (X10 Receive Output).
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on March 29, 2013, 12:43:04 AM
I have a few angles that I am working through on this project.  I don't have the time to spend one good chunk of time on this to get it knocked out at once, but I'll get there hopefully.  Since I have a XTB-IIR,  I'm going to program an arduino with a simple test.  But, I have the wireless already wired up and figured it was worth the time to debug.

What I think I found is that although the antenna setup gets really good range in one direction, it seems to have poor range in others.  Also, the short range seems very poor. Unless I put the antenna in exactly the right angle.

I have no problem moving away from wireless since it should be more reliable, but I'd like to have the wireless more reliable too. 
Title: Re: Temperature/Humidity monitoring
Post by: dave w on March 29, 2013, 10:42:26 AM
Also, the short range seems very poor. Unless I put the antenna in exactly the right angle.
If you are using a 1/4 wave with ground plane, or a 1/2 wave antenna, they will have a dead area directly below the antenna. I have had some luck with a 1/2 wave, no ground plane, and the 18 inch element bent 90 degrees at 9 inches. It probably cuts down my overall range, but it gives me better coverage directly below the antenna. dhoustons circular "egg beater" antenna would likely fix my coverage voids since it addresses horizontal-vertical polarization.  
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on March 29, 2013, 10:52:37 AM
I originally bought the RS antenna since I thought the 4 elements were a tetrahedral shaped array which would provide a really nice omni range.  I checked last night and found that only the vertical wire is a receiver and the horizontal elements are the ground plane.  The vertical element is 18-19" long and there are two 4.5" short elements near the base.

The other thing I noticed was how much the rafters affect reception.  If I place the antenna on a joist such that the vertical element rests on a rafter, it appears that my short range reception is nearly zero.  That could be a fluke since rotating the whole antenna does seem to change things.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on March 31, 2013, 03:57:27 PM
A quick question for anyone using the PSC05 with arduino (or at least have looked at it).  I am looking at using the code written by Thomas Mittet since it compiles with Arduino 1.0 and above.  Looking at the documentation for X10 on the arduino library (http://arduino.cc/en/Tutorial/x10), it says a pullup resistor is needed on the data pin.  There are 2 data pins for the PSC05, so I would assume I'd put resistors on both (I think that's in line with what Brian H said above).  But, looking at the Mitten code, it doesn't show/say anything about pullup resistors.  I suppose having them won't damage anything should they not be required, so I guess I'll start off with them installed.  Any opinion on why it's not mentioned for this newer code (or perhaps I missed it)?

EDIT:  Never mind.  I don't see why it's not listed in the Mittet code but even the technicalnote.pdf has the pullup resistors in the schematic.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 07, 2013, 01:44:18 PM
I got my PSC04 in the mail a couple days back.  I thought I could use the Arduino code and hardware as is, but apparently the PSC05 connection doesn't make the PSC04 happy.  I simply removed the pullup resistor and added a jumper to ground and it works fine.  I simplified my code to almost nothing so as to make sure the basic transmit function works.  What I found is that the XTB-IIR does not like the PSC04 for some reason.  Perhaps someone could give some guidance?

This is my code:
Quote
#define DEBUG

#define VERSION "Attic Fan Controller TEST 20130407"

#include <dht11.h>
#include <SimpleTimer.h>

#include <X10ex.h>

#define POWER_LINE_MSG "PL:"
#define POWER_LINE_BUFFER_ERROR "PL:_ExBuffer"
#define SERIAL_DATA_MSG "SD:"
#define SERIAL_DATA_THRESHOLD 1000
#define SERIAL_DATA_TIMEOUT "SD:_ExTimOut"
#define MODULE_STATE_MSG "MS:"
#define MSG_DATA_ERROR "_ExSyntax"

// Fields used for serial and byte message reception
unsigned long sdReceived;
char bmHouse;
byte bmUnit;
byte bmCommand;
byte bmExtCommand;


// Initialize timer
SimpleTimer timer;


// X10 related values
#define Fan1_HC    'E'              // Fan_1 on house code C
#define Fan1_UC    1                // Fan_1 on unit code 1
#define Fan2_HC    'E'              // Fan_1 on house code C
#define Fan2_UC    2                // Fan_1 on unit code 1



// general constants
#define FanRunTime 2000
#define X10CommandDelay 1000         // delay after sending command to avoid collisions



// X10 Power Line Communication Library
X10ex x10ex = X10ex(
2, // Zero Cross Interrupt Number (2 = "Custom" Pin Change Interrupt)
4, // Zero Cross Interrupt Pin (Pin 4-7 can be used with interrupt 2)
5, // Power Line Transmit Pin
6, // Power Line Receive Pin
true, // Enable this to see echo of what is transmitted on the power line
powerLineEvent, // Event triggered when power line message is received
1, // Number of phases (1 = No Phase Repeat/Coupling)
60 // The power line AC frequency (e.g. 50Hz in Europe, 60Hz in North America)
);

void setup()
{
  Serial.begin(9600);
  Serial.println(VERSION);

  x10ex.begin();
  Serial.println("X10 active");
}

void loop()
{
  delay(FanRunTime);
  TurnOnFan_1();
  TurnOnFan_2();
 
  delay(FanRunTime);
 
  TurnOffFan_1();
  TurnOffFan_2();
 
  delay(FanRunTime);
}


void TurnOnFan_1()
{
  // turn fan1 on and start run timer
  Serial.println("Turn ON Fan 1");
  x10ex.sendCmd(Fan1_HC, Fan1_UC, CMD_ON, 1);
  delay(X10CommandDelay);
}

void TurnOnFan_2()
{
  // turn fan1 on and start run timer
  Serial.println("Turn ON Fan 2");
  x10ex.sendCmd(Fan2_HC, Fan2_UC, CMD_ON, 1);
  delay(X10CommandDelay);
}

void TurnOffFan_1()
{
  // turn off fan1 and start delay timer
  Serial.println("Turn OFF Fan 1");
  x10ex.sendCmd(Fan1_HC, Fan1_UC, CMD_OFF, 1);
  delay(X10CommandDelay);
}

void TurnOffFan_2()
{
  // turn off fan2 and start delay timer
  Serial.println("Turn OFF Fan 2");
  x10ex.sendCmd(Fan2_HC, Fan2_UC, CMD_OFF, 1);
  delay(X10CommandDelay);
}


//**************************************************************
// Process messages received from X10 modules over the power line
void powerLineEvent(char house, byte unit, byte command, byte extData, byte extCommand, byte remainingBits)
{
  // Display any recieved messages
  printX10Message(POWER_LINE_MSG, house, unit, command, extData, extCommand, remainingBits);
}

void printX10Message(const char type[], char house, byte unit, byte command, byte extData, byte extCommand, int remainingBits)
{
  printX10TypeHouseUnit(type, house, unit, command);
  // Ignore non X10 commands like the CMD_ADDRESS command used by the IR library
  if(command <= 0xF)
  {
    Serial.print(command, HEX);
    if(extCommand || (extData && (command == CMD_STATUS_ON || command == CMD_STATUS_OFF)))
    {
      printX10ByteAsHex(extCommand);
      printX10ByteAsHex(extCommand == EXC_PRE_SET_DIM ? extData & B111111 : extData);
    }
  }
  else
  {
    Serial.print("_");
  }
  Serial.println();
}

void printX10ByteAsHex(byte data)
{
  Serial.print("x");
  if(data <= 0xF) {
    Serial.print("0");
  }
  Serial.print(data, HEX);
}

byte charHexToDecimal(byte input)
{
  // 0123456789  =>  0-15
  if(input >= 0x30 && input <= 0x39) input -= 0x30;
  // ABCDEF  =>  10-15
  else if(input >= 0x41 && input <= 0x46) input -= 0x37;
  // Return converted byte
  return input;
}

void printX10TypeHouseUnit(const char type[], char house, byte unit, byte command)
{
  Serial.print(type);
  Serial.print(house);
  if(
  unit &&
    unit != DATA_UNKNOWN/* &&
   command != CMD_ALL_UNITS_OFF &&
   command != CMD_ALL_LIGHTS_ON &&
   command != CMD_ALL_LIGHTS_OFF &&
   command != CMD_HAIL_REQUEST*/)
  {
    Serial.print(unit - 1, HEX);
  }
  else
  {
    Serial.print("_");
  }
}

The other files required are the x10eh library found here (author Thomas Mittet):
https://code.google.com/p/arduino-x10/source/browse/trunk/Libraries/?r=66#Libraries%2FX10ex%253Fstate%253Dclosed

When viewing the signal on the XTBM, I see that 3/4 of the time the signal works fine but the rest of the time I get a collision.  If I turn off the XTB-IIR, the PSC04 transmits correctly every time.  This is sending the signal from a standard outlet remote from the XTB-IIR, but the signal from the PSC04 and XTB-IIR are both over 9.00.  I moved to a different location and tried again and with the repeater plugged in, I was getting mostly collisions and very few successful signals.

The last check was to move the setup to the XTB-IIR and plug it into the booster port on the front of it.  Using the same hardware and software, I got no collisions and all signals were received by the XTBM from a different circuit.

Does anyone have any clue why this could be happening?  I made sure to try without anything plugged into the circuit just to eliminate any signal suckers/noise generators.  I can play with the timing between signals, but the timing of the signal going to the PSC04 seems correct if it's working without the XTB-IIR connected or when plugged into the XTB-IIR booster port.
Title: Re: Temperature/Humidity monitoring
Post by: Noam on April 08, 2013, 05:49:21 PM
The XTB-IIR has a TW523/PSC05 emulator built into it (there is an RJ11 on the bottom of it). I am connecting my Arduino into that.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 08, 2013, 06:27:09 PM
Hen I plug the arduino into the XTB-IIR TW523 emulator port, things work great.  When I plug the PL513 into the XTB-IIR booster outlet, things work great.  When I turn off the XTB-IIR an plug the PL513 into a standard outlet, things work great.  When I keep the XTB-IIR on and plug the PL513 into a standard outlet, I get poor results.  It appears to me based on the limited equipment I have that the XTB-IIR is receiving the signal from the PL513 but thinks it's done transmitting too early and repeats before the PL513 is finished.  As a result, there is a collision.  I don't have any other device to drive the PL513, so I don't know if this is the arduino or the PL513 or the XTB-IIR.  I would lean towards the arduino library first.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on April 09, 2013, 05:51:31 AM
I would lean towards the arduino library first.
Not likely. The X10 PLC Protocol calls for sending during 22 contiguous half-cycles of the powerline with no breaks. It should not repeat unless your code is calling for repeats.

However, if there is an option to send only to a single phase, you might try that. It might be that the timing for the second and third phases is off. Also, make sure you are sending for 60Hz instead of 50Hz. I vaguely recall a post from Jeff about some sort of timing issue with certain transmitters.

Also, make sure your code allows for a minimum of 3 full cycles between commands. For example A1, Pause 3 cycles, AOn.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 09, 2013, 10:36:55 AM
The code allows for selecting the frequency.  It defaults to 50Hz, but I changed it to 60Hz.  I'll verify that it didn't somehow revert though.  Is it possible that the code isn't waiting long enough between sending the command?  I mean, doesn't X10 PLC send a command first selecting the house and unit codes and then a second with a house code and command?  If the gap between them is different than what the XTB-IIR is expecting, it could try repeating before the PL513 is done, right?  Looking at the Wikipedia article to refresh my memory, this is an excerpt:
http://en.wikipedia.org/wiki/X10_%28industry_standard%29
Quote
The protocol may transmit a message that says "select code A3", followed by "turn on", which commands unit "A3" to turn on its device. Several units can be addressed before giving the command, allowing a command to affect several units simultaneously. For example, "select A3", "select A15", "select A4", and finally, "turn on", causes units A3, A4, and A15 to all turn on.
I don't know how the arduino code is sending the command, so I guess I'll have to review.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 09, 2013, 10:57:37 AM
This is the list of global constants for the Arduino library.  I'm not sure if these timings are correct or should be tweaked.

Code: [Select]
// Number of silent power line cycles before command is sent
#define X10_PRE_CMD_CYCLES    6
// Sample delay should be set to 500us according to spec
#define X10_SAMPLE_DELAY    500
// Signal length should be set to 1000us according to spec
#define X10_SIGNAL_LENGTH  1000
// Set buffer size to the number of individual messages you would like to
// buffer, plus one. The buffer is useful when triggering a scenario e.g.
// Each slot in the buffer uses 5 bytes of memory
#define X10_BUFFER_SIZE      17
// Set the min delay, in ms, between buffering of two identical messages
// This delay does not affect message repeats (when button is held)
#define X10_REBUFFER_DELAY  500
// Chooses how to save module state and info (types and names).
// Set to 0: Neither state nor info is stored and state code is ignored
// Set to 1: Module state data and module info is stored in EEPROM.
// Set to 2: State data is stored in volatile memory and cleared on
// reboot. Module types and names are not stored when state is set to 2.
#define X10_PERSIST_MOD_DATA  1
// Length of module names stored in EEPROM, do not change if you don't
// know what you are doing. 4 and 8 should be valid, but this isn't tested.
#define X10_INFO_NAME_LEN    16
// Enable this to use X10 standard message PRE_SET_DIM commands.
// PRE_SET_DIM commands do not work with any of the European modules I've
// tested. I have no idea if it works at all, but it's part of the X10
// standard. If you're using a PLC interface and modules that support
// extended code: use the "sendExtDim" method in stead.
#define X10_USE_PRE_SET_DIM   0
Also, the test code I posted before was set up to use 1 phase (no repeats) and 60Hz.  I wonder if I should change that to 2 phase since I do have a repeater installed which couples the phases.  Europeans don't need a phase coupling since they run on 220v for all equipment.  In the US, since we transmit on one leg and have to couple the other, shouldn't I make that 2 so that I give the repeater time to repeat to the other phase before sending a second command (or second half of the command pair)?  If I had a different repeater still, I'd throw it in there and see if it works the same or different.  I got rid of it a while back, so I don't have anything to test with.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on April 09, 2013, 11:29:31 AM
I don't know how the arduino code is sending the command, so I guess I'll have to review.
I doubt that it sends the sequence automatically. It's probably up to you to make sure there is an adequate gap. It may be that the gap is too long and Jeff's device assumes the line is clear and starts to repeat the code - then you step on it with your second command.

The only devices that automatically send both Address & Function codes are the RF transceivers.

But, I'm speculating. It's probably best to let Jeff help you with this.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on April 09, 2013, 11:38:28 AM
Also, the test code I posted before was set up to use 1 phase (no repeats) and 60Hz.  I wonder if I should change that to 2 phase since I do have a repeater installed which couples the phases.
No! Leave it at 1 phase. Your two phases share the same ZC time as they are 180° out of phase with each other. 3 phase ZCs are at 60° intervals.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 09, 2013, 12:53:16 PM
I'm certainly on a single phase of electricity, I just wasn't sure if the nomenclature of the code meant something different.  I'm aware that in the US 3 phase is typically used to transfer power and not typically used for anything but factories.  Most residential power is 120/240V coming out of a pole mounted transformer.  In my case, it's an underground vault on the property, but same difference.

If there are 2 sequences sent right after each other, then I could possibly change the delay in the code to make it possible for the repeater to do it's thing prior to sending the second half.  I'd just have to find the right constant to increase.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on April 09, 2013, 04:08:09 PM
Quote
The delay to see if the powerline is clear before sending a code (#define X10_PRE_CMD_CYCLES    6) is absolutely worthless.

Oooops! I have to modify that - while none of the TTL interfaces (PL513, PSC24, TW523, PSC05, XM10, TW7223) can report in realtime to avoid collisions, putting 6 idle cycles in front of each command does guarantee the required gap between commands. So, its not absolutely worthless.

Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 09, 2013, 04:23:19 PM
I'll email Jeff and see if he can help.  At this point it's probably best to understand what the XTB-IIR is expecting so I can make the code modifications necessary (if possible) to make them work together.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 15, 2013, 12:00:57 PM
Unfortunately, Jeff didn't have the time to review my code (I don't blame him, I wouldn't want to take on that task either).  He did point out how all repeaters/signal boosters function which led me to the answer.  Basically, the repeater is waiting for a command to be sent over PLC.  When it sees the first 22 bits, it then begins repeating (and boosting if equipped) the same sequence right over top of the second set of identical 22 bits.  If there is an irregularity, then bad things can happen.

I started looking at the code and realized that the command string that library was constructing was not 22 or 44 bits long.

1110010101100110100101 (correct 22-bit, set unit E1)
11100101011001101001011110010101100110100101 (correct 44-bit, set unit E1)
10110000000000000000100111001 (incorrect 29-bit, E1 ON)

Now, the correct 22- and 44-bit signals include the two's compliment data.  Even if the 29-bit one did not, I don't see how it got the right data to the function that sends the data.

start string:
1110
house code (E):
0001
unit code (1):
01100
command (ON):
00101

No matter how I try to decipher the bad code, it doesn't make sense.  Irregardless, that's not the problem.  I found a couple more libraries and looked at them instead.  The other libraries send out strings that make perfect sense but still caused signal collisions.  The only way to fix this was to increase the gap between codes from 6 zero crossings to around 30 zero crossings.  I'm not sure why I need such a large gap, but I decided to simply add a 0.5 second delay after every X10 command.  With that statement included, the code works perfectly.  I was originally going to keep the first library since it's a much more powerful code, but I couldn't figure out how to get it going even with the delay.  So, I am now using the simpler code.

I have been testing the setup including the DHT11's on a breadboard over the weekend and it works great.  I'm going to put this setup in the attic for a few days just to be sure before I tear into the finished v1 project.  Assuming there are no errors, I'll update to v2.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on April 15, 2013, 12:43:29 PM
The Arduino is clueless as far as powerline activity. The PL513 & PSC04 do not receive PLC and the PSC05, TW523, TW7223 & XM10 all report PLC activity only after a 22 half-cycle delay. So, while the latter group may detect earlier activity, they do not report in realtime so collisions cannot be avoided.

The repeater starts immediately after the first code and you original Arduino code was stepping on the repeated code, resulting in the reported collisions.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 15, 2013, 01:48:38 PM
The original code was somehow taking the house code, unit code, and command as input to the SendCommand function.  That function constructed and sent all bits for the 2 44-bit commands internally.  I tried to locate what bits were being sent and their timings, but could not find them.  The only thing that I can figure (guessing here) is that the code was sending the first 22-bits and waiting for 6 zero crossings to send the second set OR the the code was sending 44-bits in such a way that that the XTB-IIR was not able to write the second 22-bit command concurrently with the PL513.  Either way, using a different library has allowed me more control of what is actually being written and I have a way to get the results I need.

The first library is actually better since it uses the zero crossings as it's way to send/receive rather than using times.  Using times is ok, but zero crossings is per spec.  The library I am currently using really only uses the zero crossing to count how long to wait to send the next command in the buffer.  The author stated in the documentation that he wanted to someday update the code to include receiving as well as just transmitting (TW523/PSC05 is compatible for transmit currently).  As I see it, you can't do receiving without being fully driven by the zero crossings since that's when you have to pole for incoming commands.
Title: Re: Temperature/Humidity monitoring
Post by: dhouston on April 15, 2013, 02:58:36 PM
I'm not sure what you mean by using times. It has to be sync'ed to ZC. Here's the spec from the extended code documentation at http://software.x10.com/pub/manuals/xtdcode.pdf
Quote
Data is accepted bit by bit as the presence or absence of 120Khz carrier occurring after the positive or negative mains zero crossing. The acceptance window begins approximately 250 usecs. and ends approximately 900 usecs. after a zero crossing. In this window 48 or more cycle of carrier are accepted as a "1" bit and fewer than 48 as a "0" bit. Except for the Startcode, each bit of data is sent in its true and complement form.
and from http://www.x10.com/support/technology1.htm
Quote
A Square wave representing zero crossing detect is provided by the PL513/TW523 and is within 100 µs of the zero crossing point of the AC power line. The output signal envelope from the O.E.M. should be within 50 µs of this zero crossing detect. The signal envelope should be 1 ms (-50µs +100µs).
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 15, 2013, 03:12:06 PM
I don't have the code I'm currently using in front of me, but, as I recall, the zero crossing was only used for counting the number of crossings between commands.  If there weren't enough crossings, the code waited to transmit the buffer.  I do not believe it was used for anything else.  Yes, the zero crossing should be driving everything.  A delay from the zero crossing to start and end of the bit is obviously required.  I'll have to review the code again, but, like I said, I don't recall the zero crossing driving everything like it did in the original code.
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 15, 2013, 03:22:24 PM
Ok, looked at the code again and it does use the zc for sending bits.  Must have been a different code or a hallucination where it was hidden better.  In any case, here's how it writes:

Code: [Select]
void x10Class::sendBits(byte cmd, byte numBits, byte isStartCode) {
  byte thisBit; // byte for shifting bits
 
// iterate the number of bits to be shifted:
for(int i=1; i<=numBits; i++) {
// wait for a zero crossing change
waitForZeroCross(zeroCrossingPin, 1);
// shift off the last bit of the command:
thisBit = cmd & (1 << (numBits - i));

// repeat once for each phase:
for (int phase = 0; phase < 3; phase++) {
// set the data Pin:
digitalWrite(txPin, thisBit);
delayMicroseconds(BIT_LENGTH);
// clear the data pin:
digitalWrite(txPin, LOW);
delayMicroseconds(BIT_DELAY);
}

// if this command is a start code, don't
// send its complement.  Otherwise do:
if(!isStartCode) {
// wait for zero crossing:
waitForZeroCross(zeroCrossingPin, 1);
for (int phase = 0; phase < 3; phase++) {
// set the data pin:
digitalWrite(txPin, !thisBit);
delayMicroseconds(BIT_LENGTH);
// clear the data pin:
digitalWrite(txPin, LOW);
delayMicroseconds(BIT_DELAY);
}
}
}
}

The other function that sends commands has a wait for 6 crossings before continuing.  Also, there was another code that looked different.  I appear to have smeared them in my head.   :'
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 19, 2013, 02:13:12 AM
I found a few minutes this evening to put together the test setup such that it could interface with the installed sensors, installed the (hopefully) final version of the code, and moved everything to the attic.  If all goes well, I'll have log files in AHP and my custom script that will show things working as designed.  Everything worked perfectly at my test location, but who knows what will happen when it's out of sight.   ::)
Title: Re: Temperature/Humidity monitoring
Post by: bkenobi on April 26, 2013, 12:21:28 PM
After a week of use, it appears that the controller is working PERFECTLY!  I set it up so it runs for 10 minutes and then delays for 30 minutes.  If the temp/humidity is above trigger points, it can then turn on again.  Doing it this way, I find that the fan triggers several times in a row from around 10am-6pm for my south attic (exposed to the sun for most of the day this week) but the north attic triggers once every couple hours or so.  I selected the run time to allow a full purge of attic air several times over (calculated attic volume and used fan flow rate to determine ~5-10x purge).  Based on the fact that the north attic only needs to run once every hour or two and the south attic starts at the end of the delay time, I'd say my method is just about right.

In any case, the X10 stuff is working great at this point, so I'm thinking I'll go ahead and modify the old controller when I get a chance.  I may even throw an Ethernet shield on the arduino and set it up to upload temp and humidity for each sensor, fan run state, and even the sensor check values (for validating that sensors aren't broken) to pachube or similar.  I just have to verify that the network cables running through the attic are hooked up how I think they are.

Thanks for all the suggestions!   >!