image-20240103165259-3.png

Table of Contents:

1. Introduction

1.1 ​What is SDI-12 to LoRaWAN Converter

The Dragino SDI-12-LB/LS is a SDI-12 to LoRaWAN Converter designed for Smart Agriculture solution.

SDI-12 (Serial Digital Interface at 1200 baud) is an asynchronous serial communications protocol for intelligent sensors that monitor environment data. SDI-12 protocol is widely used in Agriculture sensor and Weather Station sensors.

SDI-12-LB/LS has SDI-12 interface and support 12v output to power external SDI-12 sensor. It can get the environment data from SDI-12 sensor and sends out the data via LoRaWAN wireless protocol.

The LoRa wireless technology used in SDI-12-LB/LS allows device to send data and reach extremely long ranges at low data-rates. It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption.

SDI-12-LB/LS is powered by 8500mAh Li-SOCI2 battery or solar powered + li-on battery it is designed for long term use up to 5 years.

Each SDI-12-LB/LS is pre-load with a set of unique keys for LoRaWAN registrations, register these keys to local LoRaWAN server and it will auto connect after power on.

image-20230201084414-1.png

​1.2 Features

  • LoRaWAN 1.0.3 Class A
  • Ultra-low power consumption
  • Controllable 3.3v, 5v and 12v output to power external sensor
  • SDI-12 Protocol to connect to SDI-12 Sensor
  • Monitor Battery Level
  • Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
  • Support Bluetooth v5.1 and LoRaWAN remote configure.
  • Support wireless OTA update firmware
  • Uplink on periodically
  • Downlink to change configure
  • 8500mAh Li/SOCl2 Battery (SDI-12-LB)
  • Solar panel + 3000mAh Li-on battery (SDI-12-LS)

1.3 Specification

Micro Controller:

  • MCU: 48Mhz ARM
  • Flash: 256KB
  • RAM: 64KB

Common DC Characteristics:

  • Supply Voltage: Built-in Battery, 2.5v ~ 3.6v
  • Support current: 5V 300mA, 12V 100mA
  • Operating Temperature: -40 ~ 85°C

LoRa Spec:

  • Frequency Range,  Band 1 (HF): 862 ~ 1020 Mhz
  • Max +22 dBm constant RF output vs.
  • RX sensitivity: down to -139 dBm.
  • Excellent blocking immunity

Current Input Measuring :

  • Range: 0 ~ 20mA
  • Accuracy: 0.02mA
  • Resolution: 0.001mA

Voltage Input Measuring:

  • Range: 0 ~ 30v
  • Accuracy: 0.02v
  • Resolution: 0.001v

Battery:

  • Li/SOCI2 un-chargeable battery
  • Capacity: 8500mAh
  • Self-Discharge: <1% / Year @ 25°C
  • Max continuously current: 130mA
  • Max boost current: 2A, 1 second

Power Consumption

  • Sleep Mode: 5uA @ 3.3v
  • LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm

1.4 Connect to SDI-12 Sensor

1675212538524-889.png

1.5 Sleep mode and working mode

Deep Sleep Mode: Sensor doesn't have any LoRaWAN activate. This mode is used for storage and shipping to save battery life.

Working Mode: In this mode, Sensor will work as LoRaWAN Sensor to Join LoRaWAN network and send out sensor data to server. Between each sampling/tx/rx periodically, sensor will be in IDLE mode), in IDLE mode, sensor has the same power consumption as Deep Sleep mode.

1.6 Button & LEDs

image-20240103160425-4.png

Behavior on ACTFunctionAction
Pressing ACT between 1s < time < 3sSend an uplink

If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, blue led will blink once.
Meanwhile, BLE module will be active and user can connect via BLE to configure device.

Pressing ACT for more than 3sActive Device

Green led will fast blink 5 times, device will enter OTA mode for 3 seconds. And then start to JOIN LoRaWAN network.
Green led will solidly turn on for 5 seconds after joined in network.
Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device join or not join LoRaWAN network.

Fast press ACT 5 times.Deactivate DeviceRed led will solid on for 5 seconds. Means PS-LB-NA is in Deep Sleep Mode.

1.7 Pin Mapping

1675213198663-754.png

1.8 BLE connection

SDI-12-LB/LS support BLE remote configure.

BLE can be used to configure the parameter of sensor or see the console output from sensor. BLE will be only activate on below case:

  • Press button to send an uplink
  • Press button to active device.
  • Device Power on or reset.

If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.

1.9 Mechanical

1.9.1 for LB version

image-20230201090139-2.png

image-20230201090139-3.png

image-20230201090139-4.png

1.9.2 for LS version

image-20231231203439-3.png

2. Configure SDI-12 to connect to LoRaWAN network

2.1 How it works

The SDI-12-LB/LS is configured as LoRaWAN OTAA Class A mode by default. It has OTAA keys to join LoRaWAN network. To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and activate the SDI-12-LB/LS. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.

2.2 Quick guide to connect to LoRaWAN server (OTAA)

Following is an example for how to join the TTN v3 LoRaWAN Network. Below is the network structure; we use the LPS8v2  as a LoRaWAN gateway in this example. 

image-20230201090528-5.png

The LPS8V2 is already set to connected to TTN network , so what we need to now is configure the TTN server.

Step 1: Create a device in TTN with the OTAA keys from SDI-12-LB/LS.

Each SDI-12-LB/LS is shipped with a sticker with the default device EUI as below:

image-20230426084456-1.png

You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:

Register the device

1675213652444-622.png

Add APP EUI and DEV EUI

1675213661769-223.png

Add APP EUI in the application

1675213675852-577.png

Add APP KEY

1675213686734-883.png

Step 2: Activate on SDI-12-LB/LS

Press the button for 5 seconds to activate the SDI-12-LB/LS.

Green led will fast blink 5 times, device will enter OTA mode for 3 seconds. And then start to JOIN LoRaWAN network. Green led will solidly turn on for 5 seconds after joined in network.

1675213704414-644.png

​2.3 SDI-12 Related Commands

User need to configure SDI-12-LB/LS to communicate with SDI-12 sensors otherwise the uplink payload will only include a few bytes.

2.3.1 Basic SDI-12 debug command

User can run some basic SDI-12 command to debug the connection to the SDI-12 sensor. These commands can be sent via AT Command or LoRaWAN downlink command.

If SDI-12 sensor return value after get these commands, SDI-12-LB/LS will uplink the return on FPORT=100, otherwise, if there is no response from SDI-12 sensor. SDI-12-LB/LS will uplink NULL (0x 4E 55 4C 4C) to server.

The following is the display information on the serial port and the server.

image-20230201091027-6.png

image-20230201091027-7.png

al!  -- Get SDI-12 sensor Identification

  • AT Command:  AT+ADDRI=aa
  • LoRaWAN Downlink(prefix 0xAA00):  AA 00 aa

Parameter:  aa: ASCII value of SDI-12 sensor address in downlink or HEX value in AT Command)

Example :   AT+ADDRI=0  ( Equal to downlink: 0x AA 00 30)

The following is the display information on the serial port and the server.

image-20230201091257-8.png

image-20230201091257-9.png

aM!,aMC!, aM1!- aM9!, aMC1!- aMC9!

aM! : Start Non-Concurrent Measurement

aMC! : Start Non-Concurrent Measurement – Request CRC

aM1!- aM9! : Additional Measurements

aMC1!- aMC9! : Additional Measurements – Request CRC

  • AT Command : AT+ADDRM=0,1,0,1 
  • LoRaWAN Downlink(prefix 0xAA01): 0xAA 01 30 01 00 01

Downlink:AA 01 aa bb cc dd

aa: SDI-12 sensor address.

bb: 0: no CRC, 1: request CRC

cc: 1-9: Additional Measurement, 0: no additional measurement

dd: delay (in second) to send aD0! to get return.

The following is the display information on the serial port and the server.

image-20230201091630-10.png

image-20230201091630-11.png

aC!, aCC!,  aC1!- aC9!,  aCC1!- aCC9! 

aC! : Start Concurrent Measurement

aCC! : Start Concurrent Measurement – Request CRC

aC1!- aC9! : Start Additional Concurrent Measurements

aCC1!- aCC9! : Start Additional Concurrent Measurements – Request CRC

  • AT Command : AT+ADDRC=0,1,0,1  
  • LoRaWAN Downlink(0xAA02): 0xAA 02 30 01 00 01

Downlink: AA 02 aa bb cc dd 

aa: SDI-12 sensor address.

bb: 0: no CRC, 1: request CRC

cc: 1-9: Additional Measurement, 0: no additional measurement

dd: delay (in second) to send aD0! to get return.

The following is the display information on the serial port and the server.

image-20230201091954-12.png

image-20230201091954-13.png

aR0!- aR9!,  aRC0!- aRC9!

Start Continuous Measurement

Start Continuous Measurement – Request CRC

  • AT Command : AT+ADDRR=0,1,0,1  
  • LoRaWAN Downlink (0xAA 03): 0xAA 03 30 01 00 01

Downlink: AA 03 aa bb cc dd 

aa: SDI-12 sensor address.

bb: 0: no CRC, 1: request CRC

cc: 1-9: Additional Measurement, 0: no additional measurement

dd: delay (in second) to send aD0! to get return.

The following is the display information on the serial port and the server.

image-20230201092208-14.png

image-20230201092208-15.png

2.3.2 Advance SDI-12 Debug command

This command can be used to debug all SDI-12 command.

LoRaWAN Downlink: A8 aa xx xx xx xx bb cc dd

aa : total SDI-12 command length

xx : SDI-12 command

bb : Delay to wait for return

cc : 0: don't uplink return to LoRaWAN, 1: Uplink return to LoRaWAN on FPORT=100

dd:  0: Do not use aD0! command access, 1: use aD0! command access.

Example1:  AT+CFGDEV =0RC0!,1 

0RC0! : SDI-12 Command,

: Delay 1 second.  ( 0: 810 mini-second)

Equal Downlink: 0xA8 05 30 52 43 30 21 01 01

The following is the display information on the serial port and the server.

image-20230201092355-16.png

image-20230201092355-17.png

Example2:  AT+CFGDEV =0M!,1,1

0M! : SDI-12 Command,

: Delay 1 second.  ( 0: 810 mini-second)

: Use aD0! command access.

Equal Downlink: 0xA8 03 30  4D 21 01 01 01

The following is the display information on the serial port and the server.

image-20230628091055-1.png

image-20230628091130-2.png

2.3.3 Convert ASCII to String

This command is used to convert between ASCII and String format.

AT+CONVFORM ( Max length: 80 bytes)

Example:

1) AT+CONVFORM=0, string Convert String from String to ASCII

1675214845056-885.png

2) AT+CONVFORM=1, ASCII Convert ASCII to String.

1675214856590-846.png

2.3.4 Define periodically SDI-12 commands and uplink.

AT+COMMANDx & AT+DATACUTx

User can define max 15 SDI-12 Commands (AT+COMMAND1 ~ AT+COMMANDF). On each uplink period (TDC time, default 20 minutes), SDI-12-LB/LS will send these SDI-12 commands and wait for return from SDI-12 sensors. SDI-12-LB/LS will then combine these returns and uplink via LoRaWAN. 

  • AT Command:

AT+COMMANDx=var1,var2,var3,var4.

var1: SDI-12 command , for example: 0RC0!

var2: Wait timeout for return. (unit: second)

var3: Whether to send addrD0! to get return after var2 timeout. 0: Don't Send addrD0! ; 1: Send addrD0!.

var4: validation check for return. If return invalid, SDI-12-LB/LS will resend this command. Max 3 retries.

No validation check;

1  Check if return chars are printable char(0x20 ~ 0x7E);

2  Check if there is return from SDI-12 sensor

3  Check if return pass CRC check ( SDI-12 command var1 must include CRC request);

Each AT+COMMANDx is followed by a AT+DATACUT command. AT+DATACUT command is used to take the useful string from the SDI-12 sensor so the final payload will have the minimum length to uplink.

AT+DATACUTx : This command defines how to handle the return from AT+COMMANDx, max return length is 100 bytes.

AT+DATACUTx=a,b,c

a:  length for the return of AT+COMMAND

b:  1: grab valid value by byte, max 6 bytes. 2: grab valid value by bytes section, max 3 sections.

c:  define the position for valid value.  

For example, if return from AT+COMMAND1 is “013METER   TER12 112T12-00024895<CR><LF>” , Below AT+DATACUT1 will get different result to combine payload:

AT+DATACUT1 valueFinal Result to combine Payload
34,1,1+2+30D 00 01 30 31 33
34,2,1~8+12~160D 00 01 30 31 33 4D 45 54 45 52 54 45 52 31 32
34,2,1~340D 00 01 30 31 33 4D 45 54 45 52 20 20 20 54 45 52 31 32 20 31 31 32 54 31 32 2D 30 30 30 32 34 38 39 35 0D 0A
  •  Downlink Payload:

0xAF  downlink command can be used to set AT+COMMANDx or AT+DATACUTx.

Note : if user use AT+COMMANDx to add a new command, he also need to send AT+DATACUTx downlink.

Format:  AF MM NN LL XX XX XX XX YY

Where:

  • MM : the AT+COMMAND or AT+DATACUT to be set. Value from 01 ~ 0F,
  • NN :  1: set the AT+COMMAND value ; 2: set the AT+DATACUT value.
  • LL :   The length of AT+COMMAND or AT+DATACUT command
  • XX XX XX XX : AT+COMMAND or AT+DATACUT command
  • YY :   If YY=0, SDI-12-LB/LS will execute the downlink command without uplink; if YY=1, SDI-12-LB/LS will execute an uplink after got this command.  

Example:

image-20230201094129-18.png

Clear SDI12 Command

The AT+COMMANDx and AT+DATACUTx settings are stored in special location, user can use below command to clear them.

  • AT Command:

AT+CMDEAR=mm,nn   mm: start position of erase ,nn: stop position of erase

Etc. AT+CMDEAR=1,10 means erase AT+COMMAND1/AT+DATACUT1 to AT+COMMAND10/AT+DATACUT10

  • Downlink Payload:

0x09 aa bb  same as AT+CMDEAR=aa,bb

command combination

Below shows a screen shot how the results combines together to a uplink payload.

1675215745275-920.png

If user don't want to use DATACUT for some command, he simply want to uplink all returns. AT+ALLDATAMOD can be set to 1.

AT+ALLDATAMOD will simply get all return and don't do CRC check as result for SDI-12 command. AT+DATACUTx command has higher priority, if AT+DATACUTx has been set, AT+ALLDATAMOD will be ignore for this SDI-12 command.

For example:  as below photo, AT+ALLDATAMOD=1, but AT+DATACUT1 has been set, AT+DATACUT1 will be still effect the result.

1675215782925-448.png

If AT+ALLDATAMOD=1, FX,X will be added in the payload, FX specify which command is used and X specify the length of return. for example in above screen, F1 05 means the return is from AT+COMMAND1 and the return is 5 bytes.

Compose Uplink

AT+DATAUP=0

Compose the uplink payload with value returns in sequence and send with A SIGNLE UPLINK.

Final Payload is Battery Info+PAYVER + VALID Value from RETURN1 + Valid Value from RETURN2 + … + RETURNx

Where PAYVER is defined by AT+PAYVER, below is an example screen shot.

1675215828102-844.png

AT+DATAUP=1

Compose the uplink payload with value returns in sequence and send with Multiply UPLINKs.

Final Payload is Battery Info+PAYVER + PAYLOAD COUNT + PAYLOAD# + DATA

  1. Battery Info (2 bytes): Battery voltage
  2. PAYVER (1 byte): Defined by AT+PAYVER
  3. PAYLOAD COUNT (1 byte): Total how many uplinks of this sampling.
  4. PAYLOAD# (1 byte): Number of this uplink. (from 0,1,2,3…,to PAYLOAD COUNT)
  5. DATA: Valid value: max 6 bytes(US915 version here, Notice*!) for each uplink so each uplink <= 11 bytes. For the last uplink, DATA will might less than 6 bytes

1675215848113-696.png

Notice: the Max bytes is according to the max support bytes in different Frequency Bands for lowest SF. As below:

  •    For AU915/AS923 bands, if UplinkDwell time=0, max 51 bytes for each uplink ( so 51 -5 = 46 max valid date) 
  •    For AU915/AS923 bands, if UplinkDwell time=1, max 11 bytes for each uplink ( so 11 -5 = 6 max valid date). 
  •    For US915 band, max 11 bytes for each uplink ( so 11 -5 = 6 max valid date). 
  •    For all other bands: max 51 bytes for each uplink  ( so 51 -5 = 46 max valid date). 

When AT+DATAUP=1, the maximum number of segments is 15, and the maximum total number of bytes is 1500;

When AT+DATAUP=1 and AT+ADR=0, the maximum number of bytes of each payload is determined by the DR value.

2.4 Uplink Payload

2.4.1 Device Payload, FPORT=5

Include device configure status. Once SDI-12-LB/LS Joined the network, it will uplink this message to the server.

Users can also use the downlink command(0x26 01) to ask SDI-12-LB/LS to resend this uplink.

Device Status (FPORT=5)
Size (bytes)12112
ValueSensor ModelFirmware VersionFrequency BandSub-bandBAT

Example parse in TTNv3

1675215946738-635.png

Sensor Model: For SDI-12-LB/LS, this value is 0x17

Firmware Version: 0x0100, Means: v1.0.0 version

Frequency Band:

0x01: EU868

0x02: US915

0x03: IN865

0x04: AU915

0x05: KZ865

0x06: RU864

0x07: AS923

0x08: AS923-1

0x09: AS923-2

0x0a: AS923-3

0x0b: CN470

0x0c: EU433

0x0d: KR920

0x0e: MA869

Sub-Band:

AU915 and US915:value 0x00 ~ 0x08

CN470: value 0x0B ~ 0x0C

Other Bands: Always 0x00

Battery Info:

Check the battery voltage.

Ex1: 0x0B45 = 2885mV

Ex2: 0x0B49 = 2889mV

2.4.2 Uplink Payload, FPORT=2

There are different cases for uplink. See below

  • SDI-12 Debug Command return: FPORT=100
  • Periodically Uplink: FPORT=2

Size(bytes)

21Length depends on the return from the commands
Value

Battery(mV)
&
Interrupt_Flag

PAYLOAD_VER

If the valid payload is too long and exceed the maximum support.
Payload length in server,server will show payload not provided in the LoRaWAN server.

1675216282284-923.png

2.4.3 Battery Info

Check the battery voltage for SDI-12-LB/LS.

Ex1: 0x0B45 = 2885mV

Ex2: 0x0B49 = 2889mV

2.4.4 Interrupt Pin

This data field shows if this packet is generated by Interrupt Pin or not. Click here for the hardware and software set up. Note: The Internet Pin is a separate pin in the screw terminal. See pin mapping.

Example:

Ex1: 0x0B45:0x0B&0x80= 0x00    Normal uplink packet.

Ex2: 0x8B49:0x8B&0x80= 0x80    Interrupt Uplink Packet.

2.4.5 Payload version

The version number of the payload, mainly used for decoding. The default is 01.

2.4.6 ​Decode payload in The Things Network

While using TTN network, you can add the payload format to decode the payload.

1675216779406-595.png

There is no fix payload decoder in LoRaWAN server because the SDI-12 sensors returns are different. User need to write the decoder themselves for their case.

SDI-12-LB/LS TTN Payload Decoder: https://github.com/dragino/dragino-end-node-decoder

2.5 Uplink Interval

The SDI-12-LB/LS by default uplink the sensor data every 20 minutes. User can change this interval by AT Command or LoRaWAN Downlink Command. See this link:

http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H4.1ChangeUplinkInterval

2.6 Examples To Set SDI commands

2.6.1 Examples 1 -- General Example

COM port and SDI-12 sensor communication converted to SDI-12-LB/LS and SDI-12 sensor communication.

image-20230222143809-1.png

1) The AT+COMMANDx command is applied to the red arrow part, and sends the SDI12 command to the SDI12 sensor:

a. Send the first command and get the first reply:

AT+COMMANDx=1I!,0,0,1

b. Send the second command and get the second reply:

AT+COMMANDx=2I!,0,0,1

c. Send the third command and get the third reply:

AT+COMMANDx=3I!,0,0,1

d. Send the fourth command and get the fourth reply:

AT+COMMANDx=4I!,0,0,1

e. Send the fifth command plus the sixth command, get the sixth reply:

AT+COMMANDx=1M!,2,1,1

f. Send the seventh command plus the eighth command, get the eighth reply:

AT+COMMANDx=2M!,2,1,1

g. Send the ninth command plus the tenth command, get the tenth reply:

AT+COMMANDx=3M!,1,1,1

h. Send the eleventh command plus the twelfth command, get the twelfth reply:

AT+COMMANDx=4M!,1,1,1

2) The AT+DATACUTx command is applied to the green arrow part, receiving and cut out data from the SDI12 sensor:

a. The first reply, all 34 characters: ”113TRUEBNERSMT100038220303182331<CR><LF>”

Cut out all characters: AT+ALLDATAMOD=1  or  AT+DATACUTx=34,2,1~34;

b. The sixth reply, all 31 characters: "1+19210+1.04+0.00+22.49+11.75<CR><LF>"

Cut out all characters: AT+ALLDATAMOD=1  or  AT+DATACUTx=31,2,1~31;

c. The eighth reply, all 31 characters: "2+18990+1.08+0.00+22.24+11.80<CR><LF>"

Cut out all characters: AT+ALLDATAMOD=1  or  AT+DATACUTx=31,2,1~31;

d. The tenth reply, all 15 characters: "3-2919.8+24.0<CR><LF>"

Cut out all characters: AT+ALLDATAMOD=1  or  AT+DATACUTx=15,2,1~15;

e. The twelfth reply, all 25 characters: "4+30.8+22.84+4.7+954.38<CR><LF>"

Partial cut, the cut sensor address and the first two parameters:AT+DATACUTx=25,2,1~12, cut out the character field "4+30.8+22.84".

2.6.2 Example 2 -- Connect to Hygrovue10

2.6.2.1 Reference Manual and Command

  • Commands to be used in PC and output.

1. check device address

2. change device address

3. check device ID

4. start measure

5. Get Meausre result

image-20230603120209-2.png

2.6.2.2 Hardware Connection to SDI-12-LB/LS

image-20230603120515-3.png

2.6.2.3 Commands set in SDI-12-LB/LS and uplink payload

image-20230603120648-4.png

image-20230603120726-5.png

Data in TTN:

image-20230603120859-6.png

2.6.3 Example 3 -- Connect to SIL-400

2.6.3.1 Reference Manual and Command

  • Commands to be used in PC and output.

1. check device address

2. change device address

3. check device ID

4. start measure

5. Get Meausre result

image-20230603121606-7.png

2.6.3.2 Hardware Connection to SDI-12-LB/LS

image-20230603121643-8.png

2.6.3.3 Commands set in SDI-12-LB/LS and uplink payload

image-20230603121721-9.png

image-20230628090323-1.png

Data in TTN:

image-20230603121826-11.png

2.6.4 Example 4 -- Connect to TEROS-12

2.6.4.1 Reference Manual and Command

  • Commands to be used in PC and output.

1.check device address

2.change device address

3.check device ID

4.start measure

5.Get Meausre result

image-20230603122248-16.png

2.6.4.2 Hardware Connection to SDI-12-LB/LS

image-20230603122212-15.png

2.6.4.3 Commands set in SDI-12-LB/LS and uplink payload

image-20230603122040-12.png

image-20230603122109-13.png

Data in TTN:

image-20230603122139-14.png

2.6.5 Example 5 -- Connect to SIL-400/TEROS-12 & Hygrovue10

2.6.5.1 Important Notice!

  • The product page and reference command see above example 2,3,4
  • All of these SDI-12 sensors use the same address (address 0) by default. So we need to change their address to different address, by using aAb! command. See above example.
  • The sensor needs to be powered to a steady statue. So the 12VT time need to be set to the maximum stable time for the sensors. in this example, it is 13 seconds.
  • If these SDI-12 sensors are powered by external power source. It will add 300uA in the total current in SDI-12-LB/LS.

2.6.5.2 Hardware Connection to SDI-12-LB/LS

image-20230603122508-17.png

2.6.5.3 Commands set in SDI-12-LB/LS and uplink payload

image-20230603122549-18.png

image-20230603122623-19.png

Data in TTN:

image-20230603122719-20.png

2.6.6 Example 6 -- Connect to ENTELECHY-EP_SDI-12

2.6.6.1 Reference Manual and Command

  • Commands to be used in PC and output.

1.check device address

2.change device address

3.check device ID

4.start measure

5.Get Meausre result

image-20230627174559-3.png

2.6.6.2 Hardware Connection to SDI-12-LB/LS

image-20230627174446-2.png

2.6.6.3 Commands set in SDI-12-LB/LS and uplink payload

image-20230627175513-4.png

image-20230627175736-5.png

Data in TTN:

image-20230627180303-6.png

2.6.7 Example 6 -- Connect to GroPoint Profile-8 (SDI-12 Version)

2.6.7.1  Reference Manual and Command

  • Commands to be used in PC and output.
  1. check device address
  2. change device address
  3. check device ID
  4. start measure
  5. Get Meausre result

image-20240423143921-1.png

2.6.7.2 Hardware Connection to SDI-12-LB/LS

image-20240423145522-2.png

2.6.7.3 Commands set in SDI-12-LB/LS and uplink payload

image-20240423151202-3.png

image-20240423162851-6.png

DATA in TTN:

image-20240423162322-4.png

2.7 Frequency Plans

The SDI-12-LB/LS uses OTAA mode and below frequency plans by default. Each frequency band use different firmware, user update the firmware to the corresponding band for their country.

http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/

2.8 Firmware Change Log

Firmware download link:

https://www.dropbox.com/sh/qrbgbikb109lkiv/AACBR-v_ZhZAMengcY7Nsa1ja?dl=0

3. Configure SDI-12-LB/LS via AT Command or LoRaWAN Downlink

Use can configure SDI-12-LB/LS via AT Command or LoRaWAN Downlink.

  • AT Command Connection: See FAQ.
  • LoRaWAN Downlink instruction for different platforms: See IoT LoRaWAN Server section.

There are two kinds of commands to configure SDI-12-LB/LS, they are:

  • General Commands.

These commands are to configure:

  • General system settings like: uplink interval.
  • LoRaWAN protocol & radio related command.

They are same for all Dragino Device which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:

http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/

  • Commands special design for SDI-12-LB/LS

These commands only valid for SDI-12-LB/LS, as below:

3.1 Set Transmit Interval Time

Feature: Change LoRaWAN End Node Transmit Interval.

AT Command: AT+TDC

Command ExampleFunctionResponse
AT+TDC=?Show current transmit Interval

30000
OK
the interval is 30000ms = 30s

AT+TDC=60000Set Transmit Interval

OK
Set transmit interval to 60000ms = 60 seconds

Downlink Command: 0x01

Format: Command Code (0x01) followed by 3 bytes time value.

If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.

  • Example 1: Downlink Payload: 0100001E       // Set Transmit Interval (TDC) = 30 seconds
  • Example 2: Downlink Payload: 0100003C      //  Set Transmit Interval (TDC) = 60 seconds

3.2 Set Interrupt Mode

Feature, Set Interrupt mode for GPIO_EXIT.

AT Command: AT+INTMOD

Command ExampleFunctionResponse
AT+INTMOD=?Show current interrupt mode

0
OK
the mode is 0 =Disable Interrupt

AT+INTMOD=2

Set Transmit Interval
0. (Disable Interrupt),
1. (Trigger by rising and falling edge)
2. (Trigger by falling edge)
3. (Trigger by rising edge)

OK

Downlink Command: 0x06

Format: Command Code (0x06) followed by 3 bytes.

This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06.

  • Example 1: Downlink Payload: 06000000       //  Turn off interrupt mode
  • Example 2: Downlink Payload: 06000003       //  Set the interrupt mode to rising edge trigger

3.3 Set the output time

Feature, Control the output 3V3 , 5V or 12V.

AT Command: AT+3V3T

Command ExampleFunctionResponse
AT+3V3T=?Show 3V3 open time.

0
OK

AT+3V3T=0Normally open 3V3 power supply.

OK
default setting

AT+3V3T=1000Close after a delay of 1000 milliseconds.

OK

AT+3V3T=65535Normally closed 3V3 power supply.

OK

AT Command: AT+5VT

Command ExampleFunctionResponse
AT+5VT=?Show 5V open time.

0
OK

AT+5VT=0Normally closed 5V power supply.

OK
default setting

AT+5VT=1000Close after a delay of 1000 milliseconds.

OK

AT+5VT=65535Normally open 5V power supply.

OK

AT Command: AT+12VT 

(The v1.2 version is enabled for 1 second by default, and the version below v1.2 is disabled by default)

Command ExampleFunctionResponse
AT+12VT=?Show 12V open time.

0
OK

AT+12VT=0Normally closed 12V power supply.OK
AT+12VT=500Close after a delay of 500 milliseconds.

OK

Downlink Command: 0x07

Format: Command Code (0x07) followed by 3 bytes.

