Teensy 4.0 seems broken after triggering MOSFET

Status
Not open for further replies.
I was testing if I can control a fan by sending different PWM signals from the Teensy 4.0 to a logic level MOSFET when the Teensy seems to have broken down in some way.
If I connect the Teensy to power, either via USB or via a 5V power supply connected to the pins, the program seems to be running for a short time, somewhere between 0.5 s and 10 s, and then stops working. The LED pin turns off and the Teensy doesn't get recognized anymore by the computer if connected via USB.

Does anyone have an idea if I can salvage the Teensy and why it broke down in the first place, so that I can make sure it won't happen again?


Testplatine.png
Code:
const int signalPin =  19;
const int LedPin = 13;
int i = 1;


void setup()   {                
  pinMode(signalPin, OUTPUT);
  pinMode(LedPin, OUTPUT);
  digitalWrite(LedPin, HIGH);
  
}

void loop()                     
{
  if (i<= 5){
    analogWrite(signalPin, i*50);
    delay(2000);
    i = i+1;
  }
  else{
    i = 1;
  }
}
 
Your diagram is incomplete as it doesn't show all of the power connections. It is really easy to make a mistake and have ground current flow through your Teensy and turn traces into fuses. The Teensy must have exactly one connection between its ground and the ground at the MOSFET source.
 
Based on Ohms law your 100 ohm resistor allows 33ma to be drawn from the Teensy which is likely much more than the 4.0 can handle. 300 ohm also seems a little high at 11ma, I don’t know what the max the 4.0 can handle but the 3.6 has 10ma as it’s max so if you go with a common 470 ohm resistor for 7ma it’ll likely be fine. If the 4.0 has any kind of protection circuit it’s likely shutting itself off from too much current draw from that pin otherwise you may have burned something up inside of it.
 
Based on Ohms law your 100 ohm resistor allows 33ma to be drawn from the Teensy which is likely much more than the 4.0 can handle. 300 ohm also seems a little high at 11ma, I don’t know what the max the 4.0 can handle but the 3.6 has 10ma as it’s max so if you go with a common 470 ohm resistor for 7ma it’ll likely be fine. If the 4.0 has any kind of protection circuit it’s likely shutting itself off from too much current draw from that pin otherwise you may have burned something up inside of it.

I think that something burned up inside, since the Teensy shows the same shut off even if I disconnect everything from it and just give it power via USB.
The resistor was not intended to limit the current drawn, but instead to reduce the steepness of the signal. I thought that there is no relevant current going into the gate of a MOSFET, but reading up on it some more maybe the small current needed to charge the capacitance is already to high. I'll try a higher resistor and see what happens, once I'll get a new Teensy.

Your diagram is incomplete as it doesn't show all of the power connections. It is really easy to make a mistake and have ground current flow through your Teensy and turn traces into fuses. The Teensy must have exactly one connection between its ground and the ground at the MOSFET source.


What do you mean by "turn traces into fuses"?
 
I think that something burned up inside, since the Teensy shows the same shut off even if I disconnect everything from it and just give it power via USB.
The resistor was not intended to limit the current drawn, but instead to reduce the steepness of the signal. I thought that there is no relevant current going into the gate of a MOSFET, but reading up on it some more maybe the small current needed to charge the capacitance is already to high. I'll try a higher resistor and see what happens, once I'll get a new Teensy.




What do you mean by "turn traces into fuses"?

Suggests internal wiring burned away from over current - like a fuse … as noted in first part of the post : "something burned up inside"
 
Can you connect a voltmeter to the 3.3V power and GND? When your Teensy 4.0 mysteriously turns off, is the 3.3V power stable and remaining 3.3V?
 
Interesting, I cannot find any reference that suggests that 100 ohms or even zero ohms into a small capacitance (such as a mosfet gate) will damage a teensy 4.0 pin. For longer term outputs, 470+ ohms seems reasonable, but I can't find support for that either.
 
I tried it again with a new Teensy and 470 ohms instead of 100 ohms. It worked fine, even running 20 minutes straight, so I assume everything is fine now.
But I was also more careful with grounding, as UhClem suggested, and made it more tidy, so I'm not sure what finally solved it. If I feel like losing another Teensy, I'll test it again with the 100 ohms resistor and the current grounding.
 
Status
Not open for further replies.
Back
Top