PDA

View Full Version : Sensors, Interface Kit, wire lenght, power supply?



RogerGuess
06-21-2009, 01:41 PM
I am looking at purchasing the Interface Kit 0/16/16, and likely 4 temp/humidity, 3 pressure, and 4 temp sensors. My main concern is two things: How far can I run the wires to these sensors, and can I provide power to all of them via at a single point (where the board will be). I would prefer to have the system on continuous power, rather than battery.

Suggestions?

Thanks,
Roger

Adrenalynn
06-21-2009, 01:52 PM
Welcome to the forum! How far do you need to run them?

Analog signal travel is largely going to be dictated by wire gauge - but calibration for really long runs becomes a nightmare as you start doing the math to try to get as close an approximation as possible.

Generally I would use a microcontroller as close to the sensors as practical, take my readings, armor them in some kind of error-tolerant format, then ship them out over serial - or RS485 serial for even longer distances.

RogerGuess
06-21-2009, 01:57 PM
I could have runs as much as 100 feet. The application is an attic monitoring system. In case you are wondering, I am tweaking an attic for ventalation, temperature, and moisture control. I live in North Texas, where poor attic temperatures can cost you an extra $200 to $400 a month in cooling/electricity bills.

nagmier
06-21-2009, 02:30 PM
Interesting project!

Adrenalynn
06-21-2009, 02:45 PM
I think I would put the controller in the attic close to the sensors - probably in an "alarm box" kinda enclosure. I would use USB over CAT5 extenders, and just run my USB to the computer over CAT5E.

Simpler wiring, more accurate, easier maintenance - does that make sense?

[Actually - if it were _me_ more specifically, I'd use something like a little Arduino to capture the data, then I would would send it to my computer over XBee wireless. But I'm an XBee fanatic.]

RogerGuess
06-21-2009, 03:00 PM
Ok, that makes sense. That will likely drop my longest run to the board down to about 20'. So, what would I do for power to the board and sensors in the alarm box? Where should I read about powered usb over cat5? I can easily run cat 5 to a location in the attic.

Thanks,
Roger

Adrenalynn
06-21-2009, 03:08 PM
20ft is still pretty long for cheap sensors.

What's your skill level? Programming, hardware, software, firmware, .... ?

I would toss together a little 5v/1A regulator or two (depending on the number of devices) for my sensors (working on a tutorial for that right now, actually), and power my board and sensors off of a wall-wort, using the regulator to get me a really clean reference to my analog devices.

