What technology for sensors everywhere in the house? - Page 1
Forum section: electronics / projects

author: Swake
author_rank: Frequent Contributor
timestamp: November 19, 2021, 04:20:22 pm
content: This is a call for suggestions and more in this new winter project.The objective is to build sensors that will be installed in and around our farm allowing to measure the environmental conditions (temperature; humidity; CO; CO2; VOC; light intensity; etc... ) and that have an 'output' capability in the form of a buzzer and some LEDs and maybe also a solid state relay.CAT5 cable is present in the middle of the ceiling in all the rooms. It can be used for both centralized power provisioning (PoE or Custom) and data transfer.- What platform would you choose for the sensors and why? (ESP32; arduino; something else?)- What communication protocol would you implement between the sensor and the collecting server (Ethernet/IP; RS485; Modbus; Canbus; something else)- How would the data from the sensors be collected? (what database on what server? )Constraints:- This system must be capable of interaction with a Node Red automation system. This system might be expanded with Home Assistant in the future.- Sizing is +/-25 sensors with all functions and 120+ one wire temperature only sensors (don't ask, it became an addiction).- Money is of importance.- I know how to write code but I'm certainly not an advanced programmer.- I know how to design a PCB but I'm not an expert and would certainly fail at designing HF stuff for example.

author: glentek
author_rank: Regular Contributor
timestamp: November 19, 2021, 09:47:26 pm
content: I'm working on something similar for my campervan. What I'm considering is STM32F103 processors with inbuilt CAN processor, and a CAN driver. Simple message protocol encoding the sensor values within one 64bit message. The STM is available for under $4. I'll use one UART to communicate via an OBD2 module with the cars systems. Add an external EEPROM for data storage.

author: cdev
author_rank: Super Contributor
timestamp: November 20, 2021, 01:59:48 pm
content: For a bigger network, one withsome distances involved, MQTT is one way to go these days for distributed sensor nets.Here is an example.https://mqtt.org/Here is a full-text paper) discussion of messaging protocols power and reliability for science applications.https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6531673/"Studies conducted on resource management in wireless sensor networks have identified energy efficient routing protocols as one of the energy saving mechanisms that can be used to manage the consumption of networks’ available energy and extend network lifetime. Routing protocols assist in finding paths for transmission of sensed events, and they must be able to extend the lifetime of a network despite some of the limitations of sensor nodes in a network and the harsh environments in which the sensor nodes are to operate. In this paper, we survey and compare existing routing protocols in wireless sensor networks. We start by introducing the different solutions that can be used to improve the network lifetime and focus on energy efficient routing protocols as the area of the survey, in addition to network topology modeling. We also model the network regarding energy consumption, sensing and event extraction analysis in the network. Categorization of the routing protocols into homogeneous and heterogeneous was performed, for which, sub-classification into static and mobile and other behavioral patterns of the routing protocols was done. The second phase of the paper presents models and simulations of selected routing protocols and comparisons of their performances. We conclude this paper by discussing future work directions with highlights on some futuristic applications."Power is a big consideration. Maybe you can use solar power to extend battery life and make your sensors not need battery replacement too often. Battery shelf life varies a lot and is important to me, if the interval between messages is longer the power draw can be very low. But for right now, I can get away with receiving others sensors data. I live in the middle of suburbia and a lot of my neighbors appear to have weather sensors running all the time. I borrow my neighbors weather station data, using my RTLSDR dongle and a super simple verical broadband antenna made with a piece of poster board and coax cable. I use the program rtl_433 to sniff it. That outdoor temperature and humidity data here is essentially free to me.. Seehttps://github.com/merbanan/rtl_433

author: Marco
author_rank: Super Contributor
timestamp: November 20, 2021, 03:40:57 pm
content: AFAICS most home automation is build on wireless, to do it wired means swimming upstream and more DIY.You could still program a WT32-ETH01 to be a wired sensor to ethernet hub just for yourself though, it's a hobby. With the cat5 already installed it would be a shame not to use it for ethernet, it's useful for more than sensors.

author: Swake
author_rank: Frequent Contributor
timestamp: November 22, 2021, 08:07:38 pm
content: Found an interesting opensource projecthttps://www.mysensors.org/Still reading in but it feels like this is exactly what I need.My choice would be Arduino based sensors sending the data over rs485 (inside) or RF (outside and maybe also hard to reach places) to another gateway Arduino that communicates over Ethernet or USB with the controller. Over 20 home automation solutions are supported as 'controller'. It does support MQTT between gateway and controller too.They also have many hardware examples and contributions.I love the idea of borrowing the weather station data !

author: Marco
author_rank: Super Contributor
timestamp: November 23, 2021, 03:31:12 pm
content: RS485 is just the electrical signalling, still need to run a protocol on top of it. In case of multidrop, not an entirely trivial protocol either. The mysensors RS485 example uses a standard serial protocol, which is not multidrop.Ethernet isn't multidrop any more either of course, but switches are readily available.

author: Renate
author_rank: Super Contributor
timestamp: November 23, 2021, 04:02:46 pm
content: I used custom ATMega328P boards speaking Modbus over wired RS-485 to a RPi in my RV.My solar controller (like many) speaks Modbus RS-485 115.2k out of the box, so I standardized on that.Yeah, it wouldn't be that hard to have two buses and use Canbus on the other, but eh, why bother?Ok, my longest run is 6 meters, so wired is no hardship. It saves me from polluting the ISM bands.You definitely wanting something somewhat intelligent logging/graphing/alarming/controlling.