Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Lidar-Lite Help Please (http://www.chiefdelphi.com/forums/showthread.php?t=142917)

khannasusa 31-01-2016 11:34

Lidar-Lite Help Please
 
2 Attachment(s)
We are trying to Use Lidar-Lite we bought last year to integrate with a simple labview project to measure distance.

On our RoboRio, a Navx is connected to the MXP port. On the Navx I2C port, we have connected Lidar wires.

Wires from Lidar
1) Red Pin1 to Navx I2C + pin
2) Pin 6 GND to Navx I2C GND Pin
3) Pin 4 SCL to Navx I2C SCL Pin
4) Pin 5 SDA to Navx I2C SDA Pin


Attached are images which show LV open and read distance logic.

We are constantly getting errors from read operation -


<b>Complete call chain:</b>
i2clib_write.vi
WPI_I2CWrite.vi
Lidar Controller.vi
SubSystems.vi
Robot Main.vi
ERROR -1 i2clib_writeread.vi<ERR>
No such device or address


Can someone please help us what we are doing wrong?
thanks
sanjay

slibert 31-01-2016 12:13

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by khannasusa (Post 1532896)
We are trying to Use Lidar-Lite we bought last year to integrate with a simple labview project to measure distance.

On our RoboRio, a Navx is connected to the MXP port. On the Navx I2C port, we have connected Lidar wires.

Wires from Lidar
1) Red Pin1 to Navx I2C + pin
2) Pin 6 GND to Navx I2C GND Pin
3) Pin 4 SCL to Navx I2C SCL Pin
4) Pin 5 SDA to Navx I2C SDA Pin


Attached are images which show LV open and read distance logic.

We are constantly getting errors from read operation -


<b>Complete call chain:</b>
i2clib_write.vi
WPI_I2CWrite.vi
Lidar Controller.vi
SubSystems.vi
Robot Main.vi
ERROR -1 i2clib_writeread.vi<ERR>
No such device or address


Can someone please help us what we are doing wrong?
thanks
sanjay

Can you please confirm two things:

- that your Lidar Lite is the original (V1) Lidar Lite? I've heard that there are some differences in behavior w/the new V2 Lidar Lite (I think it has a blue label on it, whereas the V1 has a silver label)
- since the Lidar Lite is receiving power from the navX-MXP, and since it requires 5VDC input voltage, can you confirm that the voltage select jumper on the navX-MXP is set to 5VDC (as opposed to 3.3VDC)?

dougwilliams 31-01-2016 12:58

Re: Lidar-Lite Help Please
 
Our team has also tried to get the Lidar-Lite to work, without success. We have the original (silver label) version. We tried the RoboRio standalone port as well as chained through the NavMXP I2C ports, with a without pullups, and different voltage supplies.
It works fine on an Arduino.

We are coding in C++.

slibert 31-01-2016 13:57

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by dougwilliams (Post 1532938)
Our team has also tried to get the Lidar-Lite to work, without success. We have the original (silver label) version. We tried the RoboRio standalone port as well as chained through the NavMXP I2C ports, with a without pullups, and different voltage supplies.
It works fine on an Arduino.

We are coding in C++.

Here's a link to the Java code we had working last year (this was a V1 Lidar Lite connected to the navX-MXP I2C port, powered w/5V). https://github.com/kauailabs/kauaibo...ems/LIDAR.java

You may find something in there that helps.

Last year it only worked w/the MXP I2C port and not with the RoboRIO onboard I2C port.

Let me spend some time getting this to work again, this time using the 2016 RoboRIO Firmware; I'll let you know what I find, may take a day or two.

- scott

Bpk9p4 31-01-2016 14:22

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by khannasusa (Post 1532896)
We are trying to Use Lidar-Lite we bought last year to integrate with a simple labview project to measure distance.

On our RoboRio, a Navx is connected to the MXP port. On the Navx I2C port, we have connected Lidar wires.

Wires from Lidar
1) Red Pin1 to Navx I2C + pin
2) Pin 6 GND to Navx I2C GND Pin
3) Pin 4 SCL to Navx I2C SCL Pin
4) Pin 5 SDA to Navx I2C SDA Pin


Attached are images which show LV open and read distance logic.

We are constantly getting errors from read operation -


<b>Complete call chain:</b>
i2clib_write.vi
WPI_I2CWrite.vi
Lidar Controller.vi
SubSystems.vi
Robot Main.vi
ERROR -1 i2clib_writeread.vi<ERR>
No such device or address


Can someone please help us what we are doing wrong?
thanks
sanjay

I also just bought the lidar lite and am have a lot of trouble getting it to work withthe roborio. I found some other sources but have not had any luck with them

here is some example code http://www.chiefdelphi.com/forums/sh...0&postcount=44

also some people had luck with pull up resistors http://www.chiefdelphi.com/forums/sh...d.php?t=135043

