The author of this article is Jager. Thanks to him for this development and many other devices. The article was translated semi-automatically into English, for the entire community and to add device support to zigbee2mqtt
There are many options for such interfaces, both factory and DIY. A very interesting project is Waterius , which works with various types of devices and data transfer via WiFi. I used part of this device responsible for counting pulses for my project. The device has two channels for meters and a channel for a leakage sensor, is designed to work in a zigbee network, and is powered by two AAA elements.
The attiny85V microcontroller is used to count pulses (note the “V” index, this modification operates from 1.8 volts). Work is possible both with meters with “dry contacts” and with meters with a NAMUR interface . The leakage sensor in the form of two contacts can be connected to the corresponding connector on the board; the firmware implements binding for this event, i.e. the relay/actuator can be controlled directly. The zigbee part is handled by the proven module E18-MS1-PCB
The board provides space for installing DS18B20, BME280 and SHT30 sensors. Accordingly, if you do not solder the part of the circuit responsible for counting pulses, then the board can also be used, for example, as an outdoor thermometer. It is possible to use AAA battery holders with different polarities; for this, there are jumpers on the board that must be soldered in accordance with the model you have.
The board was designed by EasyEDA and ordered from JLCPCB
Assembly should not cause any difficulties; after soldering, be sure to thoroughly rinse the board, preferably in an ultrasonic bath . As connectors, you can use not only clamp terminals, but also screw terminals with a pitch of 2.54 mm. or JST type connectors
The device in counting mode and zigbee sleep module consumes only 7 microns.
The firmware for the device was written by @aggsoft , the author of the PTVO configurator . You can upload the firmware to the attiny85V in various ways, via arduino , USBasp or Pickit . To do this, there is an interface on the board that can be flashed with installed batteries.
You can specify an initial value for counters by entering it in the “Value” field; you can also set the interval for receiving data, set in minutes. Since the zigbee module is constantly in deep sleep, after changing the data within 3 seconds, it must be woken up using the service button so that it receives the changed values.
In zigbee2mqtt, the device is also supported through an external converter; initial counter values can be sent via MQTT to the topic ..../set/l5. A positive value will change the counter state, a negative value will change the data sending interval.
To make the body of the device I used a set of plumbing products
The housing turned out to be cheap, sealed and convenient for installation directly on the pipes where the meters are installed.
For those who want to repeat, all the necessary files are in the archive .
The device can be discussed in the zigbee profile chat in Telegram.