Hi Team. I am trying to link up a LIDAR Lite v3 with a Pixhawk 2.1, either thru I2C or PWM. - and the LIDAR is not communicating with the PIXHAWK.
At the moment I am going for PWM and I know thru a scope and readout that the LIDAR itself is on and working fine. I have everything set up per this document -
Setting the following parameters:
[RNGFND1_TYPE] = 5 “PWM”
[RNGFND1_PIN] = 54 “AUX5” (if using 4.0.0 or higher any Auxiliary output may be used)
[RNGFND1_MAX_CM] = 3500
[RNGFND1_MIN_CM] = 20
[RNGFND1_SCALING] = 1
[RNGFND1_OFFSET] = 0
[BRD_PWM_COUNT] = 4
And I am getting no readouts in Mission Planner for the LIDAR. Is there anyone out there that has done this and can help? What am I doing wrong?
I have heard I need different drivers? Sorry I am new to this but happy to give any/all info that you may need to help solve this problem. Any help is much appreciated.
Do you have the resistor fitted?
James , are you certain that Analog (pwm) mode has been implemented on chibios yet?
I can’t find it in release notes
That’s a good question. I’d assumed so, as there’s no reason it shouldn’t be (ie
https://github.com/ArduPilot/ardupilot/pull/11951 works just fine)
But I cant see it in releases, according to
@rmackay9 it was scheduled for release 4…
HI James - Thanks for your feedback. Yep I have that Resistor fitted. I tried both 1KOhm as well as 500Ohm
Thank You James for responding.
Yes, the 1K resistor is installed as per this link
http://ardupilot.org/copter/docs/common-rangefinder-lidarlite.html PWM section. Also have a BEC installed with a 470uF cap on the power ground and +5 volts. And we have it connected to AUX5 as per the link above.
I have an oscilloscope probe connected between Power Ground and the Mode Control connection and we see plenty of pulses. The pulse widths change when you put your hand over the LIDAR and raise your hand. Based on this I would suspect the LIDAR is functioning. The pulses have been observed all the way to the AUX 5 pin.
It seems to me, for lack of better terms, that the pixhawk doesn’t know what to do with this signal - aka - unsupported firmware.
OK double checked and it should be working with 4.0 if you follow the updated wiki
@sbofill what firmware release have you loaded ?
I’m on 1.3.69, Build 1.3.7271.14198
@ppoirier, yes I think the PWM input works. I spent some time testing it and reworked the wiki page a bit. The RNGFNDx_TYPE should be set to “5”.
You need to update to 4 so you can use any pwm input, as written in the wiki
You mean update from Build 1.3.7271.14198 to Build 1.4?
And sorry I’m very new to this but I really appreciate all your help - where could I find version 4?
Thanks Matt for the follow-up
Thank you both!! I’ll give that a shot this weekend and let you know how it goes. Really appreciate this.
@ppoirier @Matt_C Thanks for the help. Is this the “v4” firmware I should be loading?
? (From this link:
No need to load beta as latest stable should have the updated driver
I have a PX4v2 btw. So by “Latest Stable” you mean this? (Screenshot below)
@ppoirier @Matt_C Hey this is random but are either of you available for a 5-10 min screenshare? I’d be happy to pay for your time. You guys have been very helpful so far but I’m still confused on what “v4” is and also I’m thinking a quick 5-10 min screenshare with your guidance as I hit these roadblocks would be ideal. Just throwing it out there.
Were you able to connect v3 to Ardupilot through PWM?
I was facing a similar issue!