B
B
bycter2016-04-28 22:44:14
Atmel AVR
bycter, 2016-04-28 22:44:14

Which protocol to choose for communication between sensors and server on avr or stm?

I want to do a little automation on the garden plot. I need to link several devices in a network, the distance is 15-20 meters. These will be sensors, actuators and a server. I want to make the basis of devices on a microcontroller (avr or stm). Advise the protocol of an exchange between all this economy. I know that you can also stir up a wireless network, for example, on nRF24, but this is a fallback. Modbus does not seem to be a bad protocol, but I would like the network to retain minimal functionality if the server stops working. For example, a humidity sensor will detect a critical level of humidity and give a command to turn on watering.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Volkov, 2016-04-29
@a_volkov1987

If the sensor can directly influence the executor of the command, then what is the role of the server? Collect data? Manage the performer manually?
If the performer can listen to the sensors and recognize their readings to perform some actions, then the server, it turns out, either only listens to the state of the network and can also issue commands to the performers and sensors, or is absolutely not needed.
In networks where there is a need to listen to the network and occasionally affect the operation of network elements, protocols that work similarly to TWI are preferable. Each device constantly listens to the network and when a packet with the device address and a request arrives on the network, it waits for a free window on the network and broadcasts either a broadcast response or a response intended for a specific device on the network.
Physically, such a network can be implemented on RS-485, for example. Or on any other physical exchange protocol that meets the requirements for communication range and noise immunity.

Y
yakov_cyb, 2016-11-16
@yakov_cyb

Use modbus for polling, put all the logic in the MK. about tcp/ip on MK - forget. it is not needed there, there are no resources in MK for this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question