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
36 * LoRaWAN 1.0.3 Class A
37 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
38 * Ultra-low power consumption
39 * Built-in sensors: Wind Speed, Wind Direction, Temperature,  Humidity, Air Pressure, Illumination, PM2.5, PM10 & Noise
40 * RS485 Interface for 3rd Sensors
41 * Support tipping bucket Rain Gauge
42 * Support Bluetooth v5.1 and LoRaWAN remote configure
43 * Support wireless OTA update rmware
44 * AT Commands to change parameters
45 * Downlink to change configure
46 * IP66 Waterproof Enclosure
47 * 1000mAh Rechargeable Lion Battery
48 * Input and Recharge power: 12v
49
50 == 1.3 Specification ==
51
52
53 (% style="color:blue" %)**Wind Speed:**
54
55 * Range: 0~~60m/s
56 * Accuracy: ±(0.2m/s±0.02*v)(v : the wind speed)
57 * Ultrasonic measurement,no start wind strength needed
58
59 (% style="color:blue" %)**Wind Direction:**
60
61 * Range: 0~~3599
62 * Accuracy: +3°
63 * Ultrasonic measurement,no start wind strength needed
64 * Built-in electronic compass. No need to consider installation direction
65
66 (% style="color:blue" %)**Temperature:**
67
68 * Range: -40°C ~~ +80°C
69 * Accuracy: +0.5°C
70
71 (% style="color:blue" %)**Humidity:**
72
73 * Range: 0 ~~ 99% RH
74 * Accuracy Tolerance : Typ +3% RH
75
76 (% style="color:blue" %)**Air Pressure:**
77
78 * Accuracy: ±0.15kPa@25°C 101kPa
79 * Range: 0~~120kPa
80
81 (% style="color:blue" %)**Noise:**
82
83 * Range: 30dB~~120dB
84 * Accuracy: +0.5dB
85
86 (% style="color:blue" %)**PM2.5:**
87
88 * Range: 0~~1000ug/m3
89 * Accuracy: ±3%FS
90 * Resolution: 1ug/m3
91
92 (% style="color:blue" %)**PM10:**
93
94 * Range: 0~~1000ug/m3
95 * Accuracy: +3%FS
96 * Resolution: 1ug/m3
97
98 (% style="color:blue" %)**llumination:**
99
100 * Range: 0~~200k Lux
101 * Accuracy: +7%(25 °C)
102
103 = 2. How to use =
104
105 == 2.1 Installation ==
106
107
108 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"]] 
109
110 [[image:image-20240327231510-1.png||height="499" width="1156"]]
111
112
113 (% style="color:blue" %)** Wiring:**
114
115 1. WSC2-L and sensors all powered by solar power via MPPT
116 1. WSC2-L Weather Station Kit already include 9 sensors.
117 1. Possible to add optional 3rd sensors to measure more parameter
118
119 (% style="color:red" %)**Notice 1:**
120
121 * All weather sensors and WSC2-L are powered by MPPT solar recharge controller. MPPT is connected to solar panel and storage battery.
122 * Weather sensors won't work if solar panel and storage battery fails.
123
124 (% style="color:red" %)**Notice 2:**
125
126 Due to shipment and importation limitation, user is better to purchase below parts locally:
127
128 * Solar Panel
129 * Storage Battery
130 * MPPT Solar Recharger
131 * Cabinet.
132
133 == 2.2 How it works? ==
134
135
136 (((
137 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.
138 )))
139
140
141 == 2.3 Example to use for LoRaWAN network ==
142
143
144 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.
145
146 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:
147
148
149 (% style="color:blue" %)**Step 1**(%%): Create a device in TTN V3 with the OTAA keys from WSC2-L.
150
151 Each WSC2-L is shipped with a sticker with the default device EUI as below:
152
153 [[image:image-20230426084533-1.png||height="231" width="497"]]
154
155
156 User can enter these keys in the LoRaWAN Server portal. Below is TTN V3 screen shot:
157
158 The user needs to press and hold the ACT button(Push button) for more than 3s to start the node.
159
160 [[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"]]
161
162 **Add APP EUI in the application.**
163
164 [[image:1656042662694-311.png]]
165
166 [[image:1656042673910-429.png]]
167
168
169
170
171 **Choose Manually to add WSC2-L**
172
173 [[image:1656042695755-103.png]]
174
175
176
177 **Add APP KEY and DEV EUI**
178
179 [[image:1656042723199-746.png]]
180
181
182
183 (((
184 (% 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.
185 )))
186
187
188 [[image:image-20240413134413-1.png||height="244" width="854"]]
189
190
191 == 2.4 Uplink Payload ==
192
193
194 Uplink payloads include two types: Valid Sensor Value and other status / control command.
195
196 * Valid Sensor Value: Use FPORT=2
197 * Other control command: Use FPORT other than 2.
198
199 === 2.4.1 Uplink FPORT~=5, Device Status ===
200
201 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
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||height="16" width="104"]]
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:515px" %)
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:166px" %)**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: 099%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: 01000μ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: 01000μ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" %)0200000kLux|(% 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||height="26" width="202"]](% style="display:none" %)
363 )))
364
365 (((
366 Uplink 2: [[image:image-20240418141234-5.png||height="38" width="352"]](% style="display:none" %)
367 )))
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||height="39" width="408"]]
376 )))
377
378 Uplink 2:  [[image:image-20240418141312-7.png||height="24" width="74"]]
379
380
381 === 2.4.3 Decoder in TTN V3 ===
382
383
384 (((
385 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.
386 )))
387
388 (((
389 Download decoder for suitable platform from:  [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
390 )))
391
392 (((
393 and put as below:
394 )))
395
396 [[image:image-20240413140757-2.png||height="423" width="892"]]
397
398
399 == 2.5 Show data on Application Server ==
400
401
402 (((
403 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:
404 )))
405
406 (((
407 (% style="color:blue" %)**Step 1**(%%): Be sure that your device is programmed and properly connected to the LoRaWAN network.
408 )))
409
410 (((
411 (% 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.
412 )))
413
414 [[image:1656051197172-131.png]]
415
416
417
418 **Add TagoIO:**
419
420 [[image:1656051223585-631.png]]
421
422
423
424 **Authorization:**
425
426 [[image:1656051248318-368.png]]
427
428
429 In TagoIO console ([[https:~~/~~/admin.tago.io~~/~~/>>url:https://datacake.co/]]) , add WSC2-L:
430
431
432 [[image:1656051277767-168.png]]
433
434
435 == 2.6 Frequency Plans ==
436
437
438 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.
439
440 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
441
442
443 = 3. Configure WSC2-L =
444
445 == 3.1 Configure Methods ==
446
447
448 WSC2-L supports below configure method:
449
450 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
451
452 * 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]].
453
454 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
455
456 == 3.2 General Commands ==
457
458
459 These commands are to configure:
460
461 * General system settings like: uplink interval.
462 * LoRaWAN protocol & radio related command.
463
464 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
465
466 [[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/]]
467
468
469 == 3.3 Commands special design for WSC2-L ==
470
471
472 These commands only valid for WSC2-L, as below:
473
474
475 === 3.3.1 Set Transmit Interval Time ===
476
477
478 Feature: Change LoRaWAN End Node Transmit Interval.
479
480 (% style="color:#037691" %)**AT Command: AT+TDC**
481
482 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:501px" %)
483 |(% 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**
484 |(% style="width:155px" %)AT+TDC=?|(% style="width:162px" %)Show current transmit Interval|(% style="width:177px" %)(((
485 30000
486 OK
487 the interval is 30000ms = 30s
488 )))
489 |(% style="width:155px" %)AT+TDC=60000|(% style="width:162px" %)Set Transmit Interval|(% style="width:177px" %)(((
490 OK
491 Set transmit interval to 60000ms = 60 seconds
492 )))
493
494 (% style="color:#037691" %)**Downlink Command: 0x01**
495
496 Format: Command Code (0x01) followed by 3 bytes time value.
497
498 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
499
500 * Example 1: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
501 * Example 2: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
502
503 === 3.3.2 Set the CO2 or PM mode ===
504
505
506 Feature: Set the CO2/PM mode, and the user can set the corresponding mode according to the purchased sensor.
507
508 (% style="color:#037691" %)**AT Command:**
509
510 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:466px" %)
511 |(% 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**
512 |(% style="width:155px" %)AT+PMMOD=1|(% style="width:224px" %)The working sensors are PM2.5 and PM10|(% style="width:84px" %)(((
513 OK
514
515 )))
516 |(% style="width:155px" %)AT+PMMOD=0|(% style="width:224px" %)The working sensors are CO2|(% style="width:84px" %)(((
517 OK
518 )))
519
520 (% style="color:#037691" %)**Downlink Command:**
521
522 * 0xE101     Same as: AT+PMMOD=1
523 * 0xE100     Same as: AT+PMMOD=0
524
525 === 3.3.3 Add or Delete RS485 Sensor ===
526
527
528 (((
529 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.
530 )))
531
532 (((
533 (% style="color:#037691" %)**AT Command: **
534 )))
535
536 (((
537 (% style="color:blue" %)**AT+DYSENSOR=Type_Code, Query_Length, Query_Command , Read_Length , Valid_Data ,has_CRC,timeout**
538 )))
539
540 * (((
541 Type_Code range:  A1 ~~ A4
542 )))
543 * (((
544 Query_Length:  RS485 Query frame length, Value cannot be greater than 10
545 )))
546 * (((
547 Query_Command:  RS485 Query frame data to be sent to sensor, cannot be larger than 10 bytes
548 )))
549 * (((
550 Read_Length:  RS485 response frame length supposed to receive. Max can receive
551 )))
552 * (((
553 Valid_Data:  valid data from RS485 Response, Valid Data will be added to Payload and upload via LoRaWAN.
554 )))
555 * (((
556 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.
557 )))
558 * (((
559 timeout:  RS485 receive timeout (uint:ms). Device will close receive window after timeout
560 )))
561
562 (((
563 **Example:**
564 )))
565
566 (((
567 User need to change external sensor use the type code as address code.
568 )))
569
570 (((
571 With a 485 sensor, after correctly changing the address code to A1, the RS485 query frame is shown in the following table:
572 )))
573
574 [[image:image-20220624143553-10.png]]
575
576
577 The response frame of the sensor is as follows:
578
579 [[image:image-20220624143618-11.png]]
580
581
582 **Then the following parameters should be:**
583
584 * Address_Code range: A1
585 * Query_Length: 8
586 * Query_Command: A103000000019CAA
587 * Read_Length: 8
588 * Valid_Data: 23 (Indicates that the data length is 2 bytes, starting from the 3th byte)
589 * has_CRC: 1
590 * timeout: 1500 (Fill in the test according to the actual situation)
591
592 **So the input command is:**
593
594 AT+DYSENSOR=A1,8,A103000000019CAA,8,24,1,1500
595
596
597 In every sampling. WSC2-L will auto append the sensor segment as per this structure and uplink.
598
599 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:351px" %)
600 |=(% 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
601 |(% style="width:94px" %)A1|(% style="width:121px" %)2|(% style="width:132px" %)0x000A
602
603 **Related commands:**
604
605 AT+DYSENSOR=A1,0  ~-~->  Delete 3^^rd^^ party sensor A1.
606
607 AT+DYSENSOR  ~-~->  List All 3^^rd^^ Party Sensor. Like below:
608
609
610 (% style="color:#037691" %)**Downlink Command:  **
611
612 **delete custom sensor A1:**
613
614 * 0xE5A1     Same as: AT+DYSENSOR=A1,0
615
616 **Remove all custom sensors**
617
618 * 0xE5FF  
619
620 === 3.3.4 RS485 Test Command ===
621
622
623 (% style="color:#037691" %)**AT Command:**
624
625 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:494px" %)
626 |=(% 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**
627 |(% style="width:159px" %)AT+RSWRITE=xxxxxx|(% style="width:227px" %)(((
628 Send command to 485 sensor. Range : no more than 10 bytes
629 )))|(% style="width:85px" %)OK
630
631 Eg: Send command **01 03 00 00 00 01 84 0A** to 485 sensor
632
633 AT+RSWRITE=0103000001840A
634
635
636 (% style="color:#037691" %)**Downlink Command:**
637
638 * 0xE20103000001840A     Same as: AT+RSWRITE=0103000001840A
639
640 === 3.3.5 RS485 response timeout ===
641
642
643 Feature: Set or get extended time to receive 485 sensor data.
644
645 (% style="color:#037691" %)**AT Command:**
646
647 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:433px" %)
648 |=(% 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**
649 |(% style="width:157px" %)AT+DTR=1000|(% style="width:188px" %)(((
650 Set response timeout to: Range : 0~~10000
651 )))|(% style="width:85px" %)OK
652
653 (% style="color:#037691" %)**Downlink Command:**
654
655 Format: Command Code (0xE0) followed by 3 bytes time value.
656
657 If the downlink payload=E0000005, it means set the END Node's Transmit Interval to 0x000005=5(S), while type code is E0.
658
659 * Example 1: Downlink Payload: E0000005  ~/~/  Set Transmit Interval (DTR) = 5 seconds
660 * Example 2: Downlink Payload: E000000A  ~/~/  Set Transmit Interval (DTR) = 10 seconds
661
662 === 3.3.6 Set or get the total count value ===
663
664
665 Feature: The user can set the counting to start from the set value according to the requirements. (only available in counting mode).
666
667 (% style="color:#037691" %)**AT Command:**
668
669 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:433px" %)
670 |=(% 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**
671 |(% style="width:157px" %)AT+SETCNT=1000|(% style="width:188px" %)Set the total count to start from 1000|(% style="width:85px" %)OK
672
673 (% style="color:#037691" %)**Downlink Command:**
674
675 Format: Command Code (0x09) followed by 5 bytes time value.
676
677 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.
678
679 * Example 1: Downlink Payload: 09000003E8  ~/~/  Set the value to start counting from 1000 = 1000 (times)
680
681 === 3.3.7  Set interrupt or counting mode ===
682
683
684 Feature: Users can set the trigger mode to counting mode or interrupt mode as needed.
685
686 (% style="color:#037691" %)**AT Command:**
687
688 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:433px" %)
689 |=(% 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**
690 |(% style="width:157px" %)AT+COUNTMOD=0|(% style="width:188px" %)set to interrupt mode|(% style="width:85px" %)OK
691 |(% style="width:157px" %)AT+COUNTMOD=1|(% style="width:188px" %)(((
692 set to counting mode
693 )))|(% style="width:85px" %)OK
694
695 (% style="color:#037691" %)**Downlink Command:**
696
697 Format: Command Code (0x10) followed by 1 bytes time value.
698
699 If the downlink payload=10 00, Set the trigger mode to interrupt mode, while type code is 10.
700
701 * Example 1: Downlink Payload: 10 00  ~/~/  Same as: AT+COUNTMOD=0  set to interrupt mode
702
703 == 3.4 Add 3rd RS485 / Modbus Sensor ==
704
705 === 3.4.1 Hardware Connection ===
706
707
708 Connect the A and B signal lines of the RS485 sensor to the A and B ports of the RS485 adapter board.
709
710
711 === 3.4.2 Software Setup ===
712
713
714 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.
715
716 For example: AT+DYSENSOR=A1,8,A103000000019CAA,8,24,1,1500
717
718 [[image:image-20240416164816-2.jpeg||height="770" width="492"]]
719
720
721 === 3.4.3 Payload ===
722
723 [[image:image-20240416163658-1.png]]
724
725 For example: A1 02 00 00
726
727 A1 : A1 register data acquisition instruction
728
729 02 : The valid data returned is 2 bytes in total.
730
731 00 00 : Return valid data
732
733
734 = 3.5 Add tipping bucket total solar radiation sensor =
735
736 === 3.5.1 Hardware Connection ===
737
738 [[image:image-20240416171518-3.jpeg||height="484" width="434"]]
739
740 (% class="wikigeneratedid" id="H" %)
741 [[image:image-20240419091658-1.png||height="242" width="599"]]
742
743
744 === 3.5.2 Calculating & Decode ===
745
746
747 0FC6 01 00000000 00EB 000F 0000 0003 008E 0251 00CE 0213 0017 001B 03EC 000000DE 90 A1020000 A2020032
748
749 For example:  A2 02 00 32
750
751 A2 : A2 register data acquisition instruction
752
753 02 : The valid data returned is 2 bytes in total.
754
755 00 32(HEX) : Return valid data = 50(DEC)W/m2
756
757
758 = 4. Power consumption and battery =
759
760 == 4.1 Total Power Consumption ==
761
762
763 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.
764
765
766 == 4.2 Reduce power consumption ==
767
768
769 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.
770
771
772 == 4.3 Battery ==
773
774
775 (((
776 All sensors are only power by external power source. If external power source is off. All sensor won't work.
777 )))
778
779 (((
780 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.
781 )))
782
783
784 = 5. Main Process Unit WSC2-L =
785
786
787 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.
788
789 WSC2-L reads value from various sensors and upload these sensor data to IoT server via LoRaWAN wireless protocol.
790
791 WSC2-L is full compatible with LoRaWAN Class C protocol, it can work with standard LoRaWAN gateway.
792
793 WSC2-L Supports BLE configure and wireless OTA update which make user easy to use.
794
795 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.
796
797
798 == 5.1 Features ==
799
800
801 * LoRaWAN v1.0.3 Class A protocol.
802 * RS485 / Modbus protocol
803 * Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915
804 * AT Commands to change parameters
805 * Downlink to change configure
806 * Powered by external 12v battery
807 * Back up rechargeable 1000mAh battery
808 * IP Rating: IP65
809 * Support default sensors or 3rd party RS485 sensors
810 * Support Bluetooth v5.1 and LoRaWAN remote configure
811 * Support wireless OTA update firmware
812 * Wall Attachable.
813
814 == 5.2 Power Consumption ==
815
816
817 WSC2-L (without external sensor): Idle: 4mA, Transmit: max 40mA
818
819
820 == 5.3 Storage & Operation Temperature ==
821
822
823 -20°C to +60°C
824
825
826 == 5.4 Sleep mode and working mode ==
827
828
829 (% 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.
830
831 (% 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.
832
833
834 == 5.5 Button & LEDs ==
835
836
837 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
838
839 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
840 |=(% 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**
841 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
842 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
843 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
844 )))
845 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
846 (% 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.
847 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
848 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.
849 )))
850 |(% 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.
851
852 == 5.6 BLE connection ==
853
854
855 WSC2-L supports BLE remote configure.
856
857 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:
858
859 * Press button to send an uplink
860 * Press button to active device.
861 * Device Power on or reset.
862
863 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
864
865
866 == 5.7 Pin Mapping ==
867
868
869 [[image:image-20240412165523-2.png]]
870
871
872 == 5.8 Mechanical ==
873
874
875 Refer LSn50v2 enclosure drawing in:  [[https:~~/~~/www.dropbox.com/sh/0ir0l9jjmk6p95e/AADwWXorcKuNpPR5em7VgrEja?dl=0>>https://www.dropbox.com/sh/0ir0l9jjmk6p95e/AADwWXorcKuNpPR5em7VgrEja?dl=0]]
876
877
878 == 5.9 Connect to RS485 Sensors ==
879
880
881 WSC2-L includes a RS485 converter PCB. Which help it easy to connect multiply RS485 sensors. Below is the photo for reference.
882
883 [[image:image-20240416152737-1.jpeg||height="891" width="677"]]
884
885
886 Hardware Design for the Converter Board please see:
887
888 [[https:~~/~~/www.dropbox.com/sh/bqyvsvitb70qtgf/AABLpD7_yxsQ_drVMxHIEI7wa?dl=0>>https://www.dropbox.com/sh/bqyvsvitb70qtgf/AABLpD7_yxsQ_drVMxHIEI7wa?dl=0]]
889
890
891 = 6. OTA Firmware update =
892
893
894 (% class="wikigeneratedid" %)
895 **User can change firmware WSC2-L to:**
896
897 * Change Frequency band/ region.
898 * Update with new features.
899 * Fix bugs.
900
901 **Firmware and changelog can be downloaded from :** **[[Firmware download link>>https://www.dropbox.com/sh/8j3ioji411ni9gu/AADnOw3ErB1REsthKilfaq_Pa?dl=0]]**
902
903 **Methods to Update Firmware:**
904
905 * (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/]]**
906
907 * 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]]**.
908
909 = 7. FAQ =
910
911 == 7.1 What else do I need to purchase to build Weather Station? ==
912
913
914 Below is the installation photo and structure:
915
916 [[image:image-20240413172530-3.png]]
917
918
919 [[image:1656057608049-693.png]]
920
921
922 = 8. Trouble Shooting =
923
924 == 8.1 What should I do when the RS485 sensor cannot collect data? ==
925
926
927 ~1. Recheck whether the sensor's power supply voltage is 12V at maximum.
928
929 2. Recheck whether the A and B signal lines of the sensor are connected reversely.
930
931 3. Check whether the sensor's transmission baud rate is 4800. If not, please change it to 4800 and try reading again.
932
933
934 == 8.2 Why does the weather station make electric current sounds during operation? ==
935
936
937 ~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.
938
939
940 == 8.3 How to solve the problem of temperature difference in weather stations? ==
941
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
950 = 9. Order Info =
951
952
953 Part Number: (% style="color:blue" %)**WSC2-L-XX**
954
955 (% style="color:blue" %)**XX**(%%): The default frequency band
956
957 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
958 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
959 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
960 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
961 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
962 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
963 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
964 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
965
966 = 10. Support =
967
968 * 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.
969
970 * 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]].
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0