Look for the Hardware Manual of the Sensor Boards. There is a fomula there.
Best, Bob On Mon, 23 Aug 2004 12:00:54 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Send Tinyos-users mailing list submissions to > [EMAIL PROTECTED] > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users > or, via email, send a message with subject or body 'help' to > [EMAIL PROTECTED] > > You can reach the person managing the list at > [EMAIL PROTECTED] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Tinyos-users digest..." > > Today's Topics: > > 1. mica2dot temperature reading (karan) > 2. Re: mica2dot temperature reading (karan) > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 23 Aug 2004 10:44:46 -0500 > From: karan <[EMAIL PROTECTED]> > Subject: [Tinyos-users] mica2dot temperature reading > To: "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="us-ascii" > > hi, > > im using the XSensorMDA500 app in contrib/xbow/apps/ to measure the > battery voltage and the temperature from a mica2dot. > im using a mica2 with TOSBase on the programming board to send the data > from the mica2dot to the pc. on the pc i have modified Dump.java and > Listen.java to display these readings. > > following is the formula for measuring the voltage from the mica2. this > is from the MPRMIBUserGuide. this is in my Listen.java. > Dump.getDPC is converting the data received in hex form from the mote to > a decimal. i know that works correctly. > > double vbatt, vref=1.223, adc_fs=1024, adc_count; > adc_count = Dump.getDPC(System.out, packet, 9, 2); // volts 4,5 > vbatt = vref * adc_fs / adc_count; > > does adc_count have to be in hex?? > i am using the packet[i+1] byte as the MSB and packet[i[ byte as the > LSB, is that correct? > so in the first line the thermistor data in hex is 01FB which is > converted to dec as 507. > the values im getting from a new 3V Panasonic CR 2354 battery are: > > Volts Therm Adc2 Adc3 Adc4 Adc5 Adc6 Adc7 > F1 00 FB 01 3A 01 DE 00 CC 00 CC 00 CB 00 CC 00 > 5.19648 00507 00314 00222 00204 00204 00203 00204 > F2 00 FB 01 3D 01 DF 00 CE 00 D0 00 CC 00 CC 00 > 5.17501 00507 00317 00223 00206 00208 00204 00204 > F1 00 FB 01 3D 01 DF 00 CE 00 CD 00 CC 00 CD 00 > 5.19648 00507 00317 00223 00206 00205 00204 00205 > F2 00 FC 01 39 01 DA 00 CB 00 CB 00 CA 00 CB 00 > 5.17501 00508 00313 00218 00203 00203 00202 00203 > F1 00 FB 01 3D 01 DF 00 CE 00 CD 00 CF 00 CD 00 > 5.19648 00507 00317 00223 00206 00205 00207 00205 > F2 00 FB 01 3D 01 DF 00 CE 00 CD 00 CC 00 CF 00 > 5.17501 00507 00317 00223 00206 00205 00204 00207 > F2 00 FB 01 36 01 DC 00 CC 00 CC 00 CB 00 CC 00 > 5.17501 00507 00310 00220 00204 00204 00203 00204 > F2 00 FB 01 3D 01 DF 00 CE 00 CD 00 CC 00 CF 00 > 5.17501 00507 00317 00223 00206 00205 00204 00207 > > Also how do i convert the thermistor reading into Celsius?? > I looked for the xsensordot2 app, but its an empty directory. > what is the unit of the reading that im getting? > > thanks in advance. > karan > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://Mail.Millennium.Berkeley.EDU/pipermail/tinyos-users/attachments/20040823/b0586139/attachment-0001.htm > > ------------------------------ > > Message: 2 > Date: Mon, 23 Aug 2004 11:45:38 -0500 > From: karan <[EMAIL PROTECTED]> > Subject: Re: [Tinyos-users] mica2dot temperature reading > To: "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="us-ascii" > > hi again, > > ok, i looked in the user guide again, and changed Vref from 1.223 to > 0.6. > also i am getting the readings for temperature in kelvin which im > converting to centigrade. > i am using the formula in the MPRMIBUserGuide (pg 18). > > now the readings im getting are: > Volts Therm Adc2 Adc3 Adc4 Adc5 Adc6 Adc7 > 02.4675 27.1339 00317 00221 00204 00206 00204 00205 > 02.4675 27.1339 00304 00217 00202 00201 00201 00199 > 02.4675 27.2322 00305 00218 00202 00204 00201 00201 > 02.4774 27.2322 00303 00217 00206 00203 00202 00202 > 02.4774 27.1339 00306 00218 00202 00202 00202 00202 > 02.4774 27.2322 00307 00218 00202 00202 00204 00202 > 02.4675 27.1339 00303 00217 00206 00203 00202 00202 > > can u please tell me if im doing the conversin right, for the MSB and > LSB to decimal? > should it be the other way round? > as far as i know the 2nd byte in the packet is the MSB, but it would be > good to be sure. > also, the battery voltage is very low, but the battery is new, so what > am i doing wrong out there? > > thanks, > karan > > On Mon, 2004-08-23 at 10:44, karan wrote: > > > hi, > > > > im using the XSensorMDA500 app in contrib/xbow/apps/ to measure the > > battery voltage and the temperature from a mica2dot. > > im using a mica2 with TOSBase on the programming board to send the > > data from the mica2dot to the pc. on the pc i have modified Dump.java > > and Listen.java to display these readings. > > > > following is the formula for measuring the voltage from the mica2. > > this is from the MPRMIBUserGuide. this is in my Listen.java. > > Dump.getDPC is converting the data received in hex form from the mote > > to a decimal. i know that works correctly. > > > > > > double vbatt, vref=1.223, adc_fs=1024, adc_count; > > adc_count = Dump.getDPC(System.out, packet, 9, 2); // volts > > 4,5 > > vbatt = vref * adc_fs / adc_count; > > > > > > does adc_count have to be in hex?? > > i am using the packet[i+1] byte as the MSB and packet[i[ byte as the > > LSB, is that correct? > > so in the first line the thermistor data in hex is 01FB which is > > converted to dec as 507. > > the values im getting from a new 3V Panasonic CR 2354 battery are: > > > > Volts Therm Adc2 Adc3 Adc4 Adc5 Adc6 Adc7 > > F1 00 FB 01 3A 01 DE 00 CC 00 CC 00 CB 00 CC 00 > > 5.19648 00507 00314 00222 00204 00204 00203 00204 > > F2 00 FB 01 3D 01 DF 00 CE 00 D0 00 CC 00 CC 00 > > 5.17501 00507 00317 00223 00206 00208 00204 00204 > > F1 00 FB 01 3D 01 DF 00 CE 00 CD 00 CC 00 CD 00 > > 5.19648 00507 00317 00223 00206 00205 00204 00205 > > F2 00 FC 01 39 01 DA 00 CB 00 CB 00 CA 00 CB 00 > > 5.17501 00508 00313 00218 00203 00203 00202 00203 > > F1 00 FB 01 3D 01 DF 00 CE 00 CD 00 CF 00 CD 00 > > 5.19648 00507 00317 00223 00206 00205 00207 00205 > > F2 00 FB 01 3D 01 DF 00 CE 00 CD 00 CC 00 CF 00 > > 5.17501 00507 00317 00223 00206 00205 00204 00207 > > F2 00 FB 01 36 01 DC 00 CC 00 CC 00 CB 00 CC 00 > > 5.17501 00507 00310 00220 00204 00204 00203 00204 > > F2 00 FB 01 3D 01 DF 00 CE 00 CD 00 CC 00 CF 00 > > 5.17501 00507 00317 00223 00206 00205 00204 00207 > > > > > > Also how do i convert the thermistor reading into Celsius?? > > I looked for the xsensordot2 app, but its an empty directory. > > what is the unit of the reading that im getting? > > > > thanks in advance. > > karan > > > > > > > > ______________________________________________________________________ > > > > _______________________________________________ > > Tinyos-users mailing list > > [EMAIL PROTECTED] > > http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://Mail.Millennium.Berkeley.EDU/pipermail/tinyos-users/attachments/20040823/3e8c2862/attachment-0001.htm > > ------------------------------ > > _______________________________________________ > Tinyos-users mailing list > [EMAIL PROTECTED] > http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users > > End of Tinyos-users Digest, Vol 16, Issue 11 > ******************************************** > _______________________________________________ Tinyos-users mailing list [EMAIL PROTECTED] http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users
