Close
0%
0%

Condensation Alert

A small project to check out M5StickC with MicroPython by combining it with a useful application in my apartment.

Similar projects worth following
I have an air condition build into the suspended ceiling of my bathroom. Last summer I found water stain on the ceiling. The water stains are exactly where the cold air output is connected to the air pipes, which are pulled through the whole apartment. I assume that the thermal isolation is not enough for the combination of humidity and the temperature difference. This results in condensation. This problem must be solved before next summer…

...Near the water stains I have an inspection opening which is big enough to put one hand inside but too small to fix the thermal isolation. The effort to open the ceiling is too high compared to the size of the stains. My idea is to put a saucer below the pipes at the place where the stains are. In the end it will be a solution like a refrigerator gets rid of its condensation water. To be sure not to have too much water in the ceiling I want to measure the humidity and the temperature in the ceiling. And I want to know when the condensation is happening. This means that I will implement some moisture sensors in the saucer.

This is a good opportunity for me to check out a new gadget and a new programming language. I will use for this a M5StickC, which is based on ESP32. And I want to play around with MicroPython that I have not used yet. In the ceiling I do not have any power supply, this means that I must use a battery pack for the M5StickC and that I must check if there is a possibility for a deep sleep mode in MicroPython.

For the display of the data and simple configurations of the M5StickC I will use Node-RED on a Banana Pi BPI-M2 Berry.

Todo-List

  • Set up Node-RED --> DONE
  • Simple measurement with M5StickC and readout with Node-RED --> DONE
  • Implement deep sleep + battery pack test --> deep sleep (lightsleep) implemented; test started
  • Build saucer with moisture sensor
  • Test complete setup before summer…

Node-RED-Server.json

You need for this the node-red-dashboard and node-red-contrib-coap nodes.

JavaScript Object Notation (JSON) - 5.87 kB - 12/11/2019 at 21:22

Download

  • 1 × M5StickC
  • 1 × M5StickC ENV Hat (DHT12, BMP280, BMM150)
  • 1 × Banana Pi BPI-M2 Berry With Armbian

  • M5StickC code read for long term test

    Nikola01/02/2020 at 20:14 0 comments

    I have now finished the code for the long term test. Now I want to know:

    • How long will the M5StickC + ENV sensor run with my battery pack?
    • Is the MicroPython code correct for a long term use?
    • Is the BananaPi + Node-RED good enough for a long term use?

    I have done some changes in the Node-RED flow and added the flow to the GitHub repository.

  • M5StickC - pre-version

    Nikola12/15/2019 at 21:00 0 comments

    I have successfully received the current time and the divisor. And also send data to the Node-RED server. The code is pushed to GitHub.

    For now I have some troubles with the MicroPython code, but I am not sure where to locate the problem. Sometimes the code gets stuck and the ampy tool shows a timeout.

    When this problem is fixed, I will start a long-time test run without deep-sleep (M5StickC plugged to a power supply).

  • Node-RED Server

    Nikola12/11/2019 at 21:21 0 comments

    The installation of Node-RED in Armbian is straight forward. For the dashboard I installed the node-red-dashboard and for CoAP the node-red-contrib-coap node.

    I have tested the Node-RED server over the Wifi with the coap-clieant (--> libcoap) installed on my laptop.

    The Node-RED flow looks as follows

  • Concept

    Nikola12/11/2019 at 21:11 0 comments

    My concept is to make a simple MicroPython script on the M5StickC. I have no experience with humidity measurement. I do not know how often is enough to measure. That’s why I will have a variable (divisor) in the script which is set by the Node-RED interface. Each measurement should be saved with time stamp. The M5StickC shall not connect to the Wifi for a time check. It should get once a day one time stamp from the Node-RED server and calculate the rest of the time stamps by adding 24h/divisor. Once a day the data should be pushed to the Node-RED server. The server should display the data on a dashboard (in a browser) and should save the data in a csv file on the BPI Berry. My preferred protocol for this kind of tasks is CoAP.

    The following figure shows the workflow of the whole system.

View all 4 project logs

Enjoy this project?

Share

Discussions

Jeff wrote 12/19/2019 at 18:42 point

Out of curiosity, why not MQTT? Your sensor/M5 can publish humidity data every 10 minutes or so and the NR flow subscribes to it.  The NR flow can publish the time every now and again for the sensor/M5 to subscribe to.  I just got an M5StickC and am wondering what to do with it.

  Are you sure? yes | no

Nikola wrote 12/19/2019 at 21:36 point

I am used to CoAP and for this setup MQTT is to much overhead. I do not need to set up a broker. This setup should stay active for months with one battery pack (10A/h). It should measure at max. 48x a day. The rest of the time it should go into the deep-sleep. 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates