Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Excessive current useage when analogReference is not DEFAULT

$
0
0

I've run into an issue with execssive current usage on the Launchpad. My goal is to run a sensor on a battery for at least a year. The initial test was promosing because the launchpad (with J3 jumpers removed of course) was drawing barely a uA in LP3 sleep mode using the sleepSeconds() function in Energia. I was thrilled.

 

Then I figured that I should keep tabs on the battery level. To do this, I had to set analogReference to INTERNAL2V5 and use analogRead(11) to get the value. It works great. Below is a barebones snippet. The problem is that the current usage jumps to 180uA even in LP3 sleep mode. I understand that there will be some current usage to get the reference voltage, but it never turns off. Even if I set analogReference back to DEFAULT after the analogRead and call sleepSeconds.

 

Can anyone explain this? I'm hoping I'm doing something wrong.

void setup()
{
  // Use the 2.5V internal reference
  analogReference(INTERNAL2V5);
  //analogReference(DEFAULT);
}

void loop()
{
  // Get battery voltage
  //analogReference(INTERNAL2V5);
  int v = analogRead(11);
  //analogReference(DEFAULT);

  sleepSeconds(10);
}


Viewing all articles
Browse latest Browse all 2077

Trending Articles