The story starts with my PIR’s. They happened to be just hanging from the corners of the room with no enclosures, which were kinda ugly, so I first designed a 3D printed enclosure for them.
It’s designed in a way to fit snugly into the corner of a room, right where most of the alarm wires drop.
I was kinda pleased with this, so I decided to take it a step further, by adding an all in one solution, including Smoke/gas, Temperature/Humidity and motion sensing all in one unit. I initially though this was a neat idea, since I could have one box giving me all this information. Here’s the 3D design for the enclosure:
and the resulting print:
So, all of the components were then added using a dab of hot glue to keep them in place:
There’s also a shield in there fro the D1 Mini to allow easier connection of the various sensors.
which resulted in a rather neat looking unit, although kinda unusual.
I then loaded the sketch mounted this in one of the room corners, and started the measurement.
I had noticed previously that the smoke/gas detector was quite warm when in use, but it didn’t register with me what I was about to discover next. The smoke/gas detector runs at about 25degrees celsuis, so putting the temperature sensor right beside it was a very bad idea, as it was affecting the temperature significantly. So much so, that I had to subtract a few degrees from the readings to get it to agree with another temperature sensor elsewhere in the room. So, next build, I removed the smoke/gas detector, and went back to a simpler unit with just PIR and temperature/humidity.
Which is now mounted in one of the rooms.
The wire you can see coming down into the unit is the 6-core cable from the alarm panel, so it has 5V already coming to that location, which I use to power the WeMos D1 Mini MCU board. The sketch on the D1 Mini is sending a JSON message via MQTT to my EmonCMS system (running on an AAEON Up Board, an Intel® Atom™ x5 Z8350 64 bit CPU base single board computer, the centre of my Home Automation) every minute. Working nicely, although I need to find a better location for the temperature sensor, as having it close to the ceiling is also not such a good idea. It would probably be better at head height in a room to give a more relevant temperature measurement of what the room feels like, and whether it needs heating or not.
So, the two key things to take from this:
- Dont put a smoke/gas sensor right next to a temperature sensor, you’ll only be measuring the air heated by the smoke/gas sensor.
- Don’t put a Temperature sensor up near the ceiling, it’s where all the warm air in a room accumulates. Much better positioned lower down.