External Power Teensy 3.2 won't turn on without USB plugged in

CollinDietz

New member
I have a Teensy 3.2 with the vin-vusb trace cut to allow external power use. It was functioning fine a day ago, and now it won't power on without the usb plugged into the computer. I have confirmed the battery is charged and delivering power, and there is an amperage draw from the battery in both cases, but the Teensy won't run even blink without being plugged into the computer.

It is soldered into a pcb, but I don't have the schematics.

The teensy is activated by a pulse to a STR which connects the GND line of the teensy to the gnd line of the battery, the Teensy then locks this connection by holding pin 23 high, which is linked to the same input on the STR

Any help is appreciated!
 
First note:: Forum Rule: Always post complete source code & details to reproduce any issue!

I suspect there is some code in setup() stopping progress until Serial is seen online that only appears when USB is connected.

I could say for sure with posted code, but I suspect there is some code like " while( !Serial ); " in setup that needs to be removed or modified to run when USB is not required.
 
First note:: Forum Rule: Always post complete source code & details to reproduce any issue!

I suspect there is some code in setup() stopping progress until Serial is seen online that only appears when USB is connected.

I could say for sure with posted code, but I suspect there is some code like " while( !Serial ); " in setup that needs to be removed or modified to run when USB is not required.

/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.

This example code is in the public domain.
*/

// Pin 13 has an LED connected on most Arduino boards.
// Pin 11 has the LED on Teensy 2.0
// Pin 6 has the LED on Teensy++ 2.0
// Pin 13 has the LED on Teensy 3.0
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
pinMode(23, OUTPUT);
digitalWrite(23, HIGH);
}

// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

I am running just this version of blink
 
How long is the Pulse on STR?

Teensy takes no less than 400 millis to get to setup {once startup power is received to feed caps etc to required voltage } to perform the :: digitalWrite(23, HIGH);

If the Pulse doesn't connect the battery for some time longer than that the Teensy won't have received enough power long enough to begin operation and set that output high to continue.

If the LED never pops on - for even a flash - that is likely that case.

FYI: Current TD 1.42 beta code has reduced this startup to 300 millis.
 
Had a similar problem: Teensy 4.0 and a paper display are working fine plugged into my PC, but they don't start up on a usb power adapter.
I comment out all Serial.xxx related lines and now it works. It seems that the script stops if no serial is available. It seems that I should have known ..

Hope that helps!

richard
 
Check if you have a
Code:
while(!Serial);
this waits for a serial connection... of course there is none if it is not connected to a PC...
 
I comment out all Serial.xxx related lines and now it works. It seems that the script stops if no serial is available. It seems that I should have known ..

Serial.write and Serial.print are designed to automatically recognize when no PC is connected, or when a PC is connected but becomes unresponsive (today they have a fixed timeout, in future software this will become configurable). So leftover Serial.print() statements in your code should not cause Teensy to hang.

But if your program intentionally waits with while (!Serial) or similar code, then of course you can expect that to hang when no PC is connected.
 
I have this problem without "while(!Serial);" but with a simple Serial.print(x). I guess the problem is related to the use of e-ink paper displays. Only projects (teensy & nano) with them have this problem.
 
Back
Top