CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Lidar Lite 2 Blue Label

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
diode_blade



Joined: 18 Aug 2014
Posts: 55
Location: Sheffield, South Yorkshire

View user's profile Send private message Send e-mail

Lidar Lite 2 Blue Label
PostPosted: Sat Nov 21, 2015 7:18 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group