3
\$\begingroup\$

I'm adapting a pre-existing circuit based on an ATTiny13. The original circuit has PWM output pins from the ATTiny either sourcing or sinking current for the centre point of two standard LEDs in series, and I wanted to replicate it with much higher power LEDs that need more current than can safely be supplied by the ATTiny. I therefore tried to create a totem-pole arrangement with a PMOS and an NMOS to extend the current supply capability of the pin:

enter image description here

However, something went wrong, and my safety resistor released the magic smoke. Using a thermal camera, I could see that the mosfets were also hot. After doing some reading around, my only idea is that the PMOS and NMOS were both being activated at the same time, leading to a short. The PMOS is a SOT23 3401 (A19T) and the NMOS is a 3402 (A29T). The Vgs(th) is -1V and 1V respectively, and the circuit uses 5V from USB (or 3.7V from a lipo). Assuming that I'm right about both mosfets being active while the switching voltage moves between 4V and 1V, what should I think about to create a version of this circuit that actually works (as in, only one mosfet is ever on)?

Should I search for mosfets with a Vgs(th) larger than 2.5V? Should I swap the PMOS and NMOS positions, or use NMOS for both positions? Ideally there would be as little voltage drop as possible. I could also replace the mosfets with a PNP and NPN BJTs.

Any prompts or advice would be greatly appreciated.

\$\endgroup\$
3
  • \$\begingroup\$ You experienced a shoot-through, since a FET doesn't turn off or on instantly but have raise and fall times. This lead to an overlap of the two's raise / fall time, allowing current to flow, and since they got hot, in their linear region. \$\endgroup\$
    – MiNiMe
    Oct 17, 2023 at 20:35
  • \$\begingroup\$ Is there any way to reduce the overlap, or a different topology that doesn't suffer from it? I've not really managed to think of any solution so far. \$\endgroup\$
    – The Lamb
    Oct 17, 2023 at 21:04
  • \$\begingroup\$ I'm confident there is, but I don't know. You need to introduce a delay between those on / off transitions. \$\endgroup\$
    – MiNiMe
    Oct 17, 2023 at 21:21

2 Answers 2

2
\$\begingroup\$

what should I think about to create a version of this circuit that actually works?

You need a really fast transition on the gate driver, if it isn't fast enough both fets will be on at the same time. Fets in a stage like this may also need to be matched. Other things that can kill the setup are ESD and too much current through either device, and over voltage.

Simulating the stage in spice is recommended.

If the load is inductive, use a flyback diode If you are handling the circuit, or there are wires attached, make sure you have proper grounding and you may also consider TVS diode to shunt ESD to ground. You may want to consider a small current limiting resistor if you don't need the full current of the rail.

\$\endgroup\$
6
  • \$\begingroup\$ The load is LEDs, so not inductive, and the total resistance can't be more than 62R. Is there maybe a more bullet proof way to ensure only one mosfet is ever on? \$\endgroup\$
    – The Lamb
    Oct 17, 2023 at 20:39
  • \$\begingroup\$ Why do you need a push pull stage for LED's? do you have a bidirectional LED? \$\endgroup\$
    – Voltage Spike
    Oct 17, 2023 at 20:43
  • \$\begingroup\$ Here is a link to the original circuit: github.com/wagiminator/ATtiny13-TinyCandle - the push pull aspect is integral to the project, and I don't want to change the original code, just extend the circuit to higher current. \$\endgroup\$
    – The Lamb
    Oct 17, 2023 at 20:59
  • \$\begingroup\$ @TheLamb - Hi, The page you linked then links to this one: oshwlab.com/wagiminator/attiny13-tinycandle which contains the schematic. However that schematic does not have the push-pull MOSFET arrangement you show in your question. So I'm still puzzled where the push-pull arrangement is found in that project. Can you give an exact link to the schematic on which you are basing your design? Thanks. \$\endgroup\$
    – SamGibson
    Oct 17, 2023 at 21:49
  • \$\begingroup\$ No, that is the exact schematic. The problem is that this schematic is only suitable for low power LEDs, as the per pin current max for the ATtiny is below the current required for the higher power LEDs I want to use. The totem pole was what I assumed would be the correct way to achieve higher current both sourced and sink. \$\endgroup\$
    – The Lamb
    Oct 17, 2023 at 21:59
2
\$\begingroup\$

As others stated, cross-conduction is occurring. How much current flows depends on the gate voltage required for device turn-on.

To demonstrate, a half-bridge configuration is simulated using some random transistors in LTspice with fairly low turn-on gate voltage is shown below. The X-axis is the input voltage, V(in). The Y-axis is the current through the transistors.

enter image description here

In this case, the cross-conduction current is a bit over 3A and occurs with V(in) in the 2.0 to 2.9 V range. Your circuit could have a larger or smaller cross-conduction current. To prevent this you can use driver ICs that prevent cross-conduction or drive the gates independently so cross-conduction is avoided.

When designing H-bridge amplifiers we drive each gate independently to avoid cross conduction issues. Experimental firmware is created so dead-time can be adjusted on the fly to determine an appropriate dead-time.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks, do you have any recommendations for a small (SOT23 size) gate driver that could do this, or at least could you tell me if cross-conduction of a gate driver is likely to be mentioned somehow in a datasheet? Both gates have to be driven from a single pin on the ATTiny, so this is looking like my only solution. \$\endgroup\$
    – The Lamb
    Oct 17, 2023 at 21:42
  • \$\begingroup\$ @TheLamb Generally, drivers come in 8 or 10 pins. You'll need to look through the literature as my current knowledge is for GaNFET drivers in itty-bitty packaging. \$\endgroup\$
    – qrk
    Oct 18, 2023 at 0:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.