Lidar-Lite v3

Moderators: mdrjr, odroid

Lidar-Lite v3

Unread postby brk » Fri Apr 21, 2017 12:33 am

I have recently bought two pcs Lidar-Lite v3 Laser Ranging Modules from Garmin (https://buy.garmin.com/en-US/US/p/557294).
i2cdetect -y -r 1 detects the device at 0x62.
When I download and compile the sample program from https://github.com/answer17/lidarLite I cannot achieve successful I2C communication with the device.


Lidar-Lite v3 I2C bus runs in 400k speed but as far as I know C1+ I2C default speed is 100k.
I run the following commands to set the speed to 400k but nothing changed.

fdtput -t i /media/boot/meson8b_odroidc.dtb /i2c@c1108500 master_i2c_speed "400000"
sync
reboot
fdtput -t i /media/boot/meson8b_odroidc.dtb /i2c@c11087c0 master_i2c_speed "400000"
sync
reboot

ftdget -t i /media/boot/meson8b_odroidc.dtb /i2c@c1108500 master_i2c_speed gives 400000

Is this correct that the i2c bus set to 400k, is c1+ capable of running its i2c bus at 400k?
What else should I try to make the Lidar-Lite v3 operate correctly?

Best regards.
brk
 
Posts: 16
Joined: Tue Jul 21, 2015 9:19 pm
languages_spoken: english
ODROIDs: C1

Re: Lidar-Lite v3

Unread postby rooted » Fri Apr 21, 2017 5:44 am

Have you verified the hardware works with an arduino or other device?
User avatar
rooted
 
Posts: 3673
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Lidar-Lite v3

Unread postby brk » Fri Apr 21, 2017 5:56 am

Actually not, I don't have any of these boards but i have 2 lidars and they have similar response. If I have some time I will try a C2.
brk
 
Posts: 16
Joined: Tue Jul 21, 2015 9:19 pm
languages_spoken: english
ODROIDs: C1

Re: Lidar-Lite v3

Unread postby rooted » Fri Apr 21, 2017 6:25 am

I'm sure one of the two definitely work.

I'm uncertain if the i2s is capable of 400kb on the C1+, I believe it is by reading this page.

http://helios.himmelbauer-it.at/blogs/g ... odroid-c1/
User avatar
rooted
 
Posts: 3673
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Lidar-Lite v3

Unread postby brk » Fri Apr 21, 2017 6:36 am

Ok I will try c2 to be sure.
Any other tips would be appreciated.
Regards
brk
 
Posts: 16
Joined: Tue Jul 21, 2015 9:19 pm
languages_spoken: english
ODROIDs: C1

Re: Lidar-Lite v3

Unread postby odroid » Fri Apr 21, 2017 9:16 am

@rooted,
please don't be confused I2C with I2S. ;)

@brk,
C1 and C2 can handle 400Khz speed on I2C bus.
Follow below steps and show us results.
sudo apt-get install i2c-tools
sudo i2cdetect -y 1 or sudo i2cdetect -y 2

Show us a picture how you connected the Lidar module to you C1+ board if possible.
User avatar
odroid
Site Admin
 
Posts: 25286
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Lidar-Lite v3

Unread postby rooted » Fri Apr 21, 2017 3:44 pm

odroid wrote:@rooted,
please don't be confused I2C with I2S. ;)
.


Indeed, I do it often.
User avatar
rooted
 
Posts: 3673
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Lidar-Lite v3

Unread postby brk » Fri Apr 21, 2017 7:31 pm

here are the results, Lidar is connected to i2c-1

odroid@odroid:~$ sudo modprobe aml_i2c
odroid@odroid:~$ fdtget -t i /media/boot/meson8b_odroidc.dtb /i2c@c1108500 master_i2c_speed
400000
odroid@odroid:~$ fdtget -t i /media/boot/meson8b_odroidc.dtb /i2c@c11087c0 master_i2c_speed
400000
odroid@odroid:~$ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
odroid@odroid:~$
odroid@odroid:~$ sudo i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: -- -- -- -- -- -- -- -- 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77
Attachments
Lidar Photo.jpg
Lidar Photo.jpg (100.82 KiB) Viewed 1327 times
brk
 
Posts: 16
Joined: Tue Jul 21, 2015 9:19 pm
languages_spoken: english
ODROIDs: C1

Re: Lidar-Lite v3

Unread postby odroid » Sat Apr 22, 2017 10:10 am

Is the I2C address of the Lidar sensor correct?
If yes, it connected to I2C-1 bus well. :)
Code: Select all
odroid@odroid:~$ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
User avatar
odroid
Site Admin
 
Posts: 25286
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Lidar-Lite v3

Unread postby brk » Sat Apr 22, 2017 5:07 pm

Yes it is correct, it is at 0x62.
Then can we assume that the voltage levels are ok as well. Lidar uses 5V i2c, but Odroid's i2c is 3.3V
brk
 
Posts: 16
Joined: Tue Jul 21, 2015 9:19 pm
languages_spoken: english
ODROIDs: C1

Re: Lidar-Lite v3

Unread postby odroid » Sun Apr 23, 2017 9:49 am

Short term test should be okay with over-voltage shock.
But you have to use level-shifter if you don't want to fry your C1 board for long term usage.

BTW, what errors you saw when you ran the sample program?
User avatar
odroid
Site Admin
 
Posts: 25286
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Lidar-Lite v3

Unread postby brk » Mon Apr 24, 2017 5:25 am

Actually the situation seems a little bit complicated.
First of all the sample code provided at viewtopic.php?f=115&t=9542 is for Lidar-Lite v2.
But I have a newer version (Lidar-Lite v3) and I am not sure whether they are 100% compatible or not.
And also the voltage levels might cause some problem.

BTW I always get the same value 0x24 when I read from the i2c port which can be due to the voltage levels or the obsolute protocol I use.
Tomorrow I am planning to test with level shifters and also try to buy an Arduino to test the device.
brk
 
Posts: 16
Joined: Tue Jul 21, 2015 9:19 pm
languages_spoken: english
ODROIDs: C1

Re: Lidar-Lite v3

Unread postby rooted » Mon Apr 24, 2017 9:54 am

I read somewhere about a voltage problem with that device when I was researching, I believe it was with an arduino though.

Once proper stable power was applied it began working.
User avatar
rooted
 
Posts: 3673
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Lidar-Lite v3

Unread postby brk » Mon May 01, 2017 9:16 pm

I tried the Lidar-Lite v3 with an Arduino Uno and it worked flawlessly.
Don't know what is wrong with the C1+.

BTW I used a level shifter with the C1+ and nothing changed :(
brk
 
Posts: 16
Joined: Tue Jul 21, 2015 9:19 pm
languages_spoken: english
ODROIDs: C1

Re: Lidar-Lite v3

Unread postby odroid » Tue May 02, 2017 8:07 am

Can you share your test source code on C1+?
User avatar
odroid
Site Admin
 
Posts: 25286
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Lidar-Lite v3

Unread postby brk » Tue May 02, 2017 10:55 pm

this week i am in a business trip.
i will post next week.
thx.
brk
 
Posts: 16
Joined: Tue Jul 21, 2015 9:19 pm
languages_spoken: english
ODROIDs: C1


Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 2 guests