Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

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

  1. #1

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

    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
    }

  2. #2
    Btw, this doesn't help: https://forum.pjrc.com/threads/23365...inimum-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

  3. #3
    Does anyone have any ideas? could it be faulty hardware?

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,116
    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);
    }

  5. #5
    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.

  6. #6
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,534
    I measure about 30ma with no USB and 5v on teensy2++ and this seems to agree with Paul's values at
    https://www.pjrc.com/teensy/low_power.html
    in powerdown mode i measure about 38 ua

  7. #7
    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..

  8. #8
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •