I need to connect a lot of (nodes)sensors to a Arduino/Esp32. We are talking 25 or 36 nodes. Perhaps more.
Each node will consist of a pressure sensor, and 2 IO´s. I need to read/write to each device individually. This part is pretty trivial, but how should I connect it?
If the sensors could be daisy chained the total distance will be around 5 meters in total. So I2C is out of the question. SPI is not ideal either.
The requirement to speed is low. 9600 baud would be sufficient(I would like more though). I would rather prioritize a roughed connection that is can work in a environment with electrical noise, and a connection with few wires.
Any suggestions? Is can-Bus the way to go, or is there any better solutions?
Any ideas, or link to solutions would be highly appreciated.
peter844:
Any suggestions? Is can-Bus the way to go, or is there any better solutions?
Any ideas, or link to solutions would be highly appreciated.
CAN bus, or RS-485 IMHO. the latter is simpler (and probably cheaper!) to implement. they are both diffential buses and resistant to electrical interference.
OR go wireless and use an ESP32 (or 8266, donno how many pins you need in all at each node) for each node
sherzaad
Thank you for your reply. It loks just as the right solution for this project.
I ordered parts this morning, and hope to get it going next week. The RS485 is new to me, so i am looking forward to get familiar with it.
I'd have sensor clusters with each MCU. An MCU could read 5 sensors, perhaps. The the MCU, if they were ESP32's, could send their data to a MQTT Broker, a single point of collection. The data in the MQTT Broker could be gathered with Python, C++, Node-Red or some other means and then the thing do with the data can be done.