|
Protocol of the Lacrosse WS2500-19 brightness sensor |
Each frame is 66 bits long. It is composed of:
- 10bits of 0 (start sequence) [blue]
- 11 blocks of four bits separated by a bit 1 [red] to be checked and skipped
Example 1
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 |
Example 2
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 |
Example 3
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
Example 4
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 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 | 1 | 0 | | 1 | 1 | 1 | 0 | | 0 | 1 | 1 | 0 | | 0 | 0 | 0 | 1 | | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | | 0 | 0 | 1 | 1 | | 1 | 1 | 0 | 1 | |
Example 5
1 | 0 | 1 | 0 | | 1 | 1 | 1 | 0 | | 0 | 1 | 1 | 0 | | 0 | 0 | 0 | 1 | | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | | 0 | 0 | 1 | 1 | | 1 | 1 | 0 | 1 | |
The 1st bit of each word is LSB, so we have to reverse the 4 bits of each word.
The active values of the sensor is coloured in [green] in the following tables:
Example 1
0 | 1 | 0 | 1 | | 0 | 1 | 1 | 1 | | 0 | 1 | 1 | 1 | | 1 | 0 | 0 | 1 | | 1 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | | 1 | 1 | 1 | 1 | | 0 | 1 | 0 | 1 | | 1 | 0 | 0 | 0 | | 0 | 1 | 1 | 0 | | 1 | 0 | 1 | 1 | |
5 | | 0 | 7 | | 7 | | 9 | | 8 | | 0 | | F | | 5 | | 8 | | 6 | | B | |
Check Xor : (5 ^ 7 ^ 7 ^ 9 ^ 8 ^ 0 ^ F ^ 5 ^ 8 ^ 6) = 0 Check Sum : (const5 + 5 + 7 + 7 + 9 + 8 + 0 + F + 5 + 8 + 6) and F = B | |
Example 2
0 | 1 | 0 | 1 | | 0 | 1 | 1 | 1 | | 1 | 0 | 0 | 0 | | 0 | 0 | 1 | 0 | | 0 | 1 | 0 | 1 | | 0 | 0 | 1 | 0 | | 1 | 0 | 0 | 1 | | 1 | 0 | 0 | 1 | | 1 | 0 | 0 | 0 | | 0 | 1 | 1 | 1 | | 0 | 0 | 1 | 1 | |
5 | | 0 | 7 | | 8 | | 2 | | 5 | | 2 | | 9 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 | 0 | 0 | | 0 | 0 | 0 | 0 | | 1 | 1 | 0 | 0 | | 1 | 0 | 1 | 1 | |
5 | | 0 | 7 | | 6 | | 8 | | 0 | | 0 | | 0 | | 0 | | 0 | | C | | B | |
Check Xor : (5 ^ 7 ^ 6 ^ 8 ^ 0 ^ 0 ^ 0 ^ 0 ^ 0 ^ C) = 0 Check Sum : (const5 + 5 + 7 + 6 + 8 + 0 + 0 + 0 + 0 + 0 + C) and F = B | |
| Sensor type is 5 |
| Unused ? |
| Sensor Address 7 |
| Data values |
| CheckXor |
| Checksum |
The first block is the LSB, so the values are repectively:
- [brightness] 897x100 lux - [exposition] 0x85f minutes
- [brightness] 528x102 lux - [exposition] 0x899 minutes
- [brightness] 104x103 lux - [exposition] 0x997 minutes
- [brightness] 086x100 lux - [exposition] 0x000 minutes
- [brightness] 086x100 lux - [exposition] 0x000 minutes
I am interested by any comment or more information on the format of these frames. Contact: Jean-Paul ROUBELAT - F6FBB
[back to menu]