AIS01-CB -- NB-IoT/LTE-M AI Image End Node User Manual
Table of Contents:
- 1. Introduction
- 2. Use AIS01-CB to communicate with IoT Server
- 3. Configure AIS01-CB
- 4. Clock logging
- 5. Battery & Power Consumption
- 6. Case Study
- 7. OTA Firmware update
- 8. FAQ
- 9. Order Info
- 10. Packing Info
- 11. Support
- 12. Appendix I: Field Installation Photo
1. Introduction
1.1 What is AIS01-CB
AIS01-CB is a NB-IoT/LTE-M AI Image End Node. AIS01-CB has a camera and AI processor in the probe. It can take photo , analyze the photo to get digital reading and upload to IoT server via NB-IoT/CAT-M1 network.
AIS01-CB is pre-trained to support image recognized of water meter, gas meter and power meter. It can be trained to support more image recognized for different application.
AIS01-CB can send the digital reading after recognized and it can also send the original photo via NB-IoT/CAT-M1 as well.
AIS01-CB has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration.
AIS01-CB supports BLE configure and OTA update which make user easy to use.
AIS01-CB is powered by 8500mAh Li-SOCI2 battery, it is designed for long-term use up to several years.
1.2 Features
- For -NB Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85
- For -CB Bands: B1/B2/B3/B4/B5/B8/B12/B13//B18/B19/B20/B25/B28/B66/B71/B85
- CAT-M1 / LTE-M Bands: B1/B2/B3/B4/B5/B8/B12/B13/B18/B19/B20/B25/B26/B27/B28/B66/B85
- Low power consumption
- AI Image Sensor.
- Send image to IoT server
- Recognize digits from Image and send data to IoT server
- Trained for common reading for Water Meter, Gas Meter, Power Meter
- Multiply Sampling and one uplink
- Support Interrupt uplink
- Support Bluetooth v5.1 remote configure and update firmware
- GNSS for Location Report
- Uplink via MQTT, MQTTs, TCP, UDP or CoAP
- Uplink on periodically
- Downlink to change configure
- 8500mAh Li/SOCl2 Battery
1.3 Specification
Common DC Characteristics:
- Supply Voltage: Built-in Battery , 2.6v ~ 3.6v
- Operating Temperature: -40 ~ 85°C
Camera:
- Mono: black & white
- Angle: 110°
- Image size: 64kb
- Image resolution: 640x480
- Power Consumption: 206.1mW
- Supply Voltage: DC5V
- Idel Mode: 6uA
- Take Photo: 41.22 mA and 3171 ms
- Cable Length: 150cm
- Dimension: 46.2x29x13.8 mm
I/O Interface:
- Battery output (2.6v ~ 3.6v depends on battery)
- +5v controllable output
- 3 x Interrupt or Digital IN/OUT pins
- 3 x one-wire interfaces
- 1 x UART Interface
- 1 x I2C Interface
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
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 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.5 Button & LEDs
Behavior on ACT | Function | Action |
---|---|---|
Pressing ACT between 1s < time < 3s | Send an uplink | If sensor is already Joined to LoRaWAN 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 JOIN LoRaWAN network. |
Fast press ACT 5 times. | Deactivate Device | Red led will solid on for 5 seconds. Means device is in Deep Sleep Mode. |
1.6 BLE connection
AIS01-CB supports 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.7 Pin Definitions
AIS01-CB use the mother board which as below.
1.7.1 Jumper JP2
Power on Device when put this jumper.
1.7.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.7.3 Reset Button
Press to reboot the device.
1.8 Mechanical
1.8.1 for CB version
2. Use AIS01-CB to communicate with IoT Server
2.1 Send data to IoT server via NB-IoT/CAT-M1 network
The AIS01-CB is equipped with a NB-IoT module, the pre-loaded firmware in AIS01-CB 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 AIS01-CB.
Below shows the network structure:
There are two version: -GE and -1T version of AIS01-CB.
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 AIS01-CB 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 |
1T Version: This version has 1NCE SIM card pre-installed and configure to send value to ThingsEye. User Just need to select the sensor type in ThingsEyeand Activate AIS01-CB and user will be able to see data in ThingsEye. See here for ThingsEye Config Instruction.
2.2 Payload Types
To meet different server requirement, AIS01-CB 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.2.1 General Json Format(Type=5)
This is the General Json Format. As below:
{"IMEI":"862406079156234","Model":"AIS01-CB","Reading":1618.889893,"interrupt":0,"interrupt_level":0,"battery":3.49,"signal":31,"latitude":0.000000,"longitude":0.000000,"gps_time":"2024-08-14T08:22:39Z","1":[1618.835449,"2024-08-14T08:08:00Z"],"2":[1618.835449,"2024-08-14T07:53:00Z"],"3":[1618.801025,"2024-08-14T07:38:00Z"],"4":[1617.761475,"2024-08-14T07:23:00Z"],"5":[1617.667358,"2024-08-14T07:08:00Z"],"6":[1618.667358,"2024-08-14T06:53:26Z"],"7":[1618.667358,"2024-08-14T06:38:00Z"],"8":[1618.614014,"2024-08-14T06:23:00Z"]}
Note: from above payload:
- Reading, Interrupt, Interrupt_level, Battery, Signal, latitude, longitude&GPS time 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): Reading, Sampling time.
Example:
2.2.2 HEX format Payload(Type=0)
This is the HEX Format. As below:
f86240607915623468640d9f1801000000000654000d940466beb2fd015a795806cf349666beb2fd00000654000d940466beb01700000654000d940466beac9300000654000de52e66bea77700000654000d32c666bea3f300000654000d32c666bea06f00000654000cbf9e66be9ceb00000654000b9e7966be996700000654000cbf9e66be95e3
Version:
These bytes include the hardware and software version.
Higher byte: Specify Sensor Model: 0x68 for AIS01-CB
Lower byte: Specify the software version: 0x64=100, means firmware version 1.0.0
BAT (Battery Info):
Ex1: 0x0da6 = 3494mV
Signal Strength:
NB-IoT Network signal Strength.
Ex1: 0x1f = 31
0 -113dBm or less
1 -111dBm
2...30 -109dBm... -53dBm
31 -51dBm or greater
99 Not known or not detectable
Interrupt:
This data field shows if this packet is generated by interrupt or not.
Example:
If byte[0]&0x01=0x00 : Normal uplink packet.
If byte[0]&0x01=0x01 : Interrupt Uplink Packet.
Interrupt_level:
This byte shows whether the interrupt is triggered by a high or low level.
Ex1: 0x00 Interrupt triggered by falling edge (low level)
Ex2: 0x01 Interrupt triggered by rising edge (high level)
Reading:
The uplink integer data is the first four bytes of the Reading payload.
Ex1: 0x00000655(H) = 1621(D)
The fractional part is the last four bytes of the uplink Reading payload.
Ex2: 0x00000094(H) = 148(D) / 1000000 = 0.000148
The total number read is:
integer part(D) + decimal part(D): 1621+0.000148=1621.000148
TimeStamp & GPS Timestamp
Unit TimeStamp Example: 66beb5c3(H) = 1723774403(D)
Put the decimal value into this link(https://www.epochconverter.com/) to get the time.
Latitude:
Example: 0x015a7958(H)=22706520(D)=22.706520
Longitude:
Example: 0x06cf3496(H)=114242710(D)=114.242710
2.2.3 ThingsBoard Payload(Type=3)
Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
{
"topic": "2276492",
"payload": {
"IMEI": "864370064394515",
"Model": "S31x-CB",
"temperature": 26.9,
"humidity": 59.5,
"interrupt": 0,
"interrupt_level": 0,
"battery": 3.51,
"signal": 25,
"latitude": 0.0,
"longitude": 0.0,
"gps_time": "2024-06-13T07:23:27Z",
"1": [26.7, 60.5, "2024-06-13T07:22:01Z"],
"2": [26.5, 61.9, "2024-06-13T07:20:01Z"],
"3": [26.5, 60.5, "2024-06-13T07:18:01Z"],
"4": [26.5, 63.6, "2024-06-13T07:16:01Z"],
"5": [26.5, 62.1, "2024-06-13T07:14:01Z"],
"6": [26.5, 62.4, "2024-06-13T07:12:01Z"],
"7": [26.4, 62.2, "2024-06-13T07:10:01Z"],
"8": [26.5, 62.9, "2024-06-13T07:08:01Z"]
}
}
2.2.4 ThingSpeak Payload(Type=1)
This payload meets ThingSpeak platform requirement. It includes only four fields. Form 1~4 are:
Temperature, Humidity, Battery & Signal. This payload type only valid for ThingsSpeak Platform
As below:
field1=Tem&field2=Hum&field3=BatV&field4=Singal
2.3 Image data
Apart from the eight bytes mentioned above, the next 200 bytes are all image data.
Example: Payload: 663095C00BBE1000FFD8FFE000104A46494600010101004800480000FFDB0043001B12141714111B1716171E1C1B2028422B28252528513A3D3042605565645F555D5B6A7899816A7190735B5D
85B586909EA3ABADAB6780BCC9BAA6C799A8ABA4FFDB0043011C1E1E2823284E2B2B4EA46E5D6EA4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4
A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4FFC0000B0800F0014001012200FFC4001F00000105010101010101000000000000000001020304050607
Image data=FFD8FFE000104A46494600010101004800480000FFDB0043001B12141714111B1716171E1C1B2028422B28252528513A3D3042605565645F555D5B6A7899816A7190735B5D85B58
6909EA3ABADAB6780BCC9BAA6C799A8ABA4FFDB0043011C1E1E2823284E2B2B4EA46E5D6EA4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4
A4A4A4A4A4A4A4A4A4A4A4A4A4A4FFC0000B0800F0014001012200FFC4001F00000105010101010101000000000000000001020304050607
2.3.1 Combined image
Combine each data packet obtained from the platform (note: the first 8 bytes of each data packet need to be deleted before combining)
Then use winhex software to convert to get the image, specific tutorial: Combined image
Below is the text of the integrated data and the image of the converted data:
2.3.2 Integer
The five data points of Integer are: 02 00 00 00
Notice that the packet order is reversed here.
Ex:0x02000000=0x00000002=2
2.3.3 Decimal
Notice that the packet order is reversed here.
Ex:
0x3CAE0100=0x0001AE3C=11014
0x7A0F0200=0x00020F7A=135034
0x3CAE0100=0x0001AE3C=11014
0x3CAE0100=0x0001AE3C=11014
0x3CAE0100=0x0001AE3C=11014
2.4 ThingsEye Configuration
By configuring AIS01-CB on ThingsEye, you can intuitively see the trend of readings and obtain image data to see the real-time data.
Below shows how to Intergrate with ThingsEye with TTN platform to support AIS01-CB.
2.4.1 Create new devices in ThingsEye integration
Integration type select The Things Stack Community
Select JavaScript for Uplink data converter and Downlink data converter, and then fill in the code from the file.Uplink and downlink decoder codes.
Select JavaScript for Uplink data converter and Downlink data converter, and then fill in the code in the file.
1. Select custom
2. Fill in eu1.cloud.thethings.network
3. Fill in 8883
4. Fill in your TTN- Integrations-MQTT Username and Password
5. Fill in your MQTT Username. (Example: My MQTT Username is ais01 @ttn)
The completed example is shown below.
2.4.2 Import AIS01 rule chain library template
Rule chain library template file."ais01 _rule.json"
Select the device name you just created and save.
2.4.3 create a device profile
1. Select Device profiles
2. Click "+" to create a device profile
3. Create a name, select the rule chain template name "ais01-rule" just imported in Default rule chain
4. Click Add
2.4.4 Dashboard Configuration
Click Dashboards, click "+" and select Import dashboard to import the dashboard file.ais01 dashboard.josn
After importing, click edit mode.
Click allases, then click 2 to enter the edit.
Change to the name of the TTN device group
After clicking save, the device will appear on the table.
2.4.5 Dashboard Contents
Click on the corresponding device and four modules will be displayed, namely, BAT, reading data, Image, and command issuing module.
You can enter 0B01 in the Update Multiple Attributes module and click Save, AIS01-CB will receive Image Polling Command in next data uplink and upload the image data.
There will be multiply packets uplink for the image and ThingsEye will re-built them and You will see the actual image in the Update Multiple Attributes module.
(Note: If you need to use this function, TTN's Payload formatters need to be changed to https://github.com/dragino/dragino-end-node-decoder/blob/main/AIS01/AIS01_Thingseyes_Decoder.txt)
2.5 Node-Red Configuration
By configuring the AIS01-CB on the Node-RED, you can visualize trends in readings and acquire image data to view live dials.
The prerequisite is that the node has successfully uploaded the data.
2.5.1 Import file
Click on the upper right corner and click “import” to import the node red AIS01-CB file.
2.5.2 Edit the mqtt out node
The configuration to be modified is as follows:
1. Click on this module to enter the edit window
2. Enter the subscription subject of your node
3. Enter the edit window
4. Select the Security Edit window
5. Enter the MQTT username and password for the node.
The steps for modifying the content of these two modules are the same.
2.5.3 Edit the sqlite node
Select /home/lhr/root/data.db
Then click deploy
2.5.4 AIS01-CB Node Red UI
Click on the corresponding device and four modules will be displayed, namely, BAT data, reading data, image, and command issuing module.
You can enter 0B01 in the downlink module and click Save, AIS01-CB will receive the command and upload the image data after the next data upload.
You will see the actual image in the picture module.
(Note: If you need to use this function, TTN's Payload formatters need to be changed to https://github.com/dragino/dragino-end-node-decoder/blob/main/AIS01/AIS01_Thingseyes_Decoder.txt)
For more information about Node Red, please refer to Node-RED_Install and Use
3. Configure AIS01-CB
3.1 Configure Methods
AIS01-CB supports below configure method:
- AT Command via Bluetooth Connection (Recommended): BLE Configure Instruction.
- AT Command via UART Connection : See UART Connection.
- LoRaWAN Downlink. Instruction for different platforms: See IoT LoRaWAN Server section.
3.2 Commands special design for AIS01-CB
These commands only valid for AIS01-CB, as below:
3.2.1 Set Transmit Interval Time
Feature: Change LoRaWAN End Node Transmit Interval.
AT Command: AT+TDC
Command Example | Function | Response |
---|---|---|
AT+TDC=? | Show current transmit Interval | 30000 |
AT+TDC=60000 | Set Transmit Interval | OK |
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.2 Set Interrupt Mode
Feature, Set Interrupt mode for GPIO_EXIT.
AT Command: AT+INTMOD1,AT+INTMOD2
Command Example | Function | Response |
---|---|---|
AT+INTMOD1=? | Show current interrupt mode | 0 |
AT+INTMOD1=2 | Set Transmit Interval | OK |
AT+INTMOD2=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 ---> AT+INTMOD1=0
- Example 2: Downlink Payload: 06000003 ---> AT+INTMOD1=3
- Example 3: Downlink Payload: 06000102 ---> AT+INTMOD2=2
3.2.3 Setting up automatic image upload data
Feature: Automatically upload image data after each uplink packet
AT Command: AT+IMAGE
Command Example | Function | Response |
AT+IMAGE=1 | Enable automatic uploading of image data | 1 OK |
AT+IMAGE=0 | Disable automatic uploading of image data | 0 |
Downlink Command: 0x34
0X0A 01 // Same as AT+IMAGE=1
0x0A 00 // Same as AT+IMAGE=0
3.2.4 Example Query saved historical records
Feature:This command can be used to search the saved history, recording up to 32 groups of data, each group of historical data contains a maximum of 100 bytes.
AT Command: AT+CDP
Command Example | Function |
AT+CDP |
Downlink Command:
No downlink commands for feature
3.2.5 Uplink log query
Feature: This command can be used to query upstream logs of data packets.
AT Command: AT+GETLOG
Command Example | Function |
AT+GETLOG |
Downlink Command:
No downlink commands for feature
4. Clock logging
Sometimes when we deploy lots of end nodes in field. We want all sensors sample data at the same time, and upload these data together for analyze. In such case, we can use clock loging feature.
We can use this command to set the start time of data recording and the time interval to meet the requirements of the specific collection time of data.
- AT Command: AT+CLOCKLOG=a,b,c,d
a: 0: Disable Clock logging. 1: Enable Clock Logging
b: Specify First sampling start second: range (0 ~ 3599, 65535) // Note: If parameter b is set to 65535, the log period starts after the node accesses the network and sends packets.
c: Specify the sampling interval: range (0 ~ 255 minutes)
d:How many entries should be uplink on every TDC (max 32)
Example:
AT+CLOCKLOG=1,65535,1,5
After the node sends the first packet, data is recorded to the memory at intervals of 1 minute. For each TDC uplink, the uplink load will include: battery information + the last 5 memory records (payload + timestamp).
Note: Users need to synchronize the server time before configuring this command. If the server time is not synchronized before this command is configured, the command takes effect only after the node is reset.
5. Battery & Power Consumption
AIS01-CB use ER26500 + SPC1520 battery pack . See below link for detail information about the battery info and how to replace.
Battery Info & Power Consumption Analyze .
6. Case Study
6.1 Send Image to server to check different situation
Example 1: Users can use cameras to monitor whether the trash can is overflowing
Example 2: Users can use the camera to check whether the fire hydrant is in a safe and closed state.
7. OTA Firmware update
User can change firmware AIS01-CB to:
- Change Frequency band/ region.
- Update with new features.
- Fix bugs.
Firmware and changelog can be downloaded from : Firmware download link
Methods to Update Firmware:
- (Recommanded way) OTA firmware update via wireless: http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/
- Update through UART TTL interface: Instruction.
8. FAQ
8.1 How can I access the BG95-NGFF AT Commands?
User can access to BG95-NGFF directly and send AT Commands.
8.2 General Manual for -CB , -CS models
Users can follow the instructions in this link to see how to configure to connect to different servers.
9. Order Info
Part Number: AIS01-CB-XX
XX:
- GE: General version ( Exclude SIM card)
- 1T: with 1NCE* 10 years 500MB SIM card and Pre-configure to ThingsEye server
1NCE SIM Card NB-IoT network coverage: Austria, Belgium, Bulgaria, Croatia, Czech Republic, Denmark, Finland, Germany, Great Britain, Greece, Hungary, Ireland, Italy, Latvia, Malta, Netherlands, Norway, Puerto Rico, Russia, Slovak , Republic, Slovenia, Spain, Sweden, Switzerland, Taiwan, USA, US Virgin Islands.
1NCE SIM Card LTE-M network coverage: Argentina, Austria, Australia, Belgium, Canada, Denmark, Estonia, Finland, France, Germany, Great Britain, Hungary, Ireland, Japan, Jersey, Korea, Repiblic of, Latvia, Luxembourg, Mexico, Netherlands, New Zealand, Norway, Poland, Puerto Rico, Romania, Spain, Sweden, Switzerland, Taiwan, USA, US Virgin Islands.
10. Packing Info
Package Includes:
- AIS01-CB NB-IoT/LTE-M AI Image End Node
- External antenna x 1
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
12. Appendix I: Field Installation Photo
Step1:
Find a water meter, install the AIS Sensor on the water meter fixture and install it on the water meter
The following is a comparison of before and after installation:
Step2:
Calibrate the AIS Sensor so that it can accurately read the water meter value.
Step3:
Choose a suitable location to place AIS01-CB,overall view
Get image data
When 0A 01 is sent on the TTN platform, the device will execute the command to send image data packet after sending the next data packet.
According to the method in 2.3.3.6, the combined data is converted into binary to obtain the following jpg image.