Close

Open Collector FAIL. The ATX power-switch saga continues.

A project log for Improbable AVR -> 8088 substitution for PC/XT

Probability this can work: 98%, working well: 50% A LOT of work, and utterly ridiculous.

eric-hertzEric Hertz 12/24/2016 at 03:2127 Comments

Update 1-16-17: It's NOT Friggin' Diodes! AND I FOUND A USE!

---------------------

Update 1-15-17: FRIGGIN DIODES! (see the bottom)

Update II, vague recollection of BJTs used instead of diodes for reverse-polarity-protection. Notes and excessive ramblings at the end.

Update 1-2-17: Found some discussion about misuse of transistors, similar to what I experienced, here. Notes and ramblings and no conclusions added to the bottom.

--------------------

In the interest of making this blasted thing even more robust, yahknow, by being in-spec, rather'n just "it works" and moving on... And, since I was already modifying the circuit to lower the pull-down resistor (see last log), and add a Power LED...

I decided to add a transistor to the output of the Flip-Flop. Thus, the connection to the /PWR_ON signal would be open-collector, and capable of sinking more current, if necessary (e.g. on another Power Supply, should this one go flakey).

Simple!

FlipFlop Output  C .-----> /PWR_ON
Buffer            /        Input
   v            |/
--|>---/\/\/\---|  NPN
              B |\
                  v E
                  |
                  v
                 GND
The /PWR_ON signal powers up the system when grounded, and the system is OFF when that pin is floating/unconnected. So, obviously, it must have a pull-up resistor somewhere in the circuit (if necessary).

--------

I powered it up (works great! Finally!)

But the stupid LED wasn't lighting. Alright, musta reversed it... Swapped the polarity, and sure 'nough, it's lit. Excellent!

No, wait... WTF... The fan's not spinning. push the button and the LED goes off but the Fan starts up.

WTF?

....

The LED is connected to the Q (non-inverted) output of the FlipFlop, anode tied high through a resistor (since TTL has much greater drive-strength when driving low).

The /Q output drives the transistor when high.

