Author Topic: What technology for sensors everywhere in the house?  (Read 1198 times)

0 Members and 1 Guest are viewing this topic.

Offline SwakeTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: be
What technology for sensors everywhere in the house?
« on: November 19, 2021, 04:20:22 pm »
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 :palm: ).
- 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.

When it fits stop using the hammer
 

Offline glentek

  • Regular Contributor
  • *
  • Posts: 56
Re: What technology for sensors everywhere in the house?
« Reply #1 on: November 19, 2021, 09:47:26 pm »
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.
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: What technology for sensors everywhere in the house?
« Reply #2 on: November 20, 2021, 01:59:48 pm »
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.. See  https://github.com/merbanan/rtl_433
« Last Edit: November 20, 2021, 02:11:37 pm by cdev »
"What the large print giveth, the small print taketh away."
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6842
  • Country: nl
Re: What technology for sensors everywhere in the house?
« Reply #3 on: November 20, 2021, 03:40:57 pm »
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.
« Last Edit: November 20, 2021, 05:37:37 pm by Marco »
 

Offline SwakeTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: be
Re: What technology for sensors everywhere in the house?
« Reply #4 on: November 22, 2021, 08:07:38 pm »
Found an interesting opensource project https://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 !
When it fits stop using the hammer
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6842
  • Country: nl
Re: What technology for sensors everywhere in the house?
« Reply #5 on: November 23, 2021, 03:31:12 pm »
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.
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: What technology for sensors everywhere in the house?
« Reply #6 on: November 23, 2021, 04:02:46 pm »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf