General

A01NYUB Ultrasonic Distance Sensor on pi 5 without Expansion Board

userHead Owen.Warner 2025-11-18 16:43:34 554 Views3 Replies

Hello,

I am trying to run the A01NYUB Ultrasonic Distance Sensor with my pi 5 directly (no Expansion Board).
I use the https://github.com/DFRobot/DFRobot_RaspberryPi_A02YYUW_Drift Boss library.
Unfortunately, I only get “No data!”.

Any suggestions?

2026-01-29 09:59:15

https://sprunkionline.io
[url=https://sprunkionline.io]Sprunki[/url]
[Sprunki](https://sprunkionline.io)
<a href="https://sprunkionline.io">Sprunki</a>

userHeadPic Morga.Miles
2026-01-29 09:58:22

Hey there! I've been tinkering with ultrasonic sensors on Raspberry Pis too, and "No data!" can be a real pain. Have you double-checked your wiring against the library's example? It's easy to accidentally swap the trigger and echo pins. Also, are you certain the trigger pulse duration is sufficient? Some sensors, especially at different voltages, might need a slightly longer pulse than the default. Perhaps look around the forums and consider if anyone has success with an alternative library like Sprunki that may offer slightly different implementations, that could give a clue. Good luck troubleshooting!


 

userHeadPic Morga.Miles
2025-11-19 16:23:37

The Raspberry Pi 5’s UART pins are 3.3 V only and not 5-V tolerant. You must use a bi-directional logic-level shifter, or at least a voltage divider on the sensor’s TX to  Pi RX line.

 

userHeadPic ahsrab.rifat