Help Solve The Single-Transistor Latch Mystery

If you’ve spent any time on, you may have noticed that more than a few denizens of the site are fans of “alternative” electronic logic. Aiming to create digital circuits from such things as relays, vacuum tubes, discrete transistors, and occasionally diodes, they come up with designs that use these components in either antiquated or occasionally new and unexpected ways. This is exactly what [Mark Sherman] has done with his latest project, a single-transistor latch.

If you think every design has to compete with cutting-edge integrated circuits, or even must have an immediate practical application, you might as well stop reading now — and to play on the famous Louis Armstrong quip about jazz, if you have to ask why someone would do such a thing, you’ll never know.

Given that you’ve come this far, you’ll appreciate what [Mark] has come up with. It’s semi-well-known that the collector-emitter junction of a bipolar junction transistor (BJT) can exhibit a negative resistance characteristic when reverse-biased into avalanche breakdown. It’s this principle that allows a single BJT to be used as an ultra-simple LED flasher. [Mark] took this concept and ran with it, creating a single-transistor latch that can store one bit of information. As a bonus — or is it a requirement? — the transistor also drives an LED, so that you can visualize the state. We’ve seen a one-transistor flip-flop before, but that one also required diodes and an AC bias supply. In this new device, none of this is necessary, so it’s a step up according to the unwritten, unspoken, and generally agreed upon rules of the game.

In true hacker fashion, [Mark] came up with a working device without fully understanding exactly how it works.  We, too, are a little mystified at first glance. So, [Mark] is asking for your help in replicating and/or analyzing the circuit. He explains what he has found so far in the video after the break, but the main questions seem to revolve around why the base resistor is required, and why it works with 2N4401s but not 2N2222s.

So, Hackaday, what’s going on here? Sound off in the comments below.

33 thoughts on “Help Solve The Single-Transistor Latch Mystery

  1. The transistor is right on the edge of reverse breakdown and can be flipped easily.

    Without the pulldown the base is fully floating when “idle”.

    Once flipped into conducting (at/over the breakdown) some effect, I would guess thermal, reduces the breakdown voltage causing the transistor to remain stable over the (new) breakdown voltage (positive feedback loop).

    Resetting the latch, is fine, but as soon as the base goes floating again the typical electric fields just so happen to cause it to flip over the breakdown and it relatches itself on, as we can see it’s quite susceptible to EM noise.

    With the pulldown, when you reset it, the pulldown keeps it below the breakdown so it never gets a chance to relatch itself. And when you latch it sufficient current is pulled that the, perhaps thermal, effects cause a suitably larger reduction in breakdown voltage to keep it latched over the effect of the pulldown.

    Observing the voltage across the transistor should shed light on the matter.

    1. The transistor is not being used in reverse, turn an NPN upside down it’s still NPN. Doping profiles, gain and miller capacitance are optimised for the right way up though. Clearly stability is too, as Schmitt trigger like behaviour wouldn’t be appreciated in an amplifier. I’m still musing on the details.

      1. Yes it is still NPN with reference to the base collector junction, but I have seen transistors behave like zeners in the collector-emitter junction. I have some old NPNs that I observed with my home built component tester (octopus& scope) and it behaved like an 8 or 9 volt zener!!

        1. Think of a transistor as two diodes; a base-emitter diode, and a base-collector diode.

          The base-collector diode has a high breakdown (avalanche or zener) voltage. It is normally reverse-biased, so it provides the transistor’s voltage rating.

          The base-emitter diode has a much lower breakdown voltage; usually around 7 volts. This doesn’t matter when the transistor is used in the normal way, since the base-emitter diode is forward biased.

          In this application, he swapped the emitter and collector; so you have a transistor with a 7v “collector”-base breakdown voltage.

          Then, he is modifying this breakdown voltage with the base biasing.

  2. If you want to see weird electronics, look into pre-transistor car radios, especially the ones with ‘signal seeking’ self tuning. You’ll wonder how a mass of point to point wired chunky resistors and wax dipped paper capacitors works at all, let alone can tune itself.

    1. An interesting statement, or someone is trolling. Nothing weird about ” mass of point to point wired chunky resistors and wax dipped paper capacitors works at all, let alone can tune itself”

  3. Emitter−Base Breakdown Voltage is 6V min. Pressing reset will probably exceed that. Strange because I would think exceeding that would cause emitter-base to conduct and since base-collector is forward biased, the LED would turn on. That might possibly cause EB to stay in breakdown. Then shorting the base to V+ would force it out of breakdown.
    But this is opposite of the labelled buttons (assuming that isn’t a mistake).
    So IDK Magic?

  4. I once noticed a weird effect that let a single transistor latch while playing with magnets.

    You can solder to the nickel coatings of rare earth magnets if you’re quick – they lose magnetism when they are heated to soldering temperatures, but you can solder them to PCBs if you’re quick.

    So I made some small boards with resistors, LEDs, transistors, etc. and started sticking them to whiteboards and coated metal surfaces.

    With some TO-220 and TO-92 NPN/PNP transistors, I noticed that when the package was laid flat against the surface which the board was stuck to, it would latch. You could disconnect the ‘base’ magnet and it would stay on or off.

    It seemed pretty stable, staying latched in either position for days, but I didn’t experiment too much; maybe it wouldn’t work with large amounts of current. I wonder if it might have been similar to how commercial ferroelectric memory works, like:

    1. Neat, I’m going to have to look into this effect. I’ve seen with relays we can lower the power required to operate… though never seen with other components other than an electromagnet of course. Wondering what else can benefit from magnets for mechanical processes feedback or lowering power requirements/consumption.

  5. ID guess the reverse leakage is enough when it’s off to hold it in that state. Setting it clearly is a bypass for that current so the lower reverse voltage with the thing ON is enough to hold that state. A spice sim will likely show us all we need but again how well are the models for the given transistor? Operating a circuit like this can work in some situations but as noted EM, thermal and applied voltage all have an impact.

  6. You can reproduce this effect in nearly any FET. The field effect remains established until the removal of power. In effect this is the same principal that allows SRAM to retain its memory. Literally 1 or 0.

  7. IMO it’s zener-ing, the current rises in the LED as it comes on and drops a little as the resistor in series heats, then drops out easy when grounded, resistor cools quick and it’s off threshold again until set and resistor re-warms. May not work with 1/2 watt etc resistances.

    1. I’d agree that it looks like the base-emitter junction is zenering. The 9.6V supplhy requirement looks about right when combined with the LED’s forward voltage.

      The base-collector junction will be forward biased when the base-emitter junction zeners, so that would provide a current path to the LED. There’s probably some current gain, on the same order of magnitude as the reverse transistor region.

      Rbc would provide a current path to keep the base-emitter junction zenering once the LED is lit.

      If I’m reading the circuit and the video correctly, connecting the base resistor to GND turns the LED on, while connecting it to VCC shuts the LED off. That would be consistent with a base-emitter junction zenering: connecting to GND puts enough voltage across the junction to induce breakdown, while connecting to VCC effectively shorts the base to the emitter, making reverse breakdown impossible.

      If those assumptions are correct, the voltage from the base to the emitter should be 6V to 7V. I’d expect the voltage across Rbc to be around 0.6V to 0.7V.

  8. Hmm, offers a couple of interesting lines of enquiry, just one is the type of noise generated by junction breakdown and what that spectra offers.
    FWIW. Been musing on a one sot23 MOSFET led driver that turns on with a momentary pushbutton but, turns off after say 15mins With the option to force it off holding the pushbutton down for 4 secs and without using a processor, though the 3c CPU looks inviting if I can squeeze in something else at same time ;-)
    Thanks for post, expecting a high grade nV-uV data logger to tell me more about junction noise, I read it’s pretty weird what goes on in those quantum spaces – matrix glitches anyone ?
    Thanks for thought provoking post :-)

  9. So just want to share my thoughts on this:

    1. the transistor did not break down when working as latch (because led is not on all the time)
    2. npn transistor can work properly even if it is put reversely but the performance would definitely change comparing with the right position.

    Here is what I think on how this works with Rbc attached:

    1. There are two steady states that the circuit can operate in. During the “on” state: the BJT should be conducting current and the current is flowing from Vcc to GND through the transistor Emitter, collector and the lighting diode. During the “off” condition, the transistor is off so that there is no current flowing through the lighting diode.

    2. Then let’s see how Rbc is affecting the “on” and “off” conditions and how everything works out. Overall I think Rbc is providing bias voltage for Base and collector (now used as Base emitter). During the “on” state, I would expect the voltage turns the lighting diode on first and then turn on the npn. However, I think not all current flowing through the lighting diode come from NPN but small part of it actually flows through Rbc to provide bias voltage for NPN. As we know that BJT has base current, it makes sense that the current can keep flowing after the wire left the VCC contact.

    3. By having the wire touching GND, the voltage shuts down the lighting diode first which makes Rbc to be zero (not sure exactly step by step but this should be it ) And then the transistor turns off as well.

    Not sure if this is completely right but you can verify by measure the voltage across Rbc during different states. Another thing is that, if this is right, then if you flip the NPN BJT, the circuit would still works or might need larger Rbc depending on change on beta factor.

    Hope it helps and interesting work!

  10. How about an *analogue* pulse train divide-by-five circuit made from only *two* transistors, three diodes, two capacitors and some resistors. Integrated circuits? Bah humbug, who needs them,

    The Tektronix 184 uses several such stages to divide 100ns markers down to 5s markers.

  11. My explanation:

    During OFF state the EB voltage is close to the junction breakdown, the current is leaking into base and trough Rbc it flows into LED – generating a small voltage, thus reducing CE voltage and preventing transistor breakdown (reason why it does not work without Rbc).
    During ON state by connecting base to Vcc you turn on the transistor in reverse action mode. I guess after removing the drive the transistor stays turned on in the negative resistance region – where more current with less voltage flows than is breakdown voltage. Note CE voltage in ON state is LESS than voltage in OFF state.

  12. I think is a mix of luck in here in choosing the correct components to make this circuit work as a latch. Depending on the manufacturing NPN can be reversible or not, meaning that Emitter and Collector can be switched like MOS transistor do, but other cannot, like high power ones which have different doping for emitter and collector.

    So, even if you connect the transistor in the wrong direction, you still end up with a common collector configuration which then makes sense to work like shown.

  13. Based on the author’s observation that this circuit’s performance is sensitive to the transistor type, possibly just the right conditions for negative resistance. Or maybe not. The transistor biased in reversed is still NPN, usually with much lower gain. Worth trying

    Maybe—it’s Cold Fusion!

  14. Outstanding work.

    I would think this very interesting to people aiming to build CPUs from discrete components. Hopefully with careful component and voltage tweaking, the range of voltage over which this works can be broadened.

    Another interesting experiment would be to plot the hysteresis loop for this circuit by slowly ramping the base voltage up and dow, to see how much of a change in voltage it takes to change states either way. Once this is known, a 2D array of these can be made, using two resistors on each base, so that an X write and Y write signal both must be present for a write to occur. Making a single one-transistor latch is cool, but an array of these could make static RAM as cheap as dynamic RAM, without the refresh requirement of dynamic.

    All of the discrete-transistor CPU projects I’ve seen resort to using integrated circuits for memory, which I consider an asterisk (CPU made from discrete transistors* … *but still needs ICs for RAM).

    It would also be useful to know how quickly the switch works in both directions – how long a pulse is necessary for reliable latching.

  15. The transistor is being used in “avalanche” mode. A good book on transistor physics will describe this effect. Most bipolar transistor exhibit it to some degree, but its internal design strongly influences it (planar, alloy, epitaxial, single- or triple-diffused, etc.)

    Briefly, the collector-emitter breakdown voltage BVce of a transistor is not a fixed number. Instead, it depends on the base voltage and current. A data sheet will show some or all of the following numbers:

    BVceo (base open) is the lowest voltage.
    BVcer (base connected to emitter with a resistor) is higher.
    BVces (base shorted to emitter) is next.
    BVcex (base reverse-biased) is the highest voltage.

    Collector breakdown voltages are high (like 40-60v for a 2N4401). So this circuit swaps the collector and emitter. Emitter breakdown voltages are only 5-7v. It still works as a transistor, but the gain and performance is much less. Just call the emitter the COLLECTOR, and the collector the EMITTER in the following discussion.

    Assume the transistor is OFF. There is no collector current, so no base current, and the transistor sits at Vcer (only a base-emitter resistor). When you press SET, base current from Rb turns the transistor ON. The LED lights, and the voltage across the transistor is reduced. But, the base bias current lowers the BVce breakdown voltage enough so it latches on. Some of the collector current leaks OUT of the base, causing a voltage drop across Rbe. The base is now positively biased, keeping the BVce lower, and keeping the transistor on.

    When you press RESET, this reverse-biases the base. This raises the breakdown voltage to BVcex, which is higher than the 9.7v can provide, so the transistor turns off. Once off, it stays off because it is a gain a BVcer.

    The history of transistors is full of circuits that used avalance mode to make very fast switches and oscillators.

    Does this help?

  16. Have you considered that transistor may come from a failed/defective transistor batch? Maybe something ‘made in China’ or better said ‘recycled/refurbished in China’?

    Try to order the same transistor from different manufacturers and confirm the same effect.

    I am not talking jokes because I had more or less the same problems with some 74xx-series integrated circuits. In my project the proteus simulation works but in reality every ‘subspecies’ of those specific 74xx circuits (“LS”, “ALS”, “HC”, “HCT”, “N”, “S” – 245, 640, 641, 642) become extremely hot and spit magic smoke in minutes. Only the vintage soviet-union-made counterparts, pin compatible (K)555/1533-AP6 and (K)555/1533-AP9 work perfect. Every 74xx “subspecies” was ordered from respectable, unquestionable great suppliers which operate world-wide so blaming them for sending me sh*t parts is ruled out from the start.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.