ayatec logo
Home Store Blog Contact
unicontrol user guide by ayatec
Home Store Blog Contact

Topics

  1. Welcome
  2. Getting started
    1. What is unicontrol
    2. How it works
    3. Connectivity
    4. Integration options
    5. Default hardware
    6. Hardware extensions
    7. Special sensors
    8. RGB driver
    9. Audio driver
    10. Network API - HTTP
    11. Network API - MQTT
    12. Network security
    13. Downloads
  3. Web Interface
    1. Processes
      1. Process
      2. Name
      3. Main state
      4. Initial state
      5. Display
      6. Constraints
        1. Process timer
        2. Variable contraints
        3. Force output
      7. Input
        1. Input source
        2. Channel
        3. Control period
        4. Value
        5. Publish
        6. Frequency
        7. Subtopic
      8. Events
        1. On/Off event
        2. Condition
        3. Idle/running time
        4. Delay on/off
        5. Fade in/out
        6. High/low input
        7. Mid point/Tolerance
        8. Out on when
      9. Output
        1. Primary output
        2. Action
        3. Type
        4. Invert
        5. Duty cycle
        6. Mem value
        7. High/low output
        8. Folder/Track
        9. RGB mode
        10. RGB color
        11. RGB brightness
        12. RGB speed
        13. Publish
        14. Subtopic
        15. Secondary outputs
      10. Cycle
        1. Cycles
        2. High/Low phase
      11. On/Off button
    2. Peripheral
      1. Hardware
      2. Type
      3. Calibration
      4. Mapping (edit)
      5. IR remote (edit)
      6. Impulse_counter (edit)
      7. RGB driver (edit)
      8. DS18B20 (edit)
    3. Device
    4. Network
    5. System
    6. License
  4. Tutorials
    1. First boot
    2. First process
    3. Connect to MQTT
    4. Process sequencing

    5. DIY Project: Bath Fan

In this article

  • Introduction
advert
unicontrol > Web interface > Peripheral > Impulse counter (edit)

Impulse counter (edit)

A built-in impulse counter can be used to utilize a wide variety of pulse sensors. A standard pulse sensor works by sending short impulses over its data pin, with each impulse having a constant predefined physical-world interpretation. To translate the impulse counts into the interpreted quantity, the unicontrol lets the user define this interpretation in the Impulse counter editor. This interpretation is provided in two parts:

  • Number of pulses corresponding to a single unit of measurement, and
  • Unit of measurement in which the specific sensor's measurements are defined (e.g., liter, gallon, meter, etc.). This is only used for displaying purposes within the web interface but does not have any quantitative impact on readings.
When publishing values measured by the impulse counter, only the numeric, dimensionless value is being sent. Although it formally represents the provided Unit per minute, the Unit itself is not explicitly included.
A new pulse flow sensor is connected to the device which sends 50 pulses per 1 liter of water flowing through the sensor. The values in the editor may be filled in using any of the following options:

Option 1:
Pulses: 50
Unit: liter
All measurements will be expressed as the number of liters flowing through the sensor per minute.

Option 2:
Pulses: 5
Unit: dl
All measurements will be expressed as the number of deciliters flowing through the sensor per minute.

Option 3:
Pulses: 191 (approximately)
Unit: gallon (US)
All measurements will be expressed as tens of US gallons flowing through the sensor per minute.

Editor

After initiating the Impulse counter in the Peripheral page, clicking the Edit button below the Hardware drop-down menu lets the user define the pulse sensor parameters:

Open the mapping editor.
Please note that the "Edit" button for the Impulse counter only appears once the Impulse counter is chosen as the Hardware input and saved.

By default, only one Pulses/Unit pair can be filled in and will be used for all initiated counters. This situation is suitable when all counters are monitoring the same type of sensor.

Common counter setup

When activating the Individual switch, each counter can be assigned a separate Pulses/Unit combination:

Individual counter setup

Process

Once the Impulse counter input is fully set up, it can be called within the process by selecting the relevant digital pin as an Input source. Each Impulse counter pin carries two different values at all times, which can be differentiated by the Channel choice:

  • Channel 0 contains the instantaneous reading calculated as the number of impulses recorded in the last second, extrapolated to impulses per minute, and transformed into the required Unit of measurement.
  • Channel 1 contains the exact number of impulses recorded in the last minute, transformed into the required Unit of measurement.
Input options
Please note that in both cases, the readings correspond to the same time period, which is 60 seconds.

While the instantaneous (Channel 0) reading is an estimate and can be published at any frequency, the 60 second (Channel 1) reading will only accumulate the readings precisely if a 1 min. increment is chosen as a frequency.

Special publish frequency option
The 1 min. increment publish frequency will only publish the message with readings once the latest reading is ready, ensuring that no impulse is counted twice or missed out. Also, please note that:
  • Messages may not be sent in exact 60-second intervals, but they do contain readings accumulated over exactly 60 seconds. Assuming there are no disruptions, this will result in an accumulation of approximately 3600 messages per 24-hour period.
  • Precision is lost in case of power loss or reboot. It is advisable to ensure a stable power supply and schedule automatic maintenance reboots at a suitable time.
© 2024 ayatec.eu • Found a mistake?  Let us know!