(Note To Self: drive-strength??? hFE measured at 220... is that better than just driving low from the TTL output? Heh, barely... IOH <= 0.8mA, IOL <= 16mA. And, frankly, there's no way the /PWR_ON input could draw 16mA, right?)

So the LED should activate (cathode driven low) when the /Q output is high, which also drives the transistor, pulling the /PWR_ON signal low, powering the system.

So... what's wrong now...?

Ultimately... Turns out I grabbed a PNP by mistake.

But now I'm *really* confused. How the heck can this thing work at all?!

FlipFlop Output  C .-----> PWR_ON
Buffer            /        Input
   v            |/
--|>---/\/\/\---|  !!!!PNP!!!!
    (A)       B |^ 
                  \ E
                   |
                   v
                  GND

VBE will never be forward-biased!

-----------------

Measurements (between point and GND):

SYSTEM OFF:

VA = 3.9V

VB = (not measured)

VC = 4.5V

(VE = 0.0V)

SYSTEM ON:

VA = 0.1V

VB = 0.2V

VC = 0.8V

(VE = 0.0V)

--------------

Alright, so, have we established, yet, that I'm certainly no BJT expert? This was mentioned in the last log, as well as a few logs on other projects (e.g. the Transistor-based RS-232 inverter, which wound up acting as an amplifier)...

But, here I think I can see something that *sort of* makes sense...

Note the voltage difference when ON: VC - VB (VBC) = 0.6V... A transistor-bias voltage, if I've ever seen one... Except, VBC, not VBE.

And, similarly, when OFF: VC - VA = 4.5-3.9 = 0.6V... (Imagining not much drop across that resistor, since there's little current flowing between the Emitter and Collector.

But... WEIRD.

OK, I'm pretty sure I've read somewhere that swapping E for C will still function, but at a *really low* hFE... So I plug one in the ol' transistor-meter backwards, and sure-enough hFE = 2 (when forward, hFE=220).

---------

But, I can't let this go... this just doesn't seem right to me. If you can turn on a transistor with VBC, then how come all those open-collector circuits don't turn themselves on...?

                  9V
                   ^
                   |
   light-bulb, -> ( )
   solenoid, etc.  |
5V Buffer        C |
Output            /
   v            |/
--|>---/\/\/\---|  NPN
              B |\
                  v E
                  |
                  v
                 GND

VBC is always greater than 0.6V, in this case... OK, so it's not the *voltage* that turns it on, but the *current*, right? But, we've already seen that current through VBC can turn on the transistor... right?

So then, I guess, in this circuit IBE may be lower than IBC... And with hFE, it...

Oh, NO... In this case, VBC is < -0.6V. Reverse-Biased. OK.

But then what if you've got:

                  3V
                   ^
                   |
   light-bulb, -> ( )
   solenoid, etc.  |
5V Buffer        C |
Output            /
   v            |/
--|>---/\/\/\---|  NPN
              B |\
                  v E
                  |
                  v
                 GND

Ah, right, so... When the buffer outputs 5V, BOTH VBE and VBC are forward-biased, the switch turns on. Right. When the buffer outputs 0V, I guess we rely on the hFE to determine how "off" the transistor will be... because ... NO. VBC is reverse-biased, it'll inherently be off.

Man, once these things seemed so intuitive to me...

Lesson repeatedly-learned the hard way: Transistors Are NOT Switches. They're more like Teeter-Totters.

------------

And... This is just another in the *LONG* list of things that should've been easy that have turned into *huge* ordeals prepping for *this* project, which *still* hasn't even started.

----------

Found an interesting discussion kinda touching on my PNP-resistor experience...

https://www.researchgate.net/post/Can_we_reverse_a_BJT_by_injecting_the_input_current_into_the_collector_and_taking_the_base-emitter_voltage_as_an_output

And some really weird linking-system making it impossible to show the image here without my re-uploading it. Weee: (not my work):

Except, actually, this one's a lot more obvious to me... In fact, it's pretty much normal BJT-biasing. In fact, it's not at all similar to my circuit, now that I look further. (VCE is reverse-biased, VBE is forward-biased like a regular-ol' BJT circuit). Though it's interesting, nonetheless.

Again, what I had was:

                      :  5V
                      :  ^
                      :  |
                      :  /
                      :  \ PRESUMED
7400-series *TTL*     :  / 
FlipFlop              :  |
Output         + C .->:>-+--|>---
Buffer     0.6V   /   :      Gate(?)
   v          - |/    :...............
--|>---/\/\/\---|  !!!!PNP!!!!
    (A)       B |^ 
     +  :     +   \ E
        :    0.2V  |
   0.1V : REVERSED v
     -  :     -   GND

Measurements (between point and GND):

SYSTEM OFF:

VA = 3.9V, VB = (not measured), VC = 4.5V, (VE = 0.0V)

SYSTEM ON:

VA = 0.1V, VB = 0.2V, VC = 0.8V, (VE = 0.0V)

So, when on, this is acting as a non-inverting *buffer* rather than the typical *inverter* I'd've experienced if this were the NPN I intended.

And, when on, I'm getting:

VBE = 0.1V (NOT enough to turn on the diode, nevermind being *reverse* biased for a PNP)

VBC = -0.6V (a diode-drop... also properly-biased for a PNP)

And... random-observation: *exactly* the output-voltage a regular ol' TTL considers VIL-Max. (Hmmmm). Some discussion I read, either at that link, or another it linked, suggests that TTL actually used this design(?).

So, plausibly, if I hadn't done this with a regular ol' TTL 7400-series chip, and instead used CMOS or something of this era, this wouldn'ta worked, since the drive-strength and voltage of the output, when high, would probably be enough to assure even VBC would be zero, rather'n forward-biased... unless, somehow, ... nah, plausibly even "weirder" than that... if the output driving the base is *only* tied-high (when high), then no current could flow, the transistor would never turn on. Huh...


See, Q3 and Q4 can both be on simultaneously, depending on the load. But in the MOSFET case...? Hmmmm...

So many oddities!

---------------------------------

It's finally come back to me: Somewhere 'round this site, a year+ish ago, somehow it came up to use a BJT instead of a diode to protect a circuit from reverse-polarity...

V+ ----.     .-----> Circuit V+
        \   /
       C \ v  E
       -------
          | B
          \
          /
          \
          |
GND ------+--------> Circuit GND
(From Memory)

Yep. That's with the emitter connected to the LOAD, and V+ connected to the collector.

This guy turns on when VBC (not VBE) is forward-biased. As I recall, the purpose is that VEC is typically *smaller* than VCE. And an experiment here states the same. (Something like 1/4!)


Unlike my circuit, VBE will *also* be forward-biased in both of these circuits, but less-so than a full diode-drop.

So, I've still no idea what this thing I've run into could be useful for... I had *an* idea, then started realizing all the inherent oddities I keep running into with various circuit elements' not working the way I'm used to.

So, one idea is similar to the reverse-polarity protection, except with an NPN instead of PNP.

12V ------.
          |
          \
          /
          \
          | B
       -------
         / \
        /   v
5V ----'     '-----> Circuit 5V

GND ---------------> Circuit GND

A bit ridiculous, because it requires your 12V to be correctly-polarized... But, maybe, it could be used with/as e.g. a power-switch for some ridiculous reason...

BEWARE: I found out the hard-way... This will *NOT* work if you use a linear voltage-regulator to output that 5V (maybe from the 12V rail?).

Why...? Because, at the fundamental-level, of the same friggin' principle that got me into this mess in the first place, I think. Linear voltage-regulators are designed to *source* current, not to *sink* it, so, when the load's too small, this circuit would pull the 5V "regulated" output up to around 12V. HAHAHA.

A more obvious alternative is to do the same reverse-polarity circuit as earlier, except with an NPN on ground. But, yahknow, switching ground isn't such a great idea.

And, again, don't forget that hFE is something like 2 (not 200) when turning on with VBC, so... if the circuit uses 1A, does that mean this thing would require 0.5A into the base? But, then, maybe that's irrelevent, because, again, once the circuit turns on, *both* VBC and VBE will be forward-biased... no, wait, forward-biased, but VBE's not going to reach the diode voltage-drop, so not *on*, right? No, wait... LOL this is ridiculous.

VBC will be, say, 0.6V, then VBE will be 0.595V! So, then... does that mean *both* sides are active, and hFE is something like the average of 200 (C->E) and 5 (E->C) ?

This is *SO WEIRD*. 'Spose I should just dig out the ol' text-book and refresh myself. But apparently I'm in a rambling mood.

----------

Anyways, it's not so much that I want to find *a use* for this thing (though that's always nice), but that I'm almost certain there must be somewhat common cases where this situation is actually an oft-neglected side-effect... Just can't seem to think of one.

