Author Topic: Backfeeding MCU gate output bad?  (Read 149 times)

0 Members and 1 Guest are viewing this topic.

Offline duraluminium

  • Contributor
  • Posts: 5
  • Country: de
Backfeeding MCU gate output bad?
« on: April 16, 2021, 07:21:36 pm »
I am trying to modify a work light (1S3P 18650 3,6V) that is controlled by an 8 pin PADUK type micro.

An output from the micro goes through a 100 Ohm resistor straight to the MOSFET gate.

It has the usual 100%, 50%, SOS modes. One drawback is that at the 100% setting, after 2 min, it throttles down to 16% PWM, in order to meet the battery life claim on the box. LED heatsinking is to a massive block of aluminum and not a problem.

As in the picture, I would like to add a switch so I can feed the gate directly with battery voltage so I can get a mode with 100% light with no throttling.

In the setup I propose, will there be a problem with me backfeeding the micro output with battery voltage, while it is either off/0V or doing a 16% PWM duty cycle at 3,6V?

I thought that such outputs are protected by a diode/FET so that this wouldn't be a problem, am I correct?

(I connected the circuit as in the picture for a few seconds and no magic smoke. Also I measure no big voltage drop BAT+ to MCU gate, certainly not a 0.6V/0.3V (Shottky) diode drop, so if there were protection it would be a low Rdson FET not a diode.)

Is my solution reliable in the long term?

I considered putting in an SPDT switch so I could choose what 'source' powers the gate and could avoid any backfeed (gate connection on COM, either MCU pin or battery on the other two switch contacts) but due to size constraints of a smaller switch (only available as a SPST) I'd prefer to use the 'backfed' option if it is safe to use.[attachimg=1]

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 10020
Re: Backfeeding MCU gate output bad?
« Reply #1 on: April 16, 2021, 07:42:10 pm »
Not safe - the MCU will 'see' a 100R load resistor and when low the current is likely t oexceed its abs. max. Iol rating and the resulting gate voltage may well put the MOSFET in its linear region for an extended period and burn it out.  However if you replace the existing resistor with one in the 220R - 330R range (depending on the supply voltage and the MCU's max. Iol specification), and make the switch pull the gate high directly via a resistor of an order of magnitude smaller than the series one from the MCU, it will work at te expense of lowering the efficiency.   If ypu want to fix that as well you'd need to add a Tinylogic or similar single gate OR gate between the MCU and the existing gate resistor, with its other input controlled by the switch and a high value pull-down resistor.

At that point, its probably easier to simply patch in a new MCU, dead-bugging it if you cant get a matching pinout , and write new firmware for it to disable or reduce the throttle-back.

Also note that the throttle-back at two minutes may be for thermal reasons, because they've cheaped out on the heatsinking  - if you run it at 100% continuously it may overheat and destry the LEDs.

Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo