remote sensors - wich (wired) connection is better?

RS485 is a way to go along with Cat5 or Cat6 cables. Since your house has not been completed yet, it is much better to put in as much high quality cable as possible inside walls.

Also if total distance is not that much, you can also transmit 24V power over Cat5/Cat6 cable so that your switch or other remote devices does not have to be powered separately. Of course, do not transmit line power over it.

disclaimer: I am saying this because I have RS485 shield like that for sale so I am biased.

it seems to be a good idea, but my (ignorant) questions are:

-how do i connect any switch/sensor through a "ethernet" cable? may I send up to 7 signals? only digital ones are allowed?
-can i program my controller with the shield connected as if any inner wire is a "pin"?
-how many shields may i use for each arduino? may i leave the serial pins for other applications?

to be more specific about the sensors i will place:

-"rain" sensors http://cgi.ebay.it/ws/eBayISAPI.dll?VISuperSize&item=121067055196
-"hall" sensors http://cgi.ebay.it/ws/eBayISAPI.dll?VISuperSize&item=270984792461
-"light" sensors http://cgi.ebay.it/ws/eBayISAPI.dll?VISuperSize&item=271083725046
-some -not well defined- "ir/movement" sensors
-switches (normal or capacitive)
-temperature/humidity/pressure sensors

these are not the final choice obviously, and if required i can "cut" the analog ones and turn them into digital, i posted links only as "suggestions"

sorry for all those questions but it is hard for me to imagine this "connection" :slight_smile:

P.S. i dont think im going any farther then 50 m (probably 30m are enaugh)

Please post new links, those don't work.

RS485 Cable spec;-
Shielded: Yes
Impedance: 100-130 ohms
Distributed capacitance: <100 pF/m
Wire: AWG 18

Cat 5/6 Cable spec;-
Shielded:STP, ScTP, UTP
Impedance: 85-115 ohms
Distributed capacitance: <= 52 pf/m
Wire: 24–26 AWG/Cat5, 22–24 AWG/Cat6

2 catches for using Cat 5/6 Cable sub RS485 Cable;-

  1. Impedance, It could be fine tune the transceiver resistor to keep match.
  2. Only STP Shielded cable is compatible, order that type cable only.

Erdin:
Please post new links, those don't work.

true, sorry!
http://www.ebay.it/itm/280992276053?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649
http://www.ebay.it/itm/271083725046?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649
http://www.ebay.it/itm/270984792461?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

sonnyyu:
RS485 Cable spec;-
2. Only STP Shielded cable is compatible, order that type cable only.

may i ask you why? (just to know it)

sonnyyu:

  1. Impedance, It could be fine tune the transceiver resistor to keep match.

you mean it is "enough" or is it only better?

sotomaior:

Erdin:
Please post new links, those don't work.

true, sorry!
http://www.ebay.it/itm/280992276053?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649
http://www.ebay.it/itm/271083725046?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649
http://www.ebay.it/itm/270984792461?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

sonnyyu:
RS485 Cable spec;-
2. Only STP Shielded cable is compatible, order that type cable only.

may i ask you why? (just to know it)

sonnyyu:

  1. Impedance, It could be fine tune the transceiver resistor to keep match.

you mean it is "enough" or is it only better?

take a look picture, UTP is no shield then out. ScTP is shield all pairs then have to out. Only STP Shielded cable is compatible.

transmission line is require impedance match. RS485 transceiver IC is designed to work at Impedance: 100-130 ohms, now we feed it Impedance: 85-115 ohms cable, fine tune resistor to keep match.

all above is for keep system run at long distance, for short distance it does not matter.
but question if for short distance why you use RS485 anyway?

sonnyyu:
all above is for keep system run at long distance, for short distance it does not matter.
but question if for short distance why you use RS485 anyway?

What do you mean by "long distance"? im planning to do a 70 m^2 domotic house, so there isnt any long distance, but 20-30m are enough to kill my 5v dc signal i think...

im searching the easiest possible way to place sensors and switches into all rooms starting from a single "control box", possibly in a wired way, i understand that for serial communication the rs385 is a good idea, but is it useful and simple also for trasmitting a single 5v dc signal for a deviator for example?

1200m is max, say few hundred m to 1.2km is long distance.
20-30m, you do not need do anything, even it might work at UTP cable.

do you mean using rs485 data transmission or the "simple" 5v digital signal?

Sonny is right. None of the sensors you have listed are using "high-speed" data. So I think you would be fine without a line driver.

The MAIN issue with using long wires with digital data is that the long wires do not like to change voltage very quickly, so trying to send data will cause trouble. I don't see this being an issue with what you have listed as your sensors.

