Teensy 3.6 pin impedance before being powered

Status
Not open for further replies.

jwatte

Well-known member
I have a PCB that has an electronic power switch for "12V" input (really, 3S or 4S LiPo,) that feeds a buck regulator, that generates 5V, that powers a Teensy 3.6.

The power switch is latched high by a resistive divider on the output of the switched 12V rail.

To be able to turn off when the voltage goes too low, to save the LiPo battery powering the system, there's a voltage divider going to an analog input on the Teensy (for voltage monitoring) There's also a resistor between pin 25 on the Teensy and the power latch input on the power switch, so the teensy can pull this low. Finally, to make sure the voltage divider doesn't overvolt the Teensy pin, there's a 3.3V Zener across the lower leg of the latch-on voltage divider.

When the Teensy is not plugged in, the board works fine; hook up 12V bench power supply, press On switch, power switch turns on, voltage divider latches it high.

When the Teensy is plugged in, the power switch refuses to turn on. The boost regulator doesn't activate, so the Teensy doesn't get power, so it can't keep pin 25 high.

When measuring the Teensy pin 25 to ground when it's not powered, I measure essentially infinite impedance, but somehow, plugging it in to this circuit makes it behave differently.

What can I be missing?

This schematic uses part numbers as values, which makes it a little harder to read, but it's all I have:

Screenshot from 2019-08-24 11-27-33.png

Pin 25 is the "PWR_ON" input at the top. The power switch is the IN_ONSW switch at 10 o'clock. The power switch chip is U701. The "must turn on" voltage for INPUT is 2.1 Volts, at 10 microamps of input current.
 
Also: Powering the Teensy from USB, it can turn on and off the 12V rail fine. This is some kind of feedback problem when the Teensy itself is not yet powered.
 
Using the latest TD 1.46 or 1.47 with change for power up?

Does the T_3.6 ever come to life? Turn on LED in setup - or not getting that far? Sounds like not powering at all?
 
No, I think I'm using an earlier Teensyduino (1.44 perhaps?)
However, I don't get that far -- the power switch doesn't turn on, so the boost regulator doesn't turn on, so the Teensy doesn't turn on (AFAICT.)
Putting a scope on the 5V rail, it doesn't come on even temporarily (the boost converter has about a 2 ms soft start if power does come on to it.)

Interestingly, when the Teensy is plugged in and I want to power it from the boost converter, the voltage at the "input" node is about 1.4V; but if the Teensy is plugged in, and USB powered (so it's actually on, and keeping the INPUT node high) the INPUT node is at the expected 3.3V.
The ON button makes an 18k vs 6.8k voltage divider (with a 3.3V Zener across the 6.8k) which, at 12V in, should give me a 3.2V voltage.

Thus, my theory is that pin 25 somehow has a low impedance when the Teensy isn't powered. But measuring it with a volt meter, I see close to infinite resistance between it and ground.
There may be a few other pins that see some voltage -- the PWR_SENS and PWR_CSENS signals come to mind, sensing the voltage and current of the circuit. (You can see the voltage dividers for either.)
These are pin 29 and 22 respectively.

When i measure the Pin 25 resistance while in the circuit, it starts at about 5.6 kOhm, and slowly climbs to 6.2 kOhm, which is interesting -- some kind of capacitor getting charged. Could be in the power switch circuit, or in some input gate capacitance (but that's usually measured in nF or less)
Cranking voltage up to 16V doesn't help, and holding the power button for many seconds doesn't help.
 
AFAIK - the T_3.6 power up when power isn't up in the right time/value goes to unknown state when 'startup' brings something online that doesn't get needed power. The startup code init order was altered and you should try the TD 1.47 as that will be in the first blink of an eye of the Teensy seeing voltage.

May not help - but the T_3.6 will be going to uncontrolled state when control is lost in that first moments.
 
the T_3.6 power up when power isn't up in the right time/value goes to unknown state when 'startup' brings something online that doesn't get needed power.

But there is no 5V power into the Teensy. The 5V regulator does not start up. The 12V power switch does not turn on, because the voltage of the "INPUT" pin doesn't rise enough.
I have tried this by connecting only pin 25, and pin GND, to the circuit board from the Teensy. It still prevents the circuit from turning on. Remove pin 25, the circuit turns on. Measure resistance between Pin 25 and GND, it measures no connect.

FWIW, I also tried this with GND and pin 0, with the same result -- when a pin is connected, the voltage ends up a little over 1V.

My question is whether the Teensy 3.6 has a function where its input pins have some kind of sink/pull-down/crowbar feature/diode when the chip is not powered.
That crowbar would act on a voltage that's higher than my multimeter, so it wouldn't be visible when trying to measure resistance to ground.

Scope picture of Teensy pin connected, and pressing power switch that pulls the INPUT up through a resistor to 12V:
scope-with-teensy.jpg

Scope picture of Teensy pin not connected:
scope-without-teensy.jpg

Red is the voltage of the power switch INPUT node; yellow is the voltage of the buck converter that generates 5V and thus would power the Teensy. As there is no power to the Teensy, the firmware doesn't matter at all.
 
I haven't measured this but most digital chips of any kind have ESD protection diodes to clamp the pins to the power rail. So a brief pulse above Vcc gets clamped to Vcc + 1 diode drop, for example 0.7 volts. If the chip has no power then Vcc = 0, and the pins get clamped to +0.7 volts, more or less.
Now if the chip is unconnected to anything else, floating in space, then there's nothing to clamp it to and everything floats to that voltage no matter how high it is. But if you have it connected to a power supply which is off, there's almost certainly a large value capacitor between GND and Vcc than holds Vcc pretty near 0 V for any few-mA type of current.
 
If the chip has no power then Vcc = 0

That's a good theory, but in this case, the VCC is not hooked up at all -- the GND and pin 25 are the only pins connected. That means VCC is floating/undefined.
However, there are circuits that can conduct/clamp when not powered, and not-conduct when powered (for example, depletion mode MOSFETs.) Those are generally not super common, but it really seems as if the Teensy behaves that way.

The K66 datasheet says:
All digital and analog I/O pins are internally clamped to VSS through an ESD protection diode. There is no diode connection to VDD. If VIN is less than VSS-0.3V, a current limiting resistor is required

This makes it sound as if VCC (VDD in CMOS speak) is entirely floating and thus irrelevant. The ESD clamp diode would presumably have a Zener voltage of more than 3V, given that a pin output voltage of 3.3V works fine when the chip is powered.

This really does look like some undocumented voodoo behavior, unless there's something I'm completely missing :-(
 
This really does look like some undocumented voodoo behavior, unless there's something I'm completely missing :-(

The pins have ESD protection diodes which can cause trouble. Powered or not. It is entirely possible to run some micro-controllers with Vcc disconnected but drawing power from these diodes. (I have had it happen to me with a MSP430.)

With the micro-controller power off (Vcc=0V) and ground connected, any voltage on a I/O pin in excess of 0.7V is going to forward bias the protection diode. The current goes to Vcc which means that Vcc will be the voltage on the I/O pin minus 0.7V. At the least this can cause unexpected behaviour. In some cases the CPU will have enough power to run. Even if not it might not power down completely. You might want to include setting all GPIOs to inputs as part of the power down sequence.
 
It has been a long time since I looked at that data sheet and I had completely forgotten about that footnote. Kind of unusual.

But given that, the voltage limit of Vdd+0.3V is hard to explain. But still, you have to assume that something unexpected will happen if you exceed Vdd+0.3V which is 0.3V with power off.
 
Status
Not open for further replies.
Back
Top