I´m running out of ideas here.

I have a device that should always output a 5v signal, with a maximum tolerance of 100 mV (4.95 to 5.05 V).

I´m building a "tester" device. My tester will compare the received 5v signal with a minimum and maximum reference voltage (Uref Min=4.95 V Uref Max=5.05 V )

If my device is faulty I want my tester to emit a signal, this signal will be connected to a binary counter that will be telling me if my device failed and how often it failed.

On the plan below, if I understood it right, the LM139 should be closed (0 V) when my device is =>4.95 V or =<5.05 and open (~6 V) if <4.94 V or >5.05 V. Given that I want a single signal from my LM139, I built an OR-Flip Flop with two transistors (2N2222). Joining the two outputs together was impossible to make it work.

The last picture are the connections I soldered on my LM139, I tried grounding the others inputs but it didn´t change anything, I tried many things but nothing worked I can´t get this guy to work properly...


MinV: Below DeviceU (5 V) the output2 will be almost 0 V. From deviceU (4.96 V) the voltage will slowly rise till it reaches DeviceU (5 V) and the output2 will emit a solid 6 V.

MaxV: The voltage stays stable at the output1 (6 V) when I drop the deviceU bellow 4.95 V. Everything above, the input1 will throw almost random values...

Surveillance circuit

Real connections

  • \$\begingroup\$ That is not a "flip flop" you've built with those two transistors. It is a funky kind of upside down "OR" gate. \$\endgroup\$
    – JRE
    Commented Dec 6, 2018 at 11:44
  • \$\begingroup\$ Ups! thank you, do you still think it´s a reliable solution ? \$\endgroup\$
    – FatSumo
    Commented Dec 6, 2018 at 14:29
  • \$\begingroup\$ All you need is a diode OR. \$\endgroup\$
    – JRE
    Commented Dec 6, 2018 at 16:58

1 Answer 1


You are trying to use the LM139 outside of its Common-mode input voltage range:

enter image description here

I deduce from your question that you are using a supply voltage of 6 V. That means that the Common-mode input voltage range is between Vcc - 1.5 V = 4.5 V and 0 V. Your input voltage are higher than that at around 5.0 V

So you will need to increase the supply voltage (I would choose at least 7 V).

Or you use a voltage divider to lower the 5 V input voltage to for example half of that: 2.5 V just to keep things simple. Then of course you will also need to halve your reference voltage.

  • \$\begingroup\$ This is awesome, I thought about before, but I wasn´t sure where to look at. Thank you so mutch Bimpelrekkie, I will increase the input voltage and see what happens, Luckily I´m doing this on my workplace meaning I have almost an unlimited amount of components to burn ^^´ \$\endgroup\$
    – FatSumo
    Commented Dec 6, 2018 at 10:47
  • \$\begingroup\$ It solved my problem!!! thank you so mutch, I increased my voltage and it started working without problems, I will now build my funky upside down "Or" gate and see what happens. \$\endgroup\$
    – FatSumo
    Commented Dec 6, 2018 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.