Adding LIDAR Lite v3 to Ultraborg I2C wiring
Forums:
I'm in the process of trying to add a Lidar unit connected via I2C because SR04 units are not as accurate as I would like.
I currently have an Ultraborg and two PicoBorg Reverse connected to a RPi3b driving various motors. (One PBR will be upgraded to ThunderBorgs at some point).
I need to add a 680uF capacitor between the 5v supply and Ground that go to the Lidar unit. The 5v and Ground also goes to the Borg units in the daisy chain. All three PiBorg units wiring comes off a Hat I have added to the Pi, is there an issue in adding the capacitor? Will it affect the running of the PiBoprg stuff or visa versa?
Hope this makes sense.
piborg
Mon, 04/16/2018 - 18:10
Permalink
Adding a capacitor between 5V and GND
The capacitor you are adding between 5V and GND is used to keep the 5V level stable. In this case the added stability is likely to help all of the boards work properly by removing any "noise" they each add to the 5V line.
Both the UltraBorg and the PicoBorg Reverses already have capacitors onboard for either the 5V or 3V3 lines for exactly the same reason, as do the ThunderBorgs. As these lines are supposed to be a nice steady level adding more capacitors will generally improve on their effect, or at worst will have no effect at all.
The only things to make sure are:
METTAUK
Tue, 04/17/2018 - 12:39
Permalink
Implementing LIDAR Lite v3
Thanks for that, now working but had to roll back kernel to 4.4.50 from Feb 2017 to get it working.
Any hints on implementing this where I have the LIDAR sweeping across the front from about -45 to +45 (using a servo) to avoid obstacles. With the SR04 units it was easy - if distance to USM1 < x turn right if distance to USM2 < x turn left etc.
With one lidar sensor in a sweeping action I feel lost?
/
piborg
Fri, 04/20/2018 - 11:22
Permalink
Sweeping distance
I would start with the following logic:
This assumes that above 0 means the LIDAR is pointing right, if not swap the left and right turns above.
With that in place you should be able to avoid obstacles, but it will not be the best movement. You can then build upon it by steering harder if the objects are closer to 0 degrees and less sharply if they are at a greater angle.
Alternatively you can try and aim the robot for the angle with the largest distance reading. This will be smoother and find a better path, but it runs the risk of trying to get through a gap which is too small for the robot :)