Wiring a smoke detector

Hey Dave, that could indeed make sense. But even in that case it is a nice feature that we can use to read the smoke detector state, without having to decrypt some obscure proprietary protocol. Long live the relays..

If you don't want to use WIFI, one simple solution is to wire the relay to your Raspberry and use an optocoupler (12V or 24V input):
https://www.aliexpress.com/item/12V-1-Channel-Optocoupler-Isolation-Module-Isolated-Board-Rail-Holder-PLC-Processors-80KHz-PC817-EL817-Drive/32864935199.html?spm=a2g0s.8937460.0.0.38ce2e0eNeFjX1

A 220V optocoupler would be better, but I'm not sure whether your smoke detector relay can switch 220V.

https://www.aliexpress.com/item/1-Bit-AC-220V-Optocoupler-Isolation-Module-Voltage-Detect-Board-Adaptive-For-PLC-Isolamento-Fotoaccoppiatore-Module/32818873387.html?spm=a2g0s.8937460.0.0.a5112e0ePZutZC

Hey Flurin, we have been experimenting last week indeed also with optocouplers. Here is for example a din-rail optocoupler which is not expensive and works fine.
However from all the above feedback I now think it is better if I could put a board near to every sensor, which sends mqtt messages across my ethernet cables. Then it becomes very easy to have a second backup Node-RED which takes over when the other one fails for some reason. This kind of setup is nearly impossible when I wire the sensor cables directly (via optocoupler) to a central Raspberry. Only problem left is to find such a board with RJ45 connector. Perhaps Arduino...

You could wire all your smoke detectors (how many?) via optocouplers to an intermediate device (old rpi, rpi zero with an usb ethernet adapter) and submit mqtt messages.

For anybody looking here afterwards for a low-budget system to run Node-RED...
Instead of using a Raspberry PI Zero with wifi, you could also use (when you want a wired ethernet connection):

  • Orange PI zero at 12,5 EUR inclusive RJ45 adapter. The installation procedure is a bit different on Armbian (compared to Raspbian on Raspberry)...
  • NanoPI Neo at 13$ inclusive RJ45 adapter. See this blog.
  • Raspberry PI Zero (without wifi for 5,26 EURO) which can have an ethernet adapter for 2,5 EUR (setup tutorial can be found here). There are also hats available but these are a bit more expensive (> 7,6 eur).

Yes Colin, so simple I forgot about that option:
https://www.amazon.co.uk/Plugable-Ethernet-Compatible-Raspberry-AX88772A/dp/B00RM3KXAU/ref=sr_1_3?ie=UTF8&qid=1541951428&sr=8-3&keywords=raspberry+pi+usb+ethernet

Bart, I assume that your whole system will be hard-wired?

Yes Garry, would love to have everything wired.

I had forgotten that all the Raspberry (compatible) solutions need an SD card. When you look at all the components needed, it is becoming a bit too expensive to have such a setup for every sensor in my house/garden.

So I started back looking at ESP8266 or ESP32 based solutions, but until now I didn't found anything reliable/cheap/small to wire it. I'm getting nuts of all those wifi freaks on the web :woozy_face:

P.S. for the bit-lovers among us, there is an ethernet controller available in the dark side of the ESP8266. Very tempting, but this time I would like to have a more standard solution ...

Why don't you want to use wifi? Is this feature a critical part of the safety system or just for information.

Hey Colin, I have no nuclear installation in my basement, if that is what you mean. It is just one of my (many) abnormalities. In my house only the portables and mobiles use wifi. All devices that don't move around are wired. I love wifi for some purposes, but I want to use it as minimal as possible. And no, I don't have EMF anxiety and it is not based on a prescription of my radiation oncologist. Just want to have as less interference as possible. And now I have crossed the point of no return: just need a damn cheap wired board :rofl:

Won't the cable cost vastly more than the electronics?

Just a thought:

Maxim 1-Wire

https://www.maximintegrated.com/en/app-notes/index.mvp/id/148

Yes indeed you are 'very' correct. But on the other hand I need a power wire to the sensor anyway, because I have a fear of batteries also :rofl: If you ever meet my wife, don't tell her that the cables are also expensive!

That could be a solution. But the nice thing about the ethernet is that I can use ordinary ethernet switches to go from N sensor cables to a single cable...

If I ever find an ethernet solution during my current miserable life, I will post the result here ! Thanks guys!

I use 1-wire a lot, and it is excellent, but you can't just connect it to a relay, you need a sensor and I am not aware of a sensor that can be connected to a relay. That doesn't mean there isn't one. If there is the that would be an excellent suggestion. 1-Wire just needs cheap double core cable (it is 2-wire really of course, 1 wire plus common).

Would this fit the bill Colin?

https://www.maximintegrated.com/en/products/interface/controllers-expanders/DS2413.html

Don't forget to check out Pete Scargill's blog if you want to know about the in's and out's of using alternate SBC's.

1 Like

Haha, that would certainly push SWMBO over the edge for sure :smile:

1 Like

That looks ideal. You should be able to connect that direct to the relays just with a pulup resistor I think. Though thinking about it I am not sure what you would pull it up to. That might need a bit of thought.
Thanks for finding that, I have added it to my list of useful bits.

1 Like

1-wire is multi drop, you just need to run one two core wire round the whole set of sensors.

2 Likes

I really don't get your obsession with wired ethernet. You can power the NodeMCU directly from 12V which you already have at your detectors, and it costs less than $5 each. Add a $5 DHT-22 and you can get the temperature as well.