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).
FlipFlop Output C .-----> /PWR_ON Buffer / Input v |/ --|>---/\/\/\---| NPN B |\ v E | v GNDThe /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.
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):
VA = 3.9V
VB = (not measured)
VC = 4.5V
(VE = 0.0V)
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.
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...
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):
VA = 3.9V, VB = (not measured), VC = 4.5V, (VE = 0.0V)
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.
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.