Adding Sense to Beagle

Hello,

[Posted on beagleboard@googlegroups.com, I guess I should have posted
here instead.]

I'm interested in the Adding Senso to Beagle. I'm a 5th year
Industrial Engineer specialized in Automation. I have a lot of interest
in the fields of Signal Processing and it seems like this project would
be a good opportunity to get around to improving my Signal Processing
skills.

Two of the major usages that jump to my head right away would be:

Home Automation (domotics)
The beagle with some simple add on electronics could be responsible for
example of handling the lights in a house. Using motion detection and
light detection it could turn on or off lights automatically as you go
by them. Of course this might prove problems if you have a cat or some
other nocturnal animal.
Following the same example motion detection could be used to have music
follow you around the house. Of course both these cases involve a
complex set up.
A more simple and realistic set up could be thermostat control. Using a
couple of temperature sensors around the house it could try to handle
the heating.

Robotics
Linux embedded boards are being more common in robotics every day. In
fact I've been working on a project that has been using the Gumstix
(PXA270) platform for small mobile humanoid robots. The sensors in this
case would be more worried about spatial positioning, meaning infrared,
sonar, or contact sensors. Of course there are many types of robots so
that doesn't exclude gyros, accelerometers, heat sensors and the likes.

I'm sure there's many more usages I fail to think of. I"m curious
however as to what most people on this list would think useful sensors
are? It would be good to know a bit what people would expect out of this
project to be able to think of a good proposal on what to do. There are
so many interesting things to be done with sensors!

Edgar

Dear Edgar,

I posted that already on the GSOC site. Not sure if that is correct
for just exchanging info. So I re-post here to start the discussion.
(Some spelling fixed...)

Hello,

Dear Edgar,

I posted that already on the GSOC site. Not sure if that is correct
for just exchanging info. So I re-post here to start the discussion.
(Some spelling fixed...)
-----------------

I am a Systems Engineer in TI Industrial Automation lab in Freising,
Germany. Your project sounds interesting to me and I might mentor
this. A few questions:

- can you be more specific on interfaces? Listing all of them is nice
but for the given time you can probably implement a few examples.
Which one have you used before?

I have experience with SPI, I2C and RS232 with Atmel AVR 8 bit
microcontrollers. I also have experience with RS232 with linux. The
problem with SPI and I2C on the Beagleboard is voltage level
conversions. I think the best idea might be to have a daughterboard
(either existing or create a simple new one) to either allow connecting
sensors to voltage level converters so the Beagleboard itself can do I2C
and/or SPI or use a microcontroller like for example an Atmel AVR to
bridge between ADC, SPI and I2C with either RS232 or USB.

I do have some boards I designed myself that expose RS232, SPI, I2C and
the ADC on Atmel AVRs that shouldn't be hard to get connected to the
Beagleboard to be able to get stuff working fast. However maybe thinking
of more standard electronics like Arduino might be a better idea (my
electronics boards is very similar to Arduino).

- Would you mind programming in C++? To my mind C++ OOP is ideal for
creating frameworks of objects representing real world data.
Abstracting the interface from the data and internal implementation
should make the goal of ease of use a real one.

I wouldn't have a problem with coding in C++. Indeed it may be the best
option since the framework would be very object oriented.

- How do you plan to 'acquire' sensors? This could cause major delays
if necessary funding is not available or there are delivery issues. If
you need to implement custom hardware to connect to BeagleBoard it
gets worse.

I was planning to get off the shelf sensors or accessible sensors. I
currently have:

* SHARP GP2Y0A21YK (10-80cm IR sensor, 0-5V analogue)
http://www.pololu.com/catalog/product/136
* MMA7260QT (3 axis accelerometer, 0-3.3V analogue)
http://www.pololu.com/catalog/product/766
* ND-100 (GPS, USB interface)
http://www.globalsat.com.tw/products-page.php?gs_en_product_id=2&gs_en_product_cnt_id=30,
however not sure GPS would enter the scope of this framework

I was thinking some interesting electronics to work with would be:

* WII nunchuck and motionplus (3 axis accelerometer and 3 axis gyro, i2c
interface)
This is readily available and communicates with i2c. Protocol is
available on the web.

* Temperature sensors
Texas instruments has some i2c ones readily available.
http://focus.ti.com/docs/prod/folders/print/tmp101.html

* Photocell light sensor
Readily available at electronics store, should be easy to breadboard.
Interface would be analogue, so an ADC would be needed.

* Magneto sensor
Honeywell magneto sensors are popular, there are 2 or 3 axis ones.
Breakout boards can be ordered from multiple online companies. Generally
i2c interfaces.

* Humidity sensor
Breakout also available from sparkfun, Analogue output so would need an
ADC also.

* Pressure sensor
Breakout also available from sparkfun. Has an SPI interface.

Other sensors could be done if there is any interest in doing specific ones.

Shipping for a batch of sensors shouldn't take more then a month,
express could be asked for if needed. It should be also very important
to have a flexible and well documented interface to be able to add,
calibrate and filter new sensors without too much effort.

I can also do "simple" dual sided PCBs at my university and order more
complex ones (to 8 mils, double sided) if necessary. Doing them at my
uni would take around a week, ordering would take around a month without
express shipping.

Just a start... I am also on BeagleBoard IRC usually but not paying
attention all the time. Try a personal message if I don't react and
you want to discuss live (franktango).

Sure thing, I am connected there 24/7 as "bobbens". I may also not
always be at the computer at any given moment, but will always respond
when I see it any messages.

Thanks,

Edgar Simo

Edgar,

thanks for clarifications. Now it seems like a lot of good ideas. I
came across a new project/product actually this morning:
http://www.elinux.org/BeagleBoard_Trainer

This has Arduino compatible uC, SPI and I2C... just have a look.

I have experience with SPI, I2C and RS232 with Atmel AVR 8 bit
microcontrollers. I also have experience with RS232 with linux. The
problem with SPI and I2C on the Beagleboard is voltage level
conversions. I think the best idea might be to have a daughterboard
(either existing or create a simple new one) to either allow connecting
sensors to voltage level converters so the Beagleboard itself can do I2C
and/or SPI or use a microcontroller like for example an Atmel AVR to
bridge between ADC, SPI and I2C with either RS232 or USB.

So the daugther board exists...

I do have some boards I designed myself that expose RS232, SPI, I2C and
the ADC on Atmel AVRs that shouldn't be hard to get connected to the
Beagleboard to be able to get stuff working fast. However maybe thinking
of more standard electronics like Arduino might be a better idea (my
electronics boards is very similar to Arduino).

Seems like more people with similar ideas. Or did you work with
tincantools people?

I wouldn't have a problem with coding in C++. Indeed it may be the best
option since the framework would be very object oriented.

I was planning to get off the shelf sensors or accessible sensors. I
currently have:

* SHARP GP2Y0A21YK (10-80cm IR sensor, 0-5V analogue)http://www.pololu.com/catalog/product/136
* MMA7260QT (3 axis accelerometer, 0-3.3V analogue)http://www.pololu.com/catalog/product/766
* ND-100 (GPS, USB interface)http://www.globalsat.com.tw/products-page.php?gs_en_product_id=2&gs_e…,
however not sure GPS would enter the scope of this framework

GPS via USB is just a serial interface and then you process NMEA data.
I think that is solved even in the Linux world.
So for the sensor part there wouldn't be any news. Concentrate on
analog type sensors and how to manage them. Below stuff sounds good.

I was thinking some interesting electronics to work with would be:

* WII nunchuck and motionplus (3 axis accelerometer and 3 axis gyro, i2c
interface)
This is readily available and communicates with i2c. Protocol is
available on the web.

* Temperature sensors
Texas instruments has some i2c ones readily available.http://focus.ti.com/docs/prod/folders/print/tmp101.html

* Photocell light sensor
Readily available at electronics store, should be easy to breadboard.
Interface would be analogue, so an ADC would be needed.

* Magneto sensor
Honeywell magneto sensors are popular, there are 2 or 3 axis ones.
Breakout boards can be ordered from multiple online companies. Generally
i2c interfaces.

* Humidity sensor
Breakout also available from sparkfun, Analogue output so would need an
ADC also.

* Pressure sensor
Breakout also available from sparkfun. Has an SPI interface.

Other sensors could be done if there is any interest in doing specific ones.

Shipping for a batch of sensors shouldn't take more then a month,
express could be asked for if needed. It should be also very important
to have a flexible and well documented interface to be able to add,
calibrate and filter new sensors without too much effort.

I can also do "simple" dual sided PCBs at my university and order more
complex ones (to 8 mils, double sided) if necessary. Doing them at my
uni would take around a week, ordering would take around a month without
express shipping.

That is a plus I think...

Hello,

Edgar,

thanks for clarifications. Now it seems like a lot of good ideas. I
came across a new project/product actually this morning:
http://www.elinux.org/BeagleBoard_Trainer

This has Arduino compatible uC, SPI and I2C... just have a look.

I was looking at it the other day. It looks like it does fulfill the
needs. Also has selectable level converters so you can easily work with
3.3 V or 5 V buses. It could work great.

I have experience with SPI, I2C and RS232 with Atmel AVR 8 bit
microcontrollers. I also have experience with RS232 with linux. The
problem with SPI and I2C on the Beagleboard is voltage level
conversions. I think the best idea might be to have a daughterboard
(either existing or create a simple new one) to either allow connecting
sensors to voltage level converters so the Beagleboard itself can do I2C
and/or SPI or use a microcontroller like for example an Atmel AVR to
bridge between ADC, SPI and I2C with either RS232 or USB.

So the daugther board exists...

Yes, the beagleboard trainer does seem to expose all the communication
protocols so it could be a good daughterboard to use. It would allow
native usage of SPI and I2C which would be much more interesting then
bridging over an uart.

I think it would be a great idea to use a beagleboard trainer as the
daughterboard in the project. This would allow less time spent on
getting electronics up and running and more time spent on coding the
open source sensor framework.

I do have some boards I designed myself that expose RS232, SPI, I2C and
the ADC on Atmel AVRs that shouldn't be hard to get connected to the
Beagleboard to be able to get stuff working fast. However maybe thinking
of more standard electronics like Arduino might be a better idea (my
electronics boards is very similar to Arduino).

Seems like more people with similar ideas. Or did you work with
tincantools people?

I have actually worked independently. The idea was to publicize it and
document it well soon, however was still working on getting it robust.
At the moment all it does is motor velocity control with robust
communication protocol.

Tincantools seem to use mainly ARM, only the beagleboard trainer seems
to have an Atmel AVR. All my work at the moment has been revolving with
AVR as I gain experience with electronics designs.

* ND-100 (GPS, USB interface)http://www.globalsat.com.tw/products-page.php?gs_en_product_id=2&gs_e…,
however not sure GPS would enter the scope of this framework

GPS via USB is just a serial interface and then you process NMEA data.
I think that is solved even in the Linux world.
So for the sensor part there wouldn't be any news. Concentrate on
analog type sensors and how to manage them. Below stuff sounds good.

Yes, I have actually been playing with it. I think also sensors like
Camera and GPS might be out of the scope, since there's stuff for them
respectively (OpenCV and gpsd) that's open source and should be
supported on the beagleboard. On microphones I might think the same,
although I'm not entirely familiar with sound processing software.

Other possible interesting sensors would be binary sensors. This could
mean for example simple pushbuttons, digital output encoders used in
motor speed control or microswitces for detection collision or end of
movement. They could also be interfaced directly to the GPIO on the
Beagleboard.

If anyone can think of anything else or have any comments, I'd love to
hear them.

Edgar