1
\$\begingroup\$

I bought two HY-SRF05 ultrasonic distance sensors and connected them to BeagleBone Black (one at a time). They are powered with 5V line, so I connected the echo line through resistor divider (3x1kohm) to BBB input (one of GPIOs) which is 3.3V. The trig line is connected directly to BBB GPIO (another one, obviously also 3.3V).

Teoretically the sensors should be able to measure distance up to 400cm. However, when directing the sensors to the ceiling which is about 1,8m away from the sensor I got results of approximately 90cm in case of 1 sensor and approximately 120cm in case of the other one. When the objects are closer to the sensor, the measurements look ok.

Now the questions:

  1. Is the connection setup correct? Or could the low voltage on trig line cause any issues?
  2. Why would there be this 30cm difference in max distance measured?
  3. Anything I can do to measure something about 3m away or should I look for different sensor? If so what do you recommend?
\$\endgroup\$

1 Answer 1

1
\$\begingroup\$
  1. It might cause issues, or it might not. If you don't have a datasheet for your device what voltage levels are acceptable on the trigger input, there is no way to know without measuring and guessing what input voltages are acceptable. Some inputs for 5V devices use TTL compatible input levels, 3.3V is acceptable, but if the 5V device uses CMOS compatible input levels, 3.3V is not acceptable.

  2. It depends on material how it reflects or absorbs acoustic waves. The datasheet conditions are measured under specified laboratory environment, which most likely does not match the environment you put the sensor in,

  3. This is difficult to answer. If this is a robot detecting maze walls, maybe you can arrange maze wall material to more suitable so distances can be measured better. But asking/recommending certain products is off-topic.

\$\endgroup\$
1
  • \$\begingroup\$ Ad. 1 How do I measure then? Ad. 2 The conditions are almost the same: same ceiling, same distance, I just swap the sensor. Ad. 3 I cannot influence material to be detected. \$\endgroup\$ Aug 5, 2021 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.