last day (15 days later) » 

06:23
0
Q: Is there a type of transistor (or other semiconductor device) that can do this?

AaronDI haven't completely given up yet, on using some kind of semiconductor for the boxed ??? device below, to control an ATX power supply: simulate this circuit – Schematic created using CircuitLab A JFET doesn't work there, but is there something that does? I'd rather use a normally-closed relay ...

Maybe a depletion-mode n-channel FET? (I’m not sure if those are available in discrete packages)
A simple PNP with pulldown resistor at the base will do that
it looks like the PWR_BTN and ??? should be transposed
@MarkU Those need negative voltage to turn off, if I understand correctly. Just like an N-channel JFET but without the gate diode. I've already looked at P-channel depletion MOSFETs - those take positlve gate voltage to turn off - and while there are a few in a reasonable discrete package, the body diode is backwards for what I need. :-/
you could use a SPST-NC contact reed relay
06:23
@Jens I'm not seeing that. A PNP with a base pulldown requires power, which I don't have at first startup...and so it won't start up. Unless I'm missing something? (don't want to rely on the ATX's unknown pullup, if that's what you mean...)
@jsotola Why should they be swapped? Seems to me like it would work about the same way, with no real benefit or drawback. And yes, I absolutely could use a relay - that'd be the plumb-easy, quick-and-dirty, perfectly-valid way to do it - but I'm curious to see if there's a solid-state way to do it too.
@AaronD with the ??? turned off, the PWR_BTN will not affect GPIO_1 ... also, it could affect the aATX_EN if GPIO_1 becomes misconfigured
@AaronD Could you do something like put a diode between depletion MOS source and GND?
@jsotola I'm not sure I understand that. The PWR_BTN will not affect GPIO_1 as drawn? Or with PWR_BTN and ??? swapped? (I assume that GPIO_2 still controls ??? even when swapped?) Either way, I think it does affect it, and so the MCU code needs to be aware of the interactions regardless of the arrangement. As drawn, GPIO_1 is held to ground when ??? is on, while the swapped version pulls it up with the ATX enable line. I don't think I like the swapped version just for that reason. Do you see something different?
@DKNguyen With the drain at the higher voltage? That would require an N-channel device, which turns ON with INcreasing voltage and OFF with DEcreasing voltage. Both enhancement- and depletion-mode devices have that polarity; only the offset is different, so that one is OFF at 0V and the other is ON at 0V. And I can't go below 0V!
@DKNguyen A P-channel device turns ON with DEcreasing voltage and OFF with INcreasing voltage, which is promising so far, but the current flow that I want to block has a body diode facing the right way to conduct it around the switch...or if I turn it around, then the control voltage is referenced to the wrong signal: GPIO_1 instead of ground. The JFET was an attempt to get away from the body diode...until I learned in my accepted answer to the other question that it's referenced to the average of both terminals.
I'm talking about N-channel. Just how ON do you need it to be when ON? There can't be that much current through an Enable signal.
I'm talking about N-channel. Just how ON do you need it to be when ON?
@DKNguyen That would be enhancement then. So it would need to float up to some positive voltage and stay there. Are you thinking about using the ATX enable line to do that? It goes away before the FET can be allowed to turn off. A cap and diode might work, but it would require another transistor to isolate that from the GPIO. So now I have 2 transistors for this function (I guess that's okay) and I can only force it into "user-mode", not "direct power mode". To protect the GPIO pin, I guess I could change the held-down-timeout function to wait until the button is released again...
@DKNguyen According to this, the enable line floats to +5V, and requires 1.6mA to pull down.
06:23
Actually...is there a reason you can't just replace ??? with a large capacitor? Or you could just replace everything with a toggle pushbutton,
@DKNguyen With a bleeder resistor, perhaps, to make sure that the cap is indeed discharged enough to hold the line down while the MCU figures itself out. How then does that work with the GPIO? A big enough cap won't activate the ESD diodes during startup, but it will also slow down the button in "user mode" (hardware debouncing for free). The bleeder resistor might be a bigger problem, in that the GPIO's internal pullup can't bring it up to a logic high, even after infinite time. Disconnecting it when no longer needed, brings us back to the same original problem again.
I'm thinking that the GPIO1 can charge up the cap when it goes to pull-up mode to cause it to act as a non-conducting switch. Or it could charge it directly before changing to a pull-up but that is a bit dangerous if the button is still depressed and Q1 is conducting, although you could throw in a series resistor smaller than a pull-up to charge faster but stop it from shorting. With a bleeder you could have the GPIO1 alternate between pull-up and active HI to top the cap off against the bleeder. Or dedicate GPIO2 to do that while GPIO1 remains in pull-up mode. Human pushbuttons are slow.
Or if really paranoid dedicate GPIO2 to a PMOS or PNP to charge up the cap and top it off full blast (almost through a small resistor to protect Q1).
@DKNguyen Without a bleeder across the cap, sure! But then how do I ensure that I don't latch-up the MCU via the ESD protection during power-on? (V_cap is steadily increasing until Q1 turns on)
I think a large cap should prevent both latch up and nATX_EN charging up the cap too quickly at the expense of not being able to charge it up quickly to make it open. But then just make GPIO2 drive a transistor to quickly charge and periodically top of the cap. And also add small series resistor with the cap to slow down how quickly nATX_EN charges up the cap and to protect Q1 from a shorting scenario and also add large series resistors to further protect GPIO1 from latch up reverse currents.
@DKNguyen In the process of pulling the enable line low, the cap is charging with ~1.6mA, but there's some delay in the supply actually turning on. That's the time to latch-up. A larger cap makes it less likely for that to happen: same current, same time, less delta_V. The bleeder resistor ensures that it always starts close to 0V instead of something higher that it still has from yesterday.
@DKNguyen Later, assuming it didn't latch-up, that same cap and bleeder resistor present a load on the GPIO pullup. A bigger cap needs a stronger bleeder for the same time-constant, and that stronger bleeder counteracts the pullup. Those seem like conflicting goals that need to be balanced. I don't see the purpose of topping off the cap after Q1 converts it to a parasitic load on an ordinary pulled-up button.
@DKNguyen I guess the direct answer is that there aren't any devices that do exactly what I'm looking for, and it's not trivial to assemble one either, with all of the interactions to keep track of in different configurations. The relay is looking awfully attractive now...
06:23
I mentioned topping of the cap because you said you were concerned about the cap draining. But you're going to want the transistor anyways to charge up the cap quickly. And you probably don't need to design the system to be switched on and off rapidly.
Really, I would just get a two-position pushbutton switch and replace everything with that.
@DKNguyen Scrap the whole idea and just hold the line down directly and indefinitely? Yeah, that would solve this problem...but I already have these buttons (came from the "try me!" packaging for some LED gimmick lights), and I still want a programmatic soft power-off. (actually, that soft power-off works by controlling the MCU_OFF switch that some other gear has already and works, hence my inclusion of it here)
@DKNguyen The system that I have already is simply a transistor in parallel with the button to pull the line down. That works, and I want to keep its functionality, AND add a hold-to-kill function with the same button.
06:52
Why are you not using the +5V standby rail to power the circuit?

last day (15 days later) »