Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Digital Matter Site
  • Contact Us

Hawk - Configure Action on Digital Input Change

Written by Matthew Clark-Massera

Updated at October 6th, 2023

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Contact Support
  • Home
  • Devices
  • Cellular
  • Data Loggers
  • Hawk IoT Datalogger
  • Digital Inputs and Pulse Counting

Table of Contents

Active Level and Bias Resistor Baseboard Digital Input Configuration Example - Door Open/Close Alert Card Digital Input Configuration Digital Input Monitor Example - Turn on Pump for 30 sec if float switch activated Card Parameters Input Monitor Parameters Task 2 Digital Output Action 2

The Hawk and I/O cards have Digital Inputs available. 

  • Hawk Digital Input 1
    • Digital Input on the Baseboard
    • Mapped to Hawk Digital Input 1 the Hawk data
    • Configured under Digital Input 1 parameters
  • Ag-Tech 1 has a digital input
    • Uses I/O 7 on baseboard
    • mapped to Hawk Digital Input 8 in the Hawk data
    • Configured on the AgTech1 Card and Card Digital Input parameter tabs
  • RS1 has a digital input
    • Uses I/O 7 on baseboard
    • mapped to Hawk Digital Input 8 in the Hawk data
    • Configured on the AgTech1 Card and Card Digital Input parameter tabs

On the Hawk, we can use Digital Inputs in the following ways:

  1. Simple Monitoring (is a pump on/off)
  2. Run tasks on input change e.g.
    1. Turn output on
    2. Sample sensors
  3. Pulse Counting - see Hawk - Configure Pulse Count

This guide focuses on 1 and 2. For pulse counting see the linked article.

Active Level and Bias Resistor

Digital Inputs use these concepts, expand below for more information.

About Active Level/Bias Resistors

Digital Inputs have a configurable 'Active Level' and Bias Resistor.

  • The Active Level determines the physical line level (high or low) at which the input is considered on. 
  • The Bias Resistor essentially determines the state of the input when nothing is connected to the input. Since often we would leave them disconnected, or 'open circuit' meaning the state isn't well defined. The bias resistor handles this.

There are 3 options:

  • Pull up: pull the input high
  • Pull down: pull the input low
  • Disable: do not bias the input

These options are useful when one of the states being read is open-circuit (disconnected/high impedance). In this case, enable the bias resistor setting in the opposite state to the level being switched to. This is commonly used when working with an "open collector" output. The pull up/down is a "weak" pull up/down.

Results of different configurations. 

Bias Resistor Active High Input Result
Pull Down True Low Inactive
High Active High Active
Pull Down False Low Active
High Inactive High Inactive
Pull Up True Low Inactive
High Active High Active
Pull Up False Low Active
High Inactive High Inactive
 
 

Baseboard Digital Input Configuration

Add the Digital Input 1 Parameter Tab to configure the input.

  • The above configuration (Pull-Down/High) will register the input as on when there is > ~2.2V on the input - i.e. detecting a pump is on. 
  • Pull Up/Low would be used for a close to ground switch.
  • Pulse Counting Parameters (for pulse counting setup see Hawk - Configure Pulse Count)
    • Set the Debounce Time. For counting fast pulses this needs to be low (i.e. less than the pulse width) 
    • Rising Edge Count = Yes to enable pulse counting
    • Analog input to store pulse count if desired
  • Active/Inactive Actions
    • If pulse counting we would not want to log every individual pulse.
    • For monitoring applications, we do, and may want to configure Log + Upload to be notified immediately on the server when the output changes. 

Example - Door Open/Close Alert

We use a reed switch for this application

  • Common contact connected to GND
  • Normally open connected to DI1

A 'digital input changed' log will be sent to the server when the door opens/closes.

Card Digital Input Configuration

Configure the Card's digital input on the Card's parameter tab - i.e. 

  • The active level, Bias and Debounce set as usual
  • Digital Input Rising Edge Count
    • Set to Yes if Pulse Counting, set to No if not
  • Send Digital Input Events
    • Set to No if pulse counting, set to Yes for 'monitoring' applications like door open/closed
    • This means on input change the card notifies the baseboard, which can then take action (log, upload etc)

Digital Input Monitor

The Digital Input Monitors then dictate what the Hawk should do if the input changes. 

We use these parameters to determine the "Active Action" and "Inactive Action" if using the Card Digital Input. The parameters below will cause the Hawk to upload if the Card Digital Input goes active.

Tasks can be run in response to input changes.

Example - Turn on Pump for 30 sec if float switch activated

In terms of what the Hawk is doing, we will turn on the Switched Ground Output if the Card Digital Input Goes Active

Card Parameters

Input Monitor Parameters

Log and Upload on the input change, and Run Task 2 (which will be to turn on the output)

Task 2

Digital Output Action 2

Turn on the Switched ground for 30 seconds. 

digital input hawk configure

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Hawk - Configure Pulse Count
  • Hawk - Digital Input Battery Life Effects

Subscribe to Partner News

Subscribe to our mailing list to receive Digital Matter news, product and tehnical updates, and more.

Subscribe

Copyright © Digital Matter . All Rights Reserved.

Privacy Contact Support

Knowledge Base Software powered by Helpjuice

Expand