Yes I know they are very suspicious ;)
But I don't have any bit shift anywhere in my program(s)... Those are the actual values I'm getting
Michael, in your robocode you're getting the right values for mica2? But you're not using the VoltageM component.
So, I decided to try the same thing you did: not using VoltageM.
Although I know the Xbow MPR manual describes something about the mapping from ADC7 to the ADC channel 30, and by using VoltageM in micaz.
"RobotM.BVoltage -> ADCC.ADC[ROBOADC_BVOLTAGE];" (I tried both ROBOADC_BVOLTAGE = 7 and ROBOADC_BVOLTAGE=30) but the dataReady-event never fires (although like I said before, I was expecting something like that when not using VoltageM)
So, there remain 2 options:
-the VoltageM component contains an error (e.g. wrong mapping / reading of the ADC channel)
-Measuring Voltage in micaz is not possible? (although the xbow MPR manual claims it should be)
greetings and thanks,
R.
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.
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
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