----------

UPDATE: DIODES:

Hah, I have no idea how I didn't see it before... the circuit's basically nothing more than diodes... (Oh, and I came up with a groovy AND gate from 'em... over at #Random Ridiculosities and Experiments: https://hackaday.io/project/8348-random-ridiculosities-and-experiments/log/51939-transistor-oddities).

So, it's *slightly* better than using diodes... about twice. Since I measured the reverse-hFE as 2.

Discussions

Eric Hertz wrote 01/08/2017 at 11:40 point

And there it is:

https://www.computer.org/csdl/proceedings/afips/1958/5052/00/50520022.pdf

Direct-Coupled Transistor Logic. Go @Yann Guidon / YGDES for laying out the breadcrumbs, but ultimately it was "Reverse Active Region" that got me there.

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 12:15 point

WRONG AGAIN! From every *other* source I can find on the matter, DCTL is, in fact, normally-biased... Those arrows point in the wrong direction.

Further, from "my circuit", these wouldn't be inverters, but *buffers*.

Sheesh, this whole endeavor is absurd.

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 13:09 point

THE FRIGGIN' SAGA CONTINUES! Note the upper rail is NEGATIVE. I almost got sucked in when it explicitly stated "p-n-p"... Then I read "VBE" and thought "WTF?!" ... and finally, that is in fact -VCC. With a big ol' negative symbol before it. And all timing-diagrams show 0V as high, and lows going below zero.

This is one *weird* adventure, to say the least.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/08/2017 at 12:45 point

One reference about DCTL is Thornton's book, describing Seymour Cray's CDC6600:

http://ygdes.com/CDC/DesignOfAComputer_CDC6600.pdf

Enjoy !

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 13:21 point

*grumble* dagnabbed Common-Emitter inverter-switches *grumble*.

This book looks like a great read, but if I ever sit down to read something greater than 20 pages, I'd better start with my dad's book. At least with search-fu, one can blame reading 100 pages on rabbit-holes or fractal-branches, or something...

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 13:28 point

Then again "my circuit" *couldn't* be used (directly/explicitly) for logic... since it is a *buffer* not an inverter. Done and done. Guitar-pedals it is!

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 10:46 point

"Reverse Active Region" ah hah. Search-fu is *significantly* improved with that term.

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 10:55 point

Am I the only one who sees this as ironic...?

Didn't we just discover that it's used in almost every TTL IC? or am I still mistaken in my understanding...?

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/08/2017 at 11:11 point

not useful, but it always depends :-D

For example I have used BOTH the parasitic capacitance and the bulk diode for the discrete 10TFF cell :-D

  Are you sure? yes | no

Ted Yapo wrote 01/08/2017 at 16:18 point

I have a copy of Phil Hobbs' Building Electro-optical Systems, and in it (14.6.6) he says that inverted transistors are useful because they have very low saturation voltages (~10mV), even though they have very low beta (2-5).

So, you might be able to substitute reversed garden-variety transistors for more expensive low-Vce(sat) devices in some cases.

(link to the book, not the passage)

https://www.amazon.com/Building-Electro-Optical-Systems-Making-Work/dp/0470402296

  Are you sure? yes | no

Eric Hertz wrote 01/09/2017 at 09:27 point

@Ted Yapo Good call re low saturation-voltage. I've seen that mentioned, as well. 

Still trying to think of potential uses... With a beta of 2, obviously it's not much of an amplifier. And, at least in my configuration, it's a *buffer* not an inverter, so can't be used for logic-building-blocks...

Best I've got so far is an interface between high-current CMOS output (say Vol-max=1V) level-shifting with large fanout to TTL at <0.8V... non-inverted ;)

That book is $112 TO RENT! :)

  Are you sure? yes | no

