Skip to content

Source code and binary releases for the Twomes room monitor module (a satellite of the Twomes P1-gateway). It measures temperature, CO₂ concentration and humidity.

License

Notifications You must be signed in to change notification settings

energietransitie/twomes-room-monitor-firmware

Repository files navigation

Twomes Room Monitor Module firmware

Firmware for the Twomes Room Monitor Module.

Table of contents

General info

This firmware is designed to run on the ESP32 of the Twomes Temperature Monitor hardware, connected with the Twomes CO₂ Monitor Shield hardware which contains two primary sensors:

  • Sensirion SCD41 CO₂ sensor
  • Si7051 temperature sensor

The ESP32 reads various properties of these sensors, and stores them in RTC fast memory, to preserve them during the deep sleep interval between brief moments when the ESP32 needs to be awake for data acquisition. After a series of 20 measurements at fixed time intervals, the ESP32 will send the series of measurements to the Twomes P1 Gateway measurement device using the ESP-NOW protocol.

Via the Twomes P1 Gateway measurement device, the Twomes Room Monitor Module sends the following properties to the Twomes server:

Sensor Property Unit Printf format Measurement interval [h:mm:ss] Description
SCD41 CO2concentration ppm %d 0:05:00 CO₂ concentration
SCD41 humidity %RH %d 0:05:00 relative humidity
SCD41 roomTempCO2 °C %.1f 0:05:00 air temperature
Si7051 roomTemp °C %.1f 0:05:00 air temperature

Pairing

After deploying and installation in the home, the Twomes Room Monitor Module should be paired as a satellite to the Twomes P1 Gateway measurement device.

Deploying

This section describes how you can deploy binary releases of the firmware, i.e. without changing the source code, without a development environment and without needing to compile the source code.

Prerequisites

To deploy the firmware, in addition to the generic prerequisites for deploying Twomes firmware, you need:

  • a 3.3V TTL-USB Serial Port Adapter (e.g. FT232RL, CP210x, etc..), including the cable to connect ths adapter to a free USB port on your computer (a USB to miniUSB cable in the case of a FT232RL);
  • You need to place a 3.6V Lithium AA-battery (e.g. SAFT LS14500) in its holder to power the board, as the Twomes Room Monitor Module is not powered via the 6 pin programming connector.
  • Find a row of 6 holes holes (J1 in the corner of the PCB of the Toom Monitor Module), find the GND pin (see bottom of the PCB), alighn the 6 pins of the serial port adapter such that GND and other pins match; then connect the serial port adapter to your computer and connect the 6 pins of the serial port adapter to the 6 holes on the PCB.

Uploading firmware

  • Download the binary release for your device and extract it to a directory of your choice.
  • Follow the generic Twomes firmware upload instructions , with the exceptions mentioned below:
    • When you see the beginning of the sequence Connecting ......_____......, press and hold the button labeled GPIO0 (SW2) on the PCB, then briefly press the button labeled RESET (SW1).
    • You should see an indication that the firmware is being written to the device.
    • When the upload is finished, view the serial output with a serial monitor tool like PuTTY or the utility of your IDE (115200 baud). Press RESET (SW1) shortly to make sure the firmware boots.
    • Remove the battery or insert a battery insulating pull tab when you do not plan to use the room monitor module immediately, to prevent unnecessary battery drain.

Developing

This section describes how you can change the source code using a development environment and compile the source code into a binary release of the firmware that can be depoyed, either via the development environment, or via the method described in the section Deploying.

Please see the developing section of the generig Twomes firmware first. Reember to presse buttons to upload the firmware:

  • When you see the beginning of the sequence conecting ......_____......, press and hold the button labeled GPIO0 (SW2) on the PCB, then briefly press the button labeled RESET (SW1) shortly.
  • You should see an indication that the firmware is being written to the device.

Features

List of features ready and TODOs for future development.

Ready:

To-do:

  • Align indication of status and error via LEDs with other measurement devices.

Status

Project is: in Progress.

License

This software is available under the Apache 2.0 license, Copyright 2021 Research group Energy Transition, Windesheim University of Applied Sciences

Credits

This software is a collaborative effort of:

Thanks also go to:

Product owner:

We use and gratefully acknowlegde the efforts of the makers of the following source code and libraries:

About

Source code and binary releases for the Twomes room monitor module (a satellite of the Twomes P1-gateway). It measures temperature, CO₂ concentration and humidity.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages