Hy Muddesar,
 
as i said, the element data is a SPMessage-struct, which contains the element uint16_t reading. So the first
four bytes represents the sequence number (uint32_t seqno), the next two bytes are the sensor readings and so on.
Also the data is sent by the mote in little-endian format, that means the sensor reading in the example below is not
0xbe 0xb, but 0xb 0xbe (=3006).
 
[data="" 0x0 0x0 0x0 0xbe 0xb 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]
            |           seqn              | reading      |  ......
 
OLE
 
----- Original Message -----
Sent: Tuesday, July 18, 2006 1:41 PM
Subject: Re: [Tinyos-help] Raw Temperature readings Conversion to meaningfulDegree Celcious values

thanks a lot Ole for your help. actually i was using chanel 0 for  external temprature sensor thats why i was getting wrong data i am using channel 1 now and it gives me same data as yours(more or less).

i am still confuse how did you convert
[data="" 0x0 0x0 0x0 0xbe 0xb 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ] to  0xbbe witch is equallent to 3006 in decimal

regards

muddesar


From: "Ole Bischoff" <[EMAIL PROTECTED]>
To: "Muddesar Iqbal" <[EMAIL PROTECTED]>,"TinyOs Help List" <tinyos-help@Millennium.Berkeley.EDU>
Subject: Re: [Tinyos-help] Raw Temperature readings Conversion to meaningfulDegree Celcious values
Date: Mon, 17 Jul 2006 15:24:43 +0200

Hy Muddesar,
 
the data of your MultiHop-Msg is a SPMessage-struct  ( .../moteiv/apps/Delta/Delta.h):
   
    typedef struct DeltaMsg {
      uint32_t seqno;
      uint16_t reading;
      uint16_t parent;
      uint8_t neighborsize;
      uint8_t retransmissions;
      uint16_t neighbors[MHOP_PARENT_SIZE];
      uint16_t quality[MHOP_PARENT_SIZE];
    } DeltaMsg;
 
->    The sensor reading of your first msg [seqno=0xb7] is 0x01ec (byte-reverse-order)
 
->    The formula for conversion the raw value to its corresponding voltage is:
                    vTemp = ADCvalue / 4096 * Vref,     (Vref = 1.5V)
            (.../moteiv/apps/Oscilloscope/README.TmoteSky)
 
->    The formula for conversion the voltage to its corresponding temperature [°C] is:
                    TempC = (vTemp - 0,986) / 0,00355
            (MSP430 datasheet, page 18-21, http://focus.ti.com/lit/ug/slau049f/slau049f.pdf)
 
So your internal temperatur is about -227°C ?!
 
When i run the Dalta app on my TelosB mote i get values like:
    [data="" 0x0 0x0 0x0 0xbe 0xb 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]
this represents a sensor reading of 0xbbe -> temperature 32°C, which sounds realistic. Pherhaps you could measure
again with another TelosB mote to eliminate the possibility of hardware errors / broken sensor.
 
OLE
----- Original Message -----
Sent: Monday, July 17, 2006 11:22 AM
Subject: [Tinyos-help] Raw Temperature readings Conversion to meaningfulDegree Celcious values

Hello every one,

 

Could any one help me with conversion of raw temperature data to meaning full temperature degree celcious values.  I am using Telosb mote and  receiving data using delta application .

regards

muddesar

P.S. Following are the raw readings I am receiving.

 

1153125556312 Message <MultiHopMsg>

  [sourceaddr=0x1]

  [originaddr=0x1]

  [seqno=0xb7]

  [originseqno=0xb7]

  [ttl=0x0]

  [id=0x21]

 [data="" 0x0 0x0 0x0 0xec 0x1 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]

1153125561312 Message <MultiHopMsg>

  [sourceaddr=0x1]

  [originaddr=0x1]

  [seqno=0xb8]

  [originseqno=0xb8]

  [ttl=0x0]

  [id=0x21]

 [data="" 0x0 0x0 0x0 0xef 0x1 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]

1153125566312 Message <MultiHopMsg>

  [sourceaddr=0x1]

  [originaddr=0x1]

  [seqno=0xb9]

  [originseqno=0xb9]

  [ttl=0x0]

  [id=0x21]

 [data="" 0x0 0x0 0x0 0xee 0x1 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]

1153125571312 Message <MultiHopMsg>

  [sourceaddr=0x1]

  [originaddr=0x1]

  [seqno=0xba]

  [originseqno=0xba]

  [ttl=0x0]

  [id=0x21]

 [data="" 0x0 0x0 0x0 0xec 0x1 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]

1153125576312 Message <MultiHopMsg>

  [sourceaddr=0x1]

  [originaddr=0x1]

  [seqno=0xbb]

  [originseqno=0xbb]

  [ttl=0x0]

  [id=0x21]

 [data="" 0x0 0x0 0x0 0xea 0x1 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]

1153125581312 Message <MultiHopMsg>

  [sourceaddr=0x1]

  [originaddr=0x1]

  [seqno=0xbd]

  [originseqno=0xbd]

  [ttl=0x0]

  [id=0x21]

 [data="" 0x0 0x0 0x0 0xec 0x1 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]

1153125586312 Message <MultiHopMsg>

  [sourceaddr=0x1]

  [originaddr=0x1]

  [seqno=0xbe]

  [originseqno=0xbe]

  [ttl=0x0]

  [id=0x21]

 [data="" 0x0 0x0 0x0 0xf0 0x1 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]

1153125591312 Message <MultiHopMsg>

  [sourceaddr=0x1]

  [originaddr=0x1]

  [seqno=0xbf]

  [originseqno=0xbf]

  [ttl=0x0]

  [id=0x21]

 [data="" 0x0 0x0 0x0 0xee 0x1 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]

1153125596312 Message <MultiHopMsg>

  [sourceaddr=0x1]

  [originaddr=0x1]

  [seqno=0xc0]

  [originseqno=0xc0]

  [ttl=0x0]

  [id=0x21]

 [data="" 0x0 0x0 0x0 0xec 0x1 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]

1153125601312 Message <MultiHopMsg>

  [sourceaddr=0x1]

  [originaddr=0x1]

  [seqno=0xc1]

  [originseqno=0xc1]

  [ttl=0x0]

  [id=0x21]

 [data="" 0x0 0x0 0x0 0xee 0x1 0x7e 0x0 0x3 0x0 0x7e 0x0 0xff 0xff 0xff 0xff 0x0 0x0 ]



Amazing competition for unsigned bands with Live Sessions from MSN Spaces


_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



Be the first to hear what's new at MSN - sign up to our free newsletters!
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to