Hi, I think this equation applies to the micasb, it's a generic thermistor type equation, so the thing which may be different is the value of R1.
I'd recommend keeping the raw ADC values onboard the mote. The reason for this is that it avoids the need for any decimal points, and also minimises any rounding errors which may result from conversion. Its probably better to do any conversion on the PC (you can look at the source code for Oscilloscope and see where you can make any changes). The other possibility is to make an approximation of the equation - if you know the rough temperatures you will be measuring, then you can either use some of the terms of the expansion (http://en.wikipedia.org/wiki/Natural_logarithm), or even make a linear approximation. That way you can approximate the conversion onboard a mote using summations and multiplications - no need for a math library. Another thing worth doing is to make a quick excel plot of T(K) vs ADC to get an idea of what the relationship does around your measurement region (and see if a linear approximation would do). Hope this helps, Mike -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: 07 June 2007 18:38 To: [email protected] Subject: [Tinyos-help] Oscilloscope Temp conversion Hi all, This is my first message on the help list and I hope to get a good response. I used the OscilloscopeRF application to sense the temperature instead of light by using Temp instead of Photo in the Oscilloscope.nc file. I am able to get the readings and display them on PC using TOSBase. These readings are hexadecimal values in little endian format and I want to convert them to celsius or kelvin. I am using the mica2 motes and micasb board. I found a formula for this 1/T(K) = a + b × ln(Rthr) + c × [ln(Rthr)]3 where: Rthr = R1(ADC_FS-ADC)/ADC a = 0.001010024 b = 0.000242127 c = 0.000000146 R1 = 10000.00; ADC_FS = 1023, and ADC = output value from Mote's ADC measurement. now I have 3 questions 1) Is this formula correct for micasb 2) How do I calculate this in nesc as it involves logarithmic calculations. 3) In what format is the ADC that is being used . Is it in the same format in which the sensor senses the data ie little endian format. Please reply to this asap as I am stuck at this point in my project Thanks a lot Vishal _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information. NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Serco House, 16 Bartley Wood Business Park, Hook, Hampshire, United Kingdom RG27 9UY ------------------------------------------------------------------- _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
