Answer the question
In order to leave comments, you need to log in
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
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question