Problems with logic(NAND) gates?

I MADE a circuit that basically detects when an IR beam  is cut using a LM741 opamp .AS shown in the schematic i've connected the output of the opamp to the  two transistors (which is a nand gate) ,so when the beam is cut the output of the transistors should be high but instead the led at the collecter of the transistor glows only brighter. should i use a nand gate in a DIP package ?also when i individually measured the output of the opamp it showed that there was constantly 1.5 v coming out i tried measuring it with both opposite polarity leads of the multimeter  ,still  it showed a 1.5 v output,why does this  happen?PLS help.i need it fast.

Picture of Problems with logic(NAND) gates?
sort by: active | newest | oldest
Change the 640kΩ to 10kΩ ant the 1mΩ in line with the 640kΩ to 10kΩ and switch the other 1mΩ to 430kΩ.Change the 640kΩ to 10kΩ ant the 1mΩ in line with the 640kΩ to 10kΩ and switch the other 1mΩ to 430kΩ.

that should work.
Strontium (author)  Josehf Murchison4 years ago
how does that help?
The opamp is a comparator with little to compare.

The drop on both inputs from positive is the same see my Instructable:

other than the transistor output it is basically the same opamp circuit as yours, but if you look at my oscilloscope it has a much higher output.
Strontium (author)  Josehf Murchison4 years ago
that actually made it work.Thank you.
Best answer me.

Just curious was this project just to make a nand gate controlled by a photodiode?

Because there are easier ways to turn off an LED then to syphon off its source.
Strontium (author)  Josehf Murchison4 years ago
anyway i was trying to make a beam cut detector .when i tried testing it using my tv remote the ir led in my remote was flashing at a fast rate so icould not tell if the led was turning itself off or not ,then i tried using a normal ir led i had ,then also it did'nt work .So i substituted the resistor values you suggested and again it did'nt work properly with the remote but it worked properly with the ir led .i guess the ir led in the remote was flashing so fast that i could not tell whether the led was turning off.once again thanks
Why not just swap the inputs of the opamp and connect the LED directly to the output?

The transistor on the right will always be on, so can be omitted. Also, 1K seems a bit high for a normal 5mm LED, 470R may work better.

It sounds like the op-amp is not rail to rail, so the output will not go 0V to turn the transistor off. You can check the inverter circuit works by connecting the base of the transistor (through the resistor) to either supply rail and seeing if the LED turns on/off. A couple of diodes before the base may be enough to drop the voltage enough to turn the transistor off.
Strontium (author)  The Skinnerz4 years ago
i'm using a 3mm led.I removed one transistor and took the output of the lm741 to the base of the transistor through a diode and resistor.still the led only grows brighter.I also tried connecteing the led directly to the output of the lm741 but the result is the same (it only grows brighter).pls help if you can
Have you checked that the transistor turns on/off when you manually change the voltage applied to the base?

Unless, the inverter circuit is necessary for some reason, swapping the inputs to the op-amp and putting 2 or 3 diodes on the output and connecting it straight to the LED should work better than what you have now.
Redraw it, in the new configuration. Skinnerz is right, the opamp's output will never go to 0V, to turn off the transistor.