Copyright ©

Mongoose OS Forum


DHT Temperature Project (need advice)

Hi everyone,

I am trying to make more complicated temperature project. Okay, even now can't read DHT11 values yet :) but I am trying and planning more. I want to use one NodeMcu board as main or we can say brain of the system. Then I want to put a couple of devices (temp device) to other rooms of the house. These devices should send temperature to the main device and the main device should send all of them to the server. The main device is working with a wall plug. But temp devices should work with the battery. Do you have any recommendation about hardware, battery management or software?

Or do you recommend forget these things and make every temp device has NodeMcu board and send by itself? But that means forget the project too.


  • SergeySergey Dublin, Ireland
    edited July 2017

    My understanding is that master node is grid-powered , and sensor nodes are battery-powered.

    Then, sensor nodes must sleep and turn on wifi only periodically in order to save power.
    Alternatively, you might use ESP32 and bluetooth for sensor nodes, but I can't say about the power consumption numbers in this case. My assumption is that BT-enabled ESP32 may live off battery power for a long time. Master node should be ESP32 too, in this case.

    ESP32 has a built-in temp sensor too, but since it is built-in, it primarily measures the temperature of the MCU, not the environment :)

    Is ESP8266/nodemcu a strict requirement?

  • Yes, your understanding is true :)

    And No I started with ESP8266 but I can switch to ESP32. But with esp8266 and 9V regular battery I can't go too much. I can extend battery life only 12-13 hours. 9V battery not a good power source I know, but it has approximately 500mah even I switch 2000mah it dry at 2 days. I try to measure very frequent like once in ten minutes. Is usage of ESP32 and bluetooth can go longer than these? I have to make it at least 30 days.

    I am thinking different ways to keep battery more. Like before connecting wifi or bt, check the temperature and if the temperature didn't change from the last measure don't do anything and go deep-sleep. And the main device understands that if any device didn't send after 10 minutes that means temperature same. And the main device sends to server same temperature.

    But battery should go at least 30 days and the above idea makes it even longer.

  • If you want longer battery life, you'll have to look into deep sleep feature. You could use another microcontroller (like ATtiny 13/85) to check for temp changes before waking up ESP32 to send to server new changes.

  • rojerrojer Dublin, Ireland
    edited July 2017

    actually, ESP32 has a low power core which is designed exactly for this kind of application: reading sensor data without waking up main processor(s). see here.
    it's not trivial to use, and there is currently no assistance provided by mOS (something we are considering, but have not got arpund to), but you are free to use ESP-IDF methods in the mean time, of course.

  • Is there a sample app, or any help that can be provided, illustrating how to build a ULP app with Mongoose? I am trying to implement the following: but have no idea how to associate the *.S file with Mongoose to build correctly.

Sign In or Register to comment.