Interfacing Ultrasonic Sensor with BeagleBoard XM Rev C

Hi,

       I am working on a project that requires interfacing LV Maxsonar
EZ1 with beagle board. I am taking the output from the PW pin of the
sensor. I am able to see the waveform on a CRO. I tried connecting it
to the expansion header of the Beagle Board. To Pin 2 of expansion
header I supplied 5V and Pin 27 and 28 were grounded. The output form
the sensor is connected to Pin 23. Next I tried to check the output
via the i2c-tool but it did not show the presence of the sensors or
any of its values. Can you suggest the appropriate circuit connection
to interface sensor with Beagle Board. I am in need of connecting a
total of 8 sensors at a given time.

Regards

Julius Canute

Well, froma HW standpoint, as the I/O voltage is 1.8V max on the Beagle, I am not sure that the board is still working as it cannot support 5V levels. If it is still working, you need to convert all of the signals to 1.8V by level shifting them.

Gerald

Hi,

Next I tried to check the output
via the i2c-tool but it did not show the presence of the sensors or

I was unable to find any mention of I2C support in the datasheet. As I
understand, this sensor has serial interface and not I2C.

In the case you need to interface an I2C device with beagle you will
need
to add external pull-up resistor to the bus you are attaching the
sensors (in your case to bus i2c-2).
As Julius mentioned, if the logic voltage of your device works in
different voltage level you will need
voltage level shifting, take a look to this document
http://ics.nxp.com/support/documents/interface/pdf/an97055.pdf
Check if you have registered the i2c-2 in your board config file as
well as i2c support in your kernel config.
Take care about the correct supply of the sensor and check if you need
to provide different voltages for main supply
and for the logic level for the sda and scl pins.

Hi,

In the case you need to interface an I2C device with beagle you will
need
to add external pull-up resistor to the bus you are attaching the
sensors (in your case to bus i2c-2).
As Julius mentioned, if the logic voltage of your device works in
different voltage level you will need
voltage level shifting, take a look to this documenthttp://ics.nxp.com/support/documents/interface/pdf/an97055.pdf
Check if you have registered the i2c-2 in your board config file as
well as i2c support in your kernel config.
Take care about the correct supply of the sensor and check if you need
to provide different voltages for main supply
and for the logic level for the sda and scl pins.

Thank you, but I'm still not able to interface the ultrasonic sensor
with the beagleboard. I'm using Ubuntu 11.04 on the beagleboard.

1. Where do I check the configuration file to see if i2c-2 is
registered?
2. I have connected a 1.8V input on pin 1 of the expansion header. I
have also connected the output of the ultrasonic sensor (PW pin) to
pin 23 of the expansion header. Pins 27 and 28 of the expansion header
are grounded. Given all this, I'm still not able to see an output when
I try "i2cdetect -r 2" on the console. The output can be seen in
http://pastebin.com/PagwgVkr. What do I do now?

Thanks and Regards,
Julius Canute

1. Where do I check the configuration file to see if i2c-2 is
registered?

Before building your kernel, in kernel sources you can find in the
following directory /arch/arm/mach-omap2/ the board config file
called board-omap3beagle.c
There you can find part of the i2c board configuration. Moreover in
the kernel config you should check that i2c support is enabled.
I am not sure but I guess this should be set by default.
You can check in the filesystem if in /dev you have the i2c
directories (i.e /dev/i2c-2).
When the system starts, interrupt booting the kernel image. Then you
get a U-boot prompt, the bootloader has some options to check your
i2c. Type help i2c and it will show you the different options you
have, i think to check i2c addresses you have to type i2c probe.

2. I have connected a 1.8V input on pin 1 of the expansion header. I
have also connected the output of the ultrasonic sensor (PW pin) to
pin 23 of the expansion header. Pins 27 and 28 of the expansion header
are grounded. Given all this, I'm still not able to see an output when
I try "i2cdetect -r 2" on the console. The output can be seen inhttp://pastebin.com/PagwgVkr. What do I do now?

I dont know how your sensor should be attached to the expansion header
what is PW pin?
In general if you want to communicate with a sensor over i2c bus 2 on
beagleboard you need at least the following connections:

Power supply for your sensor (main supply and logic supply) , maybe
both are the same depend the device. The logic supply needs to be 1.8
v in order to interface with the beagle's i2c bus voltage levels.
SDA (pin 23) from beagle's expansion header to the SDA pin of your
sensor
SCL (pin 24) from beagle's expansion header to SCL pin of sensor.
Add pull-up resistors.