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:
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.