Question about sonar sensor(distance sensor) in voxl2
-
I’m trying to integrate a MaxBotix MB1242 (I2C sonar) with VOXL2 and use it in PX4, but I’m running into some issues and would appreciate your guidance.
Hardware setup:
VOXL2
VOXL 2 Ethernet and USB Hub Add-on (MDK-M0062-3-00)
MaxBotix MB1242 (I2C)
Connected via VOXL2 J19 I2C portCurrent situation:
voxl-rangefinder-server is disabled / not running
In QGroundControl, I cannot find the parameter SENS_EN_MBXX
As a result, PX4 does not seem to receive any rangefinder dataQuestions:
Does VOXL2 currently support MaxBotix I2C sonar sensors like the MB1242 through voxl-rangefinder-server?
Is additional configuration or driver support required to enable MB12xx sensors on VOXL2?
Are there any recommended steps to make the sensor visible (e.g., enabling specific services, modifying config files, where to connect)?
Any guidance or example setups would be greatly appreciated.Thanks in advance!
-
I’m trying to integrate a MaxBotix MB1242 (I2C sonar) with VOXL2 and use it in PX4, but I’m running into some issues and would appreciate your guidance.
Hardware setup:
VOXL2
VOXL 2 Ethernet and USB Hub Add-on (MDK-M0062-3-00)
MaxBotix MB1242 (I2C)
Connected via VOXL2 J19 I2C portCurrent situation:
voxl-rangefinder-server is disabled / not running
In QGroundControl, I cannot find the parameter SENS_EN_MBXX
As a result, PX4 does not seem to receive any rangefinder dataQuestions:
Does VOXL2 currently support MaxBotix I2C sonar sensors like the MB1242 through voxl-rangefinder-server?
Is additional configuration or driver support required to enable MB12xx sensors on VOXL2?
Are there any recommended steps to make the sensor visible (e.g., enabling specific services, modifying config files, where to connect)?
Any guidance or example setups would be greatly appreciated.Thanks in advance!
@Daehan-Won The mb12xx px4 driver is not in our build so you would need to add it to the voxl2-slpi build. Which pins are you attaching it to on J19?
-
@Daehan-Won The mb12xx px4 driver is not in our build so you would need to add it to the voxl2-slpi build. Which pins are you attaching it to on J19?
@Eric-Katzfey
Thank you for your response. I would like to connect to pins 7 and 8 of J19.7: I2C3 SDA 3.3V
8: I2C3 SCL 3.3V -
@Daehan-Won The mb12xx px4 driver is not in our build so you would need to add it to the voxl2-slpi build. Which pins are you attaching it to on J19?
@Eric-Katzfey Hi!
Are there any examples, case studies, or helpful resources on modifying or adapting VOXL2 to use a different sonar sensor? -
@Eric-Katzfey Hi!
Are there any examples, case studies, or helpful resources on modifying or adapting VOXL2 to use a different sonar sensor?@Daehan-Won You would need to add the support to PX4 since you are using the DSP I2C pins and only PX4 can access those while it is running. There is some useful developer documentation here: https://docs.modalai.com/voxl-px4-dev-build-guide/. Also visit the PX4 documentation as well. At a high level you'll need to fork our repo, make a branch off of voxl-dev, add the driver to the default.px4board file for voxl2-slpi, build the image, and add a start command into the startup script voxl-px4-start
-
@Daehan-Won You would need to add the support to PX4 since you are using the DSP I2C pins and only PX4 can access those while it is running. There is some useful developer documentation here: https://docs.modalai.com/voxl-px4-dev-build-guide/. Also visit the PX4 documentation as well. At a high level you'll need to fork our repo, make a branch off of voxl-dev, add the driver to the default.px4board file for voxl2-slpi, build the image, and add a start command into the startup script voxl-px4-start
@Eric-Katzfey Thank you for reply!
I will try creating a custom build using the document you provided.
-
@eric-katzfey Hello!
I modified the boards/modalai/voxl2-slpi/default.px4board file in the PX4 firmware as shown below:
CONFIG_PLATFORM_QURT=y
CONFIG_BOARD_TOOLCHAIN="qurt"
CONFIG_DRIVERS_ACTUATORS_VOXL_ESC=y
CONFIG_DRIVERS_BAROMETER_INVENSENSE_ICP101XX=y
CONFIG_DRIVERS_DISTANCE_SENSOR_VL53L0X=y
CONFIG_DRIVERS_DISTANCE_SENSOR_VL53L1X=y
CONFIG_DRIVERS_DISTANCE_SENSOR_MB12XX=y
CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
CONFIG_DRIVERS_LIGHTS_RGBLED_NCP5623C=y
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8308=y
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
CONFIG_DRIVERS_MAGNETOMETER_QMC5883L=y
CONFIG_DRIVERS_POWER_MONITOR_VOXLPM=y
CONFIG_DRIVERS_RC_CRSF_RC=y
CONFIG_DRIVERS_QSHELL_QURT=y
CONFIG_MODULES_COMMANDER=y
CONFIG_MODULES_CONTROL_ALLOCATOR=y
CONFIG_MODULES_EKF2=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_LAND_DETECTOR=y
CONFIG_MODULES_LOAD_MON=y
CONFIG_MODULES_MANUAL_CONTROL=y
CONFIG_MODULES_MC_ATT_CONTROL=y
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
CONFIG_MODULES_MC_POS_CONTROL=y
CONFIG_MODULES_MC_RATE_CONTROL=y
CONFIG_MODULES_MUORB_SLPI=y
CONFIG_MODULES_RC_UPDATE=y
CONFIG_MODULES_SENSORS=y
CONFIG_MODULES_SIMULATION_PWM_OUT_SIM=y
CONFIG_SYSTEMCMDS_UORB=y
CONFIG_SYSTEMCMDS_PARAM=y
CONFIG_ORB_COMMUNICATOR=y
CONFIG_PARAM_REMOTE=yI also added the following line to boards/modalai/voxl2/target/voxl-px4-start:
qshell mb12xx start -X -b 4
After uploading the firmware, setting SENS_EN_MB12XX to 1, and rebooting, the MB1242 I2C sonar sensor works correctly.
However, I would like to use two sonar sensors.
I changed the I2C addresses of the two MB1242 sensors to 0x70 and 0x66, respectively. However, when both sensors are connected to the I2C bus at the same time, PX4 detects only one of them.
Could you please let me know how to configure PX4 on the VOXL2 so that it can detect and use multiple MB1242 I2C sensors simultaneously? Is there any additional configuration to support more than one I2C sonar sensor?
The MB1242 sonar sensors are connected to the J19 I2C port on the VOXL2.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login