Change I2C Address TOF10120 Sensor Laser Distance

Hallo zusammen,
ich habe ein kleines Projekt bei dem ich vier TOF10120 (Time-of-Flight) Sensoren verwenden will.
Leider gibt es dazu nur sehr wenig Informationen.

Das ist der Sensor:
TOF10120 kaufen

Videos
TOF10120 Video 1
TOF10120 Video 2

Es gibt noch einen anderen TOF-Sensor (VL53L0X) mit einer Anleitung zum ändern der Adresse:
Robojax VL530 I2C change

Leider finde ich sonst nichts wie ich die I2C-Adresse ändern kann am besten dauerhaft, oder am Anfang des Programms.
Einen I2C Multiplexer möchte ich erstmal ausschließen, da dieser wieder platz und Strom benötigt.

Ich hoffe mir kann jemand weiterhelfen.

Vielen Dank schon einmal

Hello everybody,
I have a small project where I want to use four TOF10120 (Time-of-Flight) sensors.
Unfortunately, there is very little information on this.

Unfortunately, I find nothing else how I can change the I2C address permanently, or at the beginning of the program.
I would first like to exclude an I2C multiplexer, because it needs space and power again.

I hope somebody can help me.

Thank you very much

From your link you give the TOF sensor outputs an async serial signal. That will not communicate with a I2C interface unless you put a UART between the TOF and the I2C. You can use the software serial library and use most any pin. Set it for 9600 and you should be off and running. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

I would like to set the I2C address this is what i have managed to find so far,

In the data sheet translated to English it says

Set I2C slave ID

Command: s7-xxx #

Return information > Setting success: ok Setting failed: fail

Description: xxx = 1 ~ 254 (0x01 ~ 0xFE) Default 164 (0xA4)

Routine

Command = string input box Send = s4-1000

Explanation = OK Return information = set successfully: ok means the distance is set up to 1000mm



Apparently it has a Nuvoton N76E003AQ20 MCU inside handling the I2C

How do I send a command via I2C? any ideas are welcomed

I have tried this in the setup loop but no response or change

Wire.beginTransmission(0x52); // START I2C COMMUNICATION WITH TOF (0x52 / 82 = TOF ADDRESS)
Wire.write("s7-168"); // WRITE I2C COMMAND WORD TO TOF 168 = 0x54 / 84
Serial.println("");
Serial.println("New address writen to i2c: ");
Serial.println("");
Wire.endTransmission(); // STOP I2C COMMUNICATION

OK i have done it! but not by code

I set up my ESP8266 as a usb to serial board using this code

void setup()
{
 pinMode(0,INPUT);
 pinMode(1,INPUT);
}
void loop()
{

}

connected the sensor to the RX - TX pins of the ESP

once connected the serial monitor outputs the distance continually,

the next step is to enter the command in the serial monitor

s7-168#

  • s7- = register for the slave address

  • 168 = address to change it to between 0-254

  • = end command

if the command is succesful you will see an ok! response

Hope this helps someone out there

1 Like