> For the complete documentation index, see [llms.txt](https://docs.efento.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.efento.io/nb-iot-loggers/configuration/sensor-specific-settings/pulse-counter.md).

# Pulse counter

The pulse counter is used to record and accumulate pulses generated by external meters or devices, allowing the logger to track quantities such as energy, water, gas, or other pulse-based measurements.

The available settings allow the counter to be synchronized with an existing meter, define its starting value, and ensure that subsequent pulses are added to the correct accumulated reading. By default, it works in accumulative mode: it counts the total number of pulses, not only the pulses in each measurement interval.

## **Manual calibration**

{% hint style="info" %}
**Important! For the correct operation of the device, it is necessary to specify the initial value (Starting point) from which the number of pulses will be counted.**
{% endhint %}

After starting the pulse counter, the Efento application will display a message indicating that all channels need to be synchronized by setting their starting values.

This is particularly important when the logger is synchronized with an existing mechanical meter, where the initial value should match the current meter reading. If only pulse counting is required and there is no need to match an existing counter value, set the initial value to **0**.

<figure><img src="https://740246929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGPFUI36OraG706yJS7dJ%2Fuploads%2FSSHS535N6JhDpk1sbUSV%2Fpulse_counter_synchronization_required.png?alt=media&amp;token=4f535265-b840-4c0b-87e3-5ab1a74e076d" alt=""><figcaption></figcaption></figure>

### **Setting the initial value with the Efento mobile application**

To set the starting value, connect to the device and tap the gear icon. Go to **Channel settings**, select **Calibration** for the relevant channel, enter the required starting value, and save the changes.

<figure><img src="https://740246929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGPFUI36OraG706yJS7dJ%2Fuploads%2FZssnXtM9CZ4k7V26yBm6%2Fpulse_counter_channels.png?alt=media&amp;token=d2c3c5a7-00c2-44fd-8425-ff6a76cd1c26" alt=""><figcaption></figcaption></figure>

If the logger has more than one measurement channel, remember to set the starting value for all channels. After calibration, wait for one complete measurement interval. With the factory settings, this interval is 5 minutes. The logger will then continue recording measurements from the calibrated starting value, and the calibration-required message will disappear

{% hint style="warning" %}
**A logger restart or power cycle clears the active pulse count.** After the logger starts again, synchronize the counter by entering the current physical meter reading in the Efento mobile application.

This removes the *Synchronization required* status and ensures that subsequent pulse counts continue from the correct value.
{% endhint %}

## **Configurable parameters**

| Parameter                        | Configuration Options                                                                                                        |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **Conversion ratio**             | <p>Decimal number (multiplier, e.g. 0.001, 0.01, 0.1, 1, 10, 100, 1000)<br><em>Default: 1</em></p>                           |
| **Maximum pulse duration**       | <p>0 to 65,535 ms / Disabled<br><em>Default: Disabled</em></p>                                                               |
| **Debounce time**                | <p>0 to 65,535 ms<br><em>(Typical mechanical reed switch: 10–50 ms; electronic output: 0–5 ms)</em></p>                      |
| **Reversed logic**               | <p><strong>Enabled (ON) / Disabled (OFF)</strong><br><em>Default: Disabled (counts on contact close / falling edge)</em></p> |
| **Mode** (accumulative / normal) | <p><strong>Normal mode / Accumulative mode</strong><br><em>Default: Normal mode (delta per interval)</em></p>                |

A detailed description of all available parameters and their configuration options is provided below.

### **Conversion ratio**

Efento pulse counters allow users to configure a conversion ratio separately for each channel. The counted pulse value can be either **multiplied or divided** by the selected ratio before it is stored in the device memory or sent to the server.

For example, if the conversion ratio is set to 1, the pulse count remains unchanged. If Multiply is selected with a ratio of 10, each pulse is converted to a value of 10. If Divide is selected, the counted value is divided by the configured ratio.

### **Maximum pulse duration**

It is possible to set the maximum pulse duration accepted by the Efento pulse counter. If a pulse exceeds the configured value, it will be treated as an error and reported via NB-IoT / Bluetooth. This can be used to verify the correct operation of connected utility meters with defined pulse lengths. By default, max pulse duration is set to 0, which means that no maximum pulse duration is applied and pulses of any length are accepted.

### **Debounce time**

This parameter allows the logger to be protected against counting pulses in the event of electrical interference, which can be caused by machines located in the place of installation or by connecting a pulse counter and a meter with a long cable. Excessive pulses may also be caused by what is commonly known as contact bouncing. Setting the debounce time switches on the impulse counting lock from the moment of the change of state on the impulse counting input for the time specified by the user. In the example below, debounce time is set to 300 ms.

![](https://content.gitbook.com/content/GPFUI36OraG706yJS7dJ/blobs/BU0htF1EdikrFogbBIrD/Unknown%20image)

**Important! do not set the debouncing time greater than the measurement period.**

### **Reversed logic**

Pulses are counted by shorting two wires to each other. It means that the pulse is counted by the rising edge. If necessary to count pulses on the falling edge, set the Reverse logic parameter to “ON”.

### **Mode selection: accumulative / normal**

The pulse counter is able to work in one of the two modes:

* Normal mode (accumulative parameter set to OFF) - pulse counter will reset its value after each measurement period. This means that the device displays / reports to a server the number of pulses counted during a single measurement period.
* Accumulative mode (accumulative parameter set to ON) - the pulse counter accumulates the number of counted pulses. This means that the counter is not reset after each measurement period and the device displays / reports to the server the total number of counted pulses, starting from the initial value of the counter. The maximum range of the pulse counter is 999 999 999 999. After reaching this value, the counter will reset and start counting from 0. The accumulative mode is enabled by default.

## **Configuration using the Efento mobile application**

All parameters described above can be configured using the Efento mobile application in the **Nearby Devices** section.

Connect to the logger, tap the gear icon, open **Channel settings**, and select **Settings** for the required channel.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.efento.io/nb-iot-loggers/configuration/sensor-specific-settings/pulse-counter.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
