A01NYUB Ultrasonic Distance Sensor on pi 5 without Expansion Board
Jay.Be 2025-11-08 21:11:01 597 Views5 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 library.
Unfortunately, I only get “No data!”.
Any suggestions?
The A01NYUB’s TX is 5 V logic. The Pi’s GPIO RX pin is 3.3 V tolerant only.
You must use a voltage divider (e.g., 4.7 kΩ + 10 kΩ) or a logic-level shifter on the TX line to avoid damaging the Pi.
ahsrab.rifat Thanks, I will look into this.
What happens if I connect the sensor to the PI's 3V power supply? Shouldn't it then work without resistors, since it runs on 3V?
Only connecting VCC to 3V will not work. voltage divider between RX, TX lines are also essential.
It actually works without voltage divider when connected to the standard 3V3 pin of the Raspberry Pi. However, you have to use the standard library from Raspberry Pi “https://projects.raspberrypi.org/en/projects/physical-computing/12” . The DFROBOT lib just still gives “No data!” for whatever reason.

