Hi ! Thanks both of you for explanations and help ! I am now able to offline plot my data correctly, and use Radio communication to get accelerometer values in real-time, with Base Station and a DMA reading-version of BlinkToRadio (basics are always a good point to start from).
I did a calibration measure following Shimmer Calibration file instructions to set my 0g values (in fact, mean of +1g and -1g values). I used a right message struct for data transmitting with 3 uint16_t variables for each channel, instead of arbitrary 64 bit variables ... And I read DMA buffer pointer at +0, +1 and +2 to get each axis data. I think wrong values with Simpleaccel.py was because I tried using it to read my serial values with considering they could be under bluetooth format. Once again, many thanks, Erwan 2011/3/31 mike healy <mikeghe...@gmail.com> > Hi Erwan, > > Mma_Accel.setSensitivity(RANGE) has nothing to do with calibration, and, as > you say, only sets the sensitivity. You still need to calculate the offset > and scaling factor for each accel channel and apply these to the data, > either on the shimmer or post process the data offline. > > The simpleAccel.py script simply prints out the accel data to screen. Each > column represents the X, Y and Z axes, and each row is a different sampling > period. Example output is as follows: > tiny2@ShimmerLive:~/tinyos-2.x-contrib/shimmer/apps/SimpleAccel$ > ./simpleAccel.py /dev/rfcomm0 > 1983 1801 2016 > 1985 1807 2011 > 1987 1809 2014 > 1983 1799 2015 > 1989 1808 2015 > . > . > . > > The fact that you are getting 10k-15k peaks seem to indicate that something > is out of sync. The ADC on the shimmer is 12-bit, so the range of values you > should be seeing per axis is 0-4095. Any values outside that range are not > possible. > > The DMA transfer returns the raw ADC values as read by the MSP430 from the > MMA7361. To convert these values to m/s2 you need to scale them > appropriately. The calibration procedure described on the shimmer-research > website describes how to do this by using gravity as a known reference. > > Mike > > > > > On Wed, Mar 30, 2011 at 4:02 PM, Erwan RENAUDO <erwan.rena...@gmail.com>wrote: > >> Hi Mike, >> >> Thanks for your answer. >> Does it means that calibration of accelerometer is done when we "call >> Mma_Accel.setSensitivity(RANGE)" ? Or only sensitivity is setted and I still >> have to add my data an offset to reach the "physical values" ? >> >> In the same idea, what exactly is displayed by the python script >> SimpleAccel.py ? Coz I plotted it and it look quite awful even while I'm not >> touching the accelerometer (I get kind of periodical +/- 10k to 35k peak). I >> get better (it seems) results plotting Listen output and plotting separately >> payload byte by two. >> Does anybody know what DMA transfer exactly return (in terms of data) or >> where I can find these informations (Didn't get it reading MMA7361 >> datasheet) ? >> >> Once again, many thanks for help, >> I can join plotting results I necessary. >> >> Erwan. >> >> >> 2011/3/28 mike healy <mikeghe...@gmail.com> >> >>> Hi Erwan, >>> >>> The shimmer and shimmer2 used the MMA7260 accel chip, but the shimmer2r >>> uses the newer MMA7361. See the following page for info on the different >>> shimmer revisions: >>> http://www.shimmer-research.com/products-2/shimmer-revisions >>> >>> One difference between the chips is that the MMA7260 had 4 different >>> selectable sensitivity ranges (±1.5g, ±2g, ±4g and ±6g) whereas the MMA7361 >>> only has 2 (±1.5g and ±6g). >>> >>> The warning you are seeing about the decimal constant being too large has >>> nothing to do with the sensitivity range, and can be safely ignored, as the >>> intention is for the constant to be unsigned anyway. >>> >>> Mike >>> >>> >>> >>> On Mon, Mar 28, 2011 at 8:57 AM, Erwan RENAUDO >>> <erwan.rena...@gmail.com>wrote: >>> >>>> Hi Mike, >>>> >>>> Thanks for your help. >>>> I take a look at your program, and after several days have a "seems to >>>> work" program. I take it example to make my serial sensor program working. >>>> I >>>> get trunks of bytes that seems to change depending on my gestures. Now I'm >>>> trying to analyse data and I would know about the accelerometer : in >>>> Shimmer >>>> manual, they speak about MMA7260Q but when I check virtual component on >>>> sources provided, accelerometer referenced is MMA7361. So which one is >>>> physically present on the shimmer board, and could a bad platform argument >>>> on compilation / wrong material virtualization generate warnings as >>>> "decimal >>>> constant is so large that it is unsigned" (if wrong RANGE_X_0G is given) ? >>>> >>>> Another question is : Is there a Linux XubunTOS calibration program as >>>> it exists for Windows ? >>>> >>>> Thanks for your answers and support, >>>> Best regards, >>>> Erwan >>>> >>>> >> -- >> Élève Ingénieur Promo 2011 - Section *Informatique et Systèmes*. >> École Nationale Supérieure de l'Électronique et de ses Applications (* >> E.N.S.E.A.* - Cergy) >> >> > -- Élève Ingénieur Promo 2011 - Section *Informatique et Systèmes*. École Nationale Supérieure de l'Électronique et de ses Applications (* E.N.S.E.A.* - Cergy)
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help