Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rangefinder Sensor (VL53L1X) not working an Speedybee F7V3 #9188

Closed
maxledfreak opened this issue Jul 22, 2023 · 5 comments
Closed

Rangefinder Sensor (VL53L1X) not working an Speedybee F7V3 #9188

maxledfreak opened this issue Jul 22, 2023 · 5 comments

Comments

@maxledfreak
Copy link

Current Behavior

Sensor VL53L1X on i2C is not detected. Measurement with logic analyzer shows no request to sensor. To validate this behaviour the following procedure were done:
  1. Measurment with no rangefinder sensor selected
    image

Measurement:
image

  1. Measurment with rangefinder sensor selected (VL53L1X)
    image
    Measurement:
    image

Steps to Reproduce

1.Reboot FC

Expected behavior

Sensor is deteced with address 0x76 (7 bit address)

Suggested solution(s)

Maybe mapping to all ragefinder sensors is connected to internal bus like Acc., Baro etc.

Additional context


# version

INAV/SPEEDYBEEF7V3 6.0.0 Mar 22 2023 / 11:23:04 (084101a)

GCC-10.2.1 20201103 (release)

  • FC Board name and vendor:
  • INAV version string: SPEEDYBEEF7V3
@druckgott
Copy link
Contributor

#9200

@maxledfreak
Copy link
Author

@DzikuVx @druckgott fix is not working

@druckgott
Copy link
Contributor

Can be closed, fixed an tested with @maxledfreak
#9221

@mmosca mmosca closed this as completed Aug 10, 2023
@mxchinist
Copy link

mxchinist commented Sep 18, 2023

I've had issues making the VL53L1X (bought on aliexpress) work with INAV (version 5.1.0.)
To make it work, I had to add this into the target.h file (inav-release_x.x.x\src\main\target\YOURTARGETNAME\target.h) before compiling :

#define USE_RANGEFINDER
#define RANGEFINDER_I2C_BUS BUS_I2C1
#define USE_RANGEFINDER_VL53L1X

(your FC might be using BUS_I2C2 if it has one, check where is the magnetometer configured, that's where most likely will the rangefinder work)

I also had to check the sensors address (all the aliexpress VL53L0X and VL53L1X sensors seems to have 0x29 address).
And set up the correct address in inav-release_x.x.x\src\main\target\common_hardware.c (in this case the 0x29) :

#if defined(VL53L1X_I2C_BUS)
BUSDEV_REGISTER_I2C(busdev_vl53l1x,     DEVHW_VL53L1X,      VL53L1X_I2C_BUS,    0x29,               NONE,           DEVFLAGS_USE_RAW_REGISTERS,  0);
#endif

Then the sensor, after connecting to 5V,GND,SCL and SDA pins (SDA->SDA, SCL->SCL)* on your FC should work.

@maxledfreak
Copy link
Author

@mxchinist This issue includes 2 PR's. Second one works. That means rangefinder works. Default I2C adress is the correct one. Only matching of rangefinder I2C bus was missing.

@mmosca @DzikuVx is it possible that you build a .hex for me with stable 6.0 version + this PR for this board for testing? We tried it like described above, but we noticed a strange behaviour related to the GPS. Maybe we did anything wrong in building SW correct. rangefinder works as expected. We tried same rangefinder sensor on Speedybee F4 Wing and can not notice this strange behaviour. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants