Wiki source code of AQS01-L -- LoRaWAN Indoor CO2 Sensor User Manual
Last modified by Saxer Lin on 2024/02/22 10:27
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | |||
2 | |||
3 | (% style="text-align:center" %) | ||
4 | [[image:image-20240124134538-1.png||height="365" width="415"]] | ||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
11 | |||
12 | **Table of Contents:** | ||
13 | |||
14 | {{toc/}} | ||
15 | |||
16 | |||
17 | |||
18 | |||
19 | |||
20 | |||
21 | = 1. Introduction = | ||
22 | |||
23 | == 1.1 What is AQS01-L LoRaWAN Indoor CO2 Sensor == | ||
24 | |||
25 | |||
26 | The Dragino AQS01-L is an (% style="color:blue" %)**Indoor LoRaWAN Air Quality Sensor**(%%) for the Internet of Things solution. It is designed to measure the surrounding environment parameters include:(% style="color:blue" %)** CO2, Temperature , Relative Air Humidity and Air pressure**(%%), and then upload to IoT server via LoRaWAN wireless protocol. | ||
27 | |||
28 | AQS01-L is powered by a (% style="color:blue" %)**ER18505 4000mAh battery**(%%). The battery can last more than 2 years and is easy to change. | ||
29 | |||
30 | AQS01-L (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use. | ||
31 | |||
32 | AQS01-L supports (% style="color:blue" %)**CO2 Alarm and Temperature Alarm* features**(%%), users can get an alarm for instant notice. | ||
33 | |||
34 | AQS01-L supports (% style="color:blue" %)**Datalog feature**(%%), User can retrieve the sensor data from LoRaWAN commands. | ||
35 | |||
36 | (% style="color:red" %)**Note*:**(%%) CO2 Alarm and temperature Alarm will decrease a lot the battery life. | ||
37 | |||
38 | |||
39 | == 1.2 Features == | ||
40 | |||
41 | |||
42 | * LoRaWAN 1.0.3 Class A | ||
43 | * Monitor CO2/Temperature/Relative Humidity/Pressure | ||
44 | * Support CO2 alarm | ||
45 | * Support Datalog Feature | ||
46 | * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865 | ||
47 | * Support Bluetooth v5.1 and LoRaWAN remote configure | ||
48 | * Support wireless OTA update firmware | ||
49 | * Uplink on periodically | ||
50 | * Downlink to change configure | ||
51 | * 4000mAh batteries powered | ||
52 | |||
53 | == 1.3 Specification == | ||
54 | |||
55 | |||
56 | (% style="color:#037691" %)**Common DC Characteristics:** | ||
57 | |||
58 | * Supply Voltage: built in 4000mAh Li-SOCI2 battery , 2.5v ~~ 3.6v | ||
59 | * Operating Temperature: -20 ~~ 65°C | ||
60 | |||
61 | (% style="color:#037691" %)**CO2 Sensor:** | ||
62 | |||
63 | * Target gas: Carbon dioxide(CO2) | ||
64 | * Operating principle: Non-dispersiveinfrared(NDIR) | ||
65 | * Operating range: 0-50°C, 0-85% RH(non-condensing) | ||
66 | * Measurement range: 400ppm to 5000 ppm (extended range up to 10000 ppm ) | ||
67 | * Accuracy: Typ ±(50 ppm +3% of reading) | ||
68 | * Pressure Compensation | ||
69 | |||
70 | (% style="color:#037691" %)**Temperature Sensor:** | ||
71 | |||
72 | * Range: -20 ~~ 65 °C | ||
73 | * Accuracy: Typ ±1.0@ 0-65 °C | ||
74 | * Resolution: 0.01°C | ||
75 | |||
76 | (% style="color:#037691" %)**Humidity Sensor: ** | ||
77 | |||
78 | * Range: 0 ~~ 99.9% RH | ||
79 | * Accurancy: ± 3%RH (20 ~~ 80%RH) | ||
80 | * Resolution: 0.008% RH | ||
81 | * Long term stability: 0.5 %RH/yr | ||
82 | |||
83 | (% style="color:#037691" %)**Air Pressure: ** | ||
84 | |||
85 | * Range: 300~~1100hPa | ||
86 | * Accuracy: ± 1.0 hPa (0-65 °C) | ||
87 | * Resolution: 0.18Pa | ||
88 | * Long term stability: ±1.0 hPa/yr | ||
89 | |||
90 | (% style="color:#037691" %)**LoRa Spec:** | ||
91 | |||
92 | * Frequency Range, Band 1 (HF): 862 ~~ 1020 Mhz | ||
93 | * Max +22 dBm constant RF output vs. | ||
94 | * RX sensitivity: down to -139 dBm. | ||
95 | * Excellent blocking immunity | ||
96 | |||
97 | (% style="color:#037691" %)**Battery:** | ||
98 | |||
99 | * Li/SOCI2 un-chargeable battery | ||
100 | * Capacity: 4000mAh | ||
101 | * Self-Discharge: <1% / Year @ 25°C | ||
102 | |||
103 | (% style="color:#037691" %)**Power Consumption** | ||
104 | |||
105 | * Sleep Mode: 6uA @ 3.3v | ||
106 | * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm | ||
107 | |||
108 | == 1.4 Applications == | ||
109 | |||
110 | * Smart Building | ||
111 | * Industrial Monitoring and Control | ||
112 | |||
113 | == 1.5 Sleep mode and working mode == | ||
114 | |||
115 | |||
116 | (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any LoRaWAN activity. This mode is used for storage and shipping to save battery life. | ||
117 | |||
118 | (% style="color:blue" %)**Working Mode:** (%%)In this mode, Sensor will work as LoRaWAN Sensor to Join LoRaWAN network and send out sensor data to server. Between each sampling/tx/rx periodically, sensor will be in IDLE mode), in IDLE mode, sensor has the same power consumption as Deep Sleep mode. | ||
119 | |||
120 | |||
121 | (% style="color:inherit; font-family:inherit; font-size:26px" %)1.6 BLE connection | ||
122 | |||
123 | |||
124 | AQS01-L supports BLE remote configure. | ||
125 | |||
126 | BLE can be used to configure the parameter of AQS01-L or see the console output from AQS01-L. BLE will be only activate on below case: | ||
127 | |||
128 | * Press button to send an uplink. | ||
129 | * Press button to active AQS01-L. | ||
130 | * Device Power on or reset. | ||
131 | |||
132 | If there is no activity connection on BLE in 60 seconds, AQS01-L will shut down BLE module to enter low power mode. | ||
133 | |||
134 | |||
135 | = 2. Configure AQS01-L to connect to LoRaWAN network = | ||
136 | |||
137 | == 2.1 How it works == | ||
138 | |||
139 | |||
140 | The AQS01-L is configured as (% style="color:#037691" %)**LoRaWAN OTAA Class A**(%%) mode by default. It has OTAA keys to join LoRaWAN network. To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and press the button to activate the AQS01-L. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes. | ||
141 | |||
142 | |||
143 | == 2.2 Quick guide to connect to LoRaWAN server (OTAA) == | ||
144 | |||
145 | |||
146 | Following is an example for how to join the [[TTN v3 LoRaWAN Network>>url:https://console.cloud.thethings.network/]]. Below is the network structure; we use the [[LPS8v2>>url:https://www.dragino.com/products/lora-lorawan-gateway/item/228-lps8v2.html]] as a LoRaWAN gateway in this example. | ||
147 | |||
148 | The LPS8V2 is already set to connected to [[TTN network >>url:https://console.cloud.thethings.network/]], so what we need to now is configure the TTN server. | ||
149 | |||
150 | [[image:image-20240124150425-1.png||height="378" width="757"]] | ||
151 | |||
152 | (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from AQS01-L. | ||
153 | |||
154 | Each AQS01-L is shipped with a sticker with the default device EUI as below: | ||
155 | |||
156 | [[image:image-20230426084152-1.png||alt="图片-20230426084152-1.png" height="233" width="502"]] | ||
157 | |||
158 | |||
159 | You can input these keys in the LoRaWAN Server portal. Below is TTN screen shot: | ||
160 | |||
161 | |||
162 | (% style="color:blue" %)**Register the device** | ||
163 | |||
164 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/1654935135620-998.png?rev=1.1||alt="1654935135620-998.png"]] | ||
165 | |||
166 | |||
167 | (% style="color:blue" %)**Add APP EUI and DEV EUI** | ||
168 | |||
169 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-4.png?width=753&height=551&rev=1.1||alt="图片-20220611161308-4.png"]] | ||
170 | |||
171 | |||
172 | (% style="color:blue" %)**Add APP EUI in the application** | ||
173 | |||
174 | |||
175 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-5.png?width=742&height=601&rev=1.1||alt="图片-20220611161308-5.png"]] | ||
176 | |||
177 | |||
178 | (% style="color:blue" %)**Add APP KEY** | ||
179 | |||
180 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-6.png?width=744&height=485&rev=1.1||alt="图片-20220611161308-6.png"]] | ||
181 | |||
182 | |||
183 | (% style="color:blue" %)**Step 2:**(%%) Activate on AQS01-L | ||
184 | |||
185 | |||
186 | Press the button for 5 seconds to activate the AQS01-L. | ||
187 | |||
188 | (% style="color:green" %)**Green LED**(%%) will fast blink 5 times, device will enter (% style="color:blue" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network. (% style="color:green" %)**Green LED**(%%) will solidly turn on for 5 seconds after joined in network. | ||
189 | |||
190 | After join success, it will start to upload messages to TTN and you can see the messages in the panel. | ||
191 | |||
192 | |||
193 | == 2.3 Uplink Payload == | ||
194 | |||
195 | === 2.3.1 Device Status, FPORT~=5 === | ||
196 | |||
197 | |||
198 | Users can use the downlink command(**0x26 01**) to ask AQS01-L to send device configure detail, include device configure status. AQS01-L will uplink a payload via FPort=5 to the server. | ||
199 | |||
200 | The Payload format is as below. | ||
201 | |||
202 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) | ||
203 | |(% colspan="6" style="background-color:#4f81bd; color:white" %)**Device Status (FPORT=5)** | ||
204 | |(% style="width:103px" %)**Size (bytes)**|(% style="width:72px" %)**1**|(% style="width:91px" %)**2**|(% style="width:91px" %)**1**|(% style="width:86px" %)**1**|(% style="width:67px" %)**2** | ||
205 | |(% style="width:103px" %)Value|(% style="width:72px" %)Sensor Model|Firmware Version|(% style="width:91px" %)Frequency Band|(% style="width:86px" %)Sub-band|(% style="width:44px" %)BAT | ||
206 | |||
207 | Example parse in TTNv3 | ||
208 | |||
209 | [[image:image-20240112094511-1.png||height="280" width="1110"]] | ||
210 | |||
211 | |||
212 | (% style="color:#037691" %)**Sensor Model**(%%): For AQS01-L, this value is 0x37 | ||
213 | |||
214 | (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version | ||
215 | |||
216 | (% style="color:#037691" %)**Frequency Band**: | ||
217 | |||
218 | 0x01: EU868 | ||
219 | |||
220 | 0x02: US915 | ||
221 | |||
222 | 0x03: IN865 | ||
223 | |||
224 | 0x04: AU915 | ||
225 | |||
226 | 0x05: KZ865 | ||
227 | |||
228 | 0x06: RU864 | ||
229 | |||
230 | 0x07: AS923 | ||
231 | |||
232 | 0x08: AS923-1 | ||
233 | |||
234 | 0x09: AS923-2 | ||
235 | |||
236 | 0x0a: AS923-3 | ||
237 | |||
238 | 0x0b: CN470 | ||
239 | |||
240 | 0x0c: EU433 | ||
241 | |||
242 | 0x0d: KR920 | ||
243 | |||
244 | 0x0e: MA869 | ||
245 | |||
246 | |||
247 | (% style="color:#037691" %)**Sub-Band**: | ||
248 | |||
249 | AU915 and US915:value 0x00 ~~ 0x08 | ||
250 | |||
251 | CN470: value 0x0B ~~ 0x0C | ||
252 | |||
253 | Other Bands: Always 0x00 | ||
254 | |||
255 | |||
256 | (% style="color:#037691" %)**Battery Info**: | ||
257 | |||
258 | Check the battery voltage. | ||
259 | |||
260 | Ex1: 0x0B45 = 2885mV | ||
261 | |||
262 | Ex2: 0x0B49 = 2889mV | ||
263 | |||
264 | |||
265 | === 2.3.2 Sensor Data. FPORT~=2 === | ||
266 | |||
267 | |||
268 | Sensor Data is uplink via FPORT=2 | ||
269 | |||
270 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:490px" %) | ||
271 | |=(% style="width: 70px;background-color:#4F81BD;color:white" %)((( | ||
272 | **Size(bytes)** | ||
273 | )))|=(% style="width: 50px;background-color:#4F81BD;color:white" %)2|=(% style="width: 90px;background-color:#4F81BD;color:white" %)2|=(% style="width: 80px;background-color:#4F81BD;color:white" %)2|=(% style="width: 60px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)2|=(% style="width: 90px;background-color:#4F81BD;color:white" %)1 | ||
274 | |(% style="width:99px" %)Value|(% style="width:69px" %)((( | ||
275 | Battery | ||
276 | )))|(% style="width:130px" %)Temperature|(% style="width:82px" %)((( | ||
277 | Humidity | ||
278 | )))|(% style="width:87px" %)Pressure|(% style="width:53px" %)((( | ||
279 | CO2 | ||
280 | )))|(% style="width:53px" %)Alarm flag | ||
281 | |||
282 | **Alarm flag:** | ||
283 | |||
284 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:480px" %) | ||
285 | |=(% style="width: 70px;background-color:#4F81BD;color:white" %)**Size(bit)**|=(% style="width: 90px;background-color:#4F81BD;color:white" %)**[bit7:bit4]**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**bit3**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**bit2**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**bit1**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**bit0** | ||
286 | |(% style="width:99px" %)Value|(% style="width:107px" %)((( | ||
287 | Reserve | ||
288 | )))|(% style="width:81px" %)TEMPL_ flag|(% style="width:82px" %)TEMPH_ flag|(% style="width:87px" %)CO2L_ flag|(% style="width:53px" %)CO2H_ flag | ||
289 | |||
290 | [[image:image-20240112094817-2.png||height="294" width="1148"]] | ||
291 | |||
292 | |||
293 | ==== (% style="color:#4472c4" %)**Battery**(%%) ==== | ||
294 | |||
295 | Sensor Battery Level. | ||
296 | |||
297 | Ex1: 0x0B45 = 2885mV | ||
298 | |||
299 | Ex2: 0x0B49 = 2889mV | ||
300 | |||
301 | |||
302 | ==== (% style="color:#4472c4" %)**Temperature**(%%) ==== | ||
303 | |||
304 | **Example**: | ||
305 | |||
306 | If payload is: 0105H: (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree | ||
307 | |||
308 | If payload is: FF3FH : (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees. | ||
309 | |||
310 | (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative) | ||
311 | |||
312 | |||
313 | ==== (% style="color:#4472c4" %)**Humidity**(%%) ==== | ||
314 | |||
315 | Read:0x(018F)=399 Value: 399 / 10=39.9, So 39.9% | ||
316 | |||
317 | |||
318 | (% style="color:#4472c4" %)**Pressure** | ||
319 | |||
320 | **Example**: | ||
321 | |||
322 | If payload is: 279BH, Pressure = 279BH /10 = 1013.9 hPa | ||
323 | |||
324 | |||
325 | ==== (% style="color:#4472c4" %)**CO2**(%%) ==== | ||
326 | |||
327 | **Example**: | ||
328 | |||
329 | If payload is: 01FDH, CO2 = 01FDH= 509ppm | ||
330 | |||
331 | |||
332 | ==== (% style="color:#4472c4" %)**Alarm flag**(%%) ==== | ||
333 | |||
334 | TEMPH_flag: When it is True, the actual temperature exceeds the set alarm temperature. | ||
335 | |||
336 | TEMPL_flag: When it is True, the actual temperature lower than the set alarm temperature. | ||
337 | |||
338 | CO2H_flag: When it is True, the actual CO2 concentration exceeds the set alarm CO2 concentration. | ||
339 | |||
340 | CO2L_flag: When it is True, the actual CO2 concentration lower than the set alarm CO2 concentration. | ||
341 | |||
342 | **Example**: | ||
343 | |||
344 | AT+TEMPALARM=25,60 ~-~-~-~-~-~-> temperature: 23.1, TEMPH_flag: "False", TEMPL_flag: "True" | ||
345 | |||
346 | AT+CO2ALARM=400,2000 ~-~-~-~-~-~-> co2: 2368, CO2H_flag:"True", CO2L_flag:"False" | ||
347 | |||
348 | |||
349 | |||
350 | == 2.4 Payload Decoder file == | ||
351 | |||
352 | |||
353 | In TTN, user can add a custom payload so it shows friendly reading | ||
354 | |||
355 | In the page (% style="color:#037691" %)**Applications ~-~-> Payload Formats ~-~-> Custom ~-~-> decoder**(%%) to add the decoder from: | ||
356 | |||
357 | [[https:~~/~~/github.com/dragino/dragino-end-node-decoder/tree/main>>https://github.com/dragino/dragino-end-node-decoder/tree/main/AQS01-L]] | ||
358 | |||
359 | |||
360 | == 2.5 Datalog Feature == | ||
361 | |||
362 | |||
363 | Datalog Feature is to ensure IoT Server can get all sampling data from AQS01-L even if the LoRaWAN network is down. For each sampling, AQS01-L will store the reading for future retrieving purposes. | ||
364 | |||
365 | |||
366 | === 2.5.1 Ways to get datalog via LoRaWAN === | ||
367 | |||
368 | |||
369 | Set PNACKMD=1, AQS01-L will wait for ACK for every uplink, when there is no LoRaWAN network,AQS01-L will mark these records with non-ack messages and store the sensor data, and it will send all messages (10s interval) after the network recovery. | ||
370 | |||
371 | * ((( | ||
372 | a) AQS01-L will do an ACK check for data records sending to make sure every data arrive server. | ||
373 | ))) | ||
374 | * ((( | ||
375 | b) AQS01-L will send data in **CONFIRMED Mode** when PNACKMD=1, but AQS01-L won't re-transmit the packet if it doesn't get ACK, it will just mark it as a NONE-ACK message. In a future uplink if AQS01-L gets a ACK, AQS01-L will consider there is a network connection and resend all NONE-ACK messages. | ||
376 | |||
377 | |||
378 | ))) | ||
379 | |||
380 | === 2.5.2 Unix TimeStamp === | ||
381 | |||
382 | |||
383 | **AQS01-L uses Unix TimeStamp format based on** | ||
384 | |||
385 | |||
386 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/WebHome/image-20220523001219-11.png?width=627&height=97&rev=1.1||alt="图片-20220523001219-11.png" height="97" width="627"]] | ||
387 | |||
388 | User can get this time from link: [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] : | ||
389 | |||
390 | Below is the converter example | ||
391 | |||
392 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/WebHome/image-20220523001219-12.png?width=720&height=298&rev=1.1||alt="图片-20220523001219-12.png" height="298" width="720"]] | ||
393 | |||
394 | |||
395 | So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25 | ||
396 | |||
397 | |||
398 | === 2.5.3 Set Device Time === | ||
399 | |||
400 | |||
401 | User need to set (% style="color:blue" %)**SYNCMOD=1**(%%) to enable sync time via MAC command. | ||
402 | |||
403 | Once AQS01-L Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to AQS01-L. If AQS01-L fails to get the time from the server, AQS01-L will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days). | ||
404 | |||
405 | (% style="color:red" %)**Note: LoRaWAN Server need to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature, Chirpstack,TTN V3 and loriot support but TTN v2 doesn't support. If server doesn't support this command, it will through away uplink packet with this command, so user will lose the packet with time request for TTN v2 if SYNCMOD=1.** | ||
406 | |||
407 | |||
408 | === 2.5.4 Datalog Uplink payload (FPORT~=3) === | ||
409 | |||
410 | |||
411 | The Datalog uplinks will use below payload format. | ||
412 | |||
413 | **Retrieval data payload:** | ||
414 | |||
415 | (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:500px" %) | ||
416 | |=(% style="width: 60px;background-color:#4F81BD;color:white" %)((( | ||
417 | **Size(bytes)** | ||
418 | )))|=(% style="width: 40px; background-color:#4F81BD;color:white" %)**2**|=(% style="width: 55px; background-color:#4F81BD;color:white" %)**2**|=(% style="width: 65px; background-color:#4F81BD;color:white" %)**2**|=(% style="width: 180px; background-color:#4F81BD;color:white" %)**1**|=(% style="width: 100px; background-color:#4F81BD;color:white" %)**4** | ||
419 | |(% style="width:103px" %)Value|(% style="width:68px" %)((( | ||
420 | CO2 | ||
421 | )))|(% style="width:104px" %)((( | ||
422 | ((( | ||
423 | Humidity | ||
424 | ))) | ||
425 | |||
426 | ((( | ||
427 | |||
428 | ))) | ||
429 | )))|(% style="width:87px" %)((( | ||
430 | Temperature | ||
431 | )))|(% style="width:178px" %)((( | ||
432 | Poll message flag | ||
433 | )))|(% style="width:137px" %)Unix Time Stamp | ||
434 | |||
435 | **Poll message flag :** | ||
436 | |||
437 | |||
438 | [[image:image-20240112095124-3.png||height="101" width="483"]] | ||
439 | |||
440 | **No ACK Message**: 1: This message means this payload is fromn Uplink Message which doesn't get ACK from the server before ( for **PNACKMD=1** feature) | ||
441 | |||
442 | **Poll Message Flag**: 1: This message is a poll message reply. | ||
443 | |||
444 | * Poll Message Flag is set to 1. | ||
445 | |||
446 | * Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands. | ||
447 | |||
448 | For example, in US915 band, the max payload for different DR is: | ||
449 | |||
450 | **a) DR0:** max is 11 bytes so one entry of data | ||
451 | |||
452 | **b) DR1:** max is 53 bytes so devices will upload 4 entries of data (total 44 bytes) | ||
453 | |||
454 | **c) DR2:** total payload includes 11 entries of data | ||
455 | |||
456 | **d) DR3: **total payload includes 22 entries of data. | ||
457 | |||
458 | If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0 | ||
459 | |||
460 | **Example:** | ||
461 | |||
462 | If AQS01-L has below data inside Flash: | ||
463 | |||
464 | |||
465 | [[image:image-20240112095403-4.png||height="278" width="523"]] | ||
466 | |||
467 | If user sends below downlink command: 3165A010F865A015E405 | ||
468 | |||
469 | Where : Start time: 65A010F8 = time 24/1/11 16:02:00 | ||
470 | |||
471 | Stop time: 65A015E4 = time 24/1/11 16:23:00 | ||
472 | |||
473 | |||
474 | **AQS01-L will uplink this payload.** | ||
475 | |||
476 | [[image:image-20240112101407-1.png||height="244" width="1092"]] | ||
477 | |||
478 | |||
479 | //**01E401A400F14065A0112E**//01CE01A500F14065A0114F01C401A400F14065A0118A02EC01B300F24065A0138202F001B100F34065A013F4023801AD00F24065A0143302EB01BC00F24065A014D603D701B900F14065A015D3 | ||
480 | |||
481 | |||
482 | Where the first 11 bytes is for the first entry: 01 E4 01 A4 00 F1 40 65 A0 11 2E | ||
483 | |||
484 | * **CO2**=0x01E4=484 ppm | ||
485 | * **Hum**=0x01A4/10=42 % | ||
486 | * **Temp**=0x00F1/10=24.1 ℃ | ||
487 | * **poll message flag **=0x40,means reply data,sampling uplink message. | ||
488 | * **Unix time** is 0x65A0112E=1704888040s=24/1/11 16:02:54 | ||
489 | |||
490 | (% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5); display:none" tabindex="-1" %)[[image:data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==||alt="数据 URI 图片" data-widget="image" draggable="true" height="15" role="presentation" title="单击并拖动以移动" width="15"]](% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220, 220, 220, 0.5); display:none" tabindex="-1" %)[[image:data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==||alt="数据 URI 图片" draggable="true" height="15" role="presentation" title="单击并拖动以移动" width="15"]](% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5); display:none" tabindex="-1" title="单击并拖动以调整大小" %)的(% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5); display:none" tabindex="-1" %)[[image:data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==||alt="数据 URI 图片" data-widget="image" draggable="true" height="15" role="presentation" title="单击并拖动以移动" width="15"]](% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220, 220, 220, 0.5); display:none" tabindex="-1" %)[[image:data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==||alt="数据 URI 图片" draggable="true" height="15" role="presentation" title="单击并拖动以移动" width="15"]](% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5); display:none" tabindex="-1" title="单击并拖动以调整大小" %)的 | ||
491 | |||
492 | == 2.6 Frequency Plans == | ||
493 | |||
494 | |||
495 | The AQS01-L uses OTAA mode and below frequency plans by default. Each frequency band use different firmware, user update the firmware to the corresponding band for their country. | ||
496 | |||
497 | [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]] | ||
498 | |||
499 | |||
500 | == 2.7 Firmware Change Log == | ||
501 | |||
502 | |||
503 | **Firmware download link: **[[https:~~/~~/www.dropbox.com/scl/fo/o5v6j7qewlks12eso98kl/h?rlkey=v1ian3hmva65924j4h4n0yfz8&dl=0>>https://www.dropbox.com/scl/fo/o5v6j7qewlks12eso98kl/h?rlkey=v1ian3hmva65924j4h4n0yfz8&dl=0]] | ||
504 | |||
505 | |||
506 | = 3. Configure AQS01-L = | ||
507 | |||
508 | == 3.1 Configure Methods == | ||
509 | |||
510 | |||
511 | AQS01-L supports below configure method: | ||
512 | |||
513 | * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]]. | ||
514 | * AT Command via UART Connection : See [[UART Connection>>http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.6A0UARTConnectionforAQS01-Lmotherboard]]. | ||
515 | * LoRaWAN Downlink. Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section. | ||
516 | |||
517 | == 3.2 General Commands == | ||
518 | |||
519 | |||
520 | These commands are to configure: | ||
521 | |||
522 | * General system settings like: uplink interval. | ||
523 | * LoRaWAN protocol & radio related command. | ||
524 | |||
525 | They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki: | ||
526 | |||
527 | [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/]] | ||
528 | |||
529 | |||
530 | == 3.3 Commands special design for AQS01-L == | ||
531 | |||
532 | |||
533 | These commands only valid for AQS01-L, as below: | ||
534 | |||
535 | |||
536 | === 3.3.1 Set Transmit Interval Time === | ||
537 | |||
538 | |||
539 | Feature: Change LoRaWAN End Node Transmit Interval. | ||
540 | |||
541 | (% style="color:blue" %)**AT Command: AT+TDC** | ||
542 | |||
543 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) | ||
544 | |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 137px;background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response** | ||
545 | |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|((( | ||
546 | 30000 | ||
547 | OK | ||
548 | the interval is 30000ms = 30s | ||
549 | ))) | ||
550 | |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|((( | ||
551 | OK | ||
552 | Set transmit interval to 60000ms = 60 seconds | ||
553 | ))) | ||
554 | |||
555 | (% style="color:blue" %)**Downlink Command: 0x01** | ||
556 | |||
557 | Format: Command Code (0x01) followed by 3 bytes time value. | ||
558 | |||
559 | If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01. | ||
560 | |||
561 | * Example 1: Downlink Payload: 0100001E ~/~/ Set Transmit Interval (TDC) = 30 seconds | ||
562 | * Example 2: Downlink Payload: 0100003C ~/~/ Set Transmit Interval (TDC) = 60 seconds | ||
563 | |||
564 | === 3.3.2 Get Device Status === | ||
565 | |||
566 | |||
567 | Send a LoRaWAN downlink to ask device send Alarm settings. | ||
568 | |||
569 | (% style="color:blue" %)**Downlink Payload: **(%%)0x26 01 | ||
570 | |||
571 | Sensor will upload Device Status via FPORT=5. See payload section for detail. | ||
572 | |||
573 | |||
574 | === 3.3.3 Set Temperature Alarm Threshold === | ||
575 | |||
576 | |||
577 | * (% style="color:blue" %)**AT Command:** | ||
578 | |||
579 | (% style="color:#037691" %)**AT+TEMPALARM=min,max (Among them, 100 is an invalid value, which means not set)** | ||
580 | |||
581 | * When min=100, and max≠100, Alarm higher than max | ||
582 | * When min≠100, and max=100, Alarm lower than min | ||
583 | * When min≠100 and max≠100, Alarm higher than max or lower than min | ||
584 | |||
585 | Example: | ||
586 | |||
587 | AT+TEMPALARM=100,30 ~/~/ Alarm when temperature higher than 30. | ||
588 | |||
589 | * (% style="color:blue" %)**Downlink Payload:** | ||
590 | |||
591 | (% style="color:#037691" %)**0x(0C 01 64 1E)** (%%) ~/~/ Set AT+TEMPALARM=100,30 | ||
592 | |||
593 | (% style="color:red" %)**(note: 3^^rd^^ byte= 0x64 for low limit(not set), 4^^th^^ byte = 0x1E for high limit: 30)** | ||
594 | |||
595 | |||
596 | === 3.3.4 Set CO2 Alarm Threshold === | ||
597 | |||
598 | |||
599 | * (% style="color:blue" %)**AT Command:** | ||
600 | |||
601 | (% style="color:#037691" %)**AT+CO2ALARM=min,max (Among them, 0 is an invalid value, which means not set)** | ||
602 | |||
603 | * When min=0, and max≠0, Alarm higher than max | ||
604 | * When min≠0, and max=0, Alarm lower than min | ||
605 | * When min≠0 and max≠0, Alarm higher than max or lower than min | ||
606 | |||
607 | Example: | ||
608 | |||
609 | AT+CO2ALARM=400,0 ~/~/ Alarm when humidity lower than 400. | ||
610 | |||
611 | * (% style="color:blue" %)**Downlink Payload:** | ||
612 | |||
613 | (% style="color:#037691" %)**0x(0C 02 01 90 00 00)**(%%) ~/~/ Set AT+CO2ALARM=400,0 | ||
614 | |||
615 | (% style="color:red" %)**(note: 3^^rd^^ byte+4^^rd^^ byte= 0x0190 for low limit (400ppm), 5^^th^^ byte+6^^rd^^ byte = 0x00 for high limit (not set))** | ||
616 | |||
617 | |||
618 | === 3.3.5 Set Alarm Interval === | ||
619 | |||
620 | |||
621 | The shortest time of two Alarm packet. (unit: min) | ||
622 | |||
623 | * (% style="color:blue" %)**AT Command:** | ||
624 | |||
625 | (% style="color:#037691" %)**AT+ATDC=20** (%%) ~/~/ The shortest interval of two Alarm packets is 20 minutes, Means if there is an alarm packet uplink, there won't be another one in the next 20 minutes. | ||
626 | |||
627 | * (% style="color:blue" %)**Downlink Payload:** | ||
628 | |||
629 | (% style="color:#037691" %)**0x(0D 14)**(%%) **~-~--> ** Set AT+ATDC=0x 14 = 20 minutes | ||
630 | |||
631 | |||
632 | === 3.3.6 Set Time Sync Mode === | ||
633 | |||
634 | |||
635 | Feature: Enable/Disable Sync system time via LoRaWAN MAC Command (DeviceTimeReq), LoRaWAN server must support v1.0.3 protocol to reply to this command. | ||
636 | |||
637 | SYNCMOD is set to 1 by default. If user wants to set a different time from the LoRaWAN server, the user needs to set this to 0. | ||
638 | |||
639 | (% style="color:blue" %)**AT Command:** | ||
640 | |||
641 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:500px" %) | ||
642 | |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 288px; background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 57px;background-color:#4F81BD;color:white" %)**Response** | ||
643 | |(% style="width:155px" %)((( | ||
644 | AT+SYNCMOD=1 | ||
645 | )))|(% style="width:259px" %)((( | ||
646 | Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) The default is zero time zone. | ||
647 | )))|(% style="width:44px" %)((( | ||
648 | OK | ||
649 | ))) | ||
650 | |(% style="width:155px" %)((( | ||
651 | AT+SYNCMOD=1,8 | ||
652 | )))|(% style="width:259px" %)((( | ||
653 | Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) Set to East eight time zone. | ||
654 | )))|(% style="width:44px" %)((( | ||
655 | OK | ||
656 | ))) | ||
657 | |(% style="width:155px" %)AT+SYNCMOD=1,-12|(% style="width:259px" %)Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) Set to West Twelve Time Zone.|(% style="width:44px" %)OK | ||
658 | |||
659 | (% style="color:blue" %)**Downlink Command:** | ||
660 | |||
661 | 0x28 01 ~/~/ Same As AT+SYNCMOD=1 | ||
662 | |||
663 | 0x28 01 08 ~/~/ Same As AT+SYNCMOD=1,8 | ||
664 | |||
665 | 0x28 01 F4 ~/~/ Same As AT+SYNCMOD=1,-12 | ||
666 | |||
667 | 0x28 00 ~/~/ Same As AT+SYNCMOD=0 | ||
668 | |||
669 | |||
670 | === 3.3.7 Request the server to send an ACK === | ||
671 | |||
672 | |||
673 | (% style="color:blue" %)**AT Command: AT+PNACKMD** | ||
674 | |||
675 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) | ||
676 | |=(% style="width: 160px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 293px; background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 57px;background-color:#4F81BD;color:white" %)**Response** | ||
677 | |(% style="width:155px" %)AT+PNACKMD=1|(% style="width:253px" %)If the node uploads the ACK as confirm, it will request the server to send an ACK. If the server ack is not received, the node will upload the packets that have not received the ACK the next time it receives the ACK|(% style="width:100px" %)1((( | ||
678 | OK | ||
679 | ))) | ||
680 | |(% style="width:155px" %)AT+PNACKMD=0|(% style="width:253px" %)off request the server to send an ACK|(% style="width:100px" %)((( | ||
681 | 0 | ||
682 | OK | ||
683 | ))) | ||
684 | |||
685 | (% style="color:blue" %)**Downlink Command: 0x34** | ||
686 | |||
687 | 0X34 01 ~/~/Same As AT+PNACKMD=1 | ||
688 | |||
689 | 0x34 00 ~/~/Same As AT+PNACKMD=0 | ||
690 | |||
691 | |||
692 | = 4. Battery & Power Consumption = | ||
693 | |||
694 | == 4.1 Battery Life == | ||
695 | |||
696 | |||
697 | In a normal 20 minutes uplink situation , the battery life can last from 2 ~~ 8 years depends on signal environment. The Alarm feature will reduce the battery life a lot . | ||
698 | |||
699 | See below link for detail information about the battery life calculation. | ||
700 | |||
701 | [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] . | ||
702 | |||
703 | |||
704 | == 4.2 Replace Battery == | ||
705 | |||
706 | |||
707 | AQS01-L uses an ER18505 battery. If the battery is running out, User can purchase an ER18505 battery and replace. Make sure don't mess the + & - position. | ||
708 | |||
709 | [[image:image-20240108140200-1.png||height="503" width="803"]] | ||
710 | |||
711 | |||
712 | = 5. OTA Firmware update = | ||
713 | |||
714 | |||
715 | (% class="wikigeneratedid" %) | ||
716 | User can change firmware AQS01-L to: | ||
717 | |||
718 | * Change Frequency band/ region. | ||
719 | * Update with new features. | ||
720 | * Fix bugs. | ||
721 | |||
722 | Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/scl/fo/o5v6j7qewlks12eso98kl/h?rlkey=v1ian3hmva65924j4h4n0yfz8&dl=0]]** | ||
723 | |||
724 | |||
725 | Methods to Update Firmware: | ||
726 | |||
727 | * (Recommanded way) OTA firmware update via wireless : **[[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/]]** | ||
728 | * Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.6A0UARTConnectionforAQS01-Lmotherboard]]**. | ||
729 | |||
730 | = 6. FAQ = | ||
731 | |||
732 | == 6.1 Do i need to calibrate the CO2 reading of AQS01-L? == | ||
733 | |||
734 | |||
735 | The Operating principle for CO2 measurement used in AQS01-L is Non-dispersive infrared (NDIR). There is no need Calibration for this method. | ||
736 | |||
737 | |||
738 | = 7. Order Info = | ||
739 | |||
740 | |||
741 | Part Number: (% style="color:blue" %)**AQS01-L-XX** | ||
742 | |||
743 | (% style="color:red" %)**XX**(%%): The default frequency band | ||
744 | |||
745 | * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band | ||
746 | |||
747 | * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band | ||
748 | |||
749 | * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band | ||
750 | |||
751 | * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band | ||
752 | |||
753 | * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band | ||
754 | |||
755 | * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band | ||
756 | |||
757 | * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band | ||
758 | |||
759 | * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band | ||
760 | |||
761 | = 8. Packing Info = | ||
762 | |||
763 | |||
764 | (% style="color:#037691" %)**Package Includes**: | ||
765 | |||
766 | * AQS01-L LoRaWAN Indoor CO2 Sensor | ||
767 | |||
768 | (% style="color:#037691" %)**Dimension and weight**: | ||
769 | |||
770 | * Device Size: cm | ||
771 | |||
772 | * Device Weight: g | ||
773 | |||
774 | * Package Size / pcs : cm | ||
775 | |||
776 | * Weight / pcs : g | ||
777 | |||
778 | = 9. Support = | ||
779 | |||
780 | |||
781 | * 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. | ||
782 | |||
783 | * 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>>mailto:Support@dragino.cc]]. |