Active Topics

 


Reply
Thread Tools
Posts: 74 | Thanked: 142 times | Joined on Oct 2009 @ Chicago, US
#1
I was looking through the maemo 5 documentation and couldn't find anything regarding the acceleration sensor API. Does anyone have more information on this.

Also, I'm curious what the sampling rate of the acceleration sensor is. I have an application where a sampling rate of about 1kHz is necessary.

thanks
 
hopbeat's Avatar
Posts: 516 | Thanked: 643 times | Joined on Oct 2009 @ Denmark/Poland
#2
Here you are:

http://wiki.maemo.org/Accelerometers

Also, I'm working on a library for various sensors, so if you need some reference for accelerometer (using sysfs) let me know.
 

The Following 7 Users Say Thank You to hopbeat For This Useful Post:
Posts: 74 | Thanked: 142 times | Joined on Oct 2009 @ Chicago, US
#3
Thanks for your reply. I'm afraid that using the sysfs interface may introduce too much lag for the application I have in mind.

Does anyone know if nokia has released the kernel sources for the N900, more specifically the source code for the acceleration sensor driver (module)?
 
Posts: 183 | Thanked: 115 times | Joined on Nov 2007 @ Seattle, WA
#4
The accelerometer (LIS302DL) only has sample rates of 100 Hz or 400 Hz (see http://www.st.com/stonline/products/...e/ds/12726.pdf). 1kHz is really high for an accelerometer. What's your application?
 

The Following 2 Users Say Thank You to baksiidaa For This Useful Post:
Posts: 74 | Thanked: 142 times | Joined on Oct 2009 @ Chicago, US
#5
baksiidaa,

Thanks a lot for the pointer to the data sheet, 400Hz may be sufficient for my application, we will see. At this point I don't want to disclose what the application is, not for intellectual property or monetary reasons, simply because my idea is new and could turn into a nice research paper :-). The code will of course be open source :-).

I have had a look at the i2c kernel module for the LIS302DL. It seems like the timing the samples are read is entirely driven by the application (i.e. if I read sysfs every 100ms, the driver reads samples every 100ms via i2c).

Do you have any experience with this chip? I'm wondering if it is possible to use interrupt driven sampling, i.e. the chip creates an interrupt after new samples have been acquired.
 
Posts: 183 | Thanked: 115 times | Joined on Nov 2007 @ Seattle, WA
#6
Unfortunately, I haven't done anything with this chip. Sorry.
 
Posts: 336 | Thanked: 610 times | Joined on Apr 2008 @ France
#7
pinsh,

I suggest you look at the liqbase code, or the python Attitude program (both available from the repositories, liqbase is available from git somewhere).

Liqbase uses the accelerometer in the liqflow application, and also during the onedotzero event.

One point to remember when using the sysfs API:
- you need to open the file to get a new readout. Simply reading continuously doesn't work (same value returned over and over).
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#8
Note that with such high sampling rates you leave awfully little time for processing. 1KHz sampling means you have 1ms to process every sample, which is basically a no-go as Maemo is not a RTOS, not to mention the powersave/governor funk you're going to hate if you need no-lag operation. Also, every readout contains *some* error (plus, inertia can be a harsh mistress) so integration/filtering is recommended to work with realistic data (which again does not help if you really do want and need high sample rates).
 

The Following 3 Users Say Thank You to attila77 For This Useful Post:
Posts: 74 | Thanked: 142 times | Joined on Oct 2009 @ Chicago, US
#9
attila77,

The points you bring up are all valid, I'm aware of these problems. For my application I would like to get an estimate of the motion of the device during a short time window (~200ms). It is not necessary to process the samples in real time, the processing is done after all the samples have been acquired.

I'm not sure if the accuracy/SNR of the sensors are good enough for my application. I guess I will wait until I get my hands on a device and see. I will probably extend the kernel module of the sensor so that the acquisition of a block of samples can be triggered via sysfs. After the samples have been acquired they can be read via sysfs as well.
 
Posts: 2 | Thanked: 0 times | Joined on Mar 2010
#10
Originally Posted by hopbeat View Post
Here you are:

http://wiki.maemo.org/Accelerometers

Also, I'm working on a library for various sensors, so if you need some reference for accelerometer (using sysfs) let me know.
I am interested in accessing the accelerometer, GPS and microphone data. I am new to Maemo or mobile programming in general. You mentioned about some library that you had been developing for accessing the sensor data. Is it open source and where could I locate it? Also any other pointer for beginners who would like to start developing apps for N900?
 
Reply


 
Forum Jump


All times are GMT. The time now is 10:46.