I am trying to connect LIDAR-Lite v3 to Pixhawk by PWM for Alt_Hold and FlowHold flight mode.
But It dows not work well.
I setted Pixhawk as below.
- ArduPilot Copter 3.6.3, Quad X
- Pixhawk 2.4.8
- I setted parameters according to wiki guide.
- I wired Pixhawk and LIDAR according to wiki guide. http://ardupilot.org/copter/docs/common-rangefinder-lidarlite.html
- LIDAR is not died. I checked with two LIDAR-Lite v3 but behavior is same.
- I made a cable for PWM connection.
- Connector cable is conducting very well.
- I setted parameters SERVO5_FUNCTION and SERVO6_FUNCTION to Motor5 and Motor6 for my purpose.
- 5V BEC is connected to servo rail (AUX1).
Mission Planner shows sonarrange = 0.
dronekit-python Vehicle.rangefinder returns None.
Do you have some idea to improve this problem?
If you use 3.6.3 Quad Nuttx it should work. But if you use 3.6.3 Quad Chibios there was a problem with the PWM driver not working. See below:
I’ve investigated the LidarLite PWM driver not working under ChibiOS. I’m afraid to say that this is a known missing feature of ChibiOS. It’s on the to-do list to add support for RangeFinders that output PWM but it’s unlikely to be done for the 3.6.0 release. It’s possible we will resolve this in a later point release (i.e. 3.6.1, 3.6.2, etc). Until then I’m afraid the NuttX build is the one to stick with if the LidarLite PWM range finder is a required.
I have not checked yet if the PWM driver is now working because I have changed to I2C connection which is working now for me.
I am using ChibiOS ArduPilot.
I will test I2C connection.
Thank you again.
LIDAR-Lite v3 works well with I2C!
I have just built a I2C cable for lidar light v3, I have capacitor in circuit and have checked Voltage 5.3v from mauch PC. Settings per wiki, To check function I went into status and do not have senor show up at all, I can see power to Lidar pulsing red led/ lazer through small gap at cable connection so it appears to be working. I previously connected via PWM again with properly set up cable, but again no sensor or lidar readings in status page. Do other conditions need to be met EG 3d fix etc for a reading to occur… I2C errors =0, Date on lidar is 2020