Skip to main content

Units and out-of-range markers

The same bytes mean different distances on different models. 5C 02 11 EC is 4354 counts. On an LRF22VB a count is one millimetre, so that is 4.354 m. On an LRF100H a count is one centimetre, so that is 43.54 m. Guessing the unit from the family is a tenfold error.

SeriesFamilyWire unitNotes
VB (LRF10VB, LRF22VB, LRF50VB)Bmillimetres2-byte distance, little-endian
H (LRF50H, 100H, 200H, 300H, 600H)Bcentimetres2-byte distance, little-endian
LRF1500HBcentimetres3-byte distance, 5-byte frame
LR, LRF A1, SPD1200NAmetres x 1016-bit value, high byte first

Out-of-range markers (family B)​

When no valid target is found, a family B module outputs a fixed marker instead of a distance. Treat the marker as no target.

ModelMarker
LRF10VB65535
LRF22VB20000
LRF50VB50000
LRF50H, LRF100H, LRF200H, LRF300H, LRF600H65535
LRF1500H16777215

Family A status byte​

A family A reply carries a status byte (STA). STA = 1 means the measurement succeeded, any other value means it failed and the distance field is not valid.

Verify it yourself​

The serial monitor applies these rules from the model table, and its source and tests are in the erdi-docs repository. A bench capture on a real LRF22VB and LRF50H at a 1.9 m wall confirms the units: the VB module logs about 1709 (mm) and the H module about 196 (cm). See the capture notes.