Ted Yapo wrote 01/09/2017 at 17:51 point

Yep, it's an expensive book, but most of the stuff in there is hard-won practical info that usually never makes it out of the lab.  Unless you're lucky enough to work with/for someone with that kind of experience, it would take a whole career or more to stumble into it on your own.

Maybe with the low-vce property of the reversed BJT, you could make a current mirror with compliance down to the mV range?  The currents won't be exactly equal since the beta is so low, but they should still be proportional.

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 11:21 point

And here's someone claiming to use the reverse-active region as a guitar-effect... which apparently has interesting characteristics when clipping.

Though, I don't see how this isn't just an emitter-follower, even though the author claims "obviously it is not".

http://www.muzique.com/lab/reverse.htm

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/08/2017 at 09:01 point

Just one question : did you finally succeed turning the ATX power on ?

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 09:51 point

LOL. Yes. I think it's in the next log, maybe I forgot.

It *does* turn on, with this weird circuit, that's the weird part!

Well, *did*... I shoulda just left it, and changed the LED, 'cause it seemed reliable, and more importantly was such a weird circuit that I shoulda kept it running. But in the interest of having it "right" I changed it back to the regular ol' NPN "switch"/inverter.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/08/2017 at 09:56 point

yeah, making it "right" is part of ... well... serenity :-D

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 10:57 point

