sotomaior

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?

Retroplayer

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: http://www.ti.com/product/drv135)

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)

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.

sotomaior

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 im never too sure

Retroplayer

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.

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.

Retroplayer

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!