diode_blade
Joined: 18 Aug 2014 Posts: 55 Location: Sheffield, South Yorkshire
|
Lidar Lite 2 Blue Label |
Posted: Sat Nov 21, 2015 7:18 am |
|
|
For those that might be interested, I have recently purchased a Lidar Lite V2 blue label laser ranger unit from Cool Components for a project to detect distance movement. This unit can operate in two main modes I2C mode or PWM mode, the unit in IC2 mode can initiate a ranging and return various data such as distance, velocity depending on the registers read, etc plenty of info on this unit out there esp on GitHub under robotics.
But I am using it in PWM mode, apart from 5v supply this mode uses just one of the modules connection wires, the Mode wire, this has in series with it a 1k resistor, the trig side of the resistor being wired to PIC_C0
On the LIDAR LITE module side of the 1k resistor I have two monitor wires coming off it to the CCP1 and CCP2 modules, the code that I am using for this is the "EX_CCPMP.C", in the example folder, (and no I won't be posting the code), this code is suited absolutely perfectly for this module.
How the PWM mode works
Pull Trig Low (if you keep it low the Lidar unit repeatedly triggers for continuous ranging),
the lidar unit when it has completed a ranging will pull it's side of the Line high, which is why the said code works so well, the value measured in the code is the pulse width time in uS, divide this by 10 to get distance in cm's, 10 us=1cm from Lidar data sheet using this method.
Have also tested the unit on an Arduino Mega and achieved the same results, again plenty of code for that on previously mentioned forum.
CCS Ver 5.020 PCH command line compiler
Pic: 18F45K22
Lidar Lite Blue Label
MikroElektronika EasyPic V7 Board
Microchip ICD3
Mplab Ver 8.92
Windows 10 O/S on Pc
I know this isn't a code problem but I thought I would post this so if anyone else was going to use one of these I hope it gives them a starting base to work from.
Regards
Dave |
|