cancel
Showing results for 
Search instead for 
Did you mean: 

The GPIO port burns out when connecting a 4 kOhm 24 V load.

Snetka
Visitor

Hello!

There is such a button with a backlight, when connecting the backlight to a 24V power supply, it consumes 6-7 mA. 

After trying to control this backlight using stm32f407, the pin in open-drain mode burns out. Now in open-drain mode, in a high state, there is a potential of 1.2 V on the leg, and it should hang in the air. After that, in push-pull mode, the pin works fine, although I did not measure the consumption without a load.

The question is, why is the pin lit? According to the datasheet, the maximum load on the pin is 20 mA, in output mode, the pin resistance is close to zero, so the current should be the same as when connecting the backlight to the power supply, i.e. 6-7 mA. Why is the pin lit? If I made a mistake in the calculations, then how can I correctly calculate the permissible load for operation in this mode?

I want to understand how exactly the currents flowed and where the malfunction occurred.

Here is the driver diagram.

Snetka_0-1738851841714.png

As I understand it, the port burns out because the open drive mode is not turned on immediately after power is supplied, but after the initialization of the gpio. Before initialization, the output resistance is very high, so when 24V is supplied through the LED and resistor, the current will flow through the protective diode to VDD_FT. The pin will have a voltage of VDD_FT + voltage drop on the protective diode, which does not exceed the permissible value of VDD+4. 

Snetka_1-1738854505657.png

The current is 6 mA. The datasheet states that positive leakage current is impossible, the main thing is not to exceed the voltage VDD+4 on the pin.

Snetka_2-1738854762932.png

What happens next, how do currents flow in the driver, what elements are destroyed and why? Why is there now a voltage of 1.2 V on the pin in the high state in open drain mode? What resistor value would not burn out the controller pin at 24 volts?

 

7 REPLIES 7
gbm
Lead III

You are violating the maximum input voltage (see the Absolute maximum ratings) section of the datasheet.

I would guess the 200k resistor should protect your circuit but it won't allow you to control anything. Use an external transistor (some RET would be convenient).

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
KnarfB
Principal III

It's not really the current, but the 24V voltage. see max. Vin values in Table 11. Roughly speaking, you have killed the Vdd protection diode/circuitry in Fig. 25.

Add an external driver mosfet. 

hth

KnarfB

Show the schematic of your 24V connection.

Some STM32 pins are described as "5V tolerant" - that's a long way short of 24V !!

And note that even this 5V "tolerance" is subject to restrictions.

As @gbm said, you really need an external driver.

The circuit is very simple, 24V is supplied from the power supply to the LED and resistor, and connected to the open drain pin of the stm32. GND of the power supply and stm32 are connected. I understand that I have exceeded the input voltage and that such an LED must be connected through a transistor. I do not understand why there was 24V on the pin, and not vdd_ft + voltage drop on the protective diode. If this happened after the protective diode burned out, then how to calculate the value of the protective resistor so that it does not burn out? If the protective diode burned out from 6 mA, then from what current will it not burn out? @gbm said that perhaps a 200k resistor is enough, what voltage will be on the pin then?

IMG_20250206_193822.jpg

So, combining your diagram with Fig 25 from your opening post, we have:

AndrewNeil_0-1738863822046.png

Or:

AndrewNeil_1-1738863884341.png

If we take VDD_FT as 5V, and 2V across your LED, that leaves 17V across the 4k resistor - giving ~ 4.3mA

 


@Snetka wrote:

If the protective diode burned out from 6 mA, then from what current will it not burn out?


Table 12 says 5mA

Little basic EL. PSU 24V vs PSU 3,3V isnt super ideal and have some start and stop seq.

Protect diode have forward current limit and reverse voltage limit. Then for example 3V3 PSU low impedance isnt guarantie on start and stop ... Result is Top protect diode lost current and VDD_FT go up to 24V no current , but in this situation down diode to ground is over reverse voltage ... killed = open drain out set to 1 result to this down diode is broken and by level you see voltage result on pin...

Why 17v, there is also a voltage drop on the protective diode, say 0.6v.

In fact, the resistor is most likely smaller than the nominal value, it is soldered in the button and I can not measure it separately. According to Ohm's law, about 3.15-3.6k.

If vin>vdd_ft, then this is not a positive injection current? In the table it is generally equal to zero, and in the note it is written that a positive injection current is impossible and you must not exceed vdd+4 on the pin.

Snetka_1-1738867912761.png

 

 

If this equivalent circuit is correct, then there will be 5.6V on the pin with a current of 6mA. Because of this, the protective diode burns out, and instead of 5.6V on the pin there is almost 24V due to the closed transistors.

If you double the resistor value, the current will be 3mA. Will the port burn out with such a current?