DIY

Welcome, MeteoMex Makers!

Here, I show how to assemble and program a MeteoMex device. Below, several options for the housing and power supply are presented.

Assembly

The MeteoMex PCB already indicates the position of the different components. This shows the assembly of a MeteoMex aeria V 1.2 kit with a VOC sensor. 

assembly MeteoMex aeria

In this case, a 6-pin BME280 was used. Usually, the kit is supplied with a 4-pin BME280. This really does not matter, as long as you are careful that all pins are correctly connected to the board. When you see the text 'MeteoMex' in the upright position, the pins are VCC, GND, SCL, and SCA from bottom to top (see figure).

breadboard trickIf a MeteoMex is not working, this is usually not because of a faulty component, but due to poor soldering. Thus, you should heat the soldering points sufficiently before adding the solder. In case of problems, check the solder points and verify the electric connections with a multimeter. 

Both PCB, MeteoMex aerial and terra, have a jumper J1. You only need them when you plan to program a 'Deep Sleep' mode. In this case, you need to close J1 to wake up the Wemos D1 via the ESP8266 RST pin.

To properly mount the pin headers, you can use a breadboard. You can use this strategy also for the sensor board (the image at the left shows the mounting of a CCS811 sensor board). 

In the case of MeteoMex terra, you can cut the cable of the DS18B20 and use it to extend the length of the soil moisture sensor. The capacitive soil moisture sensor is specified to work with 3.3 V. However, I found that they work more reliably when connecting the (+) cable to the 5V battery solder point.

terra liquid tape

 

For outdoor use, you have to seal the electronics of the soil moisture sensor. I made good experience with water-resistant liquid tape (Permatex).

 

 

Register the device on your IoT platform

For sending data to your Internet-of-Things (IoT) platform, you have to register your device. Several IoT platform providers offer free or low-cost accounts for makers. You also can install your own IoT server. For MeteoMex, I installed the Community Edition of ThingsBoard, which is open-source, on an IONOS Virtual Personal Server: http://www.meteomex.com:8080/.

If using ThingsBoard, you have to log in as a tenant administrator and register your device. This gives you an access token that you need for programming your device.

Thingsboard Interface

Programming the Wemos

Now, you can edit an example program from the MeteoMex GitHub repository using the Arduino IDE and transfer it to your device via a USB cable. The most important variables you have to change in the programs are your device token and your WiFi settings (SSID WiFi name and password).

The WiFi Network is defined in the declaration part:

const char* ssid = "WiFi Network Name";
const char* password = "Wifi Password";

The ThingsBoard token (e.g. kuN2Rp9jVr7xfuFAB) is placed in HTML request setting the loop:

http.begin("http://www.meteomex.com:8080/api/v1/kuN2Rp9jVr7xfuFAB/telemetry");      //Specify request destination

To reduce unnecessary data traffic, you should specify a reasonable sampling rate (e.g. at the end of the loop), by inserting a delay (in milliseconds):

delay(20*60*1000);

Arduino IDE

IMPORTANT: 

You have to install the ESP32 boards from http://arduino.esp8266.com/stable/package_esp8266com_index.json  in the Arduino IDE and choose the correct device, before compiling ant transferring the program to the Wemos: Select LOLIN/Wemos D1 R1 (Or any other board you are using, e.g. the Pro version). Otherwise, you might "brick" it forever (happened to me..)!

  • For (re-)programming the Wemos, it is advisable to remove the MeteoMex sensor shield first (especially with the terra). If you have the shield mounted and the jumper J1 closed, the programming is not possible.
  • If transferring the program to the Wemos does not work, you can set the device into 'flushing mode' by shortly connecting D3 to the ground during reboot.
  • For debugging (or fast measurements in a laboratory set-up), you can define some output to 'serial' and watch it in the serial console of the Arduino IDE.

Creating an IoT Dashboard

If you did everything correctly, now your device is sending telemetry data. In the ThingsBoard Dashboard section, you can visualize your data with charts, analog gauges, etc.

Edit the ThingsBoard dashboard

Ready! You can make your dashboard public, but don't forget to make all employed devices of this dashboard public as well.

PostgreSQL database

For data mining, database maintenance, etc. also direct access to the PostgreSQL database is possible. The following screenshot shows a query of data from the wastewater treatment plant, using the Adminer interface.

adminer interface

For regular database maintenance, e.g. the automated deletion of sensor data, SQL scripts can be invoked by server CRON jobs.

Housing and powering

The MeteoMex project has not developed (yet) an official housing or power supply. In general, the housing and powering 1) should adjust to the intended use and environment ('form follows function' principle), and 2) consider cost and environmental impact. 

The following image gives examples of possible solutions:

A) The MeteoMex aeria is directly connected to a USB power supply without any housing. This solution is working perfectly fine for inhouse monitoring. When e.g. monitoring a server room, the USB power of a PC USB port can be taken. B) Professional housing and 3 x AA batteries for remote sensing. Using the deep sleep mode and with 1 sampling/hour, about 3 months of measuring are possible with a MeteoMex aeria kit. C) Water-proof housing, solar cell, and Lithium battery. This version seems attractive, but the Lithium batteries are sensitive to heat. The solar cell, the necessary charge controlling circuit, and the battery should be considered in the environmental balance. If possible, I would go for 3 x AA rechargeable batteries. D) and E) Re-use of plastic beakers. Some of them are sensitive to strong UV radiation and could become brittle. However, for most applications such a housing fulfills the requirements, is cheap, and minimizes plastics waste. 

housing and power supply

Questions or Comments?

Please join the MeteoMex Google Group or get send your Website Feedback.