
mtiberia
Canada
Asked
— Edited
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)
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
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
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.
Can you post a detailed description of how you did this? I would find it very helpful.
Thanks
Chris
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.
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
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.
Cheers
Chris