Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Canada
Asked — Edited

Dj A Feature Request For Lidar-Lite Laser

Hello DJ
I'm using the LIDAR-Lite Laser Rangefinder by PulsedLight in my project
and would like to know if you can add support for it in EZ-Builder/ Ez-Script.

Its very similar to the " GetPing( trigger port, echo port ) " command except the trigger port is low and the echo port measures the low to high output pulse width in milliseconds .

Thanks


(http://www.robotshop.com/ca/en/lidar-lite-laser-rangefinder.html#Useful%20Links)

AI Support Bot
Related Content
Synthiam
#3  
The the LIDAR-Lite Laser Rangefinder by PulsedLight also supports I2C as an interface. It should be possible to write an ARC script that can talk to the LIDAR without adding a control.

If it does get supported in ARC. Perhaps it could be supported similar to a ping sensor type control and a radar type control which would control a servo to sweep the LIDAR as well.

The manual for the LIDAR is at:


http://www.robotshop.com/media/files/pdf/operating-manual-llm20c132i500s011.pdf
PRO
Synthiam
#4  
What is the most popular lidar sensor?
#5  
There only seem to be two, Lidar Lite by PulsedLight and the Lidar unit out of the Neato vacuum robot.
PRO
Synthiam
#6  
Pulsed Light seems to be more attainable. i'll order one to try out
#7  
Hi DJ

If possible try and make it flexible to also use the Neato Lidar as I have just ordered that one ...

Cheers

Chris

ps - I am looking forward to ordering some of these new sensors when they become available in the shop too
#8  
That would be great DJ .
I'm using it with the arduino nano and communicating with the EZ-B with the new com feature you added.

The sensor has a good range and has no issues picking up soft targets like the PING does. Don't want to run into those pesky humans wearing those bulky sweaters !

I just keep the trigger pin low and the echo pin measures the time the pin goes to low and back to high.
#9  
Hi MTiberia

Can you post a detailed description of how you did this? I would find it very helpful.

Thanks

Chris
#10  
I'm using the COM port feature to communicate with the Arduino Nano so you need to be tethered to your computer, You should be able to communicate with the Nano through the EZ-B UART ports but I haven't tried it. It would be easier
to just use the EZ-B.

This unit supports two modes to communicate with your microcontroller,
I2C or a bi directional mode with line #3 from the Pulsed Light, see the diagram in the Puled Light manual , lines 2,4 and 5 aren't used.

I chose the second method because it is very similar to the PING sensor.

You need to attach a 1K ohm resister to line #3 to make sure the output pin on the Nano( D11) is pulled low and attach a jumper to D12. Voltage to the Pulsed Light is supplied from the 5v pin on the Nano and ground is connected to the Nano's ground.

I modified the Arduino sample code downloaded from the Pulsed Light documents so that when EZ-Script sent 255 to the Nano it would take a reading and send it back to EZ Buider running on my computer.



User-inserted image


The Arduino Code :

unsigned long pulse_width;
unsigned char Mantis,yy=255;



void setup()
{
Serial.begin(115200); // sets the serial port to 115200
pinMode(11, OUTPUT); // Set pin 11 as trigger pin
pinMode(12, INPUT); // Set pin 12 as monitor pin
digitalWrite(11, LOW);// Set trigger LOW for continuous read


}

void loop() {


if (Serial.available() >0) {

Mantis=Serial.read();

if ( Mantis==yy) {

pulse_width = pulseIn(12, HIGH);
pulse_width = (pulse_width/10)-25; // 10usec = 1 cm of distance for LIDAR-Lite *** subract or add $AnyNumber to calibrate sensor****
int LSB_pulse_width=pulse_width % 256;
int MSB_pulse_width=pulse_width /256;

Serial.write(char(LSB_pulse_width));
Serial.write(char(MSB_pulse_width));


}

}
}


On the EZ-Script side:



ReadingPulsedLightLIDAR.EZB
#11  
@mtiberia How accurate (and stable) do you find the Lidar-lite to be? Pings have a habit of dancing all over the place. Trying to pin down any kind of accuracy is difficult with a ping. If DJ adds support for these I am definitely going to buy a few...
#12  
@ Richard
You have to calibrate it, I needed to subtract 25 to get an accurate reading.
Just came in from trying it outdoors and was getting accurate readings to 13m in bright sunshine. It also depends how quickly you update, I have a 200 mille second delay between readings.



I found the PING wouldn't do well with soft targets like drapes couches and clothes but the Lidar-lite Laser has no issues.
#13  
@mtiberia 13m! Wow,,,, Nice... I have a couple of arduinos so I may just buy one and try what you did... Still, I do hope we get support for it in ARC...
#14  
Thanks for taking the time to help - all my purchases will be coming in over the next couple of weeks and this will be very helpful.

Cheers

Chris