Hi Francesco,

At a quick glance your calculations appear to be correct. If the effort 
is small to change the resistors, it's worth a try.

I also have been thinking, and maybe the simple model of the battery is 
not enough to explain the phenomenon you see. I suspect that the 
microcontroller turning on and off while sampling the sensor could also 
be a problem. You can force the microcontroller to stay on during the 
sampling by overriding the default behavior of the power management. 
You'll have to wire an additional interface for this:

components McuSleepC;
McuSleepC.McuPowerOverride -> YourApplication;

In your application, you need to implement the McuPowerOverride interface:

module ... {
   // ...
   provides interface McuPowerOverride;
   // ...
}
implementation {
   uint8_t sensorSampling = 0;
   // ...
   async command mcu_power_t McuPowerOverride.lowestState() {
     // WARNING: this code is specific to the Atmel microcontrollers
     // Should run on Mica2, MicaZ, and Iris
     if(sensorSampling == 0) {
       // we can allow the MCU to sleep
       return ATM128_POWER_DOWN;
     } else {
       // MCU needs to remain active
       return ATM128_POWER_IDLE;
     }
   }
   // when starting to sample the sensor
   sensorSampling = 1;
   // sample sensor
   // when done sampling sensor
   sensorSampling = 0;
   // ...
}

Cheers,
Urs


On 12/4/10 11:14 AM, Francesco Ficarola wrote:
> Urs, in the meantime I thought:
>
> Since I use a weathstone bridge
> (http://en.wikipedia.org/wiki/Wheatstone_bridge) with:
> - R1 and R3: 1.2 kOhm resistors
> - R2: 470 Ohm potentiometer
> - Rx: 354 Ohm strain gauge
>
> the equivalent resistance of the bridge is (with potentiometer in max
> resistance):
> [1/Re] = [1/(1200+470)] + [1/(1200+354)] -->  Re = 804.95 Ohm, right?
>
> Now, since I = V / R, the current consumption of this bridge is:
>
> I = 3 V / 804.95 Ohm = 3.7 mA
>
> So, assuming that the battery resistance is 3 Ohm, the voltage
> fluctuations are about 3.7 mA * 3 Ohm = 11.1 mV.
>
> Now, if I increase the values of resistors, for example:
> - R1 and R3: 10 kOhm resistors
> - R2: 10 kOhm potentiometer
> - Rx: 354 Ohm strain gauge
>
> the equivalent resistance of this bridge will be (with potentiometer in
> max resistance):
>
> [1/Re] = [1/(10000+10000)] + [1/(10000+354)] -->  Re = 6822,17 Ohm
>
> So the current consumption is:
>
> I = 3 V / 6822,17 Ohm = 0.4 mA
>
> In this case the voltage fluctuations are about 0.4 mA * 3 Ohm = 1.2 mV.
>
> Thanks to this value I should solve the problem in my ADC readings
> because a level of the quantization is greater then 2 mV.
>
>
> Do you think the reasoning is correct?
>
> Greetings,

_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to