The first byte is which power, the second and third bytes are the time to turn on.

  • Example 1: Downlink Payload: 070101F4  --->   AT+3V3T=500
  • Example 2: Downlink Payload: 0701FFFF   --->  AT+3V3T=65535
  • Example 3: Downlink Payload: 070203E8  --->  AT+5VT=1000
  • Example 4: Downlink Payload: 07020000  --->  AT+5VT=0
  • Example 5: Downlink Payload: 070301F4  --->  AT+12VT=500
  • Example 6: Downlink Payload: 07030000  --->  AT+12VT=0

3.4 Set the all data mode

Feature, Set the all data mode.

AT Command: AT+ALLDATAMOD

Command ExampleFunctionResponse
AT+ALLDATAMOD=?Show current all data mode

0
OK

AT+ALLDATAMOD=1Set all data mode is 1.OK

Downlink Command: 0xAB

Format: Command Code (0xAB) followed by 1 bytes.

  • Example 1: Downlink Payload: AB 00    //  AT+ALLDATAMOD=0
  • Example 2: Downlink Payload: AB 01    //  AT+ALLDATAMOD=1

Feature, splicing payload for uplink.

AT Command: AT+DATAUP

Command ExampleFunctionResponse
AT+DATAUP =?Show current splicing payload for uplink mode

0
OK

AT+DATAUP =0

Set splicing payload for uplink mode is 0.

OK

AT+DATAUP =1Set splicing payload for uplink mode is 1 , and the each splice uplink is sent sequentially.OK
AT+DATAUP =1,20000

Set splicing payload for uplink mode is 1, and the uplink interval of each splice to 20000 milliseconds. 

OK

Downlink Command: 0xAD

Format: Command Code (0xAD) followed by 1 bytes or 5 bytes.

  • Example 1: Downlink Payload: AD 00      //  AT+DATAUP=0
  • Example 2: Downlink Payload: AD 01      //  AT+DATAUP =1
  • Example 3: Downlink Payload: AD 01 00 00 14     //  AT+DATAUP =1,20000

This means that the interval is set to 0x000014=20S

3.6 Set the payload version

Feature, Set the payload version.

AT Command: AT+PAYVER

Command ExampleFunctionResponse
AT+PAYVER=?Show current payload version

1
OK

AT+PAYVER=5Set payload version is 5.OK

Downlink Command: 0xAE

Format: Command Code (0xAE) followed by 1 bytes.

  • Example 1: Downlink Payload: AE 01      //  AT+PAYVER=1
  • Example 2: Downlink Payload: AE 05      //  AT+PAYVER=5

4. Battery & Power Consumption

SDI-12-LB use ER26500 + SPC1520 battery pack and SDI-12-LS use 3000mAh Recharable Battery with Solar Panel. See below link for detail information about the battery info and how to replace.

Battery Info & Power Consumption Analyze .

5. Remote Configure device

5.1 Connect via BLE

Please see this instruction for how to configure via BLE: http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/

5.2 AT Command Set

6. OTA firmware update

Please see this link for how to do OTA firmware update.

http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/

7. FAQ

7.1 How to use AT Command  via UART to access device?

See: http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware

7.2 How to update firmware via UART port?

See: http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware

7.3 How to change the LoRa Frequency Bands/Region?

You can follow the instructions for how to upgrade image.
When downloading the images, choose the required image file for download. ​

8. ​Order Info

Part Number: SDI-12-LB-XX-YY or SDI-12-LS-XX-YY

XX: The default frequency band 

  • AS923: LoRaWAN AS923 band
  • AU915: LoRaWAN AU915 band
  • EU433: LoRaWAN EU433 band
  • EU868: LoRaWAN EU868 band
  • KR920: LoRaWAN KR920 band
  • US915: LoRaWAN US915 band
  • IN865: LoRaWAN IN865 band
  • CN470: LoRaWAN CN470 band 

YY: The grand connector hole size

  • M12: M12 hole
  • M16: M16 hole

9. Packing Info

Package Includes:

  • SDI-12-LB or SDI-12-LS SDI-12 to LoRaWAN Converter x 1

Dimension and weight:

  • Device Size: cm
  • Device Weight: g
  • Package Size / pcs : cm
  • Weight / pcs : g

10. ​Support

  • Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different timezones we cannot offer live support. However, your questions will be answered as soon as possible in the before-mentioned schedule.
  • Provide as much information as possible regarding your enquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to support@dragino.com
Tags:
    
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0