cancel
Showing results for 
Search instead for 
Did you mean: 

Set permanent I2C address to TOF

fpiondrancy
Associate II

Hello,

I have already use VL53L0X sensor provided by AZ-Delivery.

My main problem is that I2C address can be changed but NOT permanently.

I am looking to "Adafruit VL53L4CX Time of Flight Sensor". But I don't want to discover the same problem, that is I2C address can not be change permanently. 

Does the base-component VL53L4CX have the same "disability" ?

Is there a TOF component allowing to set and fix this important behavior ?

Best regards.

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

The VL53L sensor family all respond to the same address, and all require an address change if you use more than one of them. In fact the all use the same IP to do the I2C interface.

The problem with adding some persistent memory is that it would require things like a +12 volt supply and additional pins. It drives up the cost and most people are fine with it. A bit of hassle when you write the code but after that It's not much of an issue.

I like the Adafruit boards (as well as the Pololu and Sparkfun ones). They work well but you are going to need to copy that address change software over from your VL53L0 implementation. 

Sorry about that. 


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

View solution in original post

3 REPLIES 3
John E KVAM
ST Employee

The VL53L sensor family all respond to the same address, and all require an address change if you use more than one of them. In fact the all use the same IP to do the I2C interface.

The problem with adding some persistent memory is that it would require things like a +12 volt supply and additional pins. It drives up the cost and most people are fine with it. A bit of hassle when you write the code but after that It's not much of an issue.

I like the Adafruit boards (as well as the Pololu and Sparkfun ones). They work well but you are going to need to copy that address change software over from your VL53L0 implementation. 

Sorry about that. 


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

Thanks.

On other simple device like SRF08 (Ultra sonic range finder), address can be changed by software and saved permanently. And the component needs only 5vdc.

What I understand of the possibility to set the address at each time the software starts, is to use two additional wires (GPIO & XSHUT) with each sensor, and to process an "initialisation" sequence.

It is more complex than to have a dedicated address.

My robot  manages 3 sonars SRF08, 2 300w motors (with Saberbooth board), 1 GPS, one magnetometer LSM303, 2 USB cameras and 1 2D lidar. In my case, economy of wires number is important. But it's only my point of view 😉

Best regards.

 

It's ok.

I succeed to do it.

- shutdown all Tofs with the shutdown-pin set to 0;

- on each tof,

  * set shutdown pin to 1

const VL53L0X_I2C_SLAVE_DEVICE_ADDRESS = 0x8A
let defaultAddress = 0x29
let realCurrentAddress = i2cBus.readByteSync(defaultAddress, VL53L0X_I2C_SLAVE_DEVICE_ADDRESS)
if (realCurrentAddress == defaultAddress) {
    i2cBus.writeByteSync(0x29, VL53L0X_I2C_SLAVE_DEVICE_ADDRESS, newAddress)
}