Beagle Board with sensors

Hi,

What is the best way to connect sensors to the Beagle Board? I am considering connecting some motion sensors to my board. Is USB the only viable interface? Has anyone on the forum done robotic prototyping with sensors on Beagle Board?

Thanks,
-scurock

SCU Rock wrote:

Hi,

    What is the best way to connect sensors to the Beagle Board? I am considering connecting some motion sensors to my board. Is USB the only viable interface? Has anyone on the forum done robotic prototyping with sensors on Beagle Board?

prpplague at IRC is working at an expansion connector interface board, e.g.

http://www.beagleboard.org/irclogs/index.php?date=2008-09-29#T18:22:43

Maybe you like to ping him for more details.

Dirk

Hi,

    What is the best way to connect sensors to the Beagle Board? I am
considering connecting some motion sensors to my board. Is USB the only
viable interface? Has anyone on the forum done robotic prototyping with
sensors on Beagle Board?

You have access to SPI and I2C on the expansion connector along with another
UART. Of the 3, I2C is a little bit trickier due to the 1.8V used on the OMAP
side. For I2C, you will need a bidirectional converter.

I have plain GPIO (to control a LED) and the second UART working using LVC
open drain parts as the converter on a little hand built proto board.
Depending on what your motion sensor outputs, it might be as simple as
feeding that into a level converter and reading a GPIO. Do you have any specs
on the sensors?

-- Hunyue

I am interested in using two sensors.

One is a motion sensor:
http://www.sparkfun.com/commerce/product_info.php?products_id=8630
The ‘alarm’ pin goes from 3.3V or 5V to low.

Another is a proximity sensor:
http://www.sparkfun.com/commerce/product_info.php?products_id=242
It has an analog output that varies from 3.1V to 0.4V.

How the wiring is done using the expansion connector on Beagle?

Thanks,
-scurock

You will need level shifters. Connecting these voltages to the expansion connector will cause an issue with the processor as it only accepts 1.8V. The proximity sensor will need an A/D conveter. There are several out there that might work which are I2C devices. You can connect those to the expansion connector using the I2C bus. Again, you need to make sure it is 1.8V.

Refer to the System Reference Manual for a description of all of the signals on the expansion connector and their location. http://www.beagleboard.org/uploads/BBSRM_B5.pdf

Gerald

You will need level shifters. Connecting these voltages to the expansion
connector will cause an issue with the processor as it only accepts 1.8V.
The proximity sensor will need an A/D conveter. There are several out there
that might work which are I2C devices. You can connect those to the
expansion connector using the I2C bus. Again, you need to make sure it is
1.8V.

Refer to the System Reference Manual for a description of all of the signals
on the expansion connector and their location.
http://www.beagleboard.org/uploads/BBSRM_B5.pdf

Gerald

Using a SPI A/D converter might simplify the level converters a bit. The
wired-OR bidirectional I2C bus doesn't seem to lend itself to simple level
conversion. If you are hand building the expansion board, a lot of the
dedicated level converter don't come in hand assembly friendly packages like
SOIC or TSSOPs.

-- Hunyue

> I am interested in using two sensors.
>
> One is a motion sensor:
> PIR Motion Sensor (JST) - SEN-13285 - SparkFun Electronics
> The 'alarm' pin goes from 3.3V or 5V to low.
>
> Another is a proximity sensor:
> Infrared Proximity Sensor - Sharp GP2Y0A21YK - SEN-00242 - SparkFun Electronics
> It has an analog output that varies from 3.1V to 0.4V.
>
> How the wiring is done using the expansion connector on Beagle?
>
> Thanks,
> -scurock
>
>
>
>>
>> > Hi,
>> >
>> > What is the best way to connect sensors to the Beagle Board? I am
>> > considering connecting some motion sensors to my board. Is USB the only
>> > viable interface? Has anyone on the forum done robotic prototyping with
>> > sensors on Beagle Board?
>>
>> You have access to SPI and I2C on the expansion connector along with
>> another
>> UART. Of the 3, I2C is a little bit trickier due to the 1.8V used on the
>> OMAP
>> side. For I2C, you will need a bidirectional converter.
>>
>> I have plain GPIO (to control a LED) and the second UART working using

LVC

[...]

I've also been looking into getting the BeagleBoard to talk to various
5V and 3V things I have, but the only level shifters I've done
anything with are RS232/TTL (I'm a hobbyist without an engineering
background so I treat things like this as a black box). It seems like
the SparkFun Logic Level Converter module would do the trick, though--
does this look right to you?

http://www.sparkfun.com/commerce/product_info.php?products_id=8745

"The SparkFun logic level converter is a small device that safely
steps down 5V signals to 3.3V and steps up 3.3V to 5V. This level
converter also works with 2.8V and 1.8V devices.
...
Bread board friendly! Can be used with normal serial, I2C, SPI, and
any other digital signal. Does not work with an analog signal."

Thanks,

Brian

Looks to me like this should work. Give it a try!

Gerald

Thanks, Gerald! I just ordered a couple... at $2 each, can't hurt to
have spares :slight_smile:

I had one more question about working with sensors on the BeagleBoard.
Are there any tutorials/example programs that show how to do basic
tasks with the BeagleBoard's expansion connector? I'm looking for very
basic starting points (I really just need sample code because the
physical connections seem to be obvious) along the lines of what
people do in their first couple of weeks with an Arduino: make an LED
blink, have a two-way conversation with a digital sensor, etc.

If there aren't any sample programs for interacting with the expansion
connector, is there a library I can program against, or is the
interface exposed in some other fashion? I've never done this sort of
programming on Linux, but I see that there are docs on spi, gpio, and
i2c in the Linux kernel Documentation tree. Can I use the information
in there as-is, or is there anything specific to the BeagleBoard that
I need to know, such as bus/device addresses?

Thanks,

Brian

I would do a search in the discussions group for things like I2C, GPIO, and SPI. There has been a lot of discussions in these areas over the past several months. There is also information in the Technical reference Manual for the OMAP3530. I would think the best thing to do is stay in the area of accessing these devices from the Linux kernel.

Gerald