Teensy 4.0 Can't program when using external power supply

Status
Not open for further replies.

noodle

Member
Teensy 4.0 - Unable to program when VIN cut

I'm moving a T3.6 project to T4 and am running into a strange issue. It's affected two T4 boards so far.
Both boards respond normally and program successfully when plugged into a computer before the VIN trace is cut. However, once the trace is cut, I can no longer program the boards. They both power up fine and enter into program mode when the on-board button is pressed but they will not appear as a device on any of my computers.

The bizarre issue is, if I solder the VIN pads closed, the boards appears on my computer as expected (but without the ability to power the board externally while connected to a computer).

I'm using an MCP1826S 1A 3V3 LDO connected to the VUSB pin on the Teensy, so power and data require only one cable.
The on-board regulator is too small for my project.

Does anyone have any suggestions?
 
Last edited:
I thought the point of cutting that track was to remove power to vusb.
If your supplying 3.3v to vusb does that mean your computers usb 5v is pulled down to 3.3v?

I don’t know how this works though.
 
pinout5b.png


Wrong board but same concept. VUSB is the inner pin below GND at the top right of the image. Cutting the trace, as I understand, removes the connection between VUSB and VIN.
I have VUSB connected to an external LDO and the trace between VUSB and VIN severed, so the on-board LDO should be inactive.

At least, that's how it seemed to work on the T3.6 I used before these T4s.
 
Connect your external 3.3v to the pin labeled as 3.3v. Vusb is connected to usb socket and doing what your doing will be pulling your USB low. I would expect a message to pop up in win10 saying something about it... anyway that’s my thoughts.
359FE266-29BF-48A9-8846-F117604E7BD8.png
 
Actually looking at schematic your device would not be working if connected to vusb with the trace cut.Are you perhaps putting 3.3v into the vin side then you would be going though onboard 3.3v regulator and dropping a bit lower. Perhabs it’s too low for USB data.
 
HK2BoqR.png


Here's what it looks like. VIN has nothing connected to it.
The board powers on perfectly and runs both my sketch and the blink sketch as it should. I checked the incoming USB voltage and it's a solid 5V. The LDO produces a stable 3.3V as well.
 
@noodle:: Are the GND lines of the Two power sources common to the Teensy? Not sure why this wouldn't work as it has here if the power is good.

The problem is it seems you are only supplying 3.3V to a Teensy 4.0? When I repeat the testing below that works with 5V on VIN - the Teensy will run with 3.3V from second Teensy ( as I am seeing the SSD1306 running ) - but as you are seeing it will not connect to USB for program or even SerMon data out when only 3.3 volts are applied to VIN with the VUSB<>VIN trace cut. **: I see now above that the 3.3V was applied to the 3.3V pin and I can't fully test that - but it appeared to work the same - though at some point the Teensy supplying the 3.3V shut down.

Both the T_3.6 and the T_4.0 cards specify VIN minimum of 3.6V - and while the T_3.6 may work with 3.3V on VIN - it appears the T_4.0 will not as it is under spec and outside the operating range when USB is feeding 5V to the device but the T_4 only has 3.3V to run

This may be something Paul can confirm that in this case when the T_4.0 VIN is getting 3.6V, that this works normally as exSPECted when the VIN<>VUSB trace is cut.
> Perhaps Paul can also repeat this with 3.3V applied to a 3.3V pin as above and offer details.

During T4 Beta I cut one of the traces on a PJRC supplied T4 unit and tested powering it with 5 volts from another source - another Teensy. I found that to work well and normal, using 5 volts.

Just now with a TallDog Board with the VUSB<>VIN trace cut { and the switch to external power set it does not run when USB is connected - as expected }.
> Then I pulled GND and 5V from a second T_4 for external VIN to that T_4 under test and it runs and programs normally.
> For Test alternated between two sketches using TeensyDuino 1.49b4 using { one sketch runs i2c SSD1306 display and the other does a ram test on the unused ITCM upper area }:
-- IDE 1.8.9 and TeensyLoader with the IDE to upload and IDE SerMon
-- IDE 1.8.10 using TyCommander from SublimeTest where TyComm does upload and sermon
 
@noodle:: Are the GND lines of the Two power sources common to the Teensy? Not sure why this wouldn't work as it has here if the power is good.

I would expect so. Unless USB GND becomes disconnected when the VUSB<>VIN trace is cut...? I don't understand how this would be so but I can't pretend there isn't plenty I don't understand.

The problem is it seems you are only supplying 3.3V to a Teensy 4.0?

Yes, I am supplying 3V3 via an external MCP1826S LDO. The only non-working part is the data/serial connection to my computer.

...you are seeing it will not connect to USB for program or even SerMon data out when only 3.3 volts are applied to VIN with the VUSB<>VIN trace cut. **: I see now above that the 3.3V was applied to the 3.3V pin...

That is exactly what I am experiencing.

Thanks for testing, defragster.

Hopefully Paul can shed some more light.
 
Did you connect a capacitor to the MCP1826? I don't see one in the picture on msg #6.

From the MCP1826 datasheet:

sc.png

Like all these LDO regulators, the output capacitor must be located physically close to the regulator with short wires. These types of regulators have unstable performance without the required capacitor, or if too much wire is used between the regulator and capacitor. It must be the specific type of capacitor they say, so don't substitute a different type like aluminum electrolytic or tantalum. You need a ceramic capacitor.

Ceramic capacitors come in different material types with a 3 letter code. Use one that begins with "X" for this case. The "Y" and "Z" types like Y5V and Z5U are low quality parts. Avoid those.
 
What does the vin voltage measure with this setup.
I’m just curious (may not matter) what vusb1/2 bus is supplied with when like this.
Thanks.

Edit:
Is usb1/2_vbus used for data line voltages or some other host mode peripheral I don’t understand?

If it’s for data lines reference manual doesn’t mention using 3.3v internally for this. Looks like u need 4.5-5vdc on one of the 2 bus lines?
 
Last edited:
I had time to solder the 1uF capacitor on today. The board powers up but still no USB.
What's the next step in diagnosing this?
 
You're not powering the teensy properly. If you look at the schematic, main chip, top left, N6 and M6 are Vusb inputs, expecting I assume 5V.
Cutting the Vin-Vusb trace allows you to power the teensy with an external supply, but this should be 3.6-5.5V and applied to the Vin pin. By powering just the 3.3V pin, you're not properly feeding power to the chip, and the abscence of power to the Vusb pins would certainly explain why the USB no longer works.

I'd also note that you're "schematic" shows that you've connected the input of the regulator the Vusb pin. As I understand this, your board is going to have some other supply supplying an input voltage to this regulator, so you're still connecting this voltge to the usb voltage and hence not getting anything out of cutting the trace. I'm going to assume the following
- you want to power the teensy only from the board
- you've got 3.6-5-5V available on the board
- You need more than 250mA @ 3.3

Cut the trace on the T4. Connect 3.6-5.5V to Vin. Power your 3.3V regulator however you see fit. Do not connect the regulator's 3.3V to the T4 3.3V pins.

If you need to reprogram the T4 without powering the board, take it out and connect the Vusb and Vin pins using a jumper. If you want to be able to do this in situ, you could add a pair of pins that you can manually jump, or you can use a pair of doides to make it hot-swappable.
 
Paul - Here are some photos https://imgur.com/a/uRIu2H9
There will also be a BNO080 (I'm eagerly awaiting your findings/fixes in the other thread), ESP8266 and Quectel L76 GPS added after I have this resolved. The 20 pin header is for a TFT display. The code is written but I struck this issue and stopped soldering more things on.

tonton81 - Thanks for that. It looks like it has a 5V reg. that is connected to VIN.

Edward - If I'm understanding you correctly, you're telling me the Teensy 4.0 must be powered via its onboard regulator, it cannot be powered via external 3V3 while concurrently maintaining the ability to program?
The issue I have with what you propose is I would like to be able to use the board and program without jumpers or other workarounds. If it can be avoided, I absolutely want to.
This setup has worked for the last year with a Teensy 3.6. It's only now I've moved to a T4 I'm having this issue.
 
Is leaving trace uncut and removing the regulator on the teensy an option?
Your going to need 5v when using USB.

Edit:
Here is my full take in it.. vusb needs 4.5-5v according to a manual I read on the teensy website somewhere. The chip has internal regulator for USB purposes. So you could put 5v on vin and remove the onboard regulator and still use your external regulator for 3.3v stuff.

I think it would be better to cut trace and power teensy from 5v on vin. Keep onboard regulator for your io and wire the external 3.3v stuff directly off your external regulator. I assume this is a wiring hassle preventing you going this way.

Or as mentioned at the start of this post leave trace connected and remove the onboard regulator. Then you can put straight on your board and will work like the 3.6 did.

Get a second opinion on this though. I’ve not done it this way. By the end off all this I should know how to though.
 
Last edited:
Is leaving trace uncut and removing the regulator on the teensy an option?
I'd prefer not removing parts but that's just my preference right now. It's certainly an idea I'll tuck away for future use.

I think it would be better to cut trace and power teensy from 5v on vin. Keep onboard regulator for your io and wire the external 3.3v stuff directly off your external regulator.
I think this is the best solution at the moment. I had wanted to replicate my previous T3.6 setup but it must be incompatible with T4.

Thanks for your help everyone.
 
Last edited:
As a quick sanity check, I cut the VUSB-VIN pads on a Teensy 4.0 and connected it's 3.3V power line to my lab bench power supply. When I press the pushbutton, Teensy Loader does indeed load the code and reboot it. Communication also works to the Arduino Serial Monitor. I ran the Wire library Scanner example, and it's printing this (because nothing else is connected).

Code:
Scanning...
No I2C devices found

Scanning...
No I2C devices found

Scanning...
No I2C devices found

Scanning...
No I2C devices found

Scanning...
No I2C devices found

I can't say why it's not working for you, but I can show you some quick photos of how I tested just now.
 

Attachments

  • DSC_0680_web.jpg
    DSC_0680_web.jpg
    131.6 KB · Views: 142
  • DSC_0677_web.jpg
    DSC_0677_web.jpg
    160 KB · Views: 142
  • DSC_0676_web.jpg
    DSC_0676_web.jpg
    177.3 KB · Views: 140
  • DSC_0681_web.jpg
    DSC_0681_web.jpg
    142.5 KB · Views: 144
There will also be a BNO080 (I'm eagerly awaiting your findings/fixes in the other thread),

I do have some good news for you on BNO080. I've rewritten the Wire library functions to much better manage the FIFOs and better recover from the strange things BNO080 does at startup.

Install 1.49-beta5 to get the Wire lib updates.

https://forum.pjrc.com/threads/59030-Teensyduino-1-49-Beta-5

I tested it here with BNO080. Kurt and Mike also ran tests just before I released this. Things are looking pretty good for BNO080 now. :)
 
Thanks for checking, Paul. I'm not sure what the problem is then. The only thing we're doing differently is I'm using the bottom row pin as opposed to the side pin you're using.
If I can work anything out, I'll post it here.

Re: BNO080. Fantastic. Thank you. I'll test it out later tonight.
 
Not visible in the photos are the length of wire... (and the clutter on my workbench). Those clip leads are each 24 inches long. There's no extra capacitor or anything else between Teensy and the BK Precision 1474 power supply, just those 2 leads that are each 2 feet long.
 
I tested my teensy 4.0 powered by 3.3V at 3.3V pin and it does indeed work for me.
I think it may be significant that the high level on usb data line is about 1.5vdc when powered this way. If powered from usb 5Vdc I get a bit over 3V.

Powering a teensy 3.6 gives the same 3VDC high level if powered from 3.3v or 5v.

I've read the protocol requres 3.3Vdc pulled high on d+ or d- for speed identification.

Perhaps try another computer.

i'm getting my info from here:
https://www.beyondlogic.org/usbnutshell/usb2.shtml
 
I've just looked a bit deeper into the datasheet and it says the USB_VBUS inputs are "not part of the power-on sequence and may be powered at any time". So I was wrong, you can (as other's have shown) power the 3V3 pin externally and expect the teensy to run.
At first, I looked at paul's set up where the USB was running without powering these inputs and frankly was tremendously confused. Unless I'm really missing something, cutting the Vin-Vusb trace should disconnect pin N6 and P6 from the USB, and without power to the Vin pin, the USB should be unpowered.
I would guess, and I stress the use of guess, that there's some kind of path for powering the USB circuity. Clamping diodes on USB D+/- that allow enough power to be drawn from the data lines could do it. This would be the sort of thing that doesn't work every time. Again, the datasheet recommends 4.5V or more to VBUS, so if this condition isn't met you can't expect consistent results.
 
Status
Not open for further replies.
Back
Top