Issue with Operating Two VL53L5CX Sensors on the Same I2C Bus - Nucleo F401RE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-25 1:25 AM
Sure! Here's the rephrased version of your request in English:
I'm using a Nucleo F401RE board with two VL53L5CX sensors. Here are the steps I've taken:
- I've successfully set up one sensor on I2C1 at address 0x52.
- I want to set up the second sensor on I2C1 at address 0x53 and attempt address changing.
- I've created two output pins (LPN1 and LPN2) for each sensor.
- Both sensors are connected to the same SDA and SCL lines of I2C1 using LPN1 and LPN2.
- I've managed to run one sensor at address 0x52 while setting LPN2 to 0 for the other sensor.
- I want to run the second sensor at address 0x53 (changing the address) while setting LPN1 to 0 for the other sensor.
- The address change should occur systematically at startup in the main function before the while loop.
- I want both sensors to work alternately, addressing either 0x52 or 0x53 in the while loop.
Everything works fine individually for each sensor, but when trying to run both sensors simultaneously, I encounter issues. I'm having trouble pinpointing the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-25 2:59 AM
Please show a schematic of your setup - it's a far more effective way of communicating the setup than using words!
How are the VL53L5CX sensors mounted - a custom board? commercial breakout boards? other?
Some good, clear photos of your setup would help.
@rhamine wrote:when trying to run both sensors simultaneously, I encounter issues.
So what "issues", exactly, do you encounter?
@rhamine wrote:I'm having trouble pinpointing the problem.
What have you tried so far? What have you learned from that?
Have you looked at the I2C lines with an oscilloscope to see what's happening?
Please use this button to properly post source code:
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-25 5:06 AM
The issue is that both sensors operate individually on the same bus. I have initialized each sensor separately, and here is the output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-25 6:37 AM
Please use this button to properly post source code:
A complex system designed from scratch never works and cannot be patched up to make it work.
