Please login or register.

Login with username, password and session length
Advanced search  

News:

The Buster PiX10Hub is here! Created by the Community, for the Community.:)% #:)

Pages: 1 ... 4 5 [6] 7 8 9

Author Topic: Temperature/Humidity monitoring  (Read 45024 times)

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Temperature/Humidity monitoring
« Reply #75 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.
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 289
  • Posts: 12790
Re: Temperature/Humidity monitoring
« Reply #76 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.  ???
Logged

beelocks

  • Hero Member
  • *****
  • Helpful Post Rating: 9
  • Posts: 245
Re: Temperature/Humidity monitoring
« Reply #77 on: January 29, 2012, 08:17:57 PM »

It normally happens to me about 20 minutes after shipment has left the building  rofl
Logged
Although my explanations may not be exactly clear, I do hope for slightly less cloudy.

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Temperature/Humidity monitoring
« Reply #78 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.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 20
  • Posts: 1865
Re: Temperature/Humidity monitoring
« Reply #79 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

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 20
  • Posts: 1865
Re: Temperature/Humidity monitoring
« Reply #80 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!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 20
  • Posts: 1865
Re: Temperature/Humidity monitoring
« Reply #81 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

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Temperature/Humidity monitoring
« Reply #82 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.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 20
  • Posts: 1865
Re: Temperature/Humidity monitoring
« Reply #83 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?

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Temperature/Humidity monitoring
« Reply #84 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.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 20
  • Posts: 1865
Re: Temperature/Humidity monitoring
« Reply #85 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.

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 20
  • Posts: 1865
Re: Temperature/Humidity monitoring
« Reply #86 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!

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 49
  • Posts: 2805
Re: Temperature/Humidity monitoring
« Reply #87 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.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 20
  • Posts: 1865
Re: Temperature/Humidity monitoring
« Reply #88 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!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 20
  • Posts: 1865
Re: Temperature/Humidity monitoring
« Reply #89 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!
Pages: 1 ... 4 5 [6] 7 8 9
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.