Just a note on "the battery code"...if you are using mica2
(and perhaps others...) the reading called "battery" from
ADC7 is coming from a fixed voltage reference, however the
Vref for the converter _is_ the battery. Therefore, as the
battery droops, the apparent value on ADC7 _increases_.
That's why the calculation of actual battery voltage involves
an inversion. I posted an excruciatingly nerdly exegesis of
this about a year ago if you search for battery and ADC...

The convenient thing about this is that sensors which boil
down to voltage dividers (e.g., thermistors) that run off
the same battery do not need to account for bat-volt change.

MS

Benjamin Madore wrote:
On Wed, December 20, 2006 6:21 am, olcay çelik said:
in this code especially in the variable declaration a, b, c and Rthr what is
it ?  i did not understand
please someone help me because i have to write my own code. and

my second question is in the simulation environment how can i see the raw
data for the calculating temperature by using surge-view application

if someone had did this measuring temperature please help me


You know, I just fudged it, since it wasn't important for me. That and the
battery code seem to implement strangely through Surge. It never mentions
anywhere if there is any pre-conversion in code or what, but things are
either wildly off or inverted. I probably have something wrong, but it's not
worth it to me to figure out what.

Also, the included code doesn't seem to be mathematically simplified, making
it slightly more complicated for those who don't want to try to understand
the sensor operation, only want to display the result.

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

Reply via email to