The problems you could run into with long wires is voltage drop in the wire which would reduce the voltage at the point of the Arduino. And also it can pick up noise, and it is possible that it could pick up noise large enough to damage your arduino. Especially in the presence of an electrical storm.

For the dangerous noise possibility, consider just using supression diodes on all your lines at the control box and possibly at the hall effect sensor (it looks like it has some active components on it.) For voltage drops, just use strong pullups (low resistance) for the digital signals, and consider a low pass filter (the resistor and capacitor mentioned up above.) For analog signals, consider some balanced line drivers intended for audio (such as this: DRV135 data sheet, product information and support | TI.com)

But again, the only problem that you are likely to encounter and should seriously consider is voltage spikes as from an electrical storm.

Retroplayer:
But again, the only problem that you are likely to encounter and should seriously consider is voltage spikes as from an electrical storm.

can I reduce this possibility by using shielded cables (grounding the shield only on the arduino side)

sotomaior:

Retroplayer:
But again, the only problem that you are likely to encounter and should seriously consider is voltage spikes as from an electrical storm.

can I reduce this possibility by using shielded cables (grounding the shield only on the arduino side)

If it were to go to earth ground, perhaps (meaning, I wouldn't connect the shield to your arudion ground, connect to to pipes in your home.) The ground on your arduino has numerous layers between it and earth ground. You want large spikes like that from an electrical storm shunting to ground.

Personally, I would still use supression diodes. They only cost pennies and you just put them in parallel with your signals so it isn't complicated. They are just special purpose zener diodes essentially.

Retroplayer:
Personally, I would still use supression diodes. They only cost pennies and you just put them in parallel with your signals so it isn't complicated. They are just special purpose zener diodes essentially.

i meant grounded shields IN ADDITION :slight_smile: im never too sure

Ultimately, you are unlikely to ever encounter the problem, in all honesty. But the supressions diodes are the way to go in the 1 out of 10000 (just made that number up, btw) chance that it will happen. I work in the aerospace industry where the fuselage of aircrafts are obviously much more susceptable to high voltage spikes (both from static builing up and from electrical storms) and this is what we use on every signal that goes in or out of our electronics. I have seen them returned blown quite violently, yet the circuits themselves were protected.

Now, of course, a house is NOT an aircraft. You are not putting your house in such an environment and your house does have an earth ground (well, it better have) where the aircraft does not.

So, I guess the question is how anal do you want to be about it? Do you want to protect against all possibilities, or just take your chances (which are pretty good)?

That's the trouble with asking engineers this kind of stuff. lol. There is the right way, the wrong way, and the engineer way. The engineer is used to having to deal with standards and regulations like UL and CE, etc... which covers all kinds of whatif type scenarios. When we answer your questions, we are likely to make things sound like a scary world is out there. But those what-ifs DO happen on ocassion and the standards are the result of decades of experience and seeing the results of the what-ifs.

My only real motivation for pushing you to use supression diodes is that this will be permanently installed in your home. Being permanently connected increases your chances of encountering a what-if scenario. The whatif scenario may result in a fire. In your home. Where you sleep and where those precious to you sleep. That's why we have UL and CE standards.

A MOV or varistor is very cheap method:

Whether you want to use them or not is up to you. I guess I just can't really understand why you wouldn't want to. We're not talking about having invalid and false alarm signals from your sensors. We are talking about fires. The first time one blows and you look at the result of it, you will be glad that you did.

you convinced me, ill place zeners :slight_smile:

sotomaior:
you convinced me, ill place zeners :slight_smile:

Hmm.... somehow I thought I would feel more triumphant. Just Teasing..

BTW, not zeners. They won't cut it. They will just blow open when their peak inverse voltage is surpassed and allow the spike to enter your circuit. You need them to blow shorted. So, use MOVs (Metal Oxide Varistors). They are even cheaper (and more common) than the supression diodes. If you look inside most consumer devices, you will find at least one. Anything that plugs into a mains (even through a DC wallwart) will have one. I even found one the other day in a device that has a rechargeable battery, but you charge the battery outside of the device. That seems like overkill, but eh... that's engineers for ya!

Retroplayer:
That seems like overkill, but eh... that's engineers for ya!

the funny thing is that im supposed to be graduated in electronic engineering this septemper :roll_eyes:

Then you will soon be one of us! And will be stripped of your innocence and see the world as a dark and scary place. :wink:

Look at CATkits http://smartgreenhouse.org

(my website so appropriate disclaimer) these allow long distance communications over CAT5 using pretty much any protocol.