The emonTH is an open-source, battery powered, Temperature and Humidity monitoring wireless node.
It's been designed to be an easy to deploy tool for monitoring building / room temperature and humidity.
Using the ATmega328 the emonTH runs standard Arduino sketches and is easy to customise and upload code using the Arduino IDEand a USB to UART cable.
The data from the emonTH is transmitted via wireless (433/868Mhz) to an emonBase web-connected base-station (we recommend a Raspberry Pi with an RFM69Pi) which then posts the data onto an emoncms server (e.g. emoncms.org) for logging, processing and graphing. The room temperature and humidity data can be used to inform a heating control system, feed into a building performance model or simply for general interest!
- Microcontroller: ATmega328
- Radio: RFM69CW / RFM12B
- Sensors: DHT22 (temperature & Humidity) / DS18B20 (temperature) sensor options
- Power: 2 x AA from on-board holder, LTC3525 3.3V DC-DC boost converter to extend battery life
- Battery life: 7-36 months depending on sensor choice DHT22 / DS18B20 years expected, see blog post 1 and blog post 2
- New version emonTH V1.5 (May 2015): RF node ID DIP switch selector
DHT 22 Temperature & Humidity Sensor
- Power supply 3.3-6V DC
- Output signal digital signal via single-bus
- Sensing element Polymer capacitor
- Operating range humidity 0-100%RH; temperature -40~80Celsius
- Accuracy humidity +-2%RH(Max +-5%RH); temperature <+-0.5Celsius
- Resolution or sensitivity humidity 0.1%RH; temperature 0.1Celsius
- Repeatability humidity +-1%RH; temperature +-0.2Celsius
- Humidity hysteresis +-0.3%RH
- Long-term Stability +-0.5%RH/year
- Sensing period Average: 2s
- Independent sensor test report
The emonTH is open hardware with the designs released under the Creative Commons Attribution-ShareAlike 3.0 Unported License. The schematics and board files can be viewed and downloaded from the openenergymonitor github hardware repository here:
EmonTx Shield Arduino example code can be found on github here:
Getting started with the emonTH
The emonTH is shipped fully pre-assembled apart from the terminal block. This can be added by us on request. No soldering is needed to get the emonTH up and running using a DHT222 temperature and humidity sensor.
a.) DHT 22 - Internal Temperature and Humidity sensor (white)
Insert the DHT22 internal temperature and humidity sensor into the holder on the PCB as showin in photo
If humidity is not required a DS18B20 can be soldered directly onto the PCB instead of the DHT22, the will reduce cost and increase battery life.
b.) DS18B20 - External Temperature
If external / remote temperature readings are required connect up external encapsulated DS18B20 temperature sensor (optional).
Black - GND
Red - Dig 5 (digital I/O used as sensor power pin to enable sensor switch off in between readings to save power)
White - ADC5 (dig 18) one-wire bus
Take care when assembling the enclosure. It only fits together one way. The PCB screws onto the base of the enclosure above the wall mount lugs. The opening vents on two edges of the enclosure should be next the the DHT22 sensor. If a remote DS18B20 it's required to cut away a bit of one od the plastic fins. This can easly be done with a pair of pliers.
2.) Pre-installed Firmware
Note: From December 2015 all emonTH's will come shipped with firmware V2.6, the adds support for optical pulse counting using optical pulse sensor. The V2.6 firmware will have default node ID 23 and will require an update to the emonPi / emonBase node decoder. Update by browsing to admin > update on emoncms local. See update info in emonBase / emonPi setup guide
Shipped ready setup on RFM69CW RFM12B group 210 and node ID 19 / 23.
The emonTH bought from the OpenEnergyMonitor shop will come ready uploaded with firmware (Arduino sketch). The default RFM69CW / RFM12B settings are for the emonTH to transmit on group 210 and nodeID 19 or 23 and the frequency to match the hardware (433Mhz / 868Mhz).
If you're only setting up a single emonTH no further configuring should be required.
New for emonTH V1.5: Up to four RF node ID's can be set using on-board DIP switch:
|DIP 1||DIP 2||RF Node ID (V1.x firmware)|
|DIP 1||DIP 2||RF Node ID (V2.x firmware)|
Once batteries are inserted into the the emonTH (we recommend rechargeable alkaline or low self-discharge NiMH for best performance to environmental impact) the red LED should light up for a few seconds. During this time the emonTH will attempt to detect any connected DHT22 or DS18B20 sensors. If any sensors are successfully detected the LED with extinguish and the emonTH will start transmitting readings every 60's. If the LED flashes several times this indicates that no sensor has been detected.
- If only DHT22 sensor is detected both internal temperature and humidity will be reported from this sensor
- If only a DS18B20 is detected internal temperature will be reported from this sensor (assume internal)
- If both sensors are detected the emonTH will assume the DS18B20 is external sensor wired into terminal block and report internal temperature and humidity from DHT22 and external temperature from DS18B20
3.) Configuring emonTH inputs in emoncms.org
The emonTH running standard firmware transmits the following data structure via RF.
- DHT22 Temperature
- DS18B20 Temperature
- DHT22 Humidity
- Battery Voltage
- Pulsecount (firmware v2.1 onwards)
On the standard emonpi/emonbase the emonth node will be decoded automatically into the nodes module using pre-set node decoders in emonhub.conf. When sending to emoncms.org the inputs will appear un-named in the emoncms.org input list, The input values can be named with the above names.
Note: The value's transmitted by the emonTH are sent as integers all 10x the actual values (185 is 18.5C). Emonhub a piece of software running on the emonpi/emonbase decodes and scales the sensor values to their correct values for use either via the nodes module on the local emoncms or for the inputs interface in emoncms.org. Sending the values like this reduces the RF packet length by half which saves transmit time battery. We then scale each value by 0.1 to convert back to the correct reading.
With several temperature nodes in a building, an external temperature measurement and accurate measurement of heat input (which can be done with an emonTx and electric heating) it is possible to model and determine the thermal performance of a building, the following application guide explains one approach for doing this: Building thermal performance monitoring and modelling
Appendix A: Firmware
The emonTH has an Atmega328 at its core with the arduino UNO bootloader on board, its is programmed using the Arduino IDE and USB to UART cable. If you don't already have Arduino installed follow the setting up the arduino programming environment here:
Once you have the Arduino IDE installed you will then be able to run the firmware examples available in the emonTH firmware repository here:
As of Dec 2015 all emonTH will come shipped with firmware V2.x with support for pulse counting: https://github.com/openenergymonitor/emonTH/blob/master/emonTH_DHT22_DS18B20_RFM69CW_Pulse/emonTH_DHT22_DS18B20_RFM69CW_Pulse.ino
Be sure to use the correct firmware for the RF module of the emonTH (RFM69CW / RFM12B), see photo to help identify your module. All emonTH's shipped after April 2015 will have RFM69CW and all shipped before should have RFM12B.
USB to UART programming cable connects to the emonTH on it's internal UART pin-out shown above.
Setting the RFM12B nodeID, group and frequency
All emonTH's are shipped with the default firmware which has the RFM69CW / RFM12B configured for operation on group 210 and with an emonTH node id of 19 and the frequency to match the hardware module. If you have multiple emonTH's you will want to change the nodeID to be unique on each one.
At the top of the default emonTH sketch found here you will see the following lines:
#define freq RF12_433MHZ
const int nodeID = 19;
const int networkGroup = 210;
To change the frequency change RF12_433MHZ to RF12_868MHZ or RF12_915MHZ depending on which frequency hardware you have. The node id can be anywhere between 1 and 30 and the network group 0 - 250. However we recommend sticking to the allocation of node ID's between 17-30 for environmental sensing nodes such as the emonTH. See here for OpenEnergyMonitor Building Block page regarding the RFM12B hardware and software.
Appendix B: Debug Mode / Serial output:
Using a USB to UART cable (available in the shop) it's possible to view debug info via serial (9600 baud).
Note: to save battery debug mode should be turned off, this has now been set as default. To view debug output upload sketch with debug=1 or .hex without 'NoDEBUG' in the title. emonTH GitHub Page
DHT22 Temperature and Humidity sensor only
If your unit has a humidity sensor only the output in the serial window should read:
Using both an external DS18B20 sensor and the DHT22 at the same time
This is a neat way to measure both internal temperature and humidity and external temperature at the same time from one emonTH node.
Connect up the DS18B20 as in the picture below:
(Black wire to GND, Red wire to DIG 5 and White wire to ADC5 (used as DIG 19))
Using the default firmware the emonTH will now detect that it has a DS18B20 connected as well as the DHT22. The output in the serial window should read:
Using a DS18B20 sensor only