M
M
Marsel000092016-02-03 16:13:55
Arduino
Marsel00009, 2016-02-03 16:13:55

Choosing the basis of a "Wired" smart home?

Good afternoon!
I am new to circuit design and Arduino.
I am planning a major overhaul and want to make a smart home based on arduino and sensors via wires
. I don’t understand what methods, what protocols to use for this.
As I understand it, you need to lay a twisted pair in the wall, on each functional node there will be arduino pro mini, which will send information to the central arduino.
What do I need to transmit information over twisted pair? Here is such an adapter to attach to aduino from one end and the other end to a common bus?
And what other ways are there to wired communication between arduino?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexander Volkov, 2016-02-03
@a_volkov1987

RS-485. Ideal for long communication lines with strong interference. In fact, almost all equipment on military ships and aviation communicates via this interface.
And yes, RS-485 is a physical interface. On top of it, you will have to write your own communication protocol.
Usually there is one master and a bunch of slaves in the line. The master sends a packet with the address of the slave and data indicating what the master wants from this slave. The called slave, after receiving the master's packet, must respond to the master with its data packet. In principle, you will have enough speed, especially if you do not inflate the transmitted data and use code tables instead of transmitting string data.

V
Vlad Zaitsev, 2016-02-23
@vvzvlad

Everyone advises modbus, and does not say that there are low speeds and master-slave communication. Separately, these disadvantages do not really matter, but together they add a lot of inconvenience. The problem with modbus is that devices need to be polled. This should be done quite often, especially for motion sensors tied to the light or switches, otherwise convenience suffers - delays before turning on the light. And as soon as you have a lot of devices in the bus, you will immediately have hemorrhoids with which devices and how often you need to interrogate.
It is better to take a protocol whose devices are equivalent on the network. Of the light and common, perhaps, only the ezernet remains.

M
Mikhail Zelenkin, 2016-02-11
@cheshircat

In terms of price/features ratio, RS-485 + Modbus is quite a suitable option. An alternative (excluding special protocols like KNX or SmartBus) is CAN, but the cost of devices is more expensive and debugging is more difficult.
In principle, high speeds are not needed, since the data will be mostly a byte or two in size. In binary form, it will take about 5-10 bytes with addresses and checksum. That is, an approximate volume with a margin of 20 (10 - request, 10 - response) bytes per device.
A huge selection of ready-made devices also speaks in favor of modbus. If now it may be interesting to solder, assemble something, then in a year or two something may change and the opportunity to buy something may come in handy.
I wouldn't have high hopes for the ardurin, at least as a head unit. It is better to take either a PLC or a micro-PC (for example, Raspberry) with an RS-485 interface. In addition, it is worth thinking about how to build a network. In my opinion, it is more correct to have smart terminal devices with communication with the master. This will help in emergency situations, for example the light will be controlled by a switch on the wall through the device while the master is not available.
Of course, you can’t describe it all briefly, there are some pitfalls. For example, it is highly desirable to think about galvanic isolation and proper nutrition. But in general, both RS-485 and Modbus have a lot of information on the network, and if you set a goal, you can figure it out pretty well.
Of the alternatives, I would look at CAN, KNX or SmartBus. But for CAN, I don’t see devices at all, and for special solutions, the prices are completely different.

A
aid4u, 2016-06-07
@aid4u

I myself studied this issue and came to the conclusion that the best option is ethernet (PoE can be implemented) and 1-wire for temperature sensors if there are a lot of them. Each room has its own arduino connected via LAN and periodically sends a request to the URL with data to the server or cloud, and when the UPS is installed at the server (or router), the system will work more stable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question