These ultrasonic sonar distance sensors are really common in robotics projects, but they can also be used for automation, interactive art, and motion sensing. They work at about 2cm to 450cm away, but we think 10cm-250cm will get you the best results. Sensors look very similar and have a pair of flippers.

US-100 ultrasonic sensor

The US-100 is very similar to the popular HC-SR04 ultrasonic sensor and even looks the same, but it can work in the UART mode and provide more precise measurements.

Compatible sensors are: HY-SRF05, HC-SR04, HC-SR04 3-5V, US-100, HC-SR04P, US-015, US-016, HC-SR04+, US-026, IOE-SR05, RCWL-1601

Zigbee firmware configuration for US100

It would be best if you used the jumper is on the board to select the UART mode.

The firmware configuration for US100

Connections

P02 (UART RX) → Tx
P03 (UART TX) → Rx
GND → GND
3.3V → VCC
Do not forget about the jumper.

Zigbee firmware configuration for HC-SR04 compatible sensors

This sensor requires a trigger signal to start a measurement, and the firmware uses the “I2C SCL” signal for it. It would be best if you defined it immediately after the HC-SR04 sensor.

Note: the firmware cannot measure a signal width with precision in microseconds. Therefore, the measured distance is rounded to about 15 centimeters. If you need better accuracy, use US100 instead.

The firmware configuration for HC-SR04

Connections

I2C SCL → Trig
HC-SR04 → Echo
GND → GND
3.3V → VCC

Interval

If the value in the “Interval” field is not zero, the firmware executes measurement every N seconds. It sends a new value to a coordinator only if a distance value changes. But the firmware always sends the latest measured value with a periodic report.


There are no comments.

Leave a Reply