• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Electronics Theory / How to make a Transistor Latch Circuit

How to make a Transistor Latch Circuit

Last Updated on July 19, 2025 by Swagatam 177 Comments

In this post I have explained how to make a simple transistor latch circuit using just two BJTs and a few resistors.

Introduction

A transistor latch is a circuit which latches ON with a permanent high output in response to a momentary input high signal, and continues to stay in this position as long as its in the powered condition, regardless of the input signal.

A latch circuit can be used to lock or latch the output of the circuit in response to an input signal and sustain the position even after the input signal is removed.

The output may be used to operate a load controlled through a relay, SCR, Triac or simply by the output transistor itself.

Working Description:

The simple latch circuit using transistors I have I have explained in this article can be made very cheaply using just a couple of transistors and some other passive component.

As shown in the figure transistor T1 and T2 are configured in such a manner that T2 follows T1 to either conduct and or to stop the conduction depending upon the trigger received at the input of T1.

T2 also acts as a buffer and produces better response even to very small signals.

When a small positive signal is applied at the input of T1, T1 instantly conducts and pulls the base of T2 to ground.

This initiates T2 which also starts conducting with the received negative biasing offered by the conduction of T1.

It must be noted here that T being NPN device responds to positive signals while T2 being a PNP responds to negative potential generated by the conduction of T1.

Uptill here the function looks pretty ordinary as we witness a very normal and obvious transistor functioning.

How the Feedback from R3 Works to Latch the Circuit

However the introduction of a feedback voltage through R3 makes a huge difference to the configuration and helps to generate the required feature in the circuit, that is the BJT circuit instantly latches or freezes its output with a constant positive supply.

If a relay is used here it would also operate and stay in that position even after the input trigger is completely removed.

The moment T2 follows T1, R3 connects or feeds back some voltage from the collector of T2 back to the base of T1 making it conduct virtually “for ever”.

C1 prevents the circuit from getting activated with false triggers generated from stray pick-ups, and during switch ON transients.

The situation can be restored back either by restarting power to the circuit or by grounding the base of T1 through a push button arrangement.

The circuit can be used for many important applications, especially in security systems and in alarm systems.

Calculations and Formulas:

Threshold Voltage for BJT Activation

The threshold voltage values for turning ON or OFF the NPN and PNP transistors remain the same:

  • NPN Transistor Turn-On Voltage (VBE(on)):
    VBE(on) ≈ 0.7V (for silicon BJTs)
  • PNP Transistor Turn-On Voltage (VEB(on)):
    VEB(on) ≈ 0.7V (for silicon BJTs)

These values determine when the base-emitter junction of either transistor is forward biased, enabling current flow and turning the transistor ON.

Base Current (I_B) Calculation

For both NPN and PNP transistors, the base current is still calculated in relation to the collector current:

  • Base Current for NPN Transistor (IB(NPN)):
    IB(NPN) = IC / βNPN
  • Base Current for PNP Transistor (IB(PNP)):
    IB(PNP) = IC / βPNP

Where:

  • IC is the collector current
  • β is the current gain of the transistor (typically 50–300)

This is relevant for understanding how the transistors maintain their ON or OFF states once latched.

Collector-Emitter Voltage (V_CE)

The voltage across the collector-emitter junction of each transistor is very important for ensuring the transistors remain in the active or saturation regions:

  • NPN Transistor Saturation Voltage (VCE(sat)):
    VCE(sat) ≈ 0.2V (when fully ON)
  • PNP Transistor Saturation Voltage (VEC(sat)):
    VEC(sat) ≈ 0.2V (when fully ON)

These values are relevant when the latch is "set" or "reset," which ensures that both transistors are either fully conducting or completely turned off.

Latch Holding Condition

Once the latch is set or reset, the feedback ensures that the state is maintained regardless of the input signal:

  • Feedback Current (IFB):
    IFB > IB(required)

Where, the IB(required) is the base current needed to keep the transistor latched in its ON state.

This feedback signal ensures that once the NPN or PNP transistor is turned on, the circuit remains latched in that state until forced to reset.

Resistor Calculations

Resistors will control the currents flowing through the transistor and define the behavior of the circuit:

  • Base Resistor (RB):
    RB = (Vinput - VBE(on)) / IB
  • Collector Resistor (R_C):
    RC = (VCC - VCE(sat)) / IC

