Multifunction Monitoring Module With Email Alert

by danielgass in Circuits > Arduino

412 Views, 1 Favorites, 0 Comments

Multifunction Monitoring Module With Email Alert

_Pot de fleur équipé et boîtier.png

Creating a multifunctional module of monitoring with very low consumption at rest.

Using the developed module here for monitoring of the humidity level of a flowerpot with email warning.

To keep the power consumption low, the email function is launched only if necessary (here low humidity).

As I wanted to use professional PCBs (a first for me) and as I need to order at least 5 of them, I developed a multifunctional module that I will use in my other projects (water leakage detection, temperature monitoring, air humidity, plant watering).

Supplies

_Composants.png
  • - 1µF ceramic capacitor
  • - 10µF, 100µF capacitors
  • - Resistors 1x220k or to be defined, 3x 100k
  • - TPL5110 circuit
  • - ADS1112 circuit
  • - Wemos mini D1 or Wemos mini pro circuit with external gain antenna
  • - Capacitive probes
  • - Housing 110x60x30
  • - Connection wire
  • - PCB sockets
  • - 2.54 pin (housing Crimp) 2 pos, 3pos, 4pos

Options

  • - Mosfet P channel IRF9530 TO-220 housing or VP3203N3 TO-92 housing

Description of the Module

copie_20220621-162055.png
_Circuit diagram.png

All the project files (Arduino programs, EsayEDA schematics and PCB files) are downloadable here.

The heart of the system is a Wemos mini D1 controller. It takes care of reading analog sensors and communicating by email through Wifi interface and the internet. Physical interfaces (Mosfet transistor and I2C connector) allow to control various peripherals.

An ADS1115 circuit connected to the controller in I2C bus has 4 inputs. This circuit can accommodate sensors with analog outputs. The input A0 of the ADS1115 is connected to the power supply module which sends him the information of the state of charge of the battery. For the simple setup described here I use only one sensor to monitor the humidity level of a flower box.

A TPL5110 timer controls the activity of the assembly. In active mode the Wemos controller is powered up and its program starts. This program reads the peripherals and, depending on the results, performs actions. At the end of the program, it sends a pulse to port D0 of the TPL5110 circuit, which goes into standby. The resistor R1 gives the timer's standby time and therefore the time the circuit is powered down.

A filter consisting of an inverter and a capacitor connected between port D4 of the Wemos and port D0 of the timer avoids parasitic impulses when the Wemos is started.

This filter is necessary because when the Wemos starts up the GPIOs go through the LOW state before they can be controlled by the program. Without the RC filter, the TPL5110 circuit would go back to the standby state without the Wemos program being able to run.

The duration of the timer's inactivity is set by resistor R1 (The value of 220k corresponds to a standby state of about 2h30. It will be necessary to disconnect the internal resistor of the TPL5110 circuit as shown in the picture). To adjust the standby time to your own needs, a connector (DELAY) is available for the connection of external resistors. When set, the resistor can be soldered to the board (R1).

Special Features of the Installation

Power consumption

This assembly is characterized by its low power consumption. During the standby state the consumption is around 20µA.

In active mode, the consumption increases to 60mA for a few seconds when the humidity level and the battery level are sufficient.

When the humidity level is below a given threshold, the consumption increases to 150mA when launching the Wifi and sending emails.

The battery's operating time can then exceed 12 months.

Signal strength

Depending on the distance between the module and the Wifi antenna a Wemos mini-Pro controller with a gain antenna should be used.

Power Supply

_Components with solar.png
Power Circuit diagram_page-0001.jpg
copie_20220621-162015.png

It is realized by a second circuit based on an 18650 battery. A DC-DC converter module regulates and stabilizes the output voltage at 5V (essential to ensure the stability of the Wemos circuit!).

To monitor the charging level of the battery we use a LM10 circuit. It is an Op Amp with an internal reference voltage of 0.2V. A bridge divider (R2, R3, RP1) provides a voltage that is compared to this reference voltage. The bridge divider provides 0.2V when the battery voltage reaches 3.5V. As soon as the battery voltage is lower than 3.5V the output of the circuit switches from 0 to 5V. The potentiometer RP1 allows to adjust the threshold voltage to 3,5V.

The measurement of the battery level is controlled by an optocoupler which connects the circuit to the battery. In the same way an optocoupler transmits the state of the battery.

By this principle the battery is electrically decoupled from the circuit to be supplied to reduce the electric consumption.

The solar panel not being used in this project, we can do without the battery charger and the C1 capacitor. Two bypasses are necessary in the absence of solar panel (see on the picture of the PCB).

Given the immediate proximity between the two PCBs, the stabilization capacitor C3 is unnecessary.

Programmes

_Programme.png

The Arduino program is based on the libraries " ESP8266WiFi.h ", " ESP_Mail_Client.h " and " Adafruit_ADS1X15.h ".

The application consists of two files: the main program and a file containing the Wifi and email functions. I use the examples provided with the libraries. These examples are well explained and work correctly (Thanks to K. Suwatchai (Mobizt)).

In the main program the declarative part gathers the library calls and the variables. The setup part is simple. It reads the values of the analog inputs and compares them to defined thresholds. Depending on the case, it sends a message by email. Here I use only two inputs. 

At the end of the program, port D3 is set to LOW. Thus the port D0 of the TPL5110 circuit goes to HIGH which cuts the power for 2h30.

Conclusion

_Boîtier ouvert.png

In this project I designed the schematics with the EsyEDA software and the generation of the PCB files as well as the jlcpcb.com website for the manufacturing of the PCBs. The manufacturing is not very expensive. To make the cost of transport profitable I made a grouped order of different PCBs. The result is very good quality, and the delivery time is fast (10 days). The PCB files are at your disposal for a possible order.

This project with its various interfaces can be used for many projects. For this project I used a single probe.

A Mosfet output allows to drive a device consuming up to 600 mA. An I2C BUS interface allows to connect other peripherals as input and/or output.

The device can be woken up on an external event. To do so, you just must connect the DELAY input of the device to 5V with a relay (same effect as pressing the button of the TPL5110).

If this can give your ideas, I would be delighted. "Enjoy it”.