Zio Ultrasonic Distance Sensor - HC-SR04 (Qwiic)

Hi

Running on a RPI 4 with raspbian lite + Qwiic pHAT . Got 3 sensor to prototype a room controler. 2 sensor work fine. But the ultrasonic sensor does not appear in i2cdetect at all.

I’ve try your debug tutorial, change cable, plug, using serie or alone. Nothing. Am i missing something ? Just DOA ?

Hi neuraxis.

For reasons I don’t understand, Zio decided to use 0x00 for an I2C address on the Zio Ultrasonic Distance Sensor.

Since 0x00 and 0x01 are technically reserved addresses, most I2C scanner utilities won’t report them even if they are present on the bus. I’m not sure about the Pi, but if you modify the Arduino I2C scanner sketch to check 0x00, it will report that when a Zio Ultrasonic sensor is attached to the I2C bus on an Uno.

I’ve attached a copy of the modified Arduino sketch if you’d like to give it a try.

I2C_Scanner.zip (1.05 KB)

You nailed it

======================================================================================================

Scanning for device on I2CBus : 1

Address range : 0x0 to 0x78

======================================================================================================

Device found on: 0x0

Device found on: 0x5b

Device found on: 0x77

Thank you very much . Any hope for a python/i2c code example for this sensor ?

i2cScan.zip (481 Bytes)

Unfortunately the only sample code we have at the moment is what the manufacturer has supplied and it’s Arduino code. You can find that at the link below.

https://github.com/ZIOCC/Zio-Qwiic-Ultr … Test%20(1)

I had the Zio working and I changed this code and it stopped working. I changed the code back and it still is not working. Did I brick the Zio?

I changed the write command from measure command 1 to measure command 0.

Wire.beginTransmission(SLAVE_ADDR); // transmit to device #0

Wire.write(0); // measure command: 0x00

Wire.endTransmission(); // stop transmitting

The Zio stopped transmitting distances.

I Changed the write command back to measure command 1. It still would not transmit distances.

Wire.beginTransmission(SLAVE_ADDR); // transmit to device #0

Wire.write(1); // measure command: 0x01

Wire.endTransmission(); // stop transmitting

KPack, did you do a full power reset? (unplug-replug)

Brandon - Yes, I unplugged and plugged back in.

Are you still able to beginTransmission( )?

I don’t believe it was bricked by changing that value. Something else must have happened. However, I would suggest that you send me a PM with your order number or file an RMA request at https://sparkfun.com/returns if you purchased from us.