[Tinyos-help] battery voltage micaz

Michael Schippling schip at santafe.edu
Fri May 19 13:26:13 PDT 2006


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.

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)
> 
> 
> Greetings,
> 
> Robin
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


More information about the Tinyos-help mailing list