Version 161.8 by Xiaoling on 2024/04/19 10:50

Show last authors
1
2
3
4
5
6
7
8
9 **Table of Contents:**
10
11 {{toc/}}
12
13
14
15
16
17
18
19
20
21 = 1. Introduction =
22
23 == 1.1 Overview ==
24
25
26 Dragino WSC2-L Weather Station Kit is designed for measuring atmospheric conditions to provide information for weather forecasts and to study the weather and climate. WSC2-L Weather Station kit includes a 9 in 1 weather station and a LoRaWAN transmitter.
27
28 The 9 in 1 weather station kit can measure below values: (% style="color:blue" %)**Wind Speed, Wind Direction, Temperature, Humidity, Air Pressure, Illumination, PM2.5, PM10 & Noise**(%%). The LoRaWAN transmitter use RS485 interface to communicate with the 9 in 1 weather station. It can also connect (% style="color:blue" %)**3rd party RS485 sensors**(%%) to measure more environment data. It also has a pulse counting input which can be used to connect (% style="color:blue" %)**tipping bucket Rain Gauge**(%%).
29
30 WSC2-L is full compatible with LoRaWAN Class A protocol, it can work with standard LoRaWAN gateway.
31
32
33 == 1.2 Features ==
34
35 * LoRaWAN 1.0.3 Class A
36 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
37 * Ultra-low power consumption
38 * Built-in sensors: Wind Speed, Wind Direction, Temperature,  Humidity, Air Pressure, Illumination, PM2.5, PM10
39 * RS485 Interface for 3rd Sensors
40 * Support tipping bucket Rain Gauge
41 * Support Bluetooth v5.1 and LoRaWAN remote configure
42 * Support wireless OTA update rmware
43 * AT Commands to change parameters
44 * Downlink to change configure
45 * IP66 Waterproof Enclosure
46 * 1000mAh Rechargeable Lion Battery
47 * Input and Recharge power : 12v
48
49 == 1.3 Specification ==
50
51 (% style="color:blue" %)**Wind Speed:**
52
53 * Range: 0~~60m/s
54 * Accuracy: ±(0.2m/s±0.02*v)(v : the wind speed)
55 * Ultrasonic measurement,no start wind strength needed
56
57 (% style="color:blue" %)**Wind Direction:**
58
59 * Range: 0~~3599
60 * Accuracy: +3°
61 * Ultrasonic measurement,no start wind strength needed
62 * Built-in electronic compass. No need to consider installation direction
63
64 (% style="color:blue" %)**Temperature:**
65
66 * Range: -40°C ~~ +80°C
67 * Accuracy: +0.5°C
68
69 (% style="color:blue" %)**Humidity:**
70
71 * Range: 0 ~~ 99% RH
72 * Accuracy Tolerance : Typ +3% RH
73
74 (% style="color:blue" %)**Air Pressure:**
75
76 * Accuracy: ±0.15kPa@25°C 101kPa
77 * Range: 0~~120kPa
78
79 (% style="color:blue" %)**Noise:**
80
81 * Range: 30dB~~120dB
82 * Accuracy: +0.5dB
83
84 (% style="color:blue" %)**PM2.5:**
85
86 * Range: 0~~1000ug/m3
87 * Accuracy: ±3%FS
88 * Resolution: 1ug/m3
89
90 (% style="color:blue" %)**PM10:**
91
92 * Range: 0~~1000ug/m3
93 * Accuracy: +3%FS
94 * Resolution: 1ug/m3
95
96 (% style="color:blue" %)**llumination:**
97
98 * Range: 0~~200k Lux
99 * Accuracy: +7%(25 °C)
100
101 = 2. How to use =
102
103 == 2.1 Installation ==
104
105 Below is an installation example for the weather station. Field installation example can be found at [[Appendix I: Field Installation Photo.>>||anchor="H12.AppendixI:FieldInstallationPhoto"]] 
106
107 [[image:image-20240327231510-1.png||height="499" width="1156"]]
108
109
110 (% style="color:blue" %)** Wiring:**
111
112 1. WSC2-L and sensors all powered by solar power via MPPT
113 1. WSC2-L Weather Station Kit already include 9 sensors.
114 1. Possible to add optional 3rd sensors to measure more parameter
115
116 (% style="color:red" %)**Notice 1:**
117
118 * All weather sensors and WSC2-L are powered by MPPT solar recharge controller. MPPT is connected to solar panel and storage battery.
119 * Weather sensors won't work if solar panel and storage battery fails.
120
121 (% style="color:red" %)**Notice 2:**
122
123 Due to shipment and importation limitation, user is better to purchase below parts locally:
124
125 * Solar Panel
126 * Storage Battery
127 * MPPT Solar Recharger
128 * Cabinet.
129
130 == 2.2 How it works? ==
131
132
133 (((
134 Each WSC2-L is shipped with a worldwide unique set of OTAA keys. To use WSC2-L in a LoRaWAN network, user needs to input the OTAA keys in LoRaWAN network server. After finish installation as above. Create WSC2-L in your LoRaWAN server and Power on WSC2-L , it can join the LoRaWAN network and start to transmit sensor data. The default period for each uplink is 20 minutes.
135 )))
136
137
138 == 2.3 Example to use for LoRaWAN network ==
139
140
141 This section shows an example for how to join the TTN V3 LoRaWAN IoT server. Usages with other LoRaWAN IoT servers are of similar procedure.
142
143
144 Assume the DLOS8 is already set to connect to [[TTN V3 network >>url:https://eu1.cloud.thethings.network/]]. We need to add the WSC2-L device in TTN V3:
145
146
147 (% style="color:blue" %)**Step 1**(%%): Create a device in TTN V3 with the OTAA keys from WSC2-L.
148
149 Each WSC2-L is shipped with a sticker with the default device EUI as below:
150
151 [[image:image-20230426084533-1.png||height="231" width="497"]]
152
153
154 User can enter these keys in the LoRaWAN Server portal. Below is TTN V3 screen shot:
155
156 The user needs to press and hold the ACT button(Push button) for more than 3s to start the node.
157
158 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png||height="386" width="262"]]
159
160 **Add APP EUI in the application.**
161
162 [[image:1656042662694-311.png]]
163
164 [[image:1656042673910-429.png]]
165
166
167
168
169 **Choose Manually to add WSC2-L**
170
171 [[image:1656042695755-103.png]]
172
173
174
175 **Add APP KEY and DEV EUI**
176
177 [[image:1656042723199-746.png]]
178
179
180
181 (((
182 (% style="color:blue" %)**Step 2**(%%): Power on WSC2-L, it will start to join TTN server. After join success, it will start to upload sensor data to TTN V3 and user can see in the panel.
183 )))
184
185
186 [[image:image-20240413134413-1.png||height="244" width="854"]]
187
188
189 == 2.4 Uplink Payload ==
190
191
192 Uplink payloads include two types: Valid Sensor Value and other status / control command.
193
194 * Valid Sensor Value: Use FPORT=2
195 * Other control command: Use FPORT other than 2.
196
197 === 2.4.1 Uplink FPORT~=5, Device Status ===
198
199
200 Uplink the device configures with FPORT=5. Once WSC2-L Joined the network, it will uplink this message to the server. After first uplink, WSC2-L will uplink Device Status every 12 hours
201
202
203 (((
204 User can also use downlink command**(0x2601)** to ask WSC2-L to resend this uplink
205 )))
206
207 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
208 |=(% style="width: 70px;background-color:#4F81BD;color:white" %)**Size(**bytes)|=(% style="width: 85px;background-color:#4F81BD;color:white" %)1|=(% style="width: 105px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 105px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 85px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**2**
209 |(% style="width:99px" %)Value|(% style="width:112px" %)[[Sensor Model>>||anchor="HSensorModel:"]]|(% style="width:135px" %)[[Firmware Version>>||anchor="HFirmwareVersion:"]]|(% style="width:126px" %)[[Frequency Band>>||anchor="HFrequencyBand:"]]|(% style="width:85px" %)[[Sub-band>>||anchor="HSub-Band:"]]|(% style="width:46px" %)[[BAT>>||anchor="HBAT:"]]
210
211 [[image:image-20240415092848-2.png||height="329" width="1045"]]
212
213
214 Example Payload (FPort=5):  [[image:image-20240415091027-1.png]]
215
216
217 ==== (% style="color:#037691" %)**Sensor Model:**(%%) ====
218
219 For WSC2-L, this value is 0x2E.
220
221
222 ==== (% style="color:#037691" %)**Firmware Version:**(%%) ====
223
224 0x0100, Means: v1.0.0 version.
225
226
227 ==== (% style="color:#037691" %)**Frequency Band:**(%%) ====
228
229 0x01: EU868
230
231 0x02: US915
232
233 0x03: IN865
234
235 0x04: AU915
236
237 0x05: KZ865
238
239 0x06: RU864
240
241 0x07: AS923
242
243 0x08: AS923-1
244
245 0x09: AS923-2
246
247 0x0a: AS923-3
248
249
250 ==== (% style="color:#037691" %)**Sub-Band:**(%%) ====
251
252 value 0x00 ~~ 0x08(only for CN470, AU915,US915. Others are0x00)
253
254
255 ==== (% style="color:#037691" %)**BAT:**(%%) ====
256
257 (((
258 shows the battery voltage for WSC2-L MCU.
259 )))
260
261 (((
262 Ex1: 0x0FE4/1000 = 4068/1000=4.068V
263 )))
264
265
266 Users can also use the downlink command (0x2301) to change the uplink port of WSC2-L:
267
268 (% style="color:#037691" %)**Example**(%%) (% style="color:#037691" %)**Downlink:0x23 01(Change to port 1)**
269
270 [[image:image-20240413104831-3.png||height="364" width="934"]]
271
272
273 === 2.4.2 Uplink FPORT~=2, Real time sensor value ===
274
275
276 (((
277 WSC2-L will send this uplink after Device Config uplink once join LoRaWAN network successfully. And it will periodically send this uplink. Default interval is 20 minutes and [[can be changed>>||anchor="H3.1SetTransmitIntervalTime"]].
278 )))
279
280 (((
281 Uplink uses FPORT=2 and every 20 minutes send one uplink by default.
282 )))
283
284
285 (((
286 The upload length is dynamic, depends on what type of weather sensors are connected. The uplink payload is combined with sensor segments. As below:
287 )))
288
289
290 (% style="color:#4472c4" %)** Uplink Payload**:
291
292 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:464px" %)
293 |(% style="width:140px" %)Sensor Segment 1|(% style="width:139px" %)Sensor Segment 2|(% style="width:42px" %)……|(% style="width:140px" %)Sensor Segment n
294
295 (% style="color:#4472c4" %)** Sensor Segment Define**:
296
297 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:330px" %)
298 |(% style="width:89px" %)Type Code|(% style="width:114px" %)Length (Bytes)|(% style="width:124px" %)Measured Value
299
300 (% style="color:#4472c4" %)**Sensor Type Table:**
301
302 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
303 |(% style="background-color:#4f81bd; color:white; width:80px" %)**Sensor Type**|(% style="background-color:#4f81bd; color:white; width:65px" %)**Type Code**|(% style="background-color:#4f81bd; color:white; width:116px" %)**Range**|(% style="background-color:#4f81bd; color:white; width:88px" %)**Length( Bytes)**|(% style="background-color:#4f81bd; color:white; width:181px" %)**Example**
304 |(% style="width:103px" %)Wind Speed|(% style="width:91px" %)0x01|(% style="width:116px" %)(((
305 Speed: 0 ~~ 60m/s
306 )))|(% style="width:88px" %)0x02 |(% style="width:181px" %)(((
307 0x0028/100=0.40m/s
308 )))
309 |(% style="width:103px" %)Wind Level|(% style="width:91px" %)0x02|(% style="width:116px" %)Wind Level:(0 ~~18)|(% style="width:88px" %)0x02|(% style="width:181px" %)0x0002=2(Current wind level)
310 |(% style="width:103px" %)(((
311 Wind Direction
312 )))|(% style="width:91px" %)0x03|(% style="width:116px" %)Direction: 0~~7|(% style="width:88px" %)0x02|(% style="width:181px" %)(((
313 0X0004=3(Due north is 0, increasing clockwise, and due east is 2)
314 )))
315 |(% style="width:103px" %)Wind Angle|(% style="width:91px" %)0x04|(% style="width:116px" %)(((
316 Angel: 0 ~~ 359°
317 )))|(% style="width:88px" %)0x02|(% style="width:181px" %)(((
318 0x02C9/10=66.6°(Due north is 0°, increasing clockwise, due east is 90°)
319 )))
320 |(% style="width:103px" %)Humidity|(% style="width:91px" %)0x05|(% style="width:116px" %)Hum: 0~99%RH|(% style="width:88px" %)0x02|(% style="width:181px" %)0x0164/10=35.6%RH
321 |(% style="width:103px" %)Temperature|(% style="width:91px" %)0x06|(% style="width:116px" %)Temp: -40 ~~ +80°C|(% style="width:88px" %)0x02|(% style="width:181px" %)(((
322 0xFFDD/10=-3.5°C 
323 )))
324 |(% style="width:103px" %)Noise|(% style="width:91px" %)0x07|(% style="width:116px" %)Nosie: 30~~120dB|(% style="width:88px" %)0x02|(% style="width:181px" %)(((
325 0x023e/10=57.4dB
326 )))
327 |(% style="width:103px" %)(((
328 PM2.5 / CO2
329 )))|(% style="width:91px" %)0x08|(% style="width:116px" %)(((
330 PM2.5: 0~1000μg/m^^3^^
331
332 CO2: 0~~5000ppm
333 )))|(% style="width:88px" %)0x02|(% style="width:181px" %)(((
334 0x0023=35μg/m^^3 ^^
335
336 0x04fb=1275ppm
337 )))
338 |(% style="width:103px" %)PM10|(% style="width:91px" %)0x09|(% style="width:116px" %)(((
339 PM10: 0~1000μg/m^^3^^
340 )))|(% style="width:88px" %)0x02|(% style="width:181px" %)(((
341 0x002D=45μg/m^^3 ^^
342 )))
343 |(% style="width:103px" %)Pressure|(% style="width:91px" %)0x0A|(% style="width:116px" %)0~~120kPa/y|(% style="width:88px" %)0x02|(% style="width:181px" %)(((
344 0x2748/10=1005.6kPa   
345 )))
346 |(% style="width:103px" %)illumination|(% style="width:91px" %)0x0B|(% style="width:116px" %)0~200000kLux|(% style="width:88px" %)0x04|(% style="width:181px" %)0x04D2*10=12340kLux 
347
348 (((
349 Below is an example payload:  0FF60100000000012F00280001000400AD025E0117023E0023003203ED0001678390A102FFFF
350 )))
351
352
353 (((
354 When sending this payload to LoRaWAN server. WSC2-L will send this in one uplink or several uplinks according to LoRaWAN spec requirement. For example, total length of Payload is 54 bytes.
355 )))
356
357 * (((
358 When WSC2-L sending in US915 frequency DR0 data rate. Because this data rate has limitation of 11 bytes payload for each uplink. The payload will be split into below packets and uplink.
359 )))
360
361 (((
362 Uplink 1:  [[image:image-20240418135453-1.png]]
363 )))
364
365
366 (((
367 Uplink 2: [[image:image-20240418141234-5.png]]
368 )))
369
370 * (((
371 When WSC2-L sending in EU868 frequency DR0 data rate. The payload will be split into below packets and uplink:
372 )))
373
374 (((
375 Uplink 1:  [[image:image-20240418141304-6.png]]
376 )))
377
378
379 Uplink 2:  [[image:image-20240418141312-7.png]]
380
381
382 === 2.4.3 Decoder in TTN V3 ===
383
384
385 (((
386 In LoRaWAN platform, user only see HEX payload by default, user needs to use payload formatters to decode the payload to see human-readable value.
387 )))
388
389 (((
390 Download decoder for suitable platform from:  [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
391 )))
392
393
394 (((
395 and put as below:
396 )))
397
398 [[image:image-20240413140757-2.png||height="423" width="892"]]
399
400
401 == 2.5 Show data on Application Server ==
402
403
404 (((
405 Application platform provides a human friendly interface to show the sensor data, once we have sensor data in TTN V3, we can use Datacake to connect to TTN V3 and see the data in Datacake. Below are the steps:
406 )))
407
408 (((
409 (% style="color:blue" %)**Step 1**(%%): Be sure that your device is programmed and properly connected to the LoRaWAN network.
410 )))
411
412 (((
413 (% style="color:blue" %)**Step 2**(%%): Configure your Application to forward data to Datacake you will need to add integration. Go to TTN V3 Console ~-~-> Applications ~-~-> Integrations ~-~-> Add Integrations.
414 )))
415
416 [[image:1656051197172-131.png]]
417
418
419
420 **Add TagoIO:**
421
422 [[image:1656051223585-631.png]]
423
424
425
426 **Authorization:**
427
428 [[image:1656051248318-368.png]]
429
430
431
432 In TagoIO console ([[https:~~/~~/admin.tago.io~~/~~/>>url:https://datacake.co/]]) , add WSC2-L:
433
434
435 [[image:1656051277767-168.png]]
436
437
438 == 2.6 Frequency Plans ==
439
440
441 The WSC2-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.
442
443 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
444
445
446 = 3. Configure WSC2-L =
447
448 == 3.1 Configure Methods ==
449
450
451 WSC2-L supports below configure method:
452
453 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
454
455 * 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]].
456
457 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
458
459 == 3.2 General Commands ==
460
461
462 These commands are to configure:
463
464 * General system settings like: uplink interval.
465 * LoRaWAN protocol & radio related command.
466
467 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
468
469 [[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/]]
470
471
472 == 3.3 Commands special design for WSC2-L ==
473
474
475 These commands only valid for WSC2-L, as below:
476
477
478 === 3.3.1 Set Transmit Interval Time ===
479
480
481 Feature: Change LoRaWAN End Node Transmit Interval.
482
483 (% style="color:#037691" %)**AT Command: AT+TDC**
484
485 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:501px" %)
486 |(% style="background-color:#4f81bd; color:white; width:155px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:166px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:180px" %)**Response**
487 |(% style="width:155px" %)AT+TDC=?|(% style="width:162px" %)Show current transmit Interval|(% style="width:177px" %)(((
488 30000
489 OK
490 the interval is 30000ms = 30s
491 )))
492 |(% style="width:155px" %)AT+TDC=60000|(% style="width:162px" %)Set Transmit Interval|(% style="width:177px" %)(((
493 OK
494 Set transmit interval to 60000ms = 60 seconds
495 )))
496
497 (% style="color:#037691" %)**Downlink Command: 0x01**
498
499 Format: Command Code (0x01) followed by 3 bytes time value.
500
501 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
502
503 * Example 1: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
504 * Example 2: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
505
506 === 3.3.2 Set the CO2 or PM mode ===
507
508
509 Feature: Set the CO2/PM mode, and the user can set the corresponding mode according to the purchased sensor.
510
511 (% style="color:#037691" %)**AT Command:**
512
513 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:466px" %)
514 |(% style="background-color:#4f81bd; color:white; width:156px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:225px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:85px" %)**Response**
515 |(% style="width:155px" %)AT+PMMOD=1|(% style="width:224px" %)The working sensors are PM2.5 and PM10|(% style="width:84px" %)(((
516 OK
517
518 )))
519 |(% style="width:155px" %)AT+PMMOD=0|(% style="width:224px" %)The working sensors are CO2|(% style="width:84px" %)(((
520 OK
521 )))
522
523 (% style="color:#037691" %)**Downlink Command:**
524
525 * 0xE101     Same as: AT+PMMOD=1
526 * 0xE100     Same as: AT+PMMOD=0
527
528 === 3.3.3 Add or Delete RS485 Sensor ===
529
530
531 (((
532 Feature: User can add or delete 3^^rd^^ party sensor as long they are RS485/Modbus interface,baud rate support 9600.Maximum can add 4 sensors.
533 )))
534
535 (((
536 (% style="color:#037691" %)**AT Command: **
537 )))
538
539 (((
540 (% style="color:blue" %)**AT+DYSENSOR=Type_Code, Query_Length, Query_Command , Read_Length , Valid_Data ,has_CRC,timeout**
541 )))
542
543 * (((
544 Type_Code range:  A1 ~~ A4
545 )))
546 * (((
547 Query_Length:  RS485 Query frame length, Value cannot be greater than 10
548 )))
549 * (((
550 Query_Command:  RS485 Query frame data to be sent to sensor, cannot be larger than 10 bytes
551 )))
552 * (((
553 Read_Length:  RS485 response frame length supposed to receive. Max can receive
554 )))
555 * (((
556 Valid_Data:  valid data from RS485 Response, Valid Data will be added to Payload and upload via LoRaWAN.
557 )))
558 * (((
559 has_CRC:  RS485 Response crc check  (0: no verification required 1: verification required). If CRC=1 and CRC error, valid data will be set to 0.
560 )))
561 * (((
562 timeout:  RS485 receive timeout (uint:ms). Device will close receive window after timeout
563 )))
564
565 (((
566 **Example:**
567 )))
568
569 (((
570 User need to change external sensor use the type code as address code.
571 )))
572
573 (((
574 With a 485 sensor, after correctly changing the address code to A1, the RS485 query frame is shown in the following table:
575 )))
576
577 [[image:image-20220624143553-10.png]]
578
579
580 The response frame of the sensor is as follows:
581
582 [[image:image-20220624143618-11.png]]
583
584
585 **Then the following parameters should be:**
586
587 * Address_Code range: A1
588 * Query_Length: 8
589 * Query_Command: A103000000019CAA
590 * Read_Length: 8
591 * Valid_Data: 23 (Indicates that the data length is 2 bytes, starting from the 3th byte)
592 * has_CRC: 1
593 * timeout: 1500 (Fill in the test according to the actual situation)
594
595 **So the input command is:**
596
597 AT+DYSENSOR=A1,8,A103000000019CAA,8,24,1,1500
598
599
600 In every sampling. WSC2-L will auto append the sensor segment as per this structure and uplink.
601
602 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:351px" %)
603 |=(% style="width: 95px;background-color:#4F81BD;color:white" %)Type Code|=(% style="width: 122px;background-color:#4F81BD;color:white" %)Length (Bytes)|=(% style="width: 134px;background-color:#4F81BD;color:white" %)Measured Value
604 |(% style="width:94px" %)A1|(% style="width:121px" %)2|(% style="width:132px" %)0x000A
605
606 **Related commands:**
607
608 AT+DYSENSOR=A1,0  ~-~->  Delete 3^^rd^^ party sensor A1.
609
610 AT+DYSENSOR  ~-~->  List All 3^^rd^^ Party Sensor. Like below:
611
612
613 (% style="color:#037691" %)**Downlink Command:  **
614
615 **delete custom sensor A1:**
616
617 * 0xE5A1     Same as: AT+DYSENSOR=A1,0
618
619 **Remove all custom sensors**
620
621 * 0xE5FF  
622
623 === 3.3.4 RS485 Test Command ===
624
625
626 (% style="color:#037691" %)**AT Command:**
627
628 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:494px" %)
629 |=(% style="width: 160px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 248px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 86px;background-color:#4F81BD;color:white" %)**Response**
630 |(% style="width:159px" %)AT+RSWRITE=xxxxxx|(% style="width:227px" %)(((
631 Send command to 485 sensor. Range : no more than 10 bytes
632 )))|(% style="width:85px" %)OK
633
634 Eg: Send command **01 03 00 00 00 01 84 0A** to 485 sensor
635
636 AT+RSWRITE=0103000001840A
637
638
639 (% style="color:#037691" %)**Downlink Command:**
640
641 * 0xE20103000001840A     Same as: AT+RSWRITE=0103000001840A
642
643 === 3.3.5 RS485 response timeout ===
644
645
646 Feature: Set or get extended time to receive 485 sensor data.
647
648 (% style="color:#037691" %)**AT Command:**
649
650 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:433px" %)
651 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 190px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 86px;background-color:#4F81BD;color:white" %)**Response**
652 |(% style="width:157px" %)AT+DTR=1000|(% style="width:188px" %)(((
653 Set response timeout to: Range : 0~~10000
654 )))|(% style="width:85px" %)OK
655
656 (% style="color:#037691" %)**Downlink Command:**
657
658 Format: Command Code (0xE0) followed by 3 bytes time value.
659
660 If the downlink payload=E0000005, it means set the END Node's Transmit Interval to 0x000005=5(S), while type code is E0.
661
662 * Example 1: Downlink Payload: E0000005  ~/~/  Set Transmit Interval (DTR) = 5 seconds
663 * Example 2: Downlink Payload: E000000A  ~/~/  Set Transmit Interval (DTR) = 10 seconds
664
665 === 3.3.6 Set or get the total count value ===
666
667
668 Feature: The user can set the counting to start from the set value according to the requirements. (only available in counting mode).
669
670 (% style="color:#037691" %)**AT Command:**
671
672 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:433px" %)
673 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 190px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 86px;background-color:#4F81BD;color:white" %)**Response**
674 |(% style="width:157px" %)AT+SETCNT=1000|(% style="width:188px" %)Set the total count to start from 1000|(% style="width:85px" %)OK
675
676 (% style="color:#037691" %)**Downlink Command:**
677
678 Format: Command Code (0x09) followed by 5 bytes time value.
679
680 If the downlink payload=09000003E8, This means that the count of the END node will start counting from setting 0x000003E8=1000 (times). while type code is 09.
681
682 * Example 1: Downlink Payload: 09000003E8  ~/~/  Set the value to start counting from 1000 = 1000 (times)
683
684 === 3.3.7  Set interrupt or counting mode ===
685
686
687 Feature: Users can set the trigger mode to counting mode or interrupt mode as needed.
688
689 (% style="color:#037691" %)**AT Command:**
690
691 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:433px" %)
692 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 190px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 86px;background-color:#4F81BD;color:white" %)**Response**
693 |(% style="width:157px" %)AT+COUNTMOD=0|(% style="width:188px" %)set to interrupt mode|(% style="width:85px" %)OK
694 |(% style="width:157px" %)AT+COUNTMOD=1|(% style="width:188px" %)(((
695 set to counting mode
696 )))|(% style="width:85px" %)OK
697
698 (% style="color:#037691" %)**Downlink Command:**
699
700 Format: Command Code (0x10) followed by 1 bytes time value.
701
702 If the downlink payload=10 00, Set the trigger mode to interrupt mode, while type code is 10.
703
704 * Example 1: Downlink Payload: 10 00  ~/~/  Same as: AT+COUNTMOD=0  set to interrupt mode
705
706 == 3.4 Add 3rd RS485 / Modbus Sensor ==
707
708 === 3.4.1 Hardware Connection ===
709
710
711 Connect the A and B signal lines of the RS485 sensor to the A and B ports of the RS485 adapter board.
712
713
714 === 3.4.2 Software Setup ===
715
716
717 Send AT+DYSENSOR to activate the RS485 sensor for collecting DIY. You can refer to the instructions in section 3.3.3 of the manual.
718
719 For example: AT+DYSENSOR=A1,8,A103000000019CAA,8,24,1,1500
720
721 [[image:image-20240416164816-2.jpeg||height="770" width="492"]]
722
723
724 === 3.4.3 Payload ===
725
726 [[image:image-20240416163658-1.png]]
727
728 For example: A1 02 00 00
729
730 A1 : A1 register data acquisition instruction
731
732 02 : The valid data returned is 2 bytes in total.
733
734 00 00 : Return valid data
735
736
737 = 3.5 Add tipping bucket total solar radiation sensor =
738
739 === 3.5.1 Hardware Connection ===
740
741 [[image:image-20240416171518-3.jpeg||height="484" width="434"]]
742
743 (% class="wikigeneratedid" id="H" %)
744 [[image:image-20240419091658-1.png||height="242" width="599"]]
745
746
747 === 3.5.2 Calculating & Decode ===
748
749
750 0FC6 01 00000000 00EB 000F 0000 0003 008E 0251 00CE 0213 0017 001B 03EC 000000DE 90 A1020000 A2020032
751
752 For example:  A2 02 00 32
753
754 A2 : A2 register data acquisition instruction
755
756 02 : The valid data returned is 2 bytes in total.
757
758 00 32(HEX) : Return valid data = 50(DEC)W/m2
759
760
761 = 4. Power consumption and battery =
762
763 == 4.1 Total Power Consumption ==
764
765
766 Dragino Weather Station serial products include the main process unit (WSC2-L) and various sensors. The total power consumption equal total power of all above units. The power consumption for main process unit WSC2-L is 18ma @ 12v. and the power consumption of each sensor can be found on the Sensors chapter.
767
768
769 == 4.2 Reduce power consumption ==
770
771
772 The main process unit WSC2-L is set to LoRaWAN Class C by default. If user want to reduce the power consumption of this unit, user can set it to run in Class A. In Class A mode, WSC2-L will not be to get real-time downlink command from IoT Server.
773
774
775 == 4.3 Battery ==
776
777
778 (((
779 All sensors are only power by external power source. If external power source is off. All sensor won't work.
780 )))
781
782 (((
783 Main Process Unit WSC2-L is powered by both external power source and internal 1000mAh rechargeable battery. If external power source is off, WSC2-L still runs and can send periodically uplinks, but the sensors value will become invalid.  External power source can recharge the 1000mAh rechargeable battery.
784 )))
785
786
787 = 5. Main Process Unit WSC2-L =
788
789
790 WSC2-L is the main process unit in Dragino Weather Station solution. WSC2-LB is an an outdoor LoRaWAN RS485 end node. It is powered by external 12v solar power and have a built-in li-on backup battery.
791
792 WSC2-L reads value from various sensors and upload these sensor data to IoT server via LoRaWAN wireless protocol.
793
794 WSC2-L is full compatible with LoRaWAN Class C protocol, it can work with standard LoRaWAN gateway.
795
796 WSC2-L Supports BLE configure and wireless OTA update which make user easy to use.
797
798 Each WSC2-L is pre-load with a set of unique keys for LoRaWAN registration, register these keys to local LoRaWAN server and it will auto connect after power on.
799
800
801 == 5.1 Features ==
802
803
804 * LoRaWAN v1.0.3 Class A protocol.
805 * RS485 / Modbus protocol
806 * Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915
807 * AT Commands to change parameters
808 * Downlink to change configure
809 * Powered by external 12v battery
810 * Back up rechargeable 1000mAh battery
811 * IP Rating: IP65
812 * Support default sensors or 3rd party RS485 sensors
813 * Support Bluetooth v5.1 and LoRaWAN remote configure
814 * Support wireless OTA update firmware
815 * Wall Attachable.
816
817 == 5.2 Power Consumption ==
818
819
820 WSC2-L (without external sensor): Idle: 4mA, Transmit: max 40mA
821
822
823 == 5.3 Storage & Operation Temperature ==
824
825
826 -20°C to +60°C
827
828
829 == 5.4 Sleep mode and working mode ==
830
831
832 (% 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.
833
834 (% 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.
835
836
837 == 5.5 Button & LEDs ==
838
839
840 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
841
842
843 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
844 |=(% 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**
845 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
846 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
847 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
848 )))
849 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
850 (% 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.
851 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
852 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.
853 )))
854 |(% 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.
855
856 == 5.6 BLE connection ==
857
858
859 WSC2-L supports BLE remote configure.
860
861
862 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:
863
864 * Press button to send an uplink
865 * Press button to active device.
866 * Device Power on or reset.
867
868 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
869
870
871 == 5.7 Pin Mapping ==
872
873
874 [[image:image-20240412165523-2.png]]
875
876
877 == 5.8 Mechanical ==
878
879
880 Refer LSn50v2 enclosure drawing in:  [[https:~~/~~/www.dropbox.com/sh/0ir0l9jjmk6p95e/AADwWXorcKuNpPR5em7VgrEja?dl=0>>https://www.dropbox.com/sh/0ir0l9jjmk6p95e/AADwWXorcKuNpPR5em7VgrEja?dl=0]]
881
882
883 == 5.9 Connect to RS485 Sensors ==
884
885
886 WSC2-L includes a RS485 converter PCB. Which help it easy to connect multiply RS485 sensors. Below is the photo for reference.
887
888
889 [[image:image-20240416152737-1.jpeg||height="891" width="677"]]
890
891
892 Hardware Design for the Converter Board please see:
893
894 [[https:~~/~~/www.dropbox.com/sh/bqyvsvitb70qtgf/AABLpD7_yxsQ_drVMxHIEI7wa?dl=0>>https://www.dropbox.com/sh/bqyvsvitb70qtgf/AABLpD7_yxsQ_drVMxHIEI7wa?dl=0]]
895
896
897 = 6. OTA Firmware update =
898
899
900 (% class="wikigeneratedid" %)
901 **User can change firmware WSC2-L to:**
902
903 * Change Frequency band/ region.
904 * Update with new features.
905 * Fix bugs.
906
907 **Firmware and changelog can be downloaded from :** **[[Firmware download link>>https://www.dropbox.com/sh/8j3ioji411ni9gu/AADnOw3ErB1REsthKilfaq_Pa?dl=0]]**
908
909 **Methods to Update Firmware:**
910
911 * (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/]]**
912
913 * 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]]**.
914
915 = 7. FAQ =
916
917 == 7.1 What else do I need to purchase to build Weather Station? ==
918
919
920 Below is the installation photo and structure:
921
922
923 [[image:image-20240413172530-3.png]]
924
925
926 [[image:1656057608049-693.png]]
927
928
929 = 8. Trouble Shooting =
930
931 == 8.1 What should I do when the RS485 sensor cannot collect data? ==
932
933 1. Recheck whether the sensor’s power supply voltage is 12V at maximum.
934 1. Recheck whether the A and B signal lines of the sensor are connected reversely.
935 1. Check whether the sensor's transmission baud rate is 4800. If not, please change it to 4800 and try reading again.
936
937 == 8.2 Why does the weather station make electric current sounds during operation? ==
938
939 1. Because a certain amount of sound will be produced during long-term power supply operation. This is a normal phenomenon and does not affect use.
940
941 == 8.3 How to solve the problem of temperature difference in weather stations? ==
942
943 You can use AT+RSWRITE (downlink: E2 xx xx xx xx xx xx xx ) to modify the temperature compensation function in the weather station.
944
945 **For example:**
946
947 When the temperature of the weather station is 3℃ different from that of the external DS18B20, you can use AT+RSWRITE=01 06 00 50 00 1E 09 D3 (downlink: E2 01 06 00 50 00 1E 09 D3) to modify the temperature compensation value of the weather station to +3℃ .
948
949 = 9. Order Info =
950
951
952 Part Number: (% style="color:blue" %)**WSC2-L-XX**
953
954 (% style="color:blue" %)**XX**(%%): The default frequency band
955
956 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
957 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
958 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
959 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
960 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
961 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
962 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
963 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
964
965 = 10. Support =
966
967 * 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.
968
969 * 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.com>>url:file:///D:/市场资料/说明书/LoRa/LT系列/support@dragino.com]].