let me know if you have any luck. Can you get yours to work with an arduino example? Mine always reads 0

slibert 31-01-2016 14:29

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by Bpk9p4 (Post 1532977)
I also just bought the lidar lite and am have a lot of trouble getting it to work withthe roborio. I found some other sources but have not had any luck with them

here is some example code http://www.chiefdelphi.com/forums/sh...0&postcount=44

also some people had luck with pull up resistors http://www.chiefdelphi.com/forums/sh...d.php?t=135043

let me know if you have any luck. Can you get yours to work with an arduino example? Mine always reads 0

V2 or V1? I've heard that the I2C protocol for communication to V1 is different than V2....

I'm suspicious of you can't get it working on an Arduino that (if you've verified your wiring) you are using V1 protocol to talk to V2, or vice versa. Definitely recommend getting this working before going further w/the RoboRIO.

Bpk9p4 31-01-2016 14:50

Re: Lidar-Lite Help Please
 
i am using V1.

The arduino code i am using is from this link https://github.com/PulsedLight3D/LID...master/Arduino

it does not say if it is version 1 or 2. Does anyone have a link to v1 arduino lidar lite code?

khannasusa 31-01-2016 17:04

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by slibert (Post 1532917)
Can you please confirm two things:

- that your Lidar Lite is the original (V1) Lidar Lite? I've heard that there are some differences in behavior w/the new V2 Lidar Lite (I think it has a blue label on it, whereas the V1 has a silver label)

V1; Silver Label


- since the Lidar Lite is receiving power from the navX-MXP, and since it requires 5VDC input voltage, can you confirm that the voltage select jumper on the navX-MXP is set to 5VDC (as opposed to 3.3VDC)?

5V. Sorry I should have mentioned it in my original email.

The same Lidar wiring and setup was used successfully on an Arduino last summer to measure distance. So we are sure that Lidar is OK. But this device has no status LED to tell me otherwise.

Thanks for your help

Bpk9p4 31-01-2016 17:40

Re: Lidar-Lite Help Please
 
Does anyone that has gotten this sensor to work have a picture of how they weird it up to the roborio?

gpetilli 31-01-2016 21:03

Re: Lidar-Lite Help Please
 
Is Lidar Lite class I (does it meet R9-D)?

slibert 31-01-2016 22:42

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by gpetilli (Post 1533167)
Is Lidar Lite class I (does it meet R9-D)?

Yes it's class 1 laser (as long as you don't remove the sensor's housing), you can read more about this in the Lidar Lite Datasheet.

Bpk9p4 02-02-2016 14:55

Re: Lidar-Lite Help Please
 
anyone have any luck with this yet?

slibert 02-02-2016 18:44

Re: Lidar-Lite Help Please
 
2 Attachment(s)
Quote:

Originally Posted by Bpk9p4 (Post 1533988)
anyone have any luck with this yet?

My first round of testing with this is indicating that the RoboRIO MXP I2C port is behaving a bit differently from how it did last year, which impacts the LidarLITE communication.

Summary of Last year: We were able to get LidarLite (V1) working using the MXP I2C port (plugged into the navX-MXP I2C Expansion connector), but NOT able to get LidarLite to work w/the same code via the RoboRIO's onboard I2C connector.

This year the behavior has reversed!

Now this year: We are able to get LidarLite (V1) working using the RoboRIO onboard I2C port, but not using the MXP I2C port (plugged into the navX-MXP I2C Expansion port). The same code was used, the only difference was the Port enum value passed into the LidarLITE constructor specified a different port.

When it doesn't work, all 0s are returned, and the WPI library indicates that the transaction was aborted.

Attached are the two small java code files used in the test. As noted in the comment in robotInit() method of Robot.java, it works w/the RoboRio onboard I2C port, but not w/the MXP I2C port.

I do plan to break out a logic analyzer and see if I can figure out what's different on the two ports, but don't know when I'll get a chance to do that, maybe this weekend.

But I would recommend trying the RoboRIO onboard I2C connector, which works for me using the 2016 firmware.

sraque 03-02-2016 08:54

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by Bpk9p4 (Post 1533988)
anyone have any luck with this yet?

Sorry, I meant to reply sooner and it fell off my plate.

We got a V1 to work just fine with RIO this past summer.

Use the on-board I2C port, not the MXP one.

Our labview code can be found as part of our Marvin T release
http://www.chiefdelphi.com/forums/sh...d.php?t=140815

Bpk9p4 03-02-2016 09:34

Re: Lidar-Lite Help Please
 
any chance you could post a wiring diagram of how you had it wired?

slibert 03-02-2016 12:39

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by Bpk9p4 (Post 1534359)
any chance you could post a wiring diagram of how you had it wired?

Lidar Lite Pinout is on page 8 of this datasheet: http://www.robotshop.com/media/files...32i500s011.pdf

RoboRio onboard I2C pinout is displayed on the silkscreen of the robot itself.

Simply connect RoboRio -> Lidar Lite:

GND -> Signal/Power Ground
3.3V -> POWER_IN
SCL -> I2C Clock (SCL)
SDA -> I2C Data (SDA)

My V1 sensor worked fine w/the 3.3V power pin from the RoboRIO onboard I2C connector - but you could provide it 5V power instead from one of the 5V RoboRio power rails (or the VRM) and that should work too.

Bpk9p4 03-02-2016 13:13

Re: Lidar-Lite Help Please
 
thanks. Some people were saying you need a pull up resist to get it to work. Sounds like you got it to work without one?

RyanN 03-02-2016 13:20

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by Bpk9p4 (Post 1534483)
thanks. Some people were saying you need a pull up resist to get it to work. Sounds like you got it to work without one?

The roboRIO has 2.2k pull-up resistors on the I2C pins as mentioned on page 15 of the User Manual.

khannasusa 06-02-2016 09:47

Re: Lidar-Lite Help Please
 
1 Attachment(s)
Hi All

Thanks for all your posts and replies. Here is the final update from our experiments -

we looked at the example from Marvin T MARS Team 2614. Thanks "sraque".

There are Lidar Open and read VIs and they work as-is. Also we have our Lidar connected to I2C on NavX via MXP ports on roborio

I have attached 2 images for open and read snippets from our Begin.vi and Lidar controller VIs.

--sk

Bpk9p4 06-02-2016 11:17

Re: Lidar-Lite Help Please
 
Looks like you forgot to post the begin. Could you post it

sraque 07-02-2016 08:53

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by khannasusa (Post 1535888)
Hi All

Thanks for all your posts and replies. Here is the final update from our experiments -

we looked at the example from Marvin T MARS Team 2614. Thanks "sraque".

There are Lidar Open and read VIs and they work as-is. Also we have our Lidar connected to I2C on NavX via MXP ports on roborio

I have attached 2 images for open and read snippets from our Begin.vi and Lidar controller VIs.

--sk

You are welcome. I could not figure out from your post if it is now working or not. If not, connect to the main roborio i2c port, not MXP. From last year, there were issues with the MXP i2c port. They may have been fixed this year, but I do not know.

Bpk9p4 09-02-2016 00:54

Re: Lidar-Lite Help Please
 
I have tried both of your code and i keep getting the same error saying

<b>Complete call chain:</b>
i2clib_writeread.vi
WPI_I2CRead.vi
Lidar Read.vi
Simple Digital Output.vi
ERROR -1 i2clib_write.vi<ERR>
Device or resource busy


<b>Complete call chain:</b>
i2clib_write.vi
WPI_I2CWrite.vi
Lidar Read.vi
Simple Digital Output.vi
ERROR -1 i2clib_writeread.vi<ERR>
Device or resource busy

Has anyone seen this error before. Bellow is my code and a picture of the error log

Error log: http://imgur.com/II5VMzV
main code: http://imgur.com/CKZ7Dzk
open code: http://imgur.com/CKZ7Dzk
read code: http://imgur.com/UD1j4qk

wiring
Power: 3.3 on-board from the i2c port
Ground: on-board from the i2c port
SDA: on-board from the i2c port
SCL: on-board from the i2c port

Richard100 09-02-2016 11:07

Re: Lidar-Lite Help Please
 
Need to see your Open code. The links for Open and Main both show main code.

Is you roboRIO I2C power jumper set to 3.3 V for the On-Board I2C interface?

Bpk9p4 09-02-2016 13:24

Re: Lidar-Lite Help Please
 
sorry about that one. I will get that posted once i am home from work. Yes the I2C is set to 3.3v

I have hooked it up to 5v (from the DIO 5v pin) and i get the same results

khannasusa 09-02-2016 18:46

Re: Lidar-Lite Help Please
 
1 Attachment(s)
Looks like I forgot to attach the open VI.
Here it is. These 2 Vis are working via I2C on MXP.

sraque 09-02-2016 22:31

Re: Lidar-Lite Help Please
 
Quote:

Originally Posted by Bpk9p4 (Post 1537587)
sorry about that one. I will get that posted once i am home from work. Yes the I2C is set to 3.3v

I have hooked it up to 5v (from the DIO 5v pin) and i get the same results


Hmm..not sure what it could be. I think we wired the same as you are. We wired to the main I2C port on the RIO except for power which we wired to a 5V pin on DIO. We didn't add pull-up resistors or the capacitor that is shown on Lidar-Lite Website Arduino wiring example.

I see your code has the same loop time delays as ours...try putting the I2C Enum VI in your Begin temporarily to see if you can see the Lidar at all.

Another thing I have done to convince myself that the Lidar is working is to connect it to an Arduino, if you have one, and use the software from the Lidar Lite website to see the data.


All times are GMT -5. The time now is 23:42.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi