magner35 / ModBusWaterMeter

Pulse counting water meter overlay, providing data via the MODBUS protocol via the RS485 interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModBusWaterMeter

Pulse counting water meter overlay, providing data via the MODBUS protocol via the RS485 interface. Overlay on the water meter counting the number of revolutions of the two-color dial located on the reading panel of the water meter. The optical system of the attachment illuminates the rotating disc of the water meter with IR light, which is reflected (mirror part of the dial) or absorbed (black part of the dial), the reflected beam is recorded by the phototransistor from which the analog signal is directed to a window comparator built on the LM393 system. At the output of the comparator there is a high signal - when the phototransistor is illuminated by light reflected from the dial or low when the light is absorbed by the dial and does not reach the phototransistor. The signal formed in this way is directed to the D0 input of the microprocessor 368. The software records two pulses for each rotation of the dial - two mirror->black and black-> mirror transitions, which gives two pulses per one liter of flow.

About

Pulse counting water meter overlay, providing data via the MODBUS protocol via the RS485 interface


Languages

Language:C 100.0%