Where do you place your sensors or how do you hide them (case)?

  • Hey everyone,

    I recently stumbled upon mySensors after playing around with home-assistant for quite some time.
    The next thing I wanted to do is measuring temperature, humidity and air quality (CO2) and I am so glad I found mySensors.org. πŸ™‚

    One thing that I ask myself when seeing all your crazy hacks is this:

    Where do you hide all the components and where do you place your sensors? I don't really want to have all the cables, sensors and Arduinos to be visible. And compared to the Pi, there aren't that many cases on the market and let's be honest - they're ugly as the night... πŸ˜‰

    But even when putting the components into a case, what about the sensors? I could imagine that it isn't that great to measure the parameters mentioned above INSIDE a case, right?

    As I am still waiting for my hardware to arrive - I thought I could beginn my membership here with a quite general questions. πŸ™‚

    I am looking forward to hearing from you.

  • Mod

    Hi @MaKin, big welcome to the MySensors community!

    There is a long discussion with lots of ideas in https://forum.mysensors.org/topic/5033/clean-looking-sensor-node
    The MySensors store has some suggestions: https://www.mysensors.org/store/boxes
    And we have a cheap and compact solution by @m26872 https://forum.mysensors.org/topic/2745/my-slim-2aa-battery-node

    Some other threads:

    There is also one brilliant solution with no case, just a hole: https://www.youtube.com/watch?v=4sfzCdJKSiw

  • Hardware Contributor

    @MaKin - I pretty much use a plastic electrical box with holes in it πŸ™‚ works fine and you can hide them in different places knowing everything is secure inside.

    They are cheap and can be bought pretty much everywhere.

  • Thanks a lot guys. Will have a look at these. πŸ™‚

    Can you tell me how to handle the sensor probes themselves? Can they rest inside the case of will it render the sensor data useless? πŸ˜•

  • Mod

    @MaKin it depends on the type of sensor. Temperature sensors can be inside the box in most cases. Which sensors do you have in mind?

  • I ordered the DHT22 for humidity and temperature. Doesn't the Arduino get warm enough to have an impact on the measured environment inside the box?

    I'd also like to measure CO2 in the bedroom as we're expecting our first child and I want to make sure the air quality is as good as possible. πŸ™‚

  • Mod

    @MaKin a battery-powered tepmerature sensor can live for at least two years on 2xAA. Good 2xAA batteries have 2.5Ah of power. A rough calculation then gives that the batteries have 2.5Ah * 3V = 7.5Wh. 2 years is 2 * 365 * 24 hours, which is 17,520 hours. That gives an average heat generation of 7.5/17,520=0.00043W.

    So yes, the Arduino will generate heat of about 0.00043W. But I doubt that will affect the temperature inside the box. The accuracy of the DHT22 is +/-0.5 degrees Celsius anyway, so there will be more error from the DHT itself.

    Most people mount the sensor so it faces the outside of the box, and drill a few holes in the box. By doing that, the sensor will be more exposed to the outside air than the inside.

    For CO2 I guess the risk is that the CO2 levels of the air near the box do not match the CO2 levels inside the crib. There you might need to spin up a small fan briefly to ventilate the box. This can be done easily by using a small computer cpu fan or similar, controlled by a pin on the Arduino.

  • Hero Member

    I do not think anyone has managed to create a battery powered CO2 senor yet, at least not that I know of.
    The sensors just draw to much power and often needs some pre-heating to be accurate, so be prepared that you might have to make it a wired sensor.

  • Thanks a lot for your replies guys!

    So I might also just build two sensor boxes wired when using the CO2 component and wouldn't have to worry about the battery.

    When using a CO2 sensor plus the DHT22, should I better take an Arduino Uno/Nano instead of the Mini Pro? And what power adapter would you recommend?

    I'm really sorry for asking those questions that might seem so simple to you but my knowledge about electricity is horribly lacking... 😞

    I really have to dive deeper into the topic but I'm still pretty fresh to the subject. πŸ™‚

  • Mod

    @MaKin the Uno and Nano have USB ports, which is convenient when connecting them to a computer for programming/troubleshooting (for the Pro Minis you need a FTDI adapter, see link in the MySensors store). Another upside with the USB ports is that the node can be powered through the USB port using a regular USB phone charger.

    Uno and Nano are 5V. Pro Mini exists in 5V and 3.3V version. Some sensors use 5V and some use 3.3V. If you want to use a 3.3V sensor with a 5V Arduino (or the other way around) you need a logic level shifter.

  • I don't want you to think I haven't informed myself before. I knew that Uno and Nano are 3.3V and 5V while the Mini Pro is either or. From the getting started I got that I need some kind of step-up or step-down regulator (that's your logic level shifter I assume: here I have to dig deeper into the matter).

    What I wasn't and still am not sure about it the computation power. The Mini Pro is 8Mhz with 3.3V and 16Mhz with 5V, therefore optimal for battery usage. But is it the same with the uno and nano?

    Or are all the boards the same except for voltage, USB port and form factor?

    And don't I have to fear a lack of computation power with multiple sensors being used?

    Thanks again for your patience and support, it's unbelievably helpful when entering new fields. πŸ™‚

  • Mod

    @MaKin Sorry if my answers are too basic. It is very hard to figure out what level people are (I am no mind reader - yet), and I choose to err on the "too simple" side because of two reasons:

    1. Too advanced information is useless to a newbie, while too simple information still can be valuable or at least easily ignored by a more advanced user
    2. These threads are read by a lot of people. Someone else might be at a lower knowledge level, and can therefore benefit from simpler answers.

    I usually use https://www.arduino.cc/en/Products/Compare to compare the different Arduinos. Sparkfun has a table a bit further down on https://learn.sparkfun.com/tutorials/arduino-comparison-guide as well but doesn't have info on amount of sram.
    Computational power is very seldom a bottleneck in home automation. The mcus often sleep more than they are awake, or run around in a loop waiting for something to happen. The Sensebender runs at 1MHz and that's enough for almost anything.

    Flash size and sram can make a difference though. Some Pro Minis are based on Atmega168, which only has 16kB flash which is a bit tight. In one project I needed more than the 2kB sram available on Atmega328P so I decided to use an ESP8266 which has ~45kB usable sram when the rest of the code is loaded.

    A regulator handles voltage for power supply. A logic level shifter handles voltage for signals. They are quite different and can not be used interchangeably.

  • Hardware Contributor

  • @mfalkvidd I really appreciate your help and once again it really brought me closer to my goal.

    Today I received my arduino uno, some LEDs, resistors, buttons, buzzers and motion sensors and I was able to fiddle around a bit.

    Loaded the serial gateway program onto it and added the motion detection part and it seems to work so far. I'm still waiting for my Nanos, radios and DHT22 sensors so I can place them in my rooms.

    Can I set the voltage to 3.3V and the clock speed of the Nano to 8Mhz and also use it with a battery (when no CO2 sensor is used)?

  • Mod

    @MaKin seems like it is possible to convert a Nano to 3.3V, I found this when googling http://www.avrfreaks.net/forum/converting-arduino-nano-chinese-clone-33v

    But to me it seems like a lot of work. Easier to just use a 3.3V Pro Mini or a logic level shifter.

  • @mfalkvidd yep, found that too. But when using CO2 sensors it doesn't really matter anyway. πŸ˜‰

  • 19 days ago .. I hope i dont wake the dead .. on my latest projects I bagen using this nice stuff:


Log in to reply

Suggested Topics