Hawk - Configure Pulse Count
Table of Contents
The Hawk can be configured to count pulses on digital inputs - for example to monitor a tipping rain gauge.
The fastest pulses the Hawk can count are approximately 40 Hz.
Ensure testing is performed on faster pulse rates to ensure they can be reliably counted.
Pulse counting will cause additional battery drain (compared to device sleeping) so needs to be factored in to battery life estimates.
Baseboard + Card Digital Inputs
It is important to recognise the distinction between the Hawk Base-board Digital Inputs and Hawk Plug in Card Digital Inputs
- Base Board
- There is 1 x Digital Input on the Base-board
- This is marked DIG-1 on the base board PCB
- IO Cards
- There is 1 x Digital Input on the Ag-Tech1 card
- There is 1 x Digital Input on the RS-1 Card
- Both use I/O7
Pulse Count on Base-Board Digital Input
Increment Count
Pulse Count Parameters
- Add the Digital Input 1 parameter tab
- Set the debounce time (this should be shorter than your pulse width)
- Set Rising Edge count Yes/No for Rising/Falling Edge Count
- Set the Analogue to write the pulse count to - in the above the count will be written to Analogue 18.
Actions
- In applications where digital inputs change infrequently, we may log and upload on a digital input change so we can be notified immediately
- If we are counting many, fast pulses, we most likely want to disable all the actions shown in green - so they do not occur frequently. Even with logging disabled, we still increment the pulse count analogue in memory - we just don't log a specific record.
Upload Count Value Periodically
With the above parameters, the value is written to the specified analogue input (i.e. Analogue 18). It will only be uploaded when the device next uploads - either:
- On device heartbeat
- On task upload
Pulse Count on Card Digital Input
Increment Count
On the Card Parameters (AgTech1 or RS1, depending on what you are using) - set the Rising Edge count as before.
Select Analogue Input
Choose the analogue input for the pulse count to be stored in on the Hawk's Analogues.
Upload Count Value
Ensure Digitals Action 1 is an action for a Task.
The Task Schedule Period will be how often the current pulse count is logged to a record. Maybe we want to see a snapshot each hour to track rainfall over time and which periods saw more rain.
The Task upload period will be how often the total pulse count is uploaded to the server - i.e. upload daily.
Behaviour in event of Power Loss
The total count is saved to flash memory on the device, so that in the event of power loss, it is maintained.
- If the Hawk host is counting on the Hawk Digital Input, the count is saved at least every 5 minutes
- If the Ag-Tech1 or RS-1 Cards are doing the counting, the value is saved at least every 10 seconds