@Yann Guidon / YGDES, or something... kinda wish I'd left it, now :/

Though, the odds I'd recognize it as weird 10 years down the line is pretty unlikely unless I put a note on it... I think I'd have to make use of that strange, antique cellulose material.

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 03:38 point

Is this it?!?!?!

"The input is connected to transistor Q1 (red). This transistor is used in an unusual way, acting as a "current-steering" transistor. If the input is low, R1's current is steered through Q1's emitter to the input, leaving Q2 off." 

That's just a typical NPN "switch" with base pulled high, and emitter tied low, so the collector is low... if there were current to flow through it. But there's not (the "diodes" inherent to Q2 don't allow current to flow that direction, out Q2's base) so Q1's collector's "output" is basically floating, which means no current goes into Q2's base. So Q2 is off.

BUT:

"***If the input is high, R1's current flows "backwards" out Q1's collector to Q2's base, turning on Q2.***"

If the input is high... Well, TTL defines VIH-min as something like 2.5V... In that case, Q1 would probably be active in the normal sense (VBE would be 0.6V).

Now, I take it, the current *can't* flow into the emitter and out through the collector...(?) Thus explaining why the current is considered as flowing from the Base to the collector... (half tempted to dig out the multimeter and do some measurements, but only half).

More simply, say the input is tied directly to Vcc... Then we have an NPN's emitter connected to the positive rail... VBE is reverse-biased (or 0-biased), but VBC is forward-biased through Q2's VBE... and... that's (one half of) my circuit!

http://www.righto.com/2017/01/die-photos-and-reverse-engineering.html

From the HaD blog

http://hackaday.com/2017/01/07/yes-you-can-reverse-engineer-this-74181/

(Thanks @Mike Szczys!)

  Are you sure? yes | no

Ted Yapo wrote 01/07/2017 at 14:38 point

Here's another one to ponder:

At first, you might think it's a pair of emitter followers, which you see this way all the time.  But, no, it's a pair of common emitter "switches."  If you apply more than about 1.4V of supply voltage, the pair just bias each other fully on, and quickly overheat (or worse), which is why you never see them hooked this way.  But what about using a supply less than 1.4V?  Now, the pair behaves like a CMOS inverter!

The allowable voltage supply varies with the transistor Vbe, which is a function of temperature - it has to be above Vbe but below 2*Vbe.  So, you might need to adjust the supply with ambient temperature to make this usable, but I've wondered if you could make low-voltage BJT logic this way...

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 01:33 point

Beware of utter rambling and likely point-missing :)

-----

Uh huh! That common-emitter-switch idea was the basis of my first H-Bridge 20ish years ago... Took many a clever internet-folk to inform me of why they'd *both* be on simultaneously, and to insert a third transistor between the two bases.

-------

But you're saying... use V+ less than VBE*2... Interesting concept. Then it would work as I once naively thought; the common-emitter-switch idea would've worked. 

Seems reasonable you could use this for low-voltage BJT-logic. 

Lots to ponder, in there...

------

Similarly, if you could guarantee your input-voltage to be lower than VBE or higher than (V+ - VBE), regardless of V+... but that'd be risky, since the base would be driven with a voltage rather than a current... and inserting resistors willy-nilly c/would cause the original problem (both transistors on simultaneously).

------

But, now, as an emitter-follower... obviously it's not wired that way, but if it was... it'd be a Class-B amplifier (right?):

The PNP and NPN would be swapped... PNP at the bottom.

Or if you didn't use push-pull:

And, if what they say about swapping C and E is true (that it works the same, but with much lower HFE), then we're back to my circuit... which, I guess, is a collector-follower.

-----------

So going back to your circuit:

And comparing it to mine... and looking only at Q1, for now:

If the output voltage was *lower* than 0V (maybe pulled to -V through a resistor?), and the input voltage was higher than that by VBC ~= 0.6V, but still lower than 0V, we'd have my circuit again... 

...except that, by the input being lower than V+, it turns on Q2, which would pull the output high, which would "dissatisfy" (or override) the "collector-follower" nature of Q1... The circuit would settle with an output near V+... and, yeah, then we're back to my circuit being a really weird case that I still have yet to be able to find described anywhere as anything more than a tiny side-note, let alone having a name. 

Let it be known, the circuit I've "discovered" is hereby called an esot-follower. And in 100 years when we've finally discovered a use for it in flying EM-drives, y'all will have to use my name to refer to it :)

-----------

Alright, back to the low-voltage BJT logic...

Not very likely VBE-on will drop too much lower than 0.6V, with temperature-changes... What, maybe 0.4V at an extreme? So maybe somewhat reliably you could do 0.8V logic? Nice... Run it off a solar-cell, like a calculator? Wonder what sorts of untapped benefits it might have, would it be fast? Capable of outputting high-current? High input-voltage tolerance (Vih-max >> V+, Vil-min << V-)? Maybe using this to drive the one I "discovered" would help in creating output-voltages closer to the rails.

Crossover-distortion? Maybe an inherent hysteresis or dead-zone that makes it noise-immune...? Or in that dead-zone a third state, trinary-logic... Hmmm....

(Can you tell the Pre-Game-Shows are utterly boring to me? Oh, the game started, off to be minorly-distracted!)

  Are you sure? yes | no

Ted Yapo wrote 01/08/2017 at 15:46 point

@esot.eric , @Yann Guidon / YGDES OK, I built one.  Well, five.  And coupled them into a ring oscillator - in the shape of a ring ;-)

They're 2N3904/2N3906 pairs.  The capacitors are just supply bypass caps (0.47 uF each).  The circuit seems to be "alive" down to about 0.4V, although very touchy and unstable.  By 0.8V it shows nice, stable oscillations:

at 2.4 MHz (approx), this is a period of 420 ns, which I think you divide by 10 to estimate the propagation delay - 42ns.  (Or do you divide by 5, I can't remember now).  Anyway, they work as inverters, and produce a half-decent waveform.  At 0.8V, it consumes about 30mA.  By 1V, it was up to 100mA, but I didn't measure the oscillation frequency.

The 2N3904 has an FT of 250 MHz or so. The fastest pairs I have are MPSH10/MPSH81 (obsolete, I think) at 650 MHz.  I wonder how they would do?

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/08/2017 at 16:57 point

Start a new project now !!!

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/08/2017 at 17:38 point

It's up at #CBJT Logic :-D

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/08/2017 at 09:18 point

@Ted Yapo: Unusual logic gates : I'm very interested :-D

One advantage of very low voltage logic is lower power consumption, but you need as many PNP as NPN and it's harder to wire them in series (parallel switching seems preferred, favoring ORs over ANDs but it should be tested). I have no idea how fast that could run but... wow !

This is something I should investigate for #YGREC-Si, given that I have a good supply of both polarities ! Maybe this uses less transistors than ECL or pseudo-ECL... Vcesat vs power supply voltage, base currents, preventing saturation, all that should be examined :-P

Too bad I can't find a significant amount of NPN in Germanium... I must stick to classic ECL for #Germanium ECL. The lower threshold voltage would save some power but the leaks are just too significant.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/08/2017 at 09:28 point

Anyway, such thing could be called "LVDCTL" : Low-Voltage Direct Coupled Transistor Logic.

I can suppose it hasn't been implemented for several reasons such as :

- poor noise immunity

- those base currents that can't be controlled

- transistors were too leaky and inconsistent performance, binning would be a nightmare

- it's better to have one reference than two, less confusion and better bargaining power when ordering 1M parts

- maybe it's not as fast as other topologies

  Are you sure? yes | no

Eric Hertz wrote 01/08/2017 at 11:24 point

Hah, the idea of a homebrew transistor-CPU running at a 0.8V core-voltage seems like a weird mish-mash of eras.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 01/08/2017 at 12:34 point

I'd say 1V ? Less than 1.2V anyway. But there is the drop voltage to consider...

Who wants to try it ? :-D

  Are you sure? yes | no