Need help with Orangutan X2 and leddar one LIDAR

Hi,

I’m using Leddartech Leddar one http://www.robotshop.com/en/leddartech-leddarone-optical-rangefinder-rs-485.html for obstacle avoidance and I’m using RS-485 breakout board to connect the Orangutan x2 with lidar.
http://www.robotshop.com/en/sfe-uart-to-rs-485-converter.html
The following is the pin configuration.
RS-485-- 5v pin to 5v pin on X2, GND to GND, RX on 485 to TX on X2, TX on 485 to RX on X2.
Lidar— 5v pin to 5von X2, GND to GND, RX on lidar to A on RS-485, TX on lidar to B on RS-485.
The following is the code for that,

#include <pololu/orangutan.h>
int main()
{
char data_receive[32];
unsigned char data_receive_position=0;
serial_set_baud_rate(UART0,9600);
serial_receive_ring(UART0, data_receive,sizeof(data_receive));

while(1)
{
while(serial_get_received_bytes(UART0) != data_receive_position)
{
if( data_receive_position == sizeof(data_receive_position)-1 )
{
	data_receive_position=0;
}
else
{
	data_receive_position++;
}
lcd_goto_xy(0,0);
print("received_byte= ");
print_unsigned_long(data_receive[data_receive_position]);
}
}
}

The thing is I’m not seeing any output on LCD.
Any thing regarding this issue will help me a lot.

Hello.

Has the LCD ever worked before? It is possible that the Orangutan X2 robot controller’s 5V pin is not able to source enough current for the two connected boards (the LeddarTech LeddarOne Optical Rangefinder (RS485) and the UART to RS-485 converter). The 5V on-board regulator can source around a few hundred milliamps, and LCD screen draws quite a bit it. Can you try powering the sensor and converter from a separate power source to see if that helps?

- Amanda

Hi,

The RS-485 breakout board and LIDAR are getting power, I’ve checked it using the multimeter and LCD is working too. But the thing is I’m not seeing any output from LIDAR- on LCD it is showing 0. Is there any wrong with the code?

On the LIDAR sensor’s product page (under the “Interfaces” heading), it mentions that the module uses the MODBUS protocol to interface with it. From your code, it does not look like you are using that protocol, which is probably why the Orangutan X2 is not getting any readings back from the sensor. You might try contacting the manufacturer, LeddarTech, to get specific details on how to communicate with the sensor.

- Amanda