image-20240128210544-1.png

Table of Contents:

1. Introduction

1.1 What is the LoRaWAN 4 Channel Current Sensor Converter

The Dragino CS01-LB is a LoRaWAN 4-channel current sensor converter designed to transmit readings from current sensors to an IoT platform via a LoRaWAN network. This device is ideal for monitoring machine operating conditions and analyzing power consumption trends.

The CS01-LB can support up to four detachable current sensors, which can be swapped for sensors with different measurement scales as needed. It features BLE configuration and wireless OTA updates, simplifying setup and maintenance for users.

Powered by an 8500mAh Li-SOCI2 battery, the CS01-LB is engineered for long-term usage, lasting several years under typical operating conditions.

Each unit comes pre-loaded with unique keys for LoRaWAN registration. By registering these keys with a local LoRaWAN network server, the CS01-LB can automatically connect once powered on.

1.2 ​Features

  • LoRaWAN 1.0.3 Class A
  • Supported Bands: CN470, EU433, KR920, US915, EU868, AS923, AU915, IN865
  • Ultra-low power consumption
  • Supports up to 4 current sensors
  • Compatible with various current sensor ratios: 50A, 100A, etc.
  • Monitors machine operating status
  • Analyzes power consumption trends
  • Provides current alarms
  • Supports Bluetooth v5.1 and LoRaWAN remote configuration
  • Supports wireless OTA firmware updates
  • Periodic uplink transmissions
  • Downlink capability to modify configurations
  • 8500mAh Li/SOCl2 battery

1.3 Current Sensor Specification

The current sensors listed below are not shipped with the CS01-LB. You need to order them separately.

ModelPhotoSpecificationDimension(Unit:mm±0.5)
SCT013G-D-100

image-20240831105409-1.jpeg

* Split core current transformer
* Spec: 100A/50mA
* φ16mm Aperture

image-20240831103305-3.png

SCT024-300

image-20240902160256-1.png

* Split core current transformer
* Spec: 300A/50mA
* φ24mm Aperture

image-20240831102534-1.png

SCT036-600

image-20240902160344-2.png

* Split core current transformer
* Spec: 600A/50mA
* φ36mm Aperture

image-20240831102736-2.png

1.4 Specification

Common DC Characteristics:

  • Supply Voltage: Built-in battery, 2.5V ~ 3.6V
  • Operating Temperature: -40°C ~ 85°C

LoRa Specification:

  • Frequency Range, Band 1 (HF): 862 ~ 1020 MHz
  • Maximum RF Output: +22 dBm constant
  • RX Sensitivity: Down to -139 dBm
  • Excellent blocking immunity

Battery:

  • Type: Li/SOCl2 non-rechargeable battery
  • Capacity: 8500mAh
  • Self-Discharge: <1% per year @ 25°C
  • Maximum Continuous Current: 130mA
  • Maximum Boost Current: 2A for 1 second

Power Consumption:

  • Sleep Mode: 5µA @ 3.3V
  • LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm

1.5 Deep Sleep Mode and Working Mode

Deep Sleep Mode: The sensor does not perform any LoRaWAN activity. This mode is intended for storage and shipping to conserve battery life.

Working Mode: In this mode, the sensor operates as a LoRaWAN sensor, joining the LoRaWAN network and transmitting data to the server. Between each sampling, transmission, and reception period, the sensor enters IDLE mode. In IDLE mode, the sensor consumes the same amount of power as in Deep Sleep mode.

1.6 Button & LEDs

The CS01-LB has push button labelled as ACT and a LED indicator.

image-20240123095435-2.png

Behavior of the ACT buttonFunctionAction
Pressing the ACT button for 1 to 3 seconds.Send an uplink

If the sensor is already joined to the LoRaWAN network, it will send an uplink packet, and the Blue LED will blink once.

Meanwhile, the BLE module will be activated, allowing the user to connect via BLE to configure the device.

Pressing ACT button for more than 3sActive Device

The Green LED will blink rapidly five times, and the device will enter OTAA mode for 3 seconds before starting to join the LoRaWAN network.

The Green LED will remain solid for 5 seconds once the device successfully joins the network.

After the sensor becomes active, the BLE module will be enabled, allowing the user to connect via BLE to configure the device, regardless of whether it has joined the LoRaWAN network.

Fast press ACT button for 5 times.Deactivate Device

The Red LED will stay solid for 5 seconds, indicating that the device is in Deep Sleep Mode.

1.7 BLE Connection

CS01-LB supports BLE (Bluetooth Low Energy) remote configuration.

BLE can be used to configure the sensor's parameters or view the console output from the sensor. BLE will only be activated in the following cases:

  • Pressing the button to send an uplink
  • Pressing the button to activate the device
  • Device power on or reset

If there is no activity or connection via BLE within 60 seconds, the sensor will shut down the BLE module to enter low power mode.

1.8 Mechanical Drawings

1675143884058-338.png

1675143899218-599.png

1675143909447-639.png

100A:

image-20240831103305-3.png

300A:

image-20240831102534-1.png

600A:

image-20240831102736-2.png

2. Configure the CS01-LB to connect to LoRaWAN network

2.1 How it works

The CS01-LB is configured by default as a LoRaWAN OTAA Class A device. It comes with a pre-assigned DevEUI, AppEUI, and AppKey to enable joining a LoRaWAN network using OTAA. These same DevEUI, AppEUI, and AppKey values must be registered with the LoRaWAN Network Server you plan to use.

To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and press the button to activate the CS01-LB. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.

Then press the ACT button for more than 3 seconds to activate the CS01-LB. It will automatically join the network via OTAA and begin sending sensor values. The default uplink interval is 20 minutes.

The CS01-LB does not include a current sensor. The user needs to obtain the current sensor separately and attach it to the CS01-LB for measurement.

2.2 ​Quick Guide to Connect to LoRaWAN Network Server (OTAA)

The following figure shows how the CS01-LB connects to The Things Stack. The CB01-LB sends messages (uplinks) to The Things Stack via a LoRaWAN gateway (e.g., Dragino LPS8N) and can also receive messages (downlinks) from The Things Stack. The Things Stack can be integrated with ThingsEye, allowing it to forward uplinks to ThingsEye. ThingsEye is an IoT platform used for visualizing and analyzing sensor data. You can also send downlinks from ThingsEye (via The Things Stack) to the CS01-LB.

CS01-LB-TTN.jpg

Step 1: Create a device in TTN with the OTAA keys from CS01-LB.

Each CS01-LB is shipped with a sticker with the default device EUI as below:

图片-20230426084152-1.png

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

Register the device

image-20240129161804-1.png

Add DevEUI and AppKey

image-20240129162022-2.png

Step 2: Activate on CS01-LB

Press the button for 5 seconds to activate the CS01-LB.

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.

After join success, it will start to upload messages to TTN and you can see the messages in the panel.

2.3 Device Status, FPort=5

You can use the downlink command, 0x26 01, to request the CS01-LB to send device configuration details, including the device configuration status. The CS01-LB will uplink a payload via FPort=5 to the server.

The payload format is as follows:

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

Example: Consider the payload 33 01 00 01 FF 0C B4.

image-20240202184102-1.png

Sensor Model: For CS01-LB, this value is 0x33

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.

0x0C B4 = 3252mV

2.4 ​Working Mode & Uplink Payload

2.4.1 MOD=1(General acquisition mode), FPort=2

Note: The AT+CCAL=0,0,0,0 command must be set when the v1.0 version firmware for the first time, otherwise inaccurate current readings may occur. 

MOD=1 is the default mode. The end node will uplink the real-time current sensor value in two case:

  • At each TDC interval.
  • When an alarm is triggered based on the AT+CALARM configure.

Uplink packets use FPort=2.

Size(bytes)

222221
Value

Battery Info&Interrupt flag & Interrupt Level

Current channel 1

Current channel 2

Current channel 3

Current channel 4

Alarm_status*

Alarm_status is a combination of Cur1L_status, Cur1H_status, Cur2L_status, Cur2H_status, Cur3L_status, Cur3H_status, Cur4L_status and Cur4H_status.

It consists of a total of 1 byte, as shown below:

Bit7

Bit6Bit5Bit4Bit3Bit2Bit1Bit0

Cur1L

Cur1H

Cur2L

Cur2H

Cur3L

Cur3H

Cur4L

Cur4H

Example: Consider the payload.

image-20240203170646-2.png

Battery Info

Check the battery voltage for CS01-LB/LS.

Ex1: 0x0B45&0x3FFF = 2885mV

Ex2: 0x0B49&0x3FFF = 2889mV

Interrupt Flag & Interrupt Level

This data field indicates whether this packet was generated by an interrupt or not. Click here for the hardware and software setup.

Note: The interrupt pin refers to the GPIO_EXTI pin on the screw terminal. See the pin mapping.

Example:

If byte[0]&0x80>>15=0x00 : Normal uplink packet.

If byte[0]&0x80>>15=0x01 : Interrupt uplink Packet.

If byte[0]&0x40>>14=0x00 : Interrupt pin low level.

If byte[0]&0x40>>14=0x01 : Interrupt pin high level.

Current channel 1:

Channel 1 for measuring AC current with a resolution of 0.01A.

Example: 0x03e8 =1000/100=10.00A

Current channel 2:

Channel 2 for measuring AC current with a resolution of 0.01A.

Example: 0x041A =1050/100=10.50A

Current channel 3:

Channel 3 for measuring AC current with a resolution of 0.01A.

Example: 0x044C =1100/100=11.00A

Current channel 4:

Channel 4 for measuring AC current with a resolution of 0.01A.

Example: 0x04B0 =1200/100=12.00A

Cur1L_status:

When setting the current threshold alarm for channel 1, this flag is True if the current is lower than the set threshold; otherwise, it is False.

Cur1H_status:

When setting the current threshold alarm for channel 1, this flag is True if the current is higher than the set threshold; otherwise, it is False.

Cur2L_status:

When setting the current threshold alarm for channel 2, this flag is True if the current is lower than the set threshold; otherwise, it is False.

Cur2H_status:

When setting the current threshold alarm for channel 2, this flag is True if the current is higher than the set threshold; otherwise, it is False.

Cur3L_status:

When setting the current threshold alarm for channel 3, this flag is True if the current is lower than the set threshold; otherwise, it is False.

Cur3H_status:

When setting the current threshold alarm for channel 3, this flag is True if the current is higher than the set threshold; otherwise, it is False.

Cur4L_status:

When setting the current threshold alarm for channel 4, this flag is True if the current is lower than the set threshold; otherwise, it is False.

Cur4H_status:

When setting the current threshold alarm for channel 4, this flag is True if the current is higher than the set threshold; otherwise, it is False.

2.4.2 MOD=2 (Continuous Sampling Mode), FPort=7

In Continuous Sampling Mode (AT+MOD=2, aa, bb), the CS01 will record the current sensor data at fixed intervals and later report multiple groups of data together to the IoT server.

Note: This mode has high power consumption. An external power supply might be needed. For more details, please check the power consumption section.

AT+MOD=2,aa,bb format:

  • First Parameter set to 2: Sets the CS01-LB to work in Continuous Sampling Mode.
  • aa : Sets the sampling interval (unit: seconds)
  • bb : Defines how many groups of data will be uplinked together. 

When CS01-LB is in Continuous Sampling Mode, the TDC time setting is disabled, and CS01-LB will send uplink once it finished the number of sampling define in "bb".

Example Command:AT+MOD=2,60,5

The CS01-LB will read data from 4 channels every 1 minute. After reading 5 groups, the CS01-LB will send an uplink. Therefore, the uplink interval is 5 minutes. Each uplink will include 5 groups of sensor values. Each group contains data from 4 channels. The payload for each uplink will include:

  • Battery (2 bytes)
  • Group 1 Sensor Value (8 bytes): The 4th most recent reading for Channel 1, Channel 2, Channel 3, and Channel 4
  • Group 2 Sensor Value (8 bytes): The 3rd most recent reading for Channel 1, Channel 2, Channel 3, and Channel 4
  • Group 3 Sensor Value (8 bytes): The 2nd most recent reading for Channel 1, Channel 2, Channel 3, and Channel 4
  • Group 4 Sensor Value (8 bytes): The most recent reading for Channel 1, Channel 2, Channel 3, and Channel 4
  • Group 5 Sensor Value (8 bytes): The current reading for Channel 1, Channel 2, Channel 3, and Channel 4

In total, the payload in this example is 42 bytes.

Note: Continuous Sampling Mode may generate a large payload, and the CS01-LB will select the appropriate DR to uplink the data. This might reduce the transmission distance.

Uplink packets use FPort=7.

Size(bytes)

2Dynamic Length , Depending on how many groups

Value

BAT

Sensor value: Each 8 bytes represent a set of sensor values (the maximum is 30 groups).

Example: Consider the payload.

image-20240204142838-1.png

2.5 Payload Decoder file

In TTN, use can add a custom payload so it shows friendly reading

In the page Applications --> Payload Formats --> Custom --> decoder to add the decoder from:

https://github.com/dragino/dragino-end-node-decoder/tree/main/CS01-LB

2.6 Datalog Feature

Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, CS01-LB will store the reading for future retrieving purposes.

2.6.1 Ways to get datalog via LoRaWAN

Set PNACKMD=1: The CS01-LB will wait for an ACK for every uplink. If there is no LoRaWAN network, the CS01-LB will mark these records as non-acknowledged messages and store the sensor data. Once the network recovers, it will send all messages at 10-second intervals.

a) The CS01-LB will perform an ACK check for data record transmissions to make sure all data arrives at the server.

b) The CS01-LB will send data in CONFIRMED Mode when PNACKMD=1. However, it will not retransmit the packet if it doesn't receive an ACK. Instead, it will simply mark it as a NONE-ACK message. In a future uplink, if the CS01-LB receives an ACK, it will recognize the network connection and resend all NONE-ACK messages.

2.6.2 Unix Timestamp

The CS01-LB uses the following Unix Timestamp:

图片-20220523001219-11.png

You can get the Unix Timestamp from this link:  https://www.epochconverter.com/ :

 The following example shows how to convert the Unix Timestamp into hex number.

图片-20220523001219-12.png

So, you can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time as 2021 – Jan -- 29 Friday 03:03:25

2.6.3 Set Device Time

Users need to set SYNCMOD=1 to enable time synchronization via the MAC command.

Once the CS01-LB joins the LoRaWAN network, it will send the DeviceTimeReq MAC command, and the server will respond with DeviceTimeAns to provide the current time to the CS01-LB. If the CS01-LB fails to receive the time from the server, it will use the internal time and wait for the next time request. The period for time requests can be configured using AT+SYNCTDC, with a default value of 10 days.

Note: The LoRaWAN network server must support LoRaWAN v1.0.3 (MAC v1.0.3) or higher for this feature. Platforms like ChirpStackThe Things Stack v3, and Loriot support it, but The Things Stack v2 does not. If the server doesn't support this command, it will discard uplink packets containing the time request. As a result, you may lose packets when using The Things Stack v2 if SYNCMOD=1 is set.

2.6.4 Datalog Uplink Payload (FPort=3)

The Datalog uplinks will use the following payload format.

Retrieval data payload:

Size(bytes)

12224
Value

Interrupt flag & Interrupt_level

 

Current1

Current2

Current3

Unix TimeStamp

Interrupt flag & Interrupt level :

Size(bit)

bit 7bit 6[bit 5:bit 2]bit1bit0
Value

NO ACK message

 

Poll Message FlagReserveinterrupt levelinterrupt flag

No ACK Message:  1: This indicates that the payload is from an uplink message that did not receive an ACK from the server (for the PNACKMD=1 feature)

Poll Message Flag: 1: This indicates a poll message reply.

  • Poll Message Flag is set to 1.
  • The Poll Message Flag is set to 1. Each data entry is 11 bytes. To save airtime and battery, devices will send the maximum bytes allowed based on the current DR and frequency bands.

For example, in the US915 band, the maximum payload for different DR values is as follows:

a) DR0: Maximum is 11 bytes, so one data entry
b) DR1: Maximum is 53 bytes, so the device will upload 4 data entries (total 44 bytes)
c) DR2: Total payload includes 11 data entries
d) DR3: Total payload includes 22 data entries

If the device doesn't have any data at the polling time, it will uplink 11 bytes of zeros.

Example:

If the CS01-LB has the following data stored inside flash:

image-20240219100728-1.png

If you send the following downlink command: 3165BD971865BDA5283C

Where:

  • Start time: 65BD9718 = 23/05/24 03:30:41
  • Stop time: 65BDA528 = 23/05/24 03:33:00

The CS01-LB will uplink this payload:

image-20240219110826-3.png

4005650562056A65BD974440055D0559056265BD97BC400562055E056765BD98344005640560056965BD98AC40056A0566056F65BD992440056A0566056F65BD999C4005680564056D65BD9A144005670563056C65BD9A8C4005680564056D65BD9B0440055F055E056765BD9B7C40055F055C056465BD9BF44005660562056B65BD9C6C400562055F056765BD9CE4400562055E056765BD9D5C40055C0558056165BD9DD4400560055C056565BD9E4C400561055D056665BD9EC44005650561056965BD9F3C40055F055B056465BD9FB4400560055C056565BDA02C400562055E056665BDA0A4400561055D056665BDA11C

Where the first 11 bytes is for the first entry:

40 05 65 05 62 05 6A 65 BD 97 44

Current1=0x0565/100=13.81

Current2=0x0562/100=13.78

Current3=0x056A/100=13.86

Interrupt flag & Interrupt_level=0x40 : This indicates a reply data sampling uplink message, with the interrupt level set to low and the interrupt flag set to false.

Unix time is 0x65BD9744=1706923844s=24/2/3 01:30:44

数据 URI 图片数据 URI 图片数据 URI 图片数据 URI 图片

2.7 Frequency Plans

The CS01-LB uses OTAA mode and the frequency plans below by default. Each frequency band uses different firmware, and the user must 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

The firmware can be download from this link: https://www.dropbox.com/scl/fo/cnnyz4ynebs3am96jvtv0/h?rlkey=4no594ssi0nzt2lc3irbkid9b&dl=0

3. Configure CS01-LB

3.1 Configure Methods

CS01-LB supports the following configuration methods:

3.2 General Commands

These commands are used to configure:

  • General system settings, such as the uplink interval.
  • LoRaWAN protocol and radio-related commands.

They are the same for all Dragino devices that support the 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/

3.3 Commands Specially Designed for CS01-LB

These commands are only valid for CS01-LB, as listed below:

3.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.3.2 Get Device Status

Send a LoRaWAN downlink to ask device send Alarm settings.

Downlink Payload:  0x26 01

Sensor will upload Device Status via FPORT=5. See payload section for detail.

3.3.3 Get data

Feature: Get the current sensor data.

AT Command:

  • AT+GETSENSORVALUE=0      //  The serial port gets the reading of the current sensor
  • AT+GETSENSORVALUE=1      //  The serial port gets the current sensor reading and uploads it.

3.3.4 Set Interrupt Mode

Feature, Set Interrupt mode for GPIO_EXTI of pin.

When AT+INTMOD=0 is set, GPIO_EXTI is used as a digital input port.

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.5 Set Power Output Duration

Control the output duration 3.3V. Before each sampling, device will

1. first enable the power output to external sensor,

2. keep it on as per duration, read sensor value and construct uplink payload

3. final, close the power output.

AT Command: AT+3V3T

Command ExampleFunctionResponse
AT+3V3T=?Show 3.3V open time.0 (default)
OK
AT+3V3T=1000Close after a delay of 1000 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: 07 01 01 F4  --->   AT+3V3T=500
  • Example 2: Downlink Payload: 07 01 FF FF   --->  AT+3V3T=65535

3.3.6 Set working mode

Feature, Get or Set working mode.

AT Command: AT+MOD

Command ExampleFunctionResponse
AT+MOD=?Shows the current working mode1 (default)
OK
AT+MOD=2,60,5,0Set working mode 2OK

Description of AT instruction for setting working mode 2:

Command ExampleFunctionParameter 
AT+MOD=1Set General acquisition mode.1:General acquisition mode.
AT+MOD=2,60,5The first parameter sets the continuous detection mode 2.2: Continuous acquisition mode.
The second parameter sets the detection sampling interval.60: Data were collected every 60 seconds.
The third bit parameter sets the number of groups to record data.After 5 groups of data are collected, the uplink is performed.

 

AT+MOD=2,60,5,0

The first parameter sets the continuous detection mode 2.2: Continuous acquisition mode.
The second parameter sets the detection sampling interval.60: Data were collected every 60 seconds.
The third bit parameter sets the number of groups to record data.After 5 groups of data are collected, the uplink is performed.

The fourth parameter(This parameter is valid only for CS01-LS.) setting 5V normally open.

Keep 5V on, standby current 16mA.

0: Not set 5V normally open

1: Setting 5V normally open

Downlink Command: 0x0A

Format: Command Code (0x0A) followed by 1 byte or 4bytes,5 bytes.

  • Example 1: Downlink Payload: 0A 01              --->   AT+MOD=1
  • Example 2: Downlink Payload: 0A 02 00 3C 05  --->   AT+MOD=2,60,5
  • Example 3: Downlink Payload: 0A 02 00 3C 05 00   --->   AT+MOD=2,60,5,0

3.3.7 Set the alarm threshold

Feature, Get or set current alarm threshold. (Takes effect only when AT+MOD=1)

Note:The third, fifth, seventh and ninth parameter units of the v1.0 version are A, and the units of the third, fifth, seventh, and ninth parameters of versions after v1.1 are mA.

AT Command: AT+CALARM

Command ExampleFunctionResponse

AT+CALARM=?

Get current alarm threshold.

0,0,0,0,0,0,0,0,0(default)
OK

AT+CALARM=1,1,20,1,20,0,0,0,0
(v1.0 version)

When the current of channel 1 and channel 2 exceeds 20A, it will alarm and send a data packet.OK
Command ExampleFunctionParameter 

 AT+CALARM=1,1,10000,0,20000,0,0,0,0
(Versions after v1.1)

The first parameter enables or disables the threshold alarm. 0: Not Alarm
1: Alarm
The second and third parameters set "current 1" below threshold alarm or above threshold alarm. 

0,xx: Means if value <xx, Then Alarm
1,xx: Means if value >xx, Then Alarm

eg:1,10000: if value >10000mA(10A), Then Alarm

The fourth and fifth parameters set "current 2" below the threshold alarm or above the threshold alarm. 

0,xx: Means if value <xx, Then Alarm
1,xx: Means if value >xx, Then Alarm

eg:0,20000: if value <20000mA(20A), Then Alarm

The sixth and seventh parameters set "current 3" below the threshold alarm or above the threshold alarm.

0,0: Means if value <xx, Then Alarm
0,0: Means if value >xx, Then Alarm

eg:0,0: Disable this channel alarm

The eighth and ninth parameters set "current 4" below the threshold alarm or above the threshold alarm.

0,0: Means if value <xx, Then Alarm
0,0: Means if value >xx, Then Alarm

eg:0,0: Disable this channel alarm

Downlink Command: 0x0B

Format: Command Code (0x0B) followed by 17 bytes.

  • Example 1: Downlink Payload: 0B 01 01 00 27 10 00 00 4E 20 00 00 00 00 00 00 00 00 --->   AT+CALARM=1,1,10000,0,20000,0,0,0,0   =>1(01),1(01),10000(00 27 10),0(00),20000(00 4E 20),0(00),0(00 00 00),0(00),0(00 00 00)
  • Example 2: Downlink Payload: 0B 01 00 00 00 00 00 00 00 00 00 00 03 E8 01 00 07 D0 --->   AT+CALARM=1,0,0,0,0,0,1000,1,2000       =>1(01),0(00),0(00 00 00),0(00),0(00 00 00),0(00),1000(00 03 E8),1(01),2000(00 07 D0)
  • Example 3: Downlink Payload: 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 --->   AT+CALARM=0,0,0,0,0,0,0,0,0                   =>0(00),0(00),0(00 00 00),0(00),0(00 00 00),0(00),0(00 00 00),0(00),0(00 00 00)

Format: The first byte(Command Code ) is 0x0B, the last byte is 0x01 or 0x02, and the middle 9 bytes.

     When the last byte is 0x01, you can set the first, second, third, fourth and fifth parameters of the AT command.

  • Example 1: Downlink Payload: 0B 01 01 00 27 10 00 00 4E 20  01--->   AT+CALARM=1,1,10000,0,20000,0,0,0,0   =>1(01),1(01),10000(00 27 10),0(00),20000(00 4E 20)

     When the last byte is 0x02, you can set the first, sixth, seventh, eighth and ninth parameters of the AT command.

  • Example 2: Downlink Payload: 0B 01 00 00 03 E8 01 00 07 D0 02--->   AT+CALARM=1,0,0,0,0,0,1000,1,2000       =>1(01),0(00),1000(00 03 E8),1(01),2000(00 07 D0)

Format: Command Code (0x0B) followed by 9 bytes.

  • Example 1: Downlink Payload: 0B 01 01 14 01 14 00 00 00 00  --->   AT+CALARM=1,1,20,1,20,0,0,0,0 (v1.0 version)                           =>1(01),1(01),20(14),1(01),20(14),0(00),0(00),0(00),0(00)
  • Example 2: Downlink Payload: 0B 01 01 14 01 14 00 00 00 00  --->   AT+CALARM=1,1,20000,1,20000,0,0,0,0 (Versions after v1.1)     =>1(01),1(01),20(14),1(01),20(14),0(00),0(00),0(00),0(00)
  • Example 3: Downlink Payload: 0B 00 00 00 00 00 00 00 00 00   --->  AT+CALARM=0,0,0,0,0,0,0,0,0                                                           =>0(00),0(00),0(00),0(00),0(00),0(00),0(00),0(00),0(00)

3.3.8 Set Alarm Interval

The shortest time of two Alarm packet(unit: min). The default is 20 minutes.

  • AT Command:

AT+ATDC=30       // The shortest interval of two Alarm packets is 30 minutes, Means is there is an alarm packet uplink, there won't be another one in the next 30 minutes.

  • Downlink Payload:

0x(0C 1E)     --->  Set AT+ATDC=0x 1E = 30 minutes

3.3.9 Set enable or disable of the measurement channel

This command can be used when user connects less than four current sensors. This command can turn off unused measurement channels to save battery life.

AT Command: AT+ENCHANNEL

Command ExampleFunctionResponse
AT+ENCHANNEL=?Get enabled channels.1,1,1,1 (Default)
OK
AT+ENCHANNEL=1,1,1,0Channel 4 disabled.OK
AT+ENCHANNEL=1,1,0,0Channel 3 and 4 disabled.OK

Downlink Command: 0x08

Format: Command Code (0x08) followed by 4 bytes.

The first byte means the first channel, the second byte means the second channel, the third byte means the third channel, and the fourth byte means the fourth channel.And 1 means enable channel, 0 means disable channel.

  • Example 1: Downlink Payload: 08 01 01 01 01     --->   AT+ENCHANNEL=1,1,1,1   // All channels are enabled
  • Example 2: Downlink Payload: 08 01 01 01 00      --->  AT+ENCHANNEL=1,1,1,0  // Channel 4 disabled
  • Example 3: Downlink Payload: 08 01 01 00 00      --->  AT+ENCHANNEL=1,1,0,0  // Channel 3 and 4 disabled

3.3.10 Set the current proportion parameter (Since V1.2)

This command sets the processing multiplier of the actual value to get the displayed value.

The default current proportion parameter is 100, which means that the displayed value is equal to the actual value multiplied by 1. The value ranges from 0 to 65535 (cannot be set to 0),if the value is 1000, the displayed value is 10 times the actual value.

AT Command: AT+PROPORTION

Command ExampleFunctionResponse

AT+PROPORTION=?

Get the current proportion parameter

100 (Default)
OK

AT+PROPORTION=1Set the displayed value to 1/100 of the actual valueOK
AT+PROPORTION=200Setting the display value to 2 times the actual valueOK

Downlink Command: 0x0D

Format: Command Code (0x0D) followed by 2 bytes.

  • Example 1: Downlink Payload: 0D 00 64      --->   AT+PROPORTION=100   // Set the displayed value to the actual value multiplied by 1.
  • Example 2: Downlink Payload: 0D 01 F4      --->   AT+PROPORTION=500   // Set the displayed value to the actual value multiplied by 5.

3.3.11 Set current resolution (Since V1.2)

AT Command: AT+RESOLUTION

Command ExampleFunctionResponse

AT+RESOLUTION=?

Get the  current resolution

0 (Default)

OK

AT+RESOLUTION=0

Set the resolution to 0.01A, two decimal placesOK

AT+RESOLUTION=1

Set the resolution to 0.001A, three decimal placesOK

Downlink Command: 0x0E

Format: Command Code (0x0E) followed by 1 byte.

  • Example 1: Downlink Payload: 0E 00       --->   AT+RESOLUTION=0
  • Example 2: Downlink Payload: 0E 01       --->   AT+RESOLUTION=1

4. Use Cases

4.1 Monitor the power status of an office

image-20240505210624-1.png

This is a case study for the CS01-LB current sensor. It shows how to use the CS01-LB to monitor an office's power usage status. 

Click here for more: Case 1: Monitor the power status of an office

4.2 Function Setting: Power Consumption Calculation Case

  • Set the alarm: When the current reaches 0.1, send data.
  • Set the alarm interval to 5 minutes.
  • Set the regular data interval to approximately 6 hours. The power outage alarm takes priority.
  • Switch off the connected device.
  • Look for the alarm message, as the current will drop to a minimum.
  • Repeat the device switch-off after 8 minutes (since the alarm interval is set to 5 minutes) and check for the alarm message.
  • In a scenario with 4 outages per day, we should receive 4 alarm messages and 4 regular current messages (with a data frequency set to 6 hours).

Question: How long will the battery last under these conditions?

The third, fifth, seventh, and ninth parameter units of version v1.0 are in A (Ampere), while the units of the same parameters in versions after v1.1 are in mA (Milliampere).

Below are my settings:

  • AT+CALARM=1,0,0,0,0,0,0,0,100
  • AT+ENCHANNEL=0,0,0,1

image-20240723152145-3.png

According to the settings, three aspects need to be calculated, as follows:

  • Alarm Interval: The alarm occurs once every five minutes, 12 times per hour, for a total of 288 times per day. Each alarm is equivalent to one detection, and the consumption per detection is approximately 0.0172mAh. Therefore, the daily consumption is calculated as follows:

0.0172 * 288 = 4.9536mAh

  • Sleep Current Consumption: The sleep current consumption per day is approximately 0.0053268 * 24 = 0.1278432mAh.
  • Uplink Messages: There are 4 alarms + 4 regular current messages, which is equivalent to sending 8 uplink messages per day. Each upload consumes:
    • Single sensor: 0.076761064mAh
    • Four sensors: 0.109365489mAh
  • So:
    • Single sensor consumption per day: 0.076761064 * 8 = 0.614088512mAh
    • Four sensors consumption per day: 0.109365489 * 8 = 0.874923912mAh

The CS01-LB battery capacity is 8500mAh. Based on the above data, the battery life is calculated as follows:

  • Single sensor: 8500 / (4.9536 + 0.1278432 + 0.614088512) = 1492 days
  • Four sensors: 8500 / (4.9536 + 0.1278432 + 0.874923912) = 1427 days

This is an approximate calculation of battery life. The actual battery life also depends on the frequency band and DR (Data Rate) you use. See the figure below for details

image-20240723152001-2.png

5. Battery & Power Consumption

The CS01-LB uses an ER26500 + SPC1520 battery pack. See the link below for detailed information about the battery and how to replace it:
Battery Info & Power Consumption Analysis.
 

Note: Continuous sampling mode will significantly increase power consumption.
For example, if all four channels are used for sampling data:

  • Sample every minute and uplink data every 5 minutes: The battery life is about 10 months.
  • Sample every minute and uplink data every 20 minutes: The battery life is about 12 months.

If you want to use an external DC adapter to power the CS01-LB in this case, please refer to Power Device using a 3.3v Power Adapter.

6. OTA Firmware update

User can update the CS01-LB firmware to:

  • Change the frequency band/region.
  • Update with new features.
  • Fix bugs. 

Firmware and changelog can be downloaded from : Firmware download link

Methods to Update Firmware:

7. FAQ

Coming soon.

8. Troubleshooting

8.1 Why are the collected current values inaccurate?

When the current value collected by the node is inaccurate, please check whether the calibration value is set using the AT+CCAL command in the node. If so, change the calibration value to 0, as follows:

AT+CCAL=0,0,0,0.

Configure Methods:

http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CS01-LB_LoRaWAN_4_Channels_Current_Sensor_Converter_User_Manual/#H3.1ConfigureMethods

9. Ordering Information

Part Number: CS01-LB-XX

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

Note: CS01-LB doesn't include a current sensor. You need to purchase it separately.

Reference Models for current sensors:

  • SCT013G-D-100: 100A/50mA
  • SCT024-300: 300A/50mA
  • SCT036-600: 600A/50mA

10. ​Packaging Information

Package Includes:

  • CS01-LB LoRaWAN 4 Channels Current Sensor Converter

Dimension and weight:

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

11. Support

  • Support is available Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different time zones, we cannot offer live support. However, your questions will be answered as soon as possible within the aforementioned schedule.
  • Please provide as much information as possible regarding your inquiry, including product models, a detailed description of the problem, and steps to replicate it. Send your email to support@dragino.cc
Tags:
    
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0