LIDAR lite and Beaglebone Black I2C signals

In my previous post about the LIDAR lite I said its I2C signals were 5V. Well, if you go to their new support page you can check in this FAQ that I was wrong. They are 3.3V.

If you connect 5V to any of the 3.3V pins of the Beaglebone you will probably kill it so just to make sure I power up my Rigol scope (I got it after listening to this eevblog review, thanks Dave;-) and check the voltage on one of the I2C pins of the LIDAR lite. Humm… in the unconnected pin I have 3.6V. A little higher then 3.3V. Lets check the Beaglebone absolute maximum ratings. I’m using the I2C2 pins (connector P9, pins 19 and 20). From the Beaglebone electronic diagram they go into the TI AM3358 processor. In the AM3358 datasheet I see that the maximum voltage is 3.8V… we are pretty close to the maximum but it should be ok. This is the processor chip so we need to be careful! If I measure the voltage on the I2C2 Beaglebone side (unconnected pins) I get 3.2V.

Continue reading “LIDAR lite and Beaglebone Black I2C signals”

LIDAR lite with Beaglebone Black and Arch Linux

Its been a few months now since I received my new LIDAR lite from the crowd funded campaign on Dragon Innovation but only now I have some time to play with it. I got interested in range finder hardware after doing this great Udacity course on Artificial Intelligence for Robotics by Sebastian Thrun (the new one is here). One of the key hardware components is a good inexpensive range finder and Pulsedlight is doing it.

I want to try it out on my Beaglebone Black, the first challenge are the data pins voltage, the LIDAR is working at 5V and the Beaglebone at 3V3.

(EDIT) Well, figures out that I was wrong about LIDAR lite I2C levels, even thought it works with the logic levels converter, it is not necessary to use it, check my new post here.

I have hanging around a 4-channel I2C-safe Bi-directional Logic Level Converter – BSS138 from Adafruit. It is perfect for this. Here are some photos of the connections, I’ll publish the wiring in a few days when I have more time:

lidarlitewiringConnection to the Beaglebone via ssh.
The Beaglebone is running Arch Linux, to install the i2c tools:

# pacman -S i2c-tools

Check if the LIDAR is there:

# i2cdetect -r -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Looking good! LIDAR Light detected at address 0x62.  Now, from its manual, we need to write 0x04 at its address 0x00 to make a measurement:

# i2cset -y 1 0x62 0x00 0x04

and wait for a couple of seconds to make sure the measuring is finished, then read the measured value:

# i2cget -y 1 0x62 0x8f w

so I’m getting 117cm. It works! And the distance from it to my wall is around that value. Can’t find my meter so I can’t check its precision right now. I made a simple script to make it run for a while and save the measuring in a file, I’ll let you know my findings about repeatability later. Here is the script:

date >> lidar.txt

while :
i2cset -y 1 0x62 0x00 0x04

sleep 2

i2cget -y 1 0x62 0x8f w
i2cget -y 1 0x62 0x8f w >> lidar.txt

I couldn’t use the i2cdump command. Each time I do:

# i2cdump -y 1 0x62

I get an answer the first time with some values but if I do the i2cdump again the result is all zeros, it looks like something gets stuck and the LIDAR no longer responds. The only way to make it work again is to power down / up the LIDAR. I’ll investigate this another day.

The Selfish Gene

200px-The_Selfish_Gene3Another book that is a must, “The selfish Gene“, first published in 1976 and written by Richard Dawkins. It is a good perspective on the beginning of life on earth. The way to describe it as replicator machines that fight for resources is perfect.

Everyone knows the second law of thermodynamics, right? In a natural thermodynamic process, there is an increase in the sum of the entropies of the participating systems. This basically means that the state of “confusion” of a system will increase in time. It explains why your house is such a mess if you don’t do anything about it! And yet, out of this chaos, life emerged. Isn’t that amazing? Life is about information, structure, organization… Exactly the opposite of the second law of thermodynamics.

So these replicator machines were organizing materials and replicating themselves. They were saving information about their structure for the replication process. They didn’t care about the second law of thermodynamics.

Continue reading “The Selfish Gene”

On Intelligence

Great book “On Intelligence” from Jeff Hawkins

200px-OnIntToday I want to write about a great book that’s been around for many years but I often cross IT people that don’t know nothing about it. Its called “On Intelligence” by Jeff Hawkins. Ho yeah, the guy in the wheel chair… NO! Stop! Its not the same guy. The one in the wheel chair is an English theoretical physicist and cosmologist and his name is Stephen.

Continue reading “On Intelligence”


This one is for Windows 7. Yes, I have to use Windows, everyone else is doing it…! – )

I bought a new 2Tb external hard drive and I was looking for a simple way to keep a copy of my files automatically. I was doing it manually but it takes to long to think about it and actually do it every couple of days.

I just found SyncToy that looks nice so I decided to give it a try.

Continue reading “SyncToy”

Arch Linux install on Virtualbox VM

I’ve installed Arch Linux in a few VM’s (Virtualbox / Windows 7) and each time it is slightly different. These are my notes from a successful install. Virtualbox v4.3.22, Arch Linux 2015/02/01.

Start by downloading the ISO image of the latest Arch Linux distro, use the torrent link to go faster. You can use Deluge, an open source torrent client. Burn it to a CD so it can have it at hand. InfraRecorder works great and it is open source.

Start Virtualbox and create a VM, if you type “Arch” in the new VM name it will automatically change the type to linux and the version to Arch linux 64 bit, nice! I want a small VM so I just configure 1024Mb of RAM and 50Gb of virtual hard drive.

Insert your Arch Linux CD and start the new VM, sometimes you need to go to Devices menu and set your CD reader, sometimes it is already done for you.

Boot your system from the CD /first option) until you get the shell prompt, then using fdisk create new partitions in your new virtual drive. There are lots of info on how to create partitions so I wont get into details. Anyway I was following the Arch Linux documentation, the installation guide is great.

Continue reading “Arch Linux install on Virtualbox VM”

Virtualbox on Asus MAXIMUS VI EXTREME mobo

I had some trouble making Oracle Virtualbox work on my Windows 7 PC. The motherboard is an Asus MAXIMUS VI EXTREME and for some reason the hardware virtualization is disabled on the BIOS settings. What this does is, when creating a new VM, in the versions combo box we only have the 32 bit versions of the proposed OS’s.


After going to the BIOS settings and changing “Intel Virtualization Technology” to “Enabled” we have both the 32 bit and 64 bit versions available.

Continue reading “Virtualbox on Asus MAXIMUS VI EXTREME mobo”