Pages: [1] 2   Go Down
Author Topic: remote sensors - wich (wired) connection is better?  (Read 2276 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi evrybody,

im a newbie so please forgive me for any mistake/missing info/wrong topic etc, ill do my best.


My aim is the following:

I want to build a DOMOTIC system based on a RASPBERRY PI (php server for interfacing all commands, i.e. close window, switch off lights etc) linket through UART to a ARDUINO MEGA (master, other arduinos will be connected later on but this is not the actual problem) with a GSM SHIELD (so that i can command all stuff also by means of a mobile phone)


in practice:

intenternet (router)-ETHERNET-raspberry-UART-mega-??????-all actuators and sensors and maybe some slaves


The problem is related to the connections between the mega and all sensors and actuators, potentially far tens of meters.

Due to the fact that the hause i would like to "domotize" is not totally built yet, i wanted to use as many wires as possible because im a little afraid of wireless systems: a twisted wire is working/not working and so it will be "forever" and also because im free to place as many "wire pipes" as i wish.


Here comes the problem: i cannot connect anything by means of simple wires farther then 50cm-1m.


The possible solution i analyzed:

-signal repeaters along the wire=>expensive, unefficient (pw dissipated), hard to implement (inside pipes i should place thousand of those)
-wirelessy sonnected remoted arduinos (xbee-like)=>expensive (one arduno+xbee evry group of I/O), unefficient & i like wires smiley
-wirelessy connected remoted sensors=>a little cheaper, unefficient (lots of power supplys), a mess to implement (70-80 wireless I/O?) & again i like wires smiley



Any suggestion?
Have anybody tried something similar?


P.S. sono italiano, scrivo in inglese perchè oramai sono abituato a cercare e chiedere così, ma una risposta è ovviamente la benvenuta in qualunque lingua sia, se volete una traduzione in ITA non avete che a chiedere smiley
« Last Edit: April 05, 2013, 06:54:01 am by sotomaior » Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you use ethernet cable, cat5 or cat6, you can use RS485 signals.
The ethernet cable can also be used for some power (not too much).
If you use 12V .. 30V as power, and use DC/DC converters for each Arduino, the total current is limited.
I would use Arduino boards as remote I/O at the end of the cables.

internet (router) - ETHERNET - raspberry - UART - mega - RS485 - Arduino - remote actuators and sensors

If there are many power cables next to the ethernet cable, or the cable is very long, I would add optocouplers. That will prevent any grounding problems.
« Last Edit: April 05, 2013, 07:17:45 am by Erdin » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you for my first answer!
smiley

the problem is that i need to install switches (for light driving) pretty much "far from evrithing", and i would like to avoid using one adruino only for one button, if i understend correctly your answer
Logged

Offline Offline
Full Member
***
Karma: 5
Posts: 181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You wouldn't be using an "arduino" per se, you would be using an atmel chip at each light.  This would be a barebones type board.  An ATTINY 45/85 or 44/84 is perfect for this sort of thing.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You wouldn't be using an "arduino" per se, you would be using an atmel chip at each light.  This would be a barebones type board.  An ATTINY 45/85 or 44/84 is perfect for this sort of thing.

sorry, i cannot get it. (too newbie maybe)

Do you mean to use an ATTINY plugged into some sort of "ethernet shield"?

because that would require tens of "input" ethernet ports, i think
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Suggested RS485 protocol is very good decision, you will need on distance places some Tiny Arduino like Board if you prefare Arduino, also You may use 1-Wire combination by MAXIM-Dallas . They have various range of IC-s .

I use both, and i am satisfied of they performance.

Regards,
DUbravko
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What you could do is use some of these:
http://www.ebay.com/sch/i.html?_trksid=m570.l1313&_nkw=arduino+rf+kit&_sacat=0&_from=R40
Each censor would have one of these radios with something like an attiny to handle the rf protocol. There would be one arduino connected to your PI to receive all the signals.
Logged

Offline Offline
God Member
*****
Karma: 27
Posts: 829
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You don't need to have another arduino at the other end of your wires. The "RS485" part that is important is only the physical layer. You do not need the datalink layer.

Your hint was in using twisted wire. Twisted wire is used for differential signaling. So, all you need to do is convert your single-ended signaling (what you have now) into differential and then back to single-ended again. There are numerous drivers out there that do this. They are refered to as "Line Drivers" what would make one line driver RS485 and another RS422 is simply the voltages that are used. Any manchester encoding, protocoling, and all that other jazz is completely up to controller. All the line driver cares about is taking your single ended signal and converting it to a differential.

http://en.wikipedia.org/wiki/Differential_signaling

 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, all you need to do is convert your single-ended signaling (what you have now) into differential and then back to single-ended again. +
 

do you think i need to do arduino->"rs485 encoder"->WIRE->"rs485 decoder"->switch->"rs485 encoder"->WIRE->"rs485 decoder"->arduino

or it is enough to do arduino->"rs485 encoder"->WIRE->switch->WIRE->"rs485 decoder"->arduino

can you please suggest me any connection drawing, so that i can better recongnize what you meant?

i also found this topic http://arduino.cc/forum/index.php?topic=19254.0 but it doesent seem to have a "general long wire" solution
Logged

Offline Offline
God Member
*****
Karma: 27
Posts: 829
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Let's switch that around... what would be the ideal way for your you to hook things up? Meaning, how would YOU like them hooked up? And we will go from there.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you for your kind answer  smiley

the best thing would be to find a way to amplify/encode the 5v signal close to the arduinos (so that i dont need to bring any extra power supply outside the "control box" where transformers, relays, controllers, pi and shields are settled), send them to any switch/sensor and then back into the "control box".

The idea was:

-PI, SHIELDS and ARDUINOS that drives all RELAYS that move the power that is "generated" from the TRANSFORMERS <--- all inside the "control box"

-signals wires from/toward the controllers to the sensors and switches

-"power wires" from the relays to any actuator (i.e. lights, window actuators and so on)


if i am not clear enaugh ill provide any drawing  smiley
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Search for "mjkzz" on eBay :-)

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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"  smiley

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

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please post new links, those don't work.
Logged

Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1789
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.









Logged

Pages: [1] 2   Go Up
Jump to: