CS01-NB/NS -- NB-IoT 4 Channels Current Sensor Converter User Manual
Table of Contents:
- 1. Introduction
- 2. Use CS01-NB/NS to communicate with IoT Server
- 2.1 Send data to IoT server via NB-IoT network
- 2.2 Payload Types
- 2.3 Working Mode & Uplink Payload
- 2.5 Payload Decoder file
- 2.6 Firmware Change Log
- 3. Configure CS01-NB/NS
- 4. Use Case
- 5. Battery & Power Consumption
- 6. Firmware update
- 7. FAQ
- 8. Troubleshooting
- 9. Order Info
- 10. Packing Info
- 11. Support
1. Introduction
1.1 What is NB-IoT 4 Channels Current Sensor Converter
The Dragino CS01-NB/NS is a NB-IoT 4 Channels Current Sensor Converter. It can convert the reading from current sensors and and then upload to IoT server via NB-IoT network.
CS01-NB/NS can be used to monitor the machine running status and analyze power consumption trends.
The CS01-NB/NS supports maximum 4 current sensors. The current sensors are detachable and can be replaced with different scales.
CS01-NB/NS supports BLE configure and OTA update which make user easy to use.
CS01-NB/NS is powered by 8500mAh Li-SOCI2 battery or solar powered + Li-ion battery, it is designed for long-term use up to several years.
CS01-NB/NS has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
1.2 Features
- NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
- Ultra-low power consumption
- Supports maximum 4 current sensors
- Support various current sensor Ratio: 50A, 100A etc.
- Monitor the machine running status
- Analyze power consumption trends
- Current Alarm
- Multiply Sampling and one uplink
- Support Bluetooth v5.1 remote configure and update firmware
- Uplink on periodically
- Downlink to change configure
- 8500mAh Li/SOCl2 Battery (CS01-LB)
- Solar panel + 3000mAh Li-ion battery (CS01-LS)
- Nano SIM card slot for NB-IoT SIM
1.3 Current Sensor Spec
The current sensor list below is not ship with CS01-NB/NS, user need to order seperately:
Model | Photo | Specification | Dimension(Unit:mm±0.5) |
---|---|---|---|
SCT013G-D-100 | * Split core current transformer * Spec: 100A/50mA * φ16mm Aperture | ||
SCT024-300 | * Split core current transformer * Spec: 300A/50mA * φ24mm Aperture | ||
SCT036-600 | * Split core current transformer * Spec: 600A/50mA * φ36mm Aperture |
1.4 Specification
Common DC Characteristics:
- Supply Voltage: Built-in Battery , 2.5v ~ 3.6v
- Operating Temperature: -40 ~ 85°C
NB-IoT Spec:
NB-IoT Module: BC660K-GL
Support Bands:
- B1 @H-FDD: 2100MHz
- B2 @H-FDD: 1900MHz
- B3 @H-FDD: 1800MHz
- B4 @H-FDD: 2100MHz
- B5 @H-FDD: 860MHz
- B8 @H-FDD: 900MHz
- B12 @H-FDD: 720MHz
- B13 @H-FDD: 740MHz
- B17 @H-FDD: 730MHz
- B18 @H-FDD: 870MHz
- B19 @H-FDD: 870MHz
- B20 @H-FDD: 790MHz
- B25 @H-FDD: 1900MHz
- B28 @H-FDD: 750MHz
- B66 @H-FDD: 2000MHz
- B70 @H-FDD: 2000MHz
- B85 @H-FDD: 700MHz
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
- STOP Mode: 10uA @ 3.3v
- Max transmit power: 350mA@3.3v
1.5 Applications
- Smart Buildings & Home Automation
- Logistics and Supply Chain Management
- Smart Metering
- Smart Agriculture
- Smart Cities
- Smart Factory
1.6 Sleep mode and working mode
Deep Sleep Mode: Sensor doesn't have any NB-IoT activate. This mode is used for storage and shipping to save battery life.
Working Mode: In this mode, Sensor will work as NB-IoT Sensor to Join NB-IoT 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.7 Button & LEDs
Behavior on ACT | Function | Action |
---|---|---|
Pressing ACT between 1s < time < 3s | Send an uplink | If sensor has already attached to NB-IoT network, sensor will send an uplink packet, blue led will blink once. |
Pressing ACT for more than 3s | Active Device | Green led will fast blink 5 times, device will enter OTA mode for 3 seconds. And then start to attach NB-IoT network. |
Fast press ACT 5 times. | Deactivate Device | Red led will solid on for 5 seconds. Means device is in Deep Sleep Mode. |
1.8 BLE connection
CS01-NB/NS support BLE remote configure and firmware update.
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 Pin Definitions , Switch & SIM Direction
CS01-NB/NS use the mother board which as below.
1.9.1 Jumper JP2
Power on Device when put this jumper.
Power off device when take out this jumper
1.9.2 BOOT MODE / SW1
1) ISP: upgrade mode, device won't have any signal in this mode. but ready for upgrade firmware. LED won't work. Firmware won't run.
2) Flash: work mode, device starts to work and send out console output for further debug.
1.9.3 Reset Button
Press to reboot the device.
1.9.4 SIM Card Direction
See this link. How to insert SIM Card.
1.10 Mechanical
1.10.1 for NB version
100A:
300A:
600A:
1.10.2 for NS version
2. Use CS01-NB/NS to communicate with IoT Server
2.1 Send data to IoT server via NB-IoT network
The CS01-NB/NS is equipped with a NB-IoT module, the pre-loaded firmware in CS01-NB/NS will get environment data from sensors and send the value to local NB-IoT network via the NB-IoT module. The NB-IoT network will forward this value to IoT server via the protocol defined by CS01-NB/NS.
Below shows the network structure:
There are two version: -GE and -1D version of CS01-NB.
GE Version: This version doesn't include SIM card or point to any IoT server. User needs to use AT Commands to configure below two steps to set CS01-NB send data to IoT server.
- Install NB-IoT SIM card and configure APN. See instruction of Attach Network.
- Set up sensor to point to IoT Server. See instruction of Configure to Connect Different Servers.
Below shows result of different server as a glance.
Servers | Dash Board | Comments |
Node-Red | ||
DataCake | ||
Tago.IO | ||
General UDP | Raw Payload. Need Developer to design Dash Board | |
General MQTT | Raw Payload. Need Developer to design Dash Board | |
ThingSpeak | ||
ThingsBoard |
1D Version: This version has 1NCE SIM card pre-installed and configure to send value to DataCake. User Just need to select the sensor type in DataCake and Activate CS01-NB/NS and user will be able to see data in DataCake. See here for DataCake Config Instruction.
2.2 Payload Types
To meet different server requirement, CS01-NB/NS supports different payload type.
Includes:
- General JSON format payload. (Type=5)
- HEX format Payload. (Type=0)
- ThingSpeak Format. (Type=1)
- ThingsBoard Format. (Type=3)
User can specify the payload type when choose the connection protocol. Example:
AT+PRO=2,0 // Use UDP Connection & hex Payload
AT+PRO=2,5 // Use UDP Connection & Json Payload
AT+PRO=3,5 // Use MQTT Connection & Json Payload
2.3 Working Mode & Uplink Payload
2.3.1 Working Mode
2.3.1.1 General acquisition mode (MOD=1)
MOD=1 is the default mode. End Node will uplink the real-time current sensor value in two case:
- Each TDC Interval.
- Trigger Alarm according to AT+CALARM configure.
2.3.1.2 Continuous Sampling Mode (MOD=2)
In Continuous Sampling Mode(AT+MOD=2,aa,bb,cc), CS01 will record the current sensor data at a fix interval, and report multiply group of data together to IoT server later.
Notice: This mode has high power consumption. External power supply might be needed. More detail please check power consumption section.
AT+MOD=2,aa,bb,cc format:
- First Parameter set to 2: Set CS01-NB/NS to work in Continuous Sampling Mode.
- aa : Set Sampling Interval, Unit: Second.
- bb : Define how many group of data will be uplink together.
- cc : Set whether 5V is normally open or not.(Normally open 5V will produce 16mA standby current)
When CS01-NB/NS is in Continuous Sampling Mode, the TDC time setting is disabled, and CS01-NB/NS will send uplink once it finished the number of sampling define in "bb".
Example Command:AT+MOD=2,60,5,0
CS01-NB/NS will read 4 channels data every 1 minutes. When it reads 5 groups, CS01-NB/NS will send an uplink. So the uplink interval is 5 minutes. Each uplink will include 5 groups of sensor value. Each Group include 4 channels data. so the payload for each uplink will include:
- f+IMEI(8 bytes) + Version(2 bytes) + Battery (2 bytes) + Signal(1 byte) + GPIO_EXIT Level(1 byte) + GPIO_EXIT Flag(1 byte)+Timestamp(4 bytes)
- + Group1 Sensor Value (12 Bytes): the last 4th reading for Channel 1 + Channel 2 + Channel 3 + Channel 4
- + Group2 Sensor Value (12 Bytes): the last 3rd reading for Channel 1 + Channel 2 + Channel 3 + Channel 4
- + Group3 Sensor Value (12 Bytes): the last 2nd reading for Channel 1 + Channel 2 + Channel 3 + Channel 4
- + Group4 Sensor Value (12 Bytes): the last reading for Channel 1 + Channel 2 + Channel 3 + Channel 4
- + Group5 Sensor Value (12 Bytes): current reading for Channel 1 + Channel 2 + Channel 3 + Channel 4
Note: The maximum number of groups is set to 50, and it is recommended that the sampling interval be at least 5 seconds.
2.3.2 HEX format Payload(Type=0)
2.3.2.1 MOD=1 (General acquisition mode)
f86366306279881518640cdd13000000003ddc003d84003e1f003df866a9edeb003dd9003d78003e1d003e1266a9ed4a003dd4003d82003e17003de366a9ecd2003e20003dce003e5f003e2966a9ec5a003e1e003dc8003e52003e2266a9ebe2003ddc003d8b003e20003de966a9eb6a003d6e003d18003da7003d8266a9eaf2003d77003d1f003db1003d8566a9ea7a003d94003d3e003dcf003d9366a9ea02
If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
Version:
These bytes include the hardware and software version.
Higher byte: Specify Sensor Model: 0x18 for CS01-NB/NS
Lower byte: Specify the software version: 0x64=100, means firmware version 1.0.0
Battery Info:
Check the battery voltage for CS01-NB/NS.
Ex1: 0x0B45&0x3FFF = 2885mV
Ex2: 0x0B49&0x3FFF = 2889mV
Signal Strength:
NB-IoT Network signal Strength.
Ex1: 0x16 = 22
0 -113dBm or less
1 -111dBm
2...30 -109dBm... -53dBm
31 -51dBm or greater
99 Not known or not detectable
GPIO_EXIT Level:
GPIO_EXTI is used as Interrupt Pin.
Example:
01 (H): GPIO_EXTI pin is high level.
00 (L): GPIO_EXTI pin is low level.
Level of PA4 pin. (0: Low level 1: High level)
GPIO_EXIT Flag:
This data field shows if this packet is generated by Interrupt Pin or not.
Note: The Interrupt Pin is a separate pin in the screw terminal.
Example:
0x00: Normal uplink packet.
0x01: Interrupt Uplink Packet.
Current_alarm:
Current_alarm is a combination for Cur1L_status, Cur1H_status, Cur2L_status, Cur2H_status, Cur3L_status, Cur3H_status, Cur4L_status and Cur4H_status.
Totally 1bytes as below:
Bit7 | Bit6 | Bit5 | Bit4 | Bit3 | Bit2 | Bit1 | Bit0 |
---|---|---|---|---|---|---|---|
Cur1L | Cur1H | Cur2L | Cur2H | Cur3L | Cur3H | Cur4L | Cur4H |
Cur1L_status:
When setting the current threshold alarm of channel 1, this flag is True when it is lower than the set threshold, otherwise it is False.
Cur1H_status:
When setting the current threshold alarm of channel 1, this flag is True when it is higher than the set threshold, otherwise it is False.
Cur2L_status:
When setting the current threshold alarm of channel 2, this flag is True when it is lower than the set threshold, otherwise it is False.
Cur2H_status:
When setting the current threshold alarm of channel 2, this flag is True when it is higher than the set threshold, otherwise it is False.
Cur3L_status:
When setting the current threshold alarm of channel 3, this flag is True when it is lower than the set threshold, otherwise it is False.
Cur3H_status:
When setting the current threshold alarm of channel 3, this flag is True when it is higher than the set threshold, otherwise it is False.
Cur4L_status:
When setting the current threshold alarm of channel 4, this flag is True when it is lower than the set threshold, otherwise it is False.
Cur4H_status:
When setting the current threshold alarm of channel 4, this flag is True when it is higher than the set threshold, otherwise it is False.
Current channel 1:
Channel 1 for measuring AC current. Resolution 0.001A.
Ext: 0x002710 =10000/1000=10.000A
Current channel 2:
Channel 2 for measuring AC current. Resolution 0.001A.
Ext: 0x002904 =10500/1000=10.500A
Current channel 3:
Channel 3 for measuring AC current. Resolution 0.001A.
Ext: 0x002AF8 =11000/1000=11.000A
Current channel 4:
Channel 4 for measuring AC current. Resolution 0.001A.
Ext: 0x002EE0 =12000/1000=12.000A
TimeStamp:
Unit TimeStamp Example: 66a9edeb(H) = 1722412523(D)
Put the decimal value into this link(https://www.epochconverter.com/) to get the time.
2.3.2.2 MOD=2 (Continuous Sampling Mode)
Notice: The payload is determined by the command setting:
Example:
AT+MOD=2,60,5,0
CS01-NB/NS read 4 channels data every 1 minutes. When it reads 5 groups, CS01-NB/NS will send an uplink. So the uplink interval is 5 minutes. Each uplink will include 5 groups of sensor value. Each Group include 4 channels data.
f86366306279881518640cc514000066ab2380002f83002f91002f9c002f63002f89002f94002fa1002f72002f8b002f9b002fa2002f7d002f84002f91002f94002f64003017003026003030003002
If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
2.3.3 General Json Format(Type=5)
2.3.3.1 MOD=1 (General acquisition mode)
{"IMEI":"863663062798815","Model":"CS01-NB","current_alarm":"NNNN","current_chan1":20.496,"current_chan2":20.374,"current_chan3":20.572,"current_chan4":20.478,"battery":3.267,"signal":25,"1":[0.024,0.003,0.002,0.002,"2024/07/31 05:26:08"],"2":[0.024,0.003,0.001,0.001,"2024/07/31 05:11:08"],"3":[0.024,0.003,0.001,0.001,"2024/07/31 04:56:08"],"4":[0.024,0.003,0.001,0.001,"2024/07/31 04:41:08"],"5":[0.024,0.003,0.001,0.001,"2024/07/31 04:26:08"],"6":[0.024,0.003,0.001,0.001,"2024/07/31 04:11:08"],"7":[11.023,10.944,11.067,11.019,"2024/07/31 03:56:08"],"8":[10.907,10.831,10.948,10.893,"2024/07/31 03:41:08"]}
If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
Notice, from above payload:
- Current_alarm, Current_chan1, Current_chan2, Current_chan3, Current_chan4, Battery & Signal are the value at uplink time.
- Json entry 1 ~ 8 are the last 1 ~ 8 sampling data as specify by AT+CLOCKLOG=1,65535,15,8 Command. Each entry includes (from left to right): Current_chan1, Current_chan2, Current_chan3, Current_chan4, Sampling time.
- For "Current_alarm" : NNNN, four characters indicate the alarm status of four channels. N indicates a non-alarm, H indicates a high-threshold alarm, and L indicates a low-threshold alarm.
2.3.3.2 MOD=2 (Continuous Sampling Mode)
Notice: The payload is determined by the command setting:
Example:
AT+MOD=2,60,5,0
CS01-NB/NS read 4 channels data every 1 minutes. When it reads 5 groups, CS01-NB/NS will send an uplink. So the uplink interval is 5 minutes. Each uplink will include 5 groups of sensor value. Each Group include 4 channels data.
{"IMEI":"863663062798815","Model":"CS01-NB","battery":3.267,"signal":25,"Data":"(15.402,15.377,15.381,15.332)(15.329,15.280,15.336,15.300)(15.172,15.136,15.189,15.140)(15.165,15.136,15.185,15.135)(15.161,15.137,15.174,15.205)"}
If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
2.3.4 ThingsBoard Payload(Type=3) (The format will be adjusted later)
Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
2.3.4.1 MOD=1 (General acquisition mode)
{
"topic": "CS01_NB_PUB",
"payload": "f86366306279881518640ccc1800000000001800000300000100000166ab298a00001800000300000100000166a9f179003dd9003d78003e1d003e1266a9ed4a003dd4003d82003e17003de366a9ecd2003e20003dce003e5f003e2966a9ec5a003e1e003dc8003e52003e2266a9ebe2003ddc003d8b003e20003de966a9eb6a003d6e003d18003da7003d8266a9eaf2003d77003d1f003db1003d8566a9ea7a"
}
2.3.4.2 MOD=2 (Continuous Sampling Mode)
{
"topic": "CS01_NB_PUB",
"payload": "f86366306279881518640cdd18000066ab28a7000018000003000001000002"
}
2.3.5 ThingSpeak Payload(Type=1)
MOD=2 does not support ThingSpeak platform requirement, only MOD=1.
- MOD=1 (General acquisition mode)
This payload meets ThingSpeak platform requirement. It includes only six fields. Form 1~6 are:
Current 1, Current 2, Current 3, Current 4, Battery, Signal. This payload type only valid for ThingSpeak Platform.
field1=Current 1 value&field2=Current 2 value&field3=Current 3 value&field4=Current 4 value&field5=Battery value&field6=Signal value
2.5 Payload Decoder file
Example of CS01-NB/NS decoding in Datacake refer to the following links:
https://github.com/dragino/dragino-end-node-decoder/blob/main/Datacake-Dragino_NB
2.6 Firmware Change Log
Firmware download link: https://www.dropbox.com/scl/fo/cnnyz4ynebs3am96jvtv0/h?rlkey=4no594ssi0nzt2lc3irbkid9b&dl=0
3. Configure CS01-NB/NS
3.1 Configure Methods
CS01-NB/NS supports below configure method:
- AT Command via Bluetooth Connection (Recommended): BLE Configure Instruction.
- AT Command via UART Connection : See UART Connection.
3.2 Serial Access Password
After the Bluetooth or UART connection is successful, use the Serial Access Password to enter the AT command window.
The label on the box of the node will print the initial password: AT+PIN=xxxxxx, and directly use the six-digit password to access the AT instruction window.
If you need to change the password, use AT+PWORD=xxxxxx (6 characters), NB nodes only support lowercase letters.
Note: After entering the command, you need to add a line break, and you can also set automatic line breaks in the Bluetooth tool or UART connection tool.
3.3 AT Commands Set
AT+<CMD>? : Help on <CMD>
AT+<CMD> : Run <CMD>
AT+<CMD>=<value> : Set the value
AT+<CMD>=? : Get the value
General Commands
AT : Attention
AT? : Short Help
AT+MODEL : Get module information
ATZ : Trig a reset of the MCU
AT+DEUI : Get or set the Device ID
AT+SLEEP : Get or set the sleep status
AT+DEBUG : Set more info output
AT+SERVADDR: Get or Set the Server address
AT+TDC : Get or set the application data transmission interval in s
AT+APN : Get or set the APN
AT+RXDL : Get or Set the receiving time
AT+GETSENSORVALUE : Returns the current sensor measurement
AT+DNSCFG : Get or Set DNS Server
AT+CSQTIME : Get or Set the time to join the network
AT+DNSTIMER : Get or Set the NDS timer
AT+TLSMOD : Get or Set the TLS mode
AT+MOD: Get or Set work mode
AT+ENCHANNEL: Get or set enable or disable of four channels
AT+CCAL: Get or set calibration value of current channel
AT+CALARM: Get or set current alarm threshold
AT+ATDC: Get or set the application minimum alarm interval in min
AT+PROPORTION: Set the current proportion parameter
AT+PRO : Get or Set usage agreement (1:COAP,2:UDP,3:MQTT,4:TCP)
AT+3V3T : Get or Set extend the time of 3V3 power
AT+INTMOD : Get or Set the trigger interrupt mode (0:input,1:falling or rising,2:falling,3:rising)
AT+CLOCKLOG: Enable or Disable Clock Logging
AT+GETLOG : Print serial port logs
AT+TIMESTAMP : Get or Set UNIX timestamp in second
AT+CFG : Print all settings
MQTT Management
AT+CLIENT : Get or Set the MQTT clientID
AT+UNAME : Get or Set the MQTT Username
AT+PWD : Get or Set the MQTT password
AT+PUBTOPIC: Get or set MQTT publishing topic
AT+SUBTOPIC: Get or set MQTT subscription topic
AT+MQOS : Set the QoS level of MQTT
Coap Management
AT+URI1: Get or set CoAP option 1
AT+URI2: Get or set CoAP option 2
AT+URI3: Get or set CoAP option 3
AT+URI4: Get or set CoAP option 4
Information
AT+PWORD : Get or set the System password
AT+FDR1 : Reset parameters to factory default values except for passwords
AT+FDR : Reset Parameters to Factory Default
AT+CDP : Read or Clear cached data
AT+LDATA : Get the last upload data
3.3 Commands special design for CS01-NB/NS
These commands only valid for CS01-NB/NS, as below:
3.3.1 Set Transmit Interval Time
Feature: Change NB-IoT End Node Transmit Interval.
AT Command: AT+TDC
Command Example | Function | Response |
---|---|---|
AT+TDC=? | Show current transmit Interval | 1200 |
AT+TDC=7200 | Set Transmit Interval | OK |
Downlink Command: 0x01
Format: Command Code (0x01) followed by 3 bytes time value.
If the downlink payload=010004B0, it means set the END Node's Transmit Interval to 0x0004B0=1200(S), while type code is 01.
- Example 1: Downlink Payload: 010004B0 // Set Transmit Interval (TDC) =1200 seconds
- Example 2: Downlink Payload: 01001C20 // Set Transmit Interval (TDC) =7200 seconds
3.3.2 Get Device Status
Send 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 PA8 of pin.
When AT+INTMOD=0 is set, PA8 is used as a digital input port.
AT Command: AT+INTMOD
Command Example | Function | Response |
---|---|---|
AT+INTMOD=? | Show current interrupt mode | 0 |
AT+INTMOD=2 | Set Transmit Interval | 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 Example | Function | Response |
---|---|---|
AT+3V3T=? | Show 3.3V open time. | 0 (default) OK |
AT+3V3T=1000 | Close 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 Example | Function | Response |
---|---|---|
AT+MOD=? | Shows the current working mode | 1 (default) OK |
AT+MOD=2,60,5,0 | Set working mode 2 | OK |
Description of AT instruction for setting working mode 2:
Command Example | Function | Parameter |
---|---|---|
AT+MOD=1 | Set General acquisition mode. | 1:General acquisition mode. |
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. (Min: 5s) | |
The third bit parameter sets the number of groups to record data. | After 5 groups of data are collected, the uplink is performed. (Max: 50 groups) | |
The fourth parameter setting 5V normally open. | 0: Not set 5V normally open 1: Setting 5V normally open(High power consumption) | |
Note: If the collection interval is very short, that is, a group of data needs to be collected in a few seconds, you are advised to set 5V on normally. The module startup time can be removed, but the power consumption is relatively high. |
Downlink Command: 0x0A
Format: Command Code (0x0A) followed by 1 byte or 5 bytes.
- Example 1: Downlink Payload: 0A 01 ---> AT+MOD=1
- Example 2: 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 Example | Function | Response |
---|---|---|
AT+CALARM=? | Get current alarm threshold. | 0,0,0,0,0,0,0,0,0(default) |
AT+CALARM=1,1,20,1,20,0,0,0,0 | When the current of channel 1 and channel 2 exceeds 20A, it will alarm and send a data packet. | OK |
Command Example | Function | Parameter |
---|---|---|
AT+CALARM=1,1,10000,0,20000,0,0,0,0 | 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 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 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 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 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 Example | Function | Response |
---|---|---|
AT+ENCHANNEL=? | Get enabled channels. | 1,1,1,1 (default) OK |
AT+ENCHANNEL=1,1,1,0 | Channel 4 disabled. | OK |
AT+ENCHANNEL=1,1,0,0 | Channel 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
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 Example | Function | Response |
---|---|---|
AT+PROPORTION=? | Get the current proportion parameter | 100 (Default) |
AT+PROPORTION=1 | Set the displayed value to 1/100 of the actual value | OK |
AT+PROPORTION=200 | Setting the display value to 2 times the actual value | OK |
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.
4. Use Case
4.1 Monitor the power status of office
This is a case study for CS01-NB/NS current sensor. It shows how to use CS01 to monitor office power use status.
Click here for more: Case 1: Monitor the power status of office
4.2 Function setting power consumption calculation case
Set alarm for, when current = 0.1 send data
Set alarm interval for 5 mins
Set regular data interval for 6 hours or so Power outage alarm is the priority.
Then switch OFF the connected load.
Look for alarm message, as the current will drop to very minimum.
Repeat LOAD OFF after 8 mins ( we have set alarm interval as 5 mins) and check for alarm message.
When a scenario like 4 outages per day, then we should get 4 Alarm + 4 regular current messages (data frequency set to 6 hours), then how much will be the battery life.
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.
Below I set
AT+CALARM=1,0,0,0,0,0,0,0,100
AT+ENCHANNEL=0,0,0,1
According to the settings, three aspects need to be calculated, as follows
(1) The alarm interval is once every five minutes, 12 times per hour, a total of 288 times a day, one alarm is equivalent to one detection, and the consumption per detection is ≈0.0172mAh, so the daily consumption is calculated as follows
0.0172*288=4.9536mAh
(2) The sleep current consumption per day is ≈0.0053268*24=0.1278432mAh
(3) 4 alarms + 4 regular current messages, equivalent to sending 8 uplink messages a day, each upload will consume
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-NB/NS battery capacity is 8500mAh. Calculated by the above data
Single sensor: 8500/(4.9536+0.1278432+0.614088512)=1492 days
Four sensors: 8500/(4.9536+0.1278432+0.874923912)=1427 days
The above calculation is the approximate battery life.
The battery life is also related to the frequency band and DR you use. See the figure below for details.
5. Battery & Power Consumption
CS01-NB/NS use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
Battery Info & Power Consumption Analyze .
Notice: Continuous Sampling Mode will increase the power consumption a lot.
For example, if use all four channels to sampling data:
-- Sample every minute and uplink data every 5 minutes. The battery life is about 10 monthes.
-- Sample every minute and uplink data every 20 minutes. The battery life is about 12 monthes.
If user want to use external DC Adapter, to power the CS01-NB/NS in this case, please refer Power Device use 3.3v Power Adapter.
6. Firmware update
User can change device firmware to::
- Update with new features.
- Fix bugs.
Firmware and changelog can be downloaded from : Firmware download link
Methods to Update Firmware:
- (Recommended way) OTA firmware update via BLE: Instruction.
- Update through UART TTL interface : Instruction.
7. FAQ
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 by the AT+CCAL command in the node. If so, please change the calibration value to 0, that is: AT+CCAL=0,0,0,0.
9. Order Info
Part Number: CS01-NB/NS
XX:
- GE: General version ( Exclude SIM card)
- 1T: with 1NCE* 10 years 500MB SIM card and Pre-configure to ThingsEye server
Notice: CS01-NB/Ns doesn't include current sensor. User need to purchase seperately.
Reference Model for current sensor:
- SCT013G-D-100: 100A/50mA
- SCT024-300: 300A/50mA
- SCT036-600: 600A/50mA
10. Packing Info
Package Includes:
- CS01-NB/NS NB-IoT 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 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.cc.