Wiring to the sensors should be as heavy a gauge as practical. If you ran 12/2 / 12/3 (depending on whether it's a two wire or three wire sensor) romex out to each of them, *I* wouldn't laugh at you.

I've used a bunch of these: http://www.svideo.com/usbcat5extend.html professionally, and have a couple sets of the 2pt personally.

RogerGuess
06-21-2009, 03:13 PM
Ouch, the powered usb will nearly double the $$ on what I planned to do. Is the problem with long runs on the sensors the accuracy? Isn't it just about calibrating them to known values?

.. I am a c# developer, but do not have much electronics knowledge.

Adrenalynn
06-21-2009, 03:40 PM
It's about voltage drop over distance. If you have a 5v sensor and a 0-5v analog input, and you were to run 18G bell wire for 150', your voltage drop would be something along the lines of half a volt per 100' typically, or 0.75v. So now we'll never see more than 4.25v on our 5v input, which would lower our peak read ability by 15%, and would also lower our precision by 15%. If we don't care about the peak (because the sensor peaks higher than we need), and we're willing to accept the error, than we're probably ok. Lowering that error in software is probably generally doable with something like regression analysis. You'd want a handheld calibrated measuring device, and take a whole bunch of samples over a range with both devices, do the math, and build an algorithm to get the best fit possible. The more samples you have, the closer it's going to be. We still lose our precision and our peak though.

No sensor is perfectly accurate, so you need to at least multiply its error by our error in precision to get an idea of what you're looking at. Typically, I'd guess we'll see ~25% for a run-of-the-mill thermister.

lnxfergy
06-21-2009, 03:52 PM
Ok.. so attic monitoring, what are we doing with the data collected though? Are we opening vents? Just trying to help gauge how important accuracy really is...

-Fergs

RogerGuess
06-21-2009, 08:31 PM
Imagine this senario. 3:00pm in the afternoon, and it is 98 degrees and 50% humidity. Two things are critical: An attic with poor ventalation and no barrier could easily hit 160 degrees. Ouch that is about a 60 degree differential. Those temperatures cost serious money in cooling costs, and will severeyly damage materials in the attic over time. Second is the humidity. If it goes out of control, you can get mildew and dry rot. I am about to install a radiant barrier in my attic, but I need to carefuly monitor results. The hope is that with propert ventalation and radiant barrier, I can get my attic to within 15 degrees (differential) of the outside temperature. The savings for my area of North Texas would be huge. The catch is if the radiant barrier actuall heats up certain parts of the attic and trapps moisture, I have just traded one problem for another. The radiant barrier is like aluminum sheeting attached to the inside of the rafters. It protects the majority of the attic, but not the space between the barrier and the roof. I want to monitor temp/humidity in 4 locations. One is outside the house under the eve. The other three are in the attic. I want one in the general open space in the attic, and two to monitor two different areas that are between the barrier and the roof. I might also add other temp only sensors for top of the attic, bottom of the attic, and one that is underneath the insulation against a ceiling. That is the reason I need to make these long runs. Having said that, I would think I could live with as much as a 2 or 3 degree margin of error on temperature. As to humidity, i'd like to keep it under a 3% margin of error.

It is not all as exciting as running servos and flipping power on, but I will use the c# examples with the phidgets to write an application to trap near real time data.

RogerGuess
06-21-2009, 08:38 PM
Adrenalynn, I have an idea for a poor mans approach to your suggestion. If I purchased all the sensors, and then went ahead and ran all the wires the full lenght. I could then take all of it to a location in the attic where there is only a three foot run to my usb board. I would then place all the sensors in exactly the same spot in the attic, but also have one temp and one temp/humidity sensor on a three foot run. That way I could have two 'control' sensors that I could use to record a table of each degree, and it's interpretation to my control. On a hot day, before I install the radiant barrier, and fix the ventalation, I could likely record all the way from 75 degrees to 150. That way I don't need a formula, I just have a predevined lookup table for each sensor. Make sense?

Adrenalynn
06-22-2009, 01:10 PM
How many inputs do you really need? There's another option that might work really well for you if you can live 5 analog, 10 or so digital, and an I2C network for inputs. Then it would be super cheap to send over xbee, and there's solid dotNet API

RogerGuess
06-22-2009, 01:14 PM
I can live with five, but want at least 3 to be temp and humidity, the other two can be temp. I2C? What product are we talking about?

Thanks!

ScuD
06-22-2009, 01:22 PM
I2C is a protocol used to exchange data between devices of multiple sorts, in this case it might be a microcontroller talking to temperature/humidity sensors.

If you can find I2C capable temperature/humidity sensors that would be an awesome problem solver, but I think most are pure analog?

Here's (http://www.sensirion.com/en/01_humidity_sensors/00_humidity_sensors.html) some I2C humidity sensors, I know there's a bunch of I2C temperature sensors out there..

And theoretically you can hook 127 devices to one bus... so you'd be set :)

Adrenalynn
06-22-2009, 01:23 PM
I2C is a type of serial bus. (Primer/Tutorial coming). Some temp and humidity sensors could be hung on the I2C bus, saving your analog pins.

The board is the Serializer: http://www.trossenrobotics.com/store/p/5196-Robotics-Connection-Serializer-WL.aspx

You could plug an XBee module directly into that, plug an xbee explorer into your PC downstairs, and be golden. You could also talk to it over a bunch of other serial layer-1 protocols - USB, RS232, Bluetooth, etc.

RogerGuess
06-22-2009, 01:45 PM
So I could likely make it work with this?

Robotics Connection Serializer WLC-200-Serializer
WLXBee Wireless Communication Starter KitC-200-WRL-XbeeKit
Humidity/Temperature SensorS-60-P1125
Precision Temperature SensorS-60-P1124

What about power?


Thank you both.

Adrenalynn
06-22-2009, 02:41 PM
The board will be powering the sensors. If you need to go >100ft, you should be looking at 16G wire or larger. The minimum voltage into the sensors is 4.75v - and as we proved yesterday, you would be pushing it a bit at 100+.

You will probably need to cut apart something like servo extension cables to get the connectors to splice on to your wires going out to the remote, regardless of the board.

That kit's a good deal, but traveling attic down, punching through ceiling, I'd rather see you start with some more power.

2x http://www.trossenrobotics.com/store/p/5827-Xbee-Pro-60mW-with-Wire-Antenna.aspx

And
1x http://www.trossenrobotics.com/store/p/5828-XBee-Explorer-USB.aspx

"One Size Fits None" ;)

Power would come from an AC Wall Wort or battery swapping. If you're monitoring your HVAC presumably you have "limitless" AC power close to hand. I'd rather see you position this some distance from your HVAC (something pratical), large multi-phase motors play havoc with radio transmitters. The XBee is pretty tolerant, and we're using a bunch of power to punch through noise, so it's probably not overly critical - just thinking through the design.

I'd like to see you use some I2C sensors there, as using that humidity/temp pair you're only going to get two of each realistically - although we might think about how to multiplex them since update rate isn't an issue.

nbdeveloper
06-22-2009, 06:17 PM
I used a solid core shielded cat5e and saw a voltage drop of 1.2v over 300 feet ($75x1000ft). I was using a Phidgets 8/8/8 and connecting 6 high precision light sensors. I used the power and ground on two of the strands to power all 6 sensors and the remaining 6 strands for the sensor measurement line. I had to buy some extra sensor cables and solder more wires than I cared to but it all worked beautifully. I tried using RJ45 pigtails but there was too much noise in the plugs so I just soldered the whole thing together.

RogerGuess
06-22-2009, 07:17 PM
Thanks, very good to know!

I think I am going to go with the Connection Serializer WL, and try it out with serial RS-232 over cat5 before I try the XBee. I am assuming that I will have better luck with that than if I try to run a USB cable 30' to 40'.

Adrenalynn, IC2 sensors other than the ones on the Trossen site? I saw ScuD's link, but it looks like you have to purchase 100 at a time.

Also, I just pick up a 9v 2amp power supply?

Thanks!

Adrenalynn
06-22-2009, 07:45 PM
Yeah, that PS should be fine.

The 1.2v drop is accountable to the small gauge of the wire. Try tying multiple wires together and watch the voltage drop go down as circular mils go up. I love physics. :)

You're unlikely to run a traditional USB cable 30ft. The theoretical limit is like 16ft, but I've not had much luck going over 14'. Hence the reason for the baluns.

Serial should travel up to 1500 feet on a traditional cable, less on Cat5, but enough to get you that distance and then some.

I2C-based sensors abound. If I have time, I'll try to dig some up for you.

RogerGuess
06-22-2009, 07:56 PM
Wow, ok, so I guess I am obviously pretty green to all this. Sounds like the sensors are seriously cheaper than the $11 and $30 ones I was about to purchase. Do you just have to solder them yourself? What should I do instead of cat5 for the RS-232? I have an older pc with a 9pin serial port, but neither of my everyday pc's have a serial port. Suggestions?

Adrenalynn
06-22-2009, 08:02 PM
You could run a USB->Serial virtual serial port, but I'd rather see you either use the old PC or buy a PCI genuine serial card for cheap cheap.

Analog temp sensors can be had for a couple dollars, and soldered on the wires. I2C stuff is more expensive.

Go ahead and run the serial over RS232. Should be more than fine at those lengths!

Keanlee411
05-13-2010, 08:15 PM
Ouch, the powered usb will nearly double the $$ on what I planned to do. Is the problem with long runs on the sensors the accuracy? Isn't it just about calibrating them to known values?

.. I am a c# developer, but do not have much electronics knowledge.
It's about voltage drop over distance. If you have a 5v sensor and a 0-5v analog input, and you were to run 18G bell wire for 150', your voltage drop would be something along the lines of half a volt per 100' typically, or 0.75v. So now we'll never see more than 4.25v on our 5v input, which would lower our peak read ability by 15%, and would also lower our precision by 15%. If we don't care about the peak (because the sensor peaks higher than we need), and we're willing to accept the error, than we're probably ok. Lowering that error in software is probably generally doable with something like regression analysis. You'd want a handheld calibrated measuring device, and take a whole bunch of samples over a range with both devices, do the math, and build an algorithm to get the best fit possible. The more samples you have, the closer it's going to be. We still lose our precision and our peak though.

__________________________
Watch Letters To Juliet Online Free (http://moviesonlinefree.biz/)