Let’s get one thing out of the way. Wireless vs. wired? One of my favourite YouTubers Andreas Spiess released a vid this week about PoE on the ESP32. Andreas touched on the discussion of Wireless vs Wired for IoT devices and I agree with his comments. I’ll leave this here: wireless is fantastic but not for devices integrated into the fabric of the building:
The two devices Andreas showed seem to slightly fall-short of my requirements though. (I’ve added a third below as well.)
Onto the main question consuming my mind at the moment.
Should I make “passive” sensors which report back via a (potentially long) cable to a central controller (Arduino or whatever), or embed the microcontroller into each ceiling point, and wire each cable into an ethernet switch? (Using either passive PoE or 802.3af?)
e.g. individual sensors like the DHT22, located in ceiling, wired back to Arduino in a central location. Or sensors connected to a 1-Wire network.
- Feels a bit “old school”
- Smaller sensor housings: no need for buck converter or microprocessor inside each sensor
- 1-Wire temp sensor DS18B20 very cheap indeed (£0.30)
- 1-Wire addressable switch can be used to interface with PIR / microwave sensors. The DS2413 is £0.68 + shipping. The DS2406 is £0.26 + shipping.
- A lot cheaper
By this I mean each sensor node has its own microcontroller and network interface.
- May not be a good idea to send 5V to power each device because of voltage drop, therefore we need buck converters at each node. These can get hot, die, and could even be a fire hazard?? (Although these devices would be very low load at 5V, so maybe not.) Also they take up space.
- Less concern about interference or noise if we use ethernet
- DIY passive or “proper” PoE (the latter pushes the cost up by about £9)
- Bigger and more expensive (still cheap)
From this basic analysis, 1-Wire definitely seems a good way to go, but I have a hunch that as we begin to introduce our own sensors to the 1-Wire network using the relevant 1-Wire interface chip (e.g. the DS2406 for basic digital IO or the DS28E18 for SPI interface), things might become complicated and difficult to troubleshoot, and I fear ending up in a rabbit hole of having to fully understand the 1-Wire protocol.
My strong preference is that each sensor has its own microcontroller, ethernet connection, and buck converter. Are my fears of fire risk justified? I have for many years used a Fulree buck converter inside a wall controller I made.
One died after 3 years, but no visible damage. It is only switching 20V (from a Dell charger) down to 5V and the things are encased in resin so perhaps my concerns are over the top?