Teensy 2++ low power example works only after the teensy button is pressed

Status
Not open for further replies.

srusha

Active member
Hello,

Funny stuff..

So I uploaded the low power example, 2Mhz mode to my teensy 2++, after uploading I removed the usb cable and connect the VDD to external 5v battery.

when measuring the current (I have a small 1Ohm resistor in serial to the VDD pin) I get ~33mA, after pressing the arduino button it drops to the 4-6mA it should take. but the arduino stops working (i added a blink to show responsiveness of the mcu)

any ideas how I can achieve the low power consumption as seen in the low power page?

Code:
const int usb_usb_disable = 1;

void setup() {
  for (int i=0; i<46; i++) {
    pinMode(i, OUTPUT);
  }
  if (usb_usb_disable) Serial.end();
}

elapsedMillis usec;
const int ledPin = 6;

void loop() {

  
  digitalWrite(ledPin, HIGH);   // set the LED on
  delay(1000);                  // wait for a second
  digitalWrite(ledPin, LOW);    // set the LED off
  delay(1000);                  // wait for a second
}
 
Btw, this doesn't help: https://forum.pjrc.com/threads/23365-Teensy-2-0-low-power-minimum-current

And I want to clarify, the board is on a matrix with only 1Ohm resistor connected to it, the resistor is connected to the power supply (5V), ofcourse, the ground is also connect to the same power source.

I measure the voltage in two ways:
1 - measure the voltage on the resistor.
2- measure the voltage between the vdd and ground, and between the resistor and ground.

Of course that both measurements are theoretically should be equal - this is just a sanity check.

with both codes I get the same current - ~30mA

o
 
Extra power could be due to floating inputs.

On Teensy 2.0 and Teensy++ 2.0, all the pins default to input mode. That's convenient for software, but the pins you're not using can consume extra power if they aren't connected to anything and noise or AC electro-static coupling to the pins from your room causes their voltage to get close to the logic switching threshold.

Try configuring every unused pin to output mode. For example:

Code:
for (int i=0; i < 46; i++) {
  pinMode(i, OUTPUT);
}
 
Hi Paul,

As you can see from the code I posted, I already had the exact code in the setup function.

So thats not that.
 
I am 100% sure that Paul has measured this current, I ordered 3 new teensy2++ and will measure them, I now suspect a hardware fault in my teensy..
 
So I just got 3 new Teensy 2++ and it all works great on them. so it must be a hardware fault, my guess is that something has gone awry in the mcu itself.

I would ask to return it if the shipping to Israel wasn't so expensive..

Anyway, so thats it.
 
Status
Not open for further replies.
Back
Top