cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L0X Arduino vs STM

ihottenrott
Associate

Hello,

 

I have multiple VL53L0X sensors that I am communicating with over an STM32 board. Two of the sensors started throwing errors (only reading 8191), and so I moved them to an Arduino for the flexibility of using the downloadable API. They worked perfectly fine on the Arduino, so I am wondering what the issue with the STM code might be. I am using the following repo: https://github.com/MarcelMG?tab=repositories

along with i2c code that I wrote because I have a different stm model, but don't see that being the problem.

 

Any help would be appreciated!

2 REPLIES 2
EliasB
ST Employee

Hi ihottenrott,

Interesting. Based on your description all I can suspect is that the voltage regulators on the arduino are doing a better job than on the STM32. Let's try the following: Enable only one sensor. Check if it ranges properly and scope out the power rail to check for any instability. If all works well and power seems ok with just one, enable a second sensor, and scope the power rail with now two sensors ranging. My guess is that you are hitting a power limitation on the STM32 with however many sensors you are running and therefore some are throwing errors. Please let me know your findings.

 

Elias

Zhiyuan.Han
ST Employee

Hi

8191 is not a random data, this value will be reported when no valid ranging data is ready. 

May be there is some ESD or other noise issue stopped the sensor, have you tried to reset the device by power off and power on the device on the STM board?

 

Br

Zhiyuan.Han


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.