Teensy 3.2: external power

Status
Not open for further replies.

zelg

Member
Hi.

I'm using a teensy 3.2 with external power. But the teensy CPU won't start up - the teensy onboard voltage regulator generates correctly the 5V and 3.3V on the board.

Here's my setup:

[230 V -> 12 V by external PowerSupply] - [12V -> 5V with LM7805] - [Teensy 3.2 board wired by GND and V_IN close to USB Plug]

When the board is still connected to LM7805 - but I connect the USB to my PC, the teensy is powering on and working as desired. Is the LM7805 faulty?

Thanks for any help,
Markus
 
1. The LED of PIN 13 is blank. When the CPU will work, the LED will flash very fast - it can be detected to have a 50% PWM signal. Thats from the frequents request to the SPI where I have attached the Wiz820io.
2. no action on the TCP/IP on this address (port-scanner)
 
No code was posted - so this is a guess on a common problem in this case.

Check in setup() for "while( !Serial );" - when externally powered USB won't connect and the code will stay in that loop forever.

Try something like this - that in this case will wait for serial for 4 seconds and then start your code.

Code:
  Serial.begin(115200);
  while (!Serial && millis() < 4000) ; // wait for serial port open
 
my code in setup is with
Code:
  pinMode(LED, OUTPUT);    
  digitalWrite(LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  Serial.begin();
   ...
  while (!Serial) ;
where LED is Pin11. My led remains blank when powering over V_IN.
I will try the timeout hint.....
 
testing without Wiz820 and the timeout propose in while-!serial:
Result: same behaviour - no startup..... all blank.

attached my hardware wireing:
Print.PNG
 
Last edited:
If no USB is connected the USB doesn't need powered - if it is connected with external power then you need to cut the USB trace as indicated on the bottom side to prevent USB power from hitting the external power.
 
looking to the schema of t3.2 in
https://www.pjrc.com/teensy/schematic.html
I do see no use of VUSB. In other words: the usb-IC is supplied by the LP38691-out with 3.3 V. Same than if supplied by V_IN.
Hence the the serial should start up correctly, no?

Use a multimeter to measure the Vin pin. First plug in your USB and read the voltage, remove the USB and apply your external power and read the pin. If you have +/- 5V in both cases, its most likely your code.
 
here the voltage level measured:

1. usb powered (from notebook): 4.82V at V_IN on Teensy PIN
2. external powerd with 12.0V: 4.87V at V_IN

then:

I uploaded the blink example. powering from USB. result: works fine. Blinking ongoing....
then I removed the usb: teensy still blinking.

Then I did reboot on thensy button close to the cpu: blank. no startup. How can I restart teensy when powered over V_IN?

Note: I havent cut so far the 2 golden field to cut the usb power from external powering on the bottom of the teensy board....
 
Last edited:
here the voltage level measured:

1. usb powered (from notebook): 4.82V at V_IN on Teensy PIN
2. external powerd with 12.0V: 4.87V at V_IN

then:

I uploaded the blink example. powering from USB. result: works fine. Blinking ongoing....
then I removed the usb: teensy still blinking.

Then I did reboot on thensy button close to the cpu: blank. no startup. How can I restart teensy when powered over V_IN?

Note: I havent cut so far the 2 golden field to cut the usb power from external powering on the bottom of the teensy board....

The button on the Teensy 3.2 next to the Processor is a program button, not reset. You put it in programming mode when you pushed it. Meaning it stops and is waiting to be programmed.

If i'm reading your above explication, then your 5V supply is working fine, it seems that your code is waiting for a serial connection.
 
it seems that your code is waiting for a serial connection.

I dont think so. My code is first switching on a LED on pin 11. But the LED remains blank, see my code snippled above.

I will check the programming-button. maybe I missed this feature....
 
Code:
while (!Serial) ;

waiting for a serial connection. Won't happen without connecting to PC via USB. Look at post #4 by defragster a bit longer.
 
I dont think so. My code is first switching on a LED on pin 11. But the LED remains blank, see my code snippled above.

I will check the programming-button. maybe I missed this feature....

If you put the post #4 code in as robsoles notes and you suggested you did in post #7 - it should not be waiting on unconnected USB to appear.

Since you have not cut the VIN from VUSB trace I assumed the device went power off as you cannot safely plug in both at the same time. So when it is repowered from VIN supply it should restart. I didn't mention the button - as you now learned that button is 'Program Mode' not reset (took me some time to learn that too). Unless you wire up the RESET pad on the underside - you'll need to cycle power to restart the Teensy.

Here is a link to a simple complete sketch to compile with "Tools / USB Type : Serial": Example-program-quot-HelloSerialMonitor-quot-does-not-work

Copy that code as a new sketch and try to upload it over USB - watch it work and blink- then transition to external power and it should do the same 4 seconds after power up.
 
sorry, forgot to write: while (!Serial && millis() < 4000) ; is allready in - BUT AFTER LED should turn on.....
 
As noted - post 7 suggested that. Give the p#15 linked stand alone sketch a try.

Similar code with step by step notes that work when I've found my Teensy to get in a bad way are here : Can-t-communicate-with-Teensy-3-2-through-Teensyduino

Since you are working with USB that shouldn't be needed - but it is a cooler sketch that will start blinking with or without USB connected on a working Teensy.
 
SOLVED.

It's all about the program-feature when pressing the button on the teensy. After re-powering over V_IN, the code works fine. I will go for a extra RESET button on my host-board to have the programming feature by usb and the power feature by V_IN without removal of TENSY from the host-board.

Thanks for any help!
 
Status
Not open for further replies.
Back
Top