Wiki source code of TC01-LB/TC11-LB -- LoRaWAN Thermocouple Converter User Manual
Last modified by Xiaoling on 2024/03/11 09:40
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | |||
2 | |||
3 | (% style="text-align:center" %) | ||
4 | [[image:image-20240117163402-3.png]] | ||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
11 | |||
12 | |||
13 | **Table of Contents:** | ||
14 | |||
15 | {{toc/}} | ||
16 | |||
17 | |||
18 | |||
19 | |||
20 | |||
21 | |||
22 | = 1. Introduction = | ||
23 | |||
24 | == 1.1 What is LoRaWAN Thermocouple Converter == | ||
25 | |||
26 | |||
27 | The Dragino TC01/TC11-LB is a (% style="color:blue" %)**LoRaWAN Thermocouple Converter**(%%) for Internet of Things solution. It is used to (% style="color:blue" %)**measure the industrial environment temperature**(%%) , and then upload to IoT server via LoRaWAN network. | ||
28 | |||
29 | The TC11-LB used in K-Type thermocouple can (% style="color:blue" %)**measure -50°C ~~ 200°C**(%%). TC01-LB is(% style="color:blue" %)** with 2 open wire**(%%) so user can connect a 3rd party K, J, N, R,S T, E, or B type thermocouple. | ||
30 | |||
31 | TC01/TC11-LB supports (% style="color:blue" %)**temperature alarm feature**(%%), user can set temperature alarm for instant notice. TC01/TC11-LB supports (% style="color:blue" %)**Datalog feature**(%%), It will record the data when there is no network coverage and users can retrieve the sensor value later to ensure no miss for every sensor reading. | ||
32 | |||
33 | TC01/TC11-LB (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use. | ||
34 | |||
35 | TC01/TC11-LB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%) , it is designed for long-term use up to several years. | ||
36 | |||
37 | Each TC01/TC11-LB is pre-load with a set of unique keys for LoRaWAN registrations, register these keys to local LoRaWAN server and it will auto connect after power on. | ||
38 | |||
39 | |||
40 | == 1.2 Features == | ||
41 | |||
42 | |||
43 | * LoRaWAN 1.0.3 Class A | ||
44 | * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865 | ||
45 | * Ultra-low power consumption | ||
46 | * K Type Thermocouple (-50 ~~ 200°C) (For model TC11) | ||
47 | * 2 wire to 3rd party Thermocouple (For model TC01) | ||
48 | * Temperature alarm | ||
49 | * Datalog Feature | ||
50 | * Support Bluetooth v5.1 and LoRaWAN remote configure | ||
51 | * Support wireless OTA update firmware | ||
52 | * Uplink on periodically | ||
53 | * Downlink to change configure | ||
54 | * 8500mAh Li/SOCl2 Battery | ||
55 | |||
56 | == 1.3 Specification == | ||
57 | |||
58 | |||
59 | (% style="color:#037691" %)**Common DC Characteristics:** | ||
60 | |||
61 | * Supply Voltage: Built-in Battery , 2.5v ~~ 3.6v | ||
62 | * Operating Temperature: -40 ~~ 85°C | ||
63 | |||
64 | (% style="color:#037691" %)**LoRa Spec:** | ||
65 | |||
66 | * Frequency Range, Band 1 (HF): 862 ~~ 1020 Mhz | ||
67 | * Max +22 dBm constant RF output vs. | ||
68 | * RX sensitivity: down to -139 dBm. | ||
69 | * Excellent blocking immunity | ||
70 | |||
71 | (% style="color:#037691" %)**Battery:** | ||
72 | |||
73 | * Li/SOCI2 un-chargeable battery | ||
74 | * Capacity: 8500mAh | ||
75 | * Self-Discharge: <1% / Year @ 25°C | ||
76 | * Max continuously current: 130mA | ||
77 | * Max boost current: 2A, 1 second | ||
78 | |||
79 | (% style="color:#037691" %)**Power Consumption** | ||
80 | |||
81 | * Sleep Mode: 5uA @ 3.3v | ||
82 | * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm | ||
83 | |||
84 | |||
85 | == 1.4 Hardware Variants == | ||
86 | |||
87 | |||
88 | (% border="1" cellspacing="3" style="width:510px" %) | ||
89 | |=(% style="width: 90px;background-color:#4F81BD;color:white" %)Model|=(% style="width: 170px; background-color:#4F81BD;color: white;" %)Photo|=(% style="width: 250px; background-color:#4F81BD;color: white;" %)Probe Info | ||
90 | |(% style="width:102px" %)**TC01-LB**|(% style="width:225px" %)((( | ||
91 | [[image:11.png||height="169" width="112"]] | ||
92 | )))|(% style="width:329px" %)((( | ||
93 | 2 open wire for user to connect 3rd | ||
94 | |||
95 | Thermocouple | ||
96 | ))) | ||
97 | |(% style="width:102px" %)**TC11-LB**|(% style="width:225px" %)((( | ||
98 | [[image:12.png||height="175" width="174"]] | ||
99 | )))|(% style="width:329px" %)((( | ||
100 | K Type Thermocouple (-50 ~~ 200°C). | ||
101 | |||
102 | 2 meters | ||
103 | ))) | ||
104 | |||
105 | == 1.5 Sleep mode and working mode == | ||
106 | |||
107 | |||
108 | (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any LoRaWAN activate. This mode is used for storage and shipping to save battery life. | ||
109 | |||
110 | (% 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. | ||
111 | |||
112 | |||
113 | == 1.6 Button & LEDs == | ||
114 | |||
115 | |||
116 | [[image:image-20240117164902-4.png]] | ||
117 | |||
118 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
119 | |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 226px;background-color:#4F81BD;color:white" %)**Action** | ||
120 | |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)((( | ||
121 | If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once. | ||
122 | Meanwhile, BLE module will be active and user can connect via BLE to configure device. | ||
123 | ))) | ||
124 | |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)((( | ||
125 | (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network. | ||
126 | (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network. | ||
127 | Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device join or not join LoRaWAN network. | ||
128 | ))) | ||
129 | |(% style="width:167px" %)Fast press ACT 5 times.|(% style="width:117px" %)Deactivate Device|(% style="width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means device is in Deep Sleep Mode. | ||
130 | |||
131 | == 1.7 BLE connection == | ||
132 | |||
133 | |||
134 | TC01/TC11-LB support BLE remote configure. | ||
135 | |||
136 | |||
137 | 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: | ||
138 | |||
139 | * Press button to send an uplink | ||
140 | * Press button to active device. | ||
141 | * Device Power on or reset. | ||
142 | |||
143 | If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode. | ||
144 | |||
145 | |||
146 | == 1.8 Pin Definitions == | ||
147 | |||
148 | [[image:http://8.211.40.43/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20230610163213-1.png?width=699&height=404&rev=1.1||alt="image-20230610163213-1.png"]] | ||
149 | |||
150 | |||
151 | == 1.9 Mechanical == | ||
152 | |||
153 | [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143884058-338.png]] | ||
154 | |||
155 | |||
156 | [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143899218-599.png]] | ||
157 | |||
158 | |||
159 | [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143909447-639.png]] | ||
160 | |||
161 | |||
162 | == 1.10 Connect a Thermocouple to TC01-LB == | ||
163 | |||
164 | TC01-LB by default only have two wires and doesn't have any Thermocouple, | ||
165 | |||
166 | a) User need to solder a Thermocouple to the two wires for connection. | ||
167 | |||
168 | b) User need to set the Thermocouple Type as per [[Set Thermocouple Type>>||anchor="H3.3.3SettheThermocoupleType"]] . | ||
169 | |||
170 | There are two Solder Seal Sleeves which is provide for easy soldering with Thermocouple | ||
171 | |||
172 | [[image:image-20240310210434-1.png]] | ||
173 | |||
174 | |||
175 | = 2. Configure TC01/TC11-LB to connect to LoRaWAN network = | ||
176 | |||
177 | == 2.1 How it works == | ||
178 | |||
179 | |||
180 | The TC01/TC11-LB 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 TC01/TC11-LB. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes. | ||
181 | |||
182 | |||
183 | == 2.2 Quick guide to connect to LoRaWAN server (OTAA) == | ||
184 | |||
185 | |||
186 | 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. | ||
187 | |||
188 | 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. | ||
189 | |||
190 | [[image:image-20240117173131-6.png||height="414" width="843"]] | ||
191 | |||
192 | (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from TC01/TC11-LB. | ||
193 | |||
194 | Each TC01/TC11-LB is shipped with a sticker with the default device EUI as below: | ||
195 | |||
196 | [[image:image-20230426084152-1.png||alt="图片-20230426084152-1.png" height="233" width="502"]] | ||
197 | |||
198 | |||
199 | You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot: | ||
200 | |||
201 | |||
202 | (% style="color:blue" %)**Register the device** | ||
203 | |||
204 | [[image:image-20240226144157-1.png||height="738" width="829"]] | ||
205 | |||
206 | |||
207 | (% style="color:blue" %)**Add DEV EUI and APP KEY** | ||
208 | |||
209 | [[image:image-20240226144412-2.png||height="595" width="862"]] | ||
210 | |||
211 | |||
212 | (% style="color:blue" %)**Step 2:**(%%) Activate on TC01/TC11-LB | ||
213 | |||
214 | |||
215 | Press the button for 5 seconds to activate the TC01/TC11-LB. | ||
216 | |||
217 | (% 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. | ||
218 | |||
219 | After join success, it will start to upload messages to TTN and you can see the messages in the panel. | ||
220 | |||
221 | |||
222 | == 2.3 Uplink Payload == | ||
223 | |||
224 | === 2.3.1 Device Status, FPORT~=5 === | ||
225 | |||
226 | |||
227 | Users can use the downlink command(**0x26 01**) to ask TC01/TC11-LB to send device configure detail, include device configure status. TC01/TC11-LB will uplink a payload via FPort=5 to server. | ||
228 | |||
229 | The Payload format is as below. | ||
230 | |||
231 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
232 | |(% colspan="6" style="background-color:#4f81bd; color:white" %)**Device Status (FPORT=5)** | ||
233 | |(% style="width:103px" %)**Size (bytes)**|(% style="width:72px" %)**1**|**2**|(% style="width:91px" %)**1**|(% style="width:86px" %)**1**|(% style="width:44px" %)**2** | ||
234 | |(% 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 | ||
235 | |||
236 | Example parse in TTNv3 | ||
237 | |||
238 | [[image:image-20240226144941-3.png||height="250" width="1335"]] | ||
239 | |||
240 | |||
241 | (% style="color:#037691" %)**Sensor Model**(%%): For TC01/TC11-LB, this value is 0x0A | ||
242 | |||
243 | (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version | ||
244 | |||
245 | (% style="color:#037691" %)**Frequency Band**: | ||
246 | |||
247 | 0x01: EU868 | ||
248 | |||
249 | 0x02: US915 | ||
250 | |||
251 | 0x03: IN865 | ||
252 | |||
253 | 0x04: AU915 | ||
254 | |||
255 | 0x05: KZ865 | ||
256 | |||
257 | 0x06: RU864 | ||
258 | |||
259 | 0x07: AS923 | ||
260 | |||
261 | 0x08: AS923-1 | ||
262 | |||
263 | 0x09: AS923-2 | ||
264 | |||
265 | 0x0a: AS923-3 | ||
266 | |||
267 | 0x0b: CN470 | ||
268 | |||
269 | 0x0c: EU433 | ||
270 | |||
271 | 0x0d: KR920 | ||
272 | |||
273 | 0x0e: MA869 | ||
274 | |||
275 | |||
276 | (% style="color:#037691" %)**Sub-Band**: | ||
277 | |||
278 | AU915 and US915:value 0x00 ~~ 0x08 | ||
279 | |||
280 | CN470: value 0x0B ~~ 0x0C | ||
281 | |||
282 | Other Bands: Always 0x00 | ||
283 | |||
284 | |||
285 | (% style="color:#037691" %)**Battery Info**: | ||
286 | |||
287 | Check the battery voltage. | ||
288 | |||
289 | Ex1: 0x0B45 = 2885mV | ||
290 | |||
291 | Ex2: 0x0B49 = 2889mV | ||
292 | |||
293 | |||
294 | === 2.3.2 Sensor Data. FPORT~=2 === | ||
295 | |||
296 | |||
297 | Sensor Data is uplink via FPORT=2 | ||
298 | |||
299 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
300 | |=(% style="width: 60px;background-color:#4F81BD;color:white" %)((( | ||
301 | **Size(bytes)** | ||
302 | )))|=(% style="width: 59px; background-color:#4F81BD; color: white;" %)2|=(% style="width: 49px; background-color:#4F81BD; color: white;" %)1|=(% style="width: 65px; background-color:#4F81BD; color: white;" %)2|=(% colspan="2" rowspan="1" style="width: 132px; background-color:#4F81BD; color: white;" %)1|=(% style="width: 98px; background-color:#4F81BD; color: white;" %)4 | ||
303 | |(% style="width:99px" %)Value|(% style="width:59px" %)((( | ||
304 | Battery | ||
305 | )))|(% style="width:49px" %)Type|(% style="width:65px" %)((( | ||
306 | TempC | ||
307 | )))|(% colspan="2" rowspan="1" style="width:132px" %)((( | ||
308 | Interrupt flag & Interrupt Level & TEMPH flag & TEMPL fag | ||
309 | )))|(% style="width:98px" %)((( | ||
310 | Unix TimeStamp | ||
311 | ))) | ||
312 | |||
313 | [[image:image-20240226145757-4.png||height="346" width="1313"]] | ||
314 | |||
315 | |||
316 | ==== (% style="color:#4472c4" %)**Battery**(%%) ==== | ||
317 | |||
318 | Sensor Battery Level. | ||
319 | |||
320 | Ex1: 0x0B45 = 2885mV | ||
321 | |||
322 | Ex2: 0x0B49 = 2889mV | ||
323 | |||
324 | |||
325 | ==== (% style="color:#4472c4" %)**Type**(%%) ==== | ||
326 | |||
327 | **Thermocouple Type** | ||
328 | |||
329 | 0x00 = B Type | ||
330 | |||
331 | 0x01 = E Type | ||
332 | |||
333 | 0x02 = J Type | ||
334 | |||
335 | 0x03 = K Type (default) | ||
336 | |||
337 | 0x04 = N Type | ||
338 | |||
339 | 0x05 = R Type | ||
340 | |||
341 | 0x06 = S Type | ||
342 | |||
343 | 0x07 = T Type | ||
344 | |||
345 | |||
346 | ==== (% style="color:#4472c4" %)**TempC**(%%) ==== | ||
347 | |||
348 | **Example**: | ||
349 | |||
350 | If payload is: 0105H: (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree | ||
351 | |||
352 | If payload is: FF3FH : (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees. | ||
353 | |||
354 | (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative) | ||
355 | |||
356 | |||
357 | ==== (% style="color:#4472c4" %)**Interrupt flag & Interrupt Level & TEMPH flag & TEMPL fag**(%%) ==== | ||
358 | |||
359 | |||
360 | **Interrupt flag & Interrupt Level:** | ||
361 | |||
362 | This data field shows if this packet is generated by interrupt or not. | ||
363 | |||
364 | Note: The Interrupt Pin refers to the **GPIO_EXTI** pin in the screw terminal. | ||
365 | |||
366 | **Example:** | ||
367 | |||
368 | If byte[5]&0x01=0x00 : Normal uplink packet. | ||
369 | |||
370 | If byte[5]&0x01=0x01 : Interrupt Uplink Packet. | ||
371 | |||
372 | If byte[5]&0x02>>1=0x00 : Interrupt pin low level. | ||
373 | |||
374 | If byte[5]&0x02>>1=0x01 : Interrupt pin high level. | ||
375 | |||
376 | |||
377 | **TEMPH flag & TEMPL fag:** | ||
378 | |||
379 | Temperature alarm flag. | ||
380 | |||
381 | Turn on the alarm mode, the TEMPL fag flag is True when the temperature is below the set minimum value, otherwise it is False. | ||
382 | |||
383 | And the TEMPH fag flag is True when the temperature is higher than the set maximum value, and False otherwise. | ||
384 | |||
385 | |||
386 | == 2.4 Payload Decoder file == | ||
387 | |||
388 | |||
389 | In TTN, use can add a custom payload so it shows friendly reading | ||
390 | |||
391 | In the page (% style="color:#037691" %)**Applications ~-~-> Payload Formats ~-~-> Custom ~-~-> decoder**(%%) to add the decoder from: | ||
392 | |||
393 | [[https:~~/~~/github.com/dragino/dragino-end-node-decoder/tree/main/>>https://github.com/dragino/dragino-end-node-decoder/tree/main/]] | ||
394 | |||
395 | |||
396 | == 2.5 Datalog Feature == | ||
397 | |||
398 | |||
399 | Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, TC01/TC11-LB will store the reading for future retrieving purposes. | ||
400 | |||
401 | |||
402 | === 2.5.1 Ways to get datalog via LoRaWAN === | ||
403 | |||
404 | |||
405 | Set PNACKMD=1, TC01/TC11-LB will wait for ACK for every uplink, when there is no LoRaWAN network, TC01/TC11-LB 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. | ||
406 | |||
407 | * ((( | ||
408 | a) TC01/TC11-LB will do an ACK check for data records sending to make sure every data arrive server. | ||
409 | ))) | ||
410 | * ((( | ||
411 | b) TC01/TC11-LB will send data in **CONFIRMED Mode** when PNACKMD=1, but TC01/TC11-LB 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 TC01/TC11-LB gets a ACK, TC01/TC11-LB will consider there is a network connection and resend all NONE-ACK messages. | ||
412 | ))) | ||
413 | |||
414 | === 2.5.2 Unix TimeStamp === | ||
415 | |||
416 | |||
417 | TC01/TC11-LB uses Unix TimeStamp format based on | ||
418 | |||
419 | [[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"]] | ||
420 | |||
421 | User can get this time from link: [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] : | ||
422 | |||
423 | Below is the converter example | ||
424 | |||
425 | [[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"]] | ||
426 | |||
427 | So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25 | ||
428 | |||
429 | |||
430 | === 2.5.3 Set Device Time === | ||
431 | |||
432 | |||
433 | User need to set (% style="color:blue" %)**SYNCMOD=1**(%%) to enable sync time via MAC command. | ||
434 | |||
435 | Once TC01/TC11-LB Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to TC01/TC11-LB. If TC01/TC11-LB fails to get the time from the server, TC01/TC11-LB will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days). | ||
436 | |||
437 | (% 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 v3 and loriot support but TTN V3 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 V3 v2 if SYNCMOD=1.** | ||
438 | |||
439 | |||
440 | === 2.5.4 Datalog Uplink payload (FPORT~=3) === | ||
441 | |||
442 | |||
443 | The Datalog uplinks will use below payload format. | ||
444 | |||
445 | **Retrieval data payload:** | ||
446 | |||
447 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %) | ||
448 | |=(% style="width: 60px;background-color:#4F81BD;color:white" %)((( | ||
449 | **Size(bytes)** | ||
450 | )))|=(% style="width: 40px; background-color:#4F81BD;color:white" %)**3**|=(% style="width: 55px; background-color:#4F81BD;color:white" %)**1**|=(% 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** | ||
451 | |(% style="width:103px" %)Value|(% style="width:68px" %)((( | ||
452 | ignore | ||
453 | )))|(% style="width:104px" %)((( | ||
454 | ((( | ||
455 | Thermocouple Type | ||
456 | ))) | ||
457 | )))|(% style="width:87px" %)((( | ||
458 | Temperature | ||
459 | )))|(% style="width:178px" %)((( | ||
460 | Poll message flag & Alarm Flag& Level of PA8 | ||
461 | )))|(% style="width:137px" %)Unix Time Stamp | ||
462 | |||
463 | **Poll message flag & Alarm Flag & Level of PA8:** | ||
464 | |||
465 | [[image:image-20230524114302-1.png||height="115" width="736"]] | ||
466 | |||
467 | |||
468 | **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) | ||
469 | |||
470 | **Poll Message Flag**: 1: This message is a poll message reply. | ||
471 | |||
472 | * Poll Message Flag is set to 1. | ||
473 | |||
474 | * Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands. | ||
475 | |||
476 | For example, in US915 band, the max payload for different DR is: | ||
477 | |||
478 | **a) DR0:** max is 11 bytes so one entry of data | ||
479 | |||
480 | **b) DR1:** max is 53 bytes so devices will upload 4 entries of data (total 44 bytes) | ||
481 | |||
482 | **c) DR2:** total payload includes 11 entries of data | ||
483 | |||
484 | **d) DR3: **total payload includes 22 entries of data. | ||
485 | |||
486 | If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0 | ||
487 | |||
488 | **Example:** | ||
489 | |||
490 | If TC01/TC11-LB has below data inside Flash: | ||
491 | |||
492 | [[image:image-20240226150033-5.png||height="408" width="810"]] | ||
493 | |||
494 | |||
495 | If user sends below downlink command: 3165DC452465DC477C05 | ||
496 | |||
497 | Where : Start time: 65DC4524 = time 24/2/26 08:00:36 | ||
498 | |||
499 | Stop time: 65DC477C = time 24/2/26 08:10:36 | ||
500 | |||
501 | |||
502 | **TC01/TC11-LB will uplink this payload.** | ||
503 | |||
504 | [[image:image-20240226162149-6.png||height="368" width="1396"]] | ||
505 | |||
506 | ((( | ||
507 | FFFFFF0308A64265DC454EFFFFFF0308A94265DC458AFFFFFF0308AC4265DC45C6FFFFFF0308AD4365DC45FCFFFFFF0308AC4365DC4604FFFFFF0308B14165DC460CFFFFFF0308AC4165DC4618FFFFFF0308AC4165DC4630FFFFFF0308AC4165DC463AFFFFFF0308A64265DC4642FFFFFF0308AD4165DC464EFFFFFF0308AD4365DC465DFFFFFF0308B24165DC466EFFFFFF0308B14265DC467AFFFFFF0308AD4165DC4690FFFFFF0308AD4265DC46B6FFFFFF0308AC4165DC46CAFFFFFF0308B24265DC46F2FFFFFF0308AC4265DC472EFFFFFF0308A94065DC476A | ||
508 | ))) | ||
509 | |||
510 | ((( | ||
511 | Where the first 11 bytes is for the first entry: | ||
512 | ))) | ||
513 | |||
514 | ((( | ||
515 | FF FF FF 03 08 A6 42 65 DC 45 4E | ||
516 | ))) | ||
517 | |||
518 | ((( | ||
519 | **Thermocouple Type**=0x03=8033=K Type | ||
520 | ))) | ||
521 | |||
522 | ((( | ||
523 | **Temperature**=0x08 A6/100=22.14 | ||
524 | ))) | ||
525 | |||
526 | ((( | ||
527 | **poll message flag & Alarm Flag & Level of PA8**=0x42,means reply data,sampling uplink message,the PA8 is high level. | ||
528 | ))) | ||
529 | |||
530 | ((( | ||
531 | **Unix time** is 0x65DC454E=1708934478s=24/2/26 08:01:18 | ||
532 | ))) | ||
533 | |||
534 | |||
535 | == 2.6 Temperature Alarm Feature == | ||
536 | |||
537 | |||
538 | TC01/TC11-LB work flow with Alarm feature. | ||
539 | |||
540 | |||
541 | [[image:image-20230524110125-3.png||height="768" width="1115"]] | ||
542 | |||
543 | |||
544 | == 2.7 Frequency Plans == | ||
545 | |||
546 | |||
547 | The TC01/TC11-LB 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. | ||
548 | |||
549 | [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]] | ||
550 | |||
551 | |||
552 | == 2.8 Firmware Change Log == | ||
553 | |||
554 | |||
555 | Firmware download link:** **[[https:~~/~~/www.dropbox.com/scl/fo/m2u45ojhxj2kr286m8k42/h?rlkey=qz0jurgao6kl565rsx8k20f9v&dl=0>>https://www.dropbox.com/scl/fo/m2u45ojhxj2kr286m8k42/h?rlkey=qz0jurgao6kl565rsx8k20f9v&dl=0]] | ||
556 | |||
557 | |||
558 | = 3. Configure TC01/TC11-LB = | ||
559 | |||
560 | == 3.1 Configure Methods == | ||
561 | |||
562 | |||
563 | TC01/TC11-LB supports below configure method: | ||
564 | |||
565 | * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]]. | ||
566 | * 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.3UARTConnectionforSN50v3basemotherboard]]. | ||
567 | * LoRaWAN Downlink. Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section. | ||
568 | |||
569 | == 3.2 General Commands == | ||
570 | |||
571 | |||
572 | These commands are to configure: | ||
573 | |||
574 | * General system settings like: uplink interval. | ||
575 | * LoRaWAN protocol & radio related command. | ||
576 | |||
577 | They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki: | ||
578 | |||
579 | [[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/]] | ||
580 | |||
581 | |||
582 | == 3.3 Commands special design for TC01/TC11-LB == | ||
583 | |||
584 | |||
585 | These commands only valid for TC01/TC11-LB, as below: | ||
586 | |||
587 | |||
588 | === 3.3.1 Set Transmit Interval Time === | ||
589 | |||
590 | |||
591 | Feature: Change LoRaWAN End Node Transmit Interval. | ||
592 | |||
593 | (% style="color:blue" %)**AT Command: AT+TDC** | ||
594 | |||
595 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
596 | |=(% 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** | ||
597 | |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|((( | ||
598 | 30000 | ||
599 | OK | ||
600 | the interval is 30000ms = 30s | ||
601 | ))) | ||
602 | |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|((( | ||
603 | OK | ||
604 | Set transmit interval to 60000ms = 60 seconds | ||
605 | ))) | ||
606 | |||
607 | (% style="color:blue" %)**Downlink Command: 0x01** | ||
608 | |||
609 | Format: Command Code (0x01) followed by 3 bytes time value. | ||
610 | |||
611 | If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01. | ||
612 | |||
613 | * Example 1: Downlink Payload: 0100001E ~/~/ Set Transmit Interval (TDC) = 30 seconds | ||
614 | * Example 2: Downlink Payload: 0100003C ~/~/ Set Transmit Interval (TDC) = 60 seconds | ||
615 | |||
616 | === 3.3.2 Get Device Status === | ||
617 | |||
618 | |||
619 | Send a LoRaWAN downlink to ask device send Alarm settings. | ||
620 | |||
621 | (% style="color:blue" %)**Downlink Payload: **(%%)0x26 01 | ||
622 | |||
623 | Sensor will upload Device Status via FPORT=5. See payload section for detail. | ||
624 | |||
625 | |||
626 | === 3.3.3 Set the Thermocouple Type === | ||
627 | |||
628 | |||
629 | Feature: Change the Thermocouple Type. | ||
630 | |||
631 | (% style="color:blue" %)**AT Command: AT+TCTYPE** | ||
632 | |||
633 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
634 | |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 197px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Response** | ||
635 | |(% style="width:154px" %)AT+TCTYPE=?|(% style="width:196px" %)Displays the thermocouple type currently set.|(% style="width:157px" %)3 (default) | ||
636 | OK | ||
637 | |(% style="width:154px" %)AT+TCTYPE=0|(% style="width:196px" %)Set the thermocouple Type to 8030=B Type.|(% style="width:157px" %)OK | ||
638 | |||
639 | |||
640 | |||
641 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:420px" %) | ||
642 | |=(% style="width: 167px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% colspan="2" rowspan="1" style="width: 252px; background-color: rgb(79, 129, 189); color: white;" %)Thermocouple Type | ||
643 | |(% style="width:167px" %)AT+TCTYPE=0|(% colspan="2" rowspan="1" style="width:252px" %) B Type | ||
644 | |(% style="width:167px" %)AT+TCTYPE=1|(% colspan="2" rowspan="1" style="width:252px" %) E Type | ||
645 | |(% style="width:167px" %)AT+TCTYPE=2|(% colspan="2" style="width:252px" %) J Type | ||
646 | |(% style="width:167px" %)AT+TCTYPE=3|(% colspan="2" style="width:252px" %) K Type (default) | ||
647 | |(% style="width:167px" %)AT+TCTYPE=4|(% colspan="2" style="width:252px" %) N Type | ||
648 | |(% style="width:167px" %)AT+TCTYPE=5|(% colspan="2" style="width:252px" %) R Type | ||
649 | |(% style="width:167px" %)AT+TCTYPE=6|(% colspan="2" style="width:252px" %) S Type | ||
650 | |(% style="width:167px" %)AT+TCTYPE=7|(% colspan="2" style="width:252px" %) T Type | ||
651 | |||
652 | (% style="color:blue" %)**Downlink Command: 0x0A** | ||
653 | |||
654 | Format: Command Code (0x0A) followed by 1 bytes. | ||
655 | |||
656 | * Example 1: Downlink Payload: 0A00 **~-~-->** AT+TCTYPE=0 | ||
657 | * Example 2: Downlink Payload: 0A01 **~-~-->** AT+TCTYPE=1 | ||
658 | |||
659 | === 3.3.4 Set the Temperature sensor alarm range === | ||
660 | |||
661 | |||
662 | * (% style="color:blue" %)**AT Command:** | ||
663 | |||
664 | (% style="color:#037691" %)**AT+ARTEMP=min,max** | ||
665 | |||
666 | * When min=0, and max≠0, Alarm higher than max | ||
667 | * When min≠0, and max=0, Alarm lower than min | ||
668 | * When min≠0 and max≠0, Alarm higher than max or lower than min | ||
669 | |||
670 | Example: | ||
671 | |||
672 | AT+SHTEMP=-50,200 ~/~/ Alarm when the temperature is below -50 ° C or above 200 ° C. | ||
673 | |||
674 | * (% style="color:blue" %)**Downlink Payload: ** | ||
675 | |||
676 | (% style="color:#037691" %)**0x(0B 00 01 00 3C)** (%%) ~/~/ Set AT+SHTEMP=1,60 | ||
677 | |||
678 | (% style="color:#037691" %)**0x(0B FF CE 00 C8)** (%%) ~/~/ Set AT+SHTEMP=-50,200 | ||
679 | |||
680 | (% style="color:red" %)**(note: 2^^rd^^ & 3^^rd ^^byte for low limit, 4^^rd^^ & 5^^rd ^^byte for high limit)** | ||
681 | |||
682 | |||
683 | === 3.3.5 Set Alarm Interval === | ||
684 | |||
685 | |||
686 | The shortest time of two Alarm packet. (unit: min) | ||
687 | |||
688 | * (% style="color:blue" %)**AT Command:** | ||
689 | |||
690 | (% style="color:#037691" %)**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. | ||
691 | |||
692 | * (% style="color:blue" %)**Downlink Payload:** | ||
693 | |||
694 | (% style="color:#037691" %)**0x(0C 1E)**(%%) **~-~--> ** Set AT+ATDC=0C 1E = 30 minutes | ||
695 | |||
696 | |||
697 | === 3.3.6 Set Interrupt Mode === | ||
698 | |||
699 | |||
700 | Feature, Set Interrupt mode for PA8 of pin. | ||
701 | |||
702 | When AT+INTMOD=0 is set, PA8 is used as a digital input port. | ||
703 | |||
704 | (% style="color:blue" %)**AT Command: AT+INTMOD** | ||
705 | |||
706 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
707 | |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 197px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Response** | ||
708 | |(% style="width:154px" %)AT+INTMOD=?|(% style="width:196px" %)Show current interrupt mode|(% style="width:157px" %)((( | ||
709 | 0 | ||
710 | OK | ||
711 | the mode is 0 =Disable Interrupt | ||
712 | ))) | ||
713 | |(% style="width:154px" %)AT+INTMOD=2|(% style="width:196px" %)((( | ||
714 | Set Transmit Interval | ||
715 | 0. (Disable Interrupt), | ||
716 | ~1. (Trigger by rising and falling edge) | ||
717 | 2. (Trigger by falling edge) | ||
718 | 3. (Trigger by rising edge) | ||
719 | )))|(% style="width:157px" %)OK | ||
720 | |||
721 | (% style="color:blue" %)**Downlink Command: 0x06** | ||
722 | |||
723 | Format: Command Code (0x06) followed by 3 bytes. | ||
724 | |||
725 | This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06. | ||
726 | |||
727 | * Example 1: Downlink Payload: 06000000 ~/~/ Turn off interrupt mode | ||
728 | * Example 2: Downlink Payload: 06000003 ~/~/ Set the interrupt mode to rising edge trigger | ||
729 | |||
730 | |||
731 | = 4. Battery & Power Consumption = | ||
732 | |||
733 | |||
734 | TC01/TC11-LB use ER26500 + SPC1520 battery pack . See below link for detail information about the battery info and how to replace. | ||
735 | |||
736 | [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] . | ||
737 | |||
738 | |||
739 | = 5. OTA Firmware update = | ||
740 | |||
741 | |||
742 | (% class="wikigeneratedid" %) | ||
743 | User can change firmware TC01/TC11-LB to: | ||
744 | |||
745 | * Change Frequency band/ region. | ||
746 | * Update with new features. | ||
747 | * Fix bugs. | ||
748 | |||
749 | Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/scl/fo/m2u45ojhxj2kr286m8k42/h?rlkey=qz0jurgao6kl565rsx8k20f9v&dl=0]]** | ||
750 | |||
751 | |||
752 | Methods to Update Firmware: | ||
753 | |||
754 | * (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/]]** | ||
755 | * Update through UART TTL interface : **[[Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]**. | ||
756 | |||
757 | = 6. FAQ = | ||
758 | |||
759 | |||
760 | |||
761 | = 7. Order Info = | ||
762 | |||
763 | |||
764 | Part Number: (% style="color:blue" %)**TC01-LB-XX**(%%)** or (% style="color:blue" %)TC11-LB-XX(%%)** | ||
765 | |||
766 | (% style="color:red" %)**XX**(%%): The default frequency band | ||
767 | |||
768 | * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band | ||
769 | |||
770 | * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band | ||
771 | |||
772 | * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band | ||
773 | |||
774 | * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band | ||
775 | |||
776 | * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band | ||
777 | |||
778 | * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band | ||
779 | |||
780 | * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band | ||
781 | |||
782 | * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band | ||
783 | |||
784 | = 8. Packing Info = | ||
785 | |||
786 | |||
787 | (% style="color:#037691" %)**Package Includes**: | ||
788 | |||
789 | * TC01-LB or TC11-LB LoRaWAN Thermocouple Converter | ||
790 | |||
791 | (% style="color:#037691" %)**Dimension and weight**: | ||
792 | |||
793 | * Device Size: cm | ||
794 | |||
795 | * Device Weight: g | ||
796 | |||
797 | * Package Size / pcs : cm | ||
798 | |||
799 | * Weight / pcs : g | ||
800 | |||
801 | = 9. Support = | ||
802 | |||
803 | |||
804 | * 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. | ||
805 | |||
806 | * 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]]. |