The Hawk Ag-Tech1 plug in I/O card has a 1-wire interface. This can be used to read a DS18B20 temperature sensor.
The relevant I/Os for the DS18B20 - using the Ag-Tech1 plug-in board on the Hawk are
Connections are as follows. While the DS18B20 uses the 1-wire interface to transmit the readings, it requires a couple more connections as the sensor needs to be powered.
|Power (red wire)||Connect to Hawk IO 5 (3V3)|
|iButton Signal Line||Connect to Hawk IO 8 (1-wire input)|
|GND (Black wire)||Connect to GND|
Some wiring diagrams may indicate a pull-up resistor is required between to pull the iButton signal line to 3V3. This is done interally on the I/O card and not necessary to fit.
Configure a task schedule, and select 1-Wire Action 1 as an action
Configure Sensor Analogue
- Add the 1-Wire Action 1 Tab
- Select DS18B20 as the Sensor Type
- Select the Analogue offset - in the below case the temp value will be logged to Analogue 10
With the above parameters, the output would be:
|Temperature||Analogue Offset Value||°C * 16||160 = 10°C|