Where:

  • Vinput is the voltage applied to the base of the transistor
  • VCC is the supply voltage
  • IB and IC are the base and collector currents, respectively

These resistor values help in controlling the current levels to properly switch and latch the circuit.

Switching Time

The switching time for the latch circuit or the time it takes for the latch to change states is determined by the charging and discharging of junction capacitances:

  • Rise Time (tr):
    tr ≈ (RB * Cj)
  • Fall Time (tf):
    tf ≈ (RC * Cj)

Where Cj is the junction capacitance of the transistor which determines how quickly the transistor can switch between states.

Hysteresis Voltage

Hysteresis ensures that once the circuit is latched in a particular state... it remains stable:

  • Hysteresis Voltage (Vh):
    Vh = IFB * Rfeedback

Where:

  • Rfeedback is the feedback resistor value.

This feedback voltage creates a gap between the switching thresholds which helps to prevent oscillation and ensurs stable operation.

Testing procedure can seen in the following video tutorial:

Parts List

  • R1, R2, R4 = 10K,
  • R3 = 100K,
  • T1 = BC547,
  • T2 = BC557
  • C1 = 1uF/25V
  • D1 = 1N4007,
  • Relay = As preferred.

PCB Design

PCB design for transistor latch circuit

You'll also like:

  • Ohm’s Law/Kirchhoff’s Law using Linear First-Order Differential Equations
  • ImageDarlington Transistor Calculations
  • highcurrentvoltagedoublercircuitHigh Current Voltage Doubler Circuit
  • Emitter-Stabilized BJT Bias Circuit

Filed Under: Electronics Theory Tagged With: Latch, Transistor

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!

Previous Post: « Vehicle Immobilizer Circuit Explained
Next Post: Remote Control Circuit Using FM Radio »

Reader Interactions

Comments

Luciano says:
July 8, 2025 at 9:58 pm

Good morning Mr. Swagatam. As input trigger I should use a photoresistor hit by a high brightness flashing led external to the circuit. Can the circuit work? And how should I add the photoresistor? Thanks.

Reply
Swagatam says:
July 9, 2025 at 1:53 pm

Hi Luciano,
You can configure the circuit in the following manner:
https://www.homemade-circuits.com/wp-content/uploads/2025/07/latching-a-BJT-latch-circuit-through-LDR.jpg

Reply
luciano says:
July 10, 2025 at 3:23 am

Thanks for the suggestion. I’ll build the circuit as soon as I have a moment and let you know.

Reply
Swagatam says:
July 10, 2025 at 9:01 am

No problem Luciano, all the best to you.

Reply
Luciano says:
July 11, 2025 at 9:32 pm

Good morning Mr. Swagatam. I built the circuit and it works perfectly, but the relay works intermittently according to the LED flashing. However, I need the relay to remain permanently active. I need the circuit to activate a transmitter for remote control of an electric fence. Is it possible to modify it? Thanks.

Reply
Swagatam says:
July 12, 2025 at 8:30 am

Good morning Mr. Luciano,
The circuit explained above is supposed to latch the relay ON permanently, as soon as the T1 gets a base trigger.
If the relay is not latching in your circuit, then something might be wrong. In your case the relay should latch and lock permanently with the very first flash of the LED. The 100k resistor feedback is what does the latching of the two transistors and the relay. I hope you have connected the 100k resistor correctly. You can try reducing it to 10k and test again.

Reply
Michael Fridolin says:
June 11, 2025 at 6:01 am

hello thanks for the circuit idea. I have a question, if I want to directly drive say it 1A-2A LED strip instead of using relay what values i should use for R2 and R4 if T2 is TIP42 (overkill I thought but i have plenty of TIP42)

Reply
Swagatam says:
June 11, 2025 at 9:24 am

You can surely remove the relay and use an LED instead with a suitable series current limiter resistor.
However, TIP142 cannot be used for T2, because T2 is PNP and TIP142 is NPN….so instead of TP142, you can replace T2 with TIP147, or maybe TIP127 with a heatsink. That’s all is needed.

Reply
Michael Fridolin says:
June 12, 2025 at 6:29 am

thanks for your reply but i mean TIP42 power transistor not TIP142 Darlington. if I plan to use it what values for R2 and R4 resistor? sorry I have to ask because I am an IT guy and not have plentiful electronics basic although I love electronic since I was a kid

Reply
Swagatam says:
June 12, 2025 at 8:34 am

Sorry, I misread as TIP142. Please let me know about the supply voltage, and LED supply voltage then I can calculate, or if you can simply add another PNP BJT such as BC557 or 2N2907 or BD140, with your TIP42 to upgrade it into a Darlington pair, then the the existing setup can be used without any changes in the resistor values….

Reply
Michael Fridolin says:
June 25, 2025 at 4:23 pm

ok, I will try Darlington tip142

Reply
Swagatam says:
June 25, 2025 at 4:37 pm

OK. …

Reply
Jedidiah says:
February 13, 2025 at 1:55 pm

Hello Sir. How can I ensure that the relay is energized and de-energize using positive (rising edge) clocks only?

Reply
Swagatam says:
February 13, 2025 at 6:51 pm

Hi Jedidiah, the following BJT latch circuit will trigger ON/OFF only through positive rising edge pulse.

https://www.homemade-circuits.com/wp-content/uploads/2012/08/setresetlatchcircuit.png

Reply
Jedidiah says:
February 14, 2025 at 3:56 am

Is it possible to use one rising edge clock input position to ON and OFF the relay instead of having two positions (SET and RESET)? I have tried it out by shorting the SET and RESET points to achieve this but the output remains HIGH throughout after receiving the first clock. All the reset are assumed.

Reply
Swagatam says:
February 14, 2025 at 8:34 am

Shorting the set reset will not work for the above design. If you are trying to achieve a flip flop operation then you may have to go for an IC based circuit, doing it with a BJT circuit looks quite difficult. You can refer to the following article for more info:
https://www.homemade-circuits.com/build-these-simple-flip-flop-circuits/

Reply
Jedidiah says:
February 14, 2025 at 12:06 pm

Thank you

Reply
Jedidiah says:
February 14, 2025 at 3:46 am

Hello Sir. I have tested the circuit as drawn… but its not latching. I have tried to include part of the previous circuit whereby I placed R2 between Vcc and base of T2 and included the 1uF capacitor between Vcc and collector of T1 as it were before. It worked!

Reply
Swagatam says:
February 14, 2025 at 8:29 am

Jedidiah, both the versions should work without any issues, no matter whether R2 is connected across base/positive of the PNP T2 or collector/positive of the NPN T1. Just make sure to connected a 0.22uF capacitor between the base/ground of both the NPN transistors (both BC547)

Reply
Jedidiah says:
February 13, 2025 at 10:56 pm

Thank you so much

Reply
Malcolm says:
December 27, 2024 at 2:02 pm

Hi. Hope you had a great Christmas.

I’ve used the latch circuit to latch after it detects the first activation ping from a burglar alarm. This works as expected. I’d hoped the output from the latch would be enough to run a 555 timer and 4017 counter that will run relays to dial a cell phone to call me, an idea from one of your other blogs, but the output is only 1.9v I s’pose all that’s left of the 12v after voltage drop. It’s not enough to run the 555.

So the latch output is now connected to a BC547 base that is acting as a switch passing 12v to the 555, 4017 and SRD-12v-SL-C relays. But I imagine the base needs resistor. The math and required understanding has got the better of me what size resistor does it need?

Seems to work alright with the 4017 driving LEDs without a resistor but I’ve had transistors cook on me before.

Reply
Swagatam says:
December 27, 2024 at 6:13 pm

Hey Thanks, hope you too are enjoying the Holidays.
You do not need a BC547 at the output for powering an external circuit. You just have to replace the shown relay coil with your external circuit.
For adequate current you may have to replace the BC557 with a 2N2907 or an 8550 transistor.
So, the collector of this transistor now connects with the positive supply line of your 4017/555 circuit, and the negative to the common ground of the supply.

Reply
Marko says:
August 4, 2024 at 4:15 pm

I’m learning electronics in my spare time. I already know some basics about electronics and still learning. I’m trying to make an alarm that uses 4011 NAND gates for checking if the an alarm wire is broken and then it should use a latch circuit to turn on a microcontroller that turns on the speaker, leds etc.

Then after a specific time the microcontroller should turn off the latch circuit, to preseve energy. This is because I want to make a small battery powered multipurpose alarm system that could be used in bikes to prevent thefts (with vibration activated sensor/switch) or as a door alarm (with NC switch) in my apartment.

I already understand quite well how NPN and PNP transistors works, but I don’t currently understand the purpose of the C1 capacitor how it works here in the circuit.

Reply
Swagatam says:
August 4, 2024 at 5:37 pm

Thank you for your question, I appreciate your interest in electronics.
Could you please tell me where is this C1 capacitor situated?
Is it connected in series with a resistor or after the resistor and across ground?
If you can refer me to the schematic or provide the exact configuration details of the capacitor in the circuit, I can certainly help you to understand how the capacitor may work to fulfil its specific job.

Reply
Marko says:
August 6, 2024 at 2:20 am

Actually I mean the C1 capacitor in this example latching circuit you have made. To fully undertand this latching circuit, is this a decoupling capacitor or what exactly is it called in this setup? Or is this used for some kind of filtering or debouncing prevention?

But about the alarm circuit I’m trying to make, part that would activate the latch circuit would look something like this. I have 4011 ICs for this purpose, so one NAND gate would be used for checking if the circuit is closed and another NAND gate would be used to invert the output, so it could be used by a latch circuit.

I have not yet fully planned this, but my initial idea was to keep the alarm latched for a specific amount of time and it could probably be done using your latch circuit. In this example image I posted, the 1K resistor is just there because I quickly added something to demostrate.

Why I want to keep the alarm latched is that if someone would close the circuit again, the alarm so still be on and not turn off.

https://i.postimg.cc/GpkJPccS/alarm-nand.png

Reply
Swagatam says:
August 6, 2024 at 8:43 am

Ok, understood!
The C1 in the above latch circuit is used for filtering external noise and to prevent false activation of the latch circuit.
However, the best position of C1 is across the base/emitter of T1, so that the noise is filtered right at the beginning of the circuit.
If you want to latch your alarm circuit for some specific amount of time, then I would recommend you using a 555 monostable circuit.
Alternatively, you can simply use your NAND gates to create a simple monostable for the same purpose.
Let me know if you have any further doubts or questions.

Reply
Jan says:
March 19, 2024 at 10:02 pm

I want the latch to stay even if the input signal drops to 0. In my preferred solution the only way to break the latch is by switching off power. How do I achieve this?

Reply
Swagatam says:
March 20, 2024 at 6:28 am

The circuit will stay latched even if the input signal is removed. The circuit needs only a momentary input signal to get latched.

Reply
Jan says:
March 20, 2024 at 1:02 pm

thanks for your quick reply. at the moment, the latch drops when the base resistor of T1 is connected to ground. I don’t want this to happen. instead I want the latch to stay until the power is turned off even if the input signal drops to 0. Can you suggest a modification?

Reply
Swagatam says:
March 20, 2024 at 3:44 pm

For that, you can add a 1N4148 diode at the input side of R1, and feed the trigger signal through this diode.

Reply
Jan says:
March 22, 2024 at 3:45 pm

it worked, thanks for your help
Jan

Reply
Swagatam says:
March 22, 2024 at 5:25 pm

Glad it worked…

Reply
JimmyCrackedCorn says:
February 24, 2024 at 4:07 am

I have a circuit that takes less than 100usec to “get started” and my input signal is high during this startup period. How can I ignore the first 100usec of input before using the input to trigger? Within ~ 40usec my input is low and later (tens of seconds) the input goes high as expected and this is the transition I wish to react.

Reply
Swagatam says:
February 24, 2024 at 9:01 am

Controlling a microsecond signal looks difficult, I can’t figure out a configuration that would control the microsecond timings with such accuracy.

Reply
Ryan says:
February 17, 2024 at 2:22 pm

Amazing! Thank you so much!.
I simulated it and it works. Just the 2 questions I have are:
1) I have a 20us negative pulse that I need this transistor to switch on to and turn on the LED. Will this work?
2) There could be a lot of noise in the signal that will trigger the base of T2. I know you mentioned that C1 should help with the filtering, but now that i have switched the input to the base of T2 would this capaitor still help with noise or should I make modifications?

Reply
Swagatam says:
February 17, 2024 at 3:03 pm

Thanks, Glad it helped.
C1 might help to eliminate false switch ON only if it is connected directly across base/emitter of T2. However if this done, then the 20us pulse will be too short and might get quickly absorbed by the capacitor, so that no signal reaches the T2 base.
Nevertheless, you can try smaller capacitor values such as 0.01uF across base/emitter of T2 and see if that helps to mitigate the noise and yet allows the 20us triggering.

Reply
Ryan says:
February 17, 2024 at 1:01 pm

I would like to know how to switch the circuit on a negative going pulse rather than positive. What changes do I need to make ?

Reply
Swagatam says:
February 17, 2024 at 1:20 pm

Apply the negative pulse to the base of T2 via a resistor.
R1 can be removed, it is not required now.

Reply
Girish Chauhan says:
March 6, 2023 at 12:13 am

I am giving triggering of 1 volt from ccd camera video signal ,how can we make it possible to disable the latching when the trigger voltage is deactivated

Reply
Swagatam says:
March 6, 2023 at 8:05 am

It means you don’t want the latching feature, for that you simply have to remove the R3 resistor link.

Reply
Girish Chauhan says:
March 6, 2023 at 8:19 pm

Thanks Sir

Reply
Girish Chauhan says:
March 6, 2023 at 12:02 am

Thanks for the circuit, i made and it works fine, is there any way the the the latching will reset when the trigger circuit is removed if so please share diagram

Reply
Swagatam says:
March 6, 2023 at 8:03 am

Thank you for the update! Triggering is supposed to be done only once, then the circuit latches and remains latched. If the circuit resets on removing the triggering source then it won’t be a latch circuit.

Reply
Cn sampath kumar says:
January 10, 2023 at 4:26 pm

In connection with previous ckt my inputs both are +ve for dis i need ckt sir.

Reply
Swagatam says:
January 10, 2023 at 6:18 pm

Try this circuit then:

https://www.homemade-circuits.com/wp-content/uploads/2012/08/set-reset-latch-circuit.png

Reply
Cn sampath kumar says:
January 9, 2023 at 8:43 am

Pl give me SR Transistor lactch ctk with detail

Reply
Swagatam says:
January 9, 2023 at 9:17 am

here it is:

https://www.homemade-circuits.com/wp-content/uploads/2022/01/motor-set-reset-control.jpg

Reply
Swagatam says:
August 11, 2024 at 8:15 am

R4 is actually a pull-down resistor in this case, because T2 is a PNP transistor.
R3 is the heart of the latch circuit, without it the latching would never happen.
With a momentary base trigger when T1 is turned ON, T2 also is also turned On, which allows a feedback voltage to pass through R3 and reach the T1 base, so that now T1 and T2 lock on with each other ensuring that the circuit gets latched regardless of whether T1 base is getting any external trigger or not.

Reply
Marko says:
August 11, 2024 at 1:21 am

The R4 is called a pull-up resistor in this case. Just in case if someone else tries to figure out how the circuit works.

But about the R3 resistor, is it really needed, or could the feedback loop use only the R1 resistor? I have some difficulties understanding the function of the R3 resistor.

Reply
Swagatam says:
August 12, 2022 at 10:03 am

Connect the C1 across base/emitter of T1. C1 can be a 1uF/25V. This will stop the self latching issue.

Reply
View Older Comments

Leave a Reply to Swagatam Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

circuit simulator image



Subscribe to get New Circuits in your Email



Categories

  • Arduino Projects (92)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (84)
  • Datasheets and Components (109)
  • Electronics Theory (148)
  • Free Energy (39)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (16)
  • Inverter Circuits (94)
  • Lamps and Lights (157)
  • Meters and Testers (71)
  • Mini Projects (28)
  • Motor Controller (66)
  • Oscillator Circuits (28)
  • Pets and Pests (15)
  • Power Supply Circuits (90)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (105)
  • SMPS and Converters (32)
  • Solar Controller Circuits (60)
  • Temperature Controllers (43)
  • Timer and Delay Relay (49)
  • Voltage Control and Protection (38)
  • Water Controller (36)
  • Wireless Circuits (30)





Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap



People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Stack Exchange
  • Linkedin



Recent Comments

  • Swagatam on 3 Laser Beam Controlled Circuits Explored
  • ken on 8X Overunity from Joule Thief – Proven Design
  • Kim on 3 Laser Beam Controlled Circuits Explored
  • Swagatam on Making an Adjustable Electromagnet Circuit
  • Swagatam on Make this DC CDI Circuit for Motorcycles

© 2025 · Swagatam Innovations