I assume it's the same trick as the mica2 where the ADC Vref IS the
battery, and you get an inverted reading from the internal ref which
increases as the battery voltage droops.

Is there a micaz schematic on the XBOW site? I keep looking for one at
   http://www.tinyos.net/scoop/special/hardware
and then give up...

Also, I just referenced your name in vain on having sent me a link to
something that details the nesc include path, which I have lost as usual.
Can you resend that (assuming it was you...)

thanks
MS


David Gay wrote:
On 5/19/06, Michael Schippling <[EMAIL PROTECTED]> wrote:
I don't remember the solution to the problem in the previous email you
reference, but I think they were reading the wrong ADC or getting
wrong values somehow...perhaps Gina Upperman is still online here and
can answer.

AFAICT, there's no voltage sensor on the micaz (at least there's no
sign of it on the schematic on Xbow's web site). The micaz tinyos 1.x
Voltage component tries to read the built-in "V_BG" (bandgap) voltage.
Perusing the atmega128 documentation suggests that that voltage is not
stable until 40-70us after the ADC is enabled - so the problem may be
that it isn't stable. I'm also unclear on how a measurement of V_BG
(as setup in TinyOS 1.x's ADCREFM and HPLADCM modules...) relates to
battery voltage.


But your values look suspiciously like they have been divided by two.
Do you have an accidental bit shift someplace?

MS

R Gartz wrote:
> Hello,
>
> I'm trying to measure the voltage of the batteries of my micaz nodes.
>
> When using the VoltageM component, I'm always getting values like Vbat=
> 3901, 4638, 4892, 5261, 5398, 5351, 5445, 5398 .... -> So, 5,3 Volt for
> two AA batteries?? Seems very strange...
> When printing the raw 10-bit ADC value (so without the conversion (in
> the VoltageM component) Vbat = Vref * 1024/ADC_Count) the ADC_Count =
> 315, 258, 243, 230, 227, 229, 225,...
> So in order to get more realistic values like Vbat = 2900mV: the
> ADC_Count should be around 430...
> Everything is mapped right, I'm measuring the ADC-channel 30 for micaz...
>
> Anyone knows what is wrong? (the same problem has already been posted a
> month ago,
> http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2006-April/016227.html)
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to