Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

VL53L0X address programming


#1

Hello

I have made a sumo robot and I can’t manage the multiple sensor bus somehow.

I met the thing by using Github library and changing the addresses of sensors, but I found that the “unique address” according to datasheet, practicaly happens to work temporary, until the power is off.

Please help on making the unique address permanent. Urgent.


VL53L0X -- maximum sensors on I2C arduino bus
#2

Hello.

These sensors revert to the default address when power cycled. It appears that you are not using the XSHUT pin on any of the sensors. The general procedure for using multiple sensors like this on the same bus is to reset the devices one at a time using their XSHUT pins (each connected to something like a dedicated GPIO pin or I2C I/O expander) to assign them unique addresses. In addition to the other forum post you posted a question on, this whitepaper from ST might be helpful for you to refer to.

-Nathan


#3

Dear Nathan

Thank you very much

I used the method for Arduino pinMode setting them as OUTPUT to use XSHUT and, then as INPUT. on the other topic.

I finally understood after reading the detail under product page.

The sensor’s 7-bit slave address defaults to 0101001b on power-up. It can be changed to any other value by writing one of the device configuration registers, but the new address only applies until the sensor is reset or powered off.

Arduino Code Solution here


VL53L0X satellites on X-Nucleo-53L0A1 board
#4

Dear oleglyan,

What value resistor did you use for the XSHUT, SDA, and SCL pins? I just got my boards and I’m not trying to fry my arduino. Thanks for the addressing example that will really help!


#5

XSHUT has a pull-up resistor. Was it 10k or something? By setting pinMode as input, which enters high impedance state, is being pulled to 2.8V by sensor module. changing the mode to output, will activate XSHUT. The line is EMI sensitive for this kind of circuit, must be shielded wire. Or you should use normal level converter.

I usually use 1kohm for every IO pin of arduino, in order not to fry arduino.

This question comes to me time by time. Check out Ruggeduino-ET “Extended Temperature” -40C - 85C, you may find some solutions useful.

Every device with I2C usually has pull-up resistors of 10k for bus capacitance compensation. tau=RC, the bigger the C, the smaller resistance there should be. I suggest to take oscilloscope and see whether the pulses are square enough or not, I’d suggest to add additional pull-up resistors, rare times you might want to add 1k. Be careful of maximum sink current of the devices.