LDR and IC logic gate

I have a basic LDR circuit 

Looks like this one except there is no pot >>> http://www.reuk.co.uk/Light-Dependent-Resistor.htm (the 1st figure)

I have 2 of them and I want to logically or them together.. The problem is I dunno where to connect the IC i tryed connecting it to the legs of the LED and transistor but i don't get the desired output.

the truth table became like this

(the input is the LED output of the LDR circuit and not if i put the light on the LDR)

x  | y | output

0 | 0 | 0

0 | 1 | 0

1 | 0 | 0

1 | 1 | 1

 

I only want it to be 0 when both are 0 which is the OR gate 

 

the truth table if I was to use the LDR input instead would be

x  | y | output

0 | 0 | 1

0 | 1 | 1

1 | 0 | 1

1 | 1 | 0

Have a look at a NAND gate

Have a look at a NAND gate http://en.wikipedia.org/wiki/NAND_gate

 

**I will stick my nose in where it hasn’t been asked to be **

yet again. :stuck_out_tongue:

The circuit you are considering

looks very similar to the following, minus the LDR, variable resisotor, and LED

That being the case, I believe if you hook your circuit up as I think you are planning to, you will get the reverse logic of what you are attempting. If however, you are using a NAND gate IC you can always tie a pair of one gate’s inputs together and get a NOT so you could feed the proper input into your preferred NAND gate, or, you could use the second circuit

and get the proper input to your NAND gate. Just my opinion, I can’t prove it because I have not tried it. At least it is something to think about once you get your circuit put together.

Schematic

Yup the NAND gate can get me the table. as for the LDR circuit it is a dark sensor the LED out is on when it is dark… I made a circuit of it that worked on circuit wizard but have not tried it on the breadboard ._. 

Oh and i still used an OR gate

ldr.jpg

to get me that table though xDDD

 

Thanks for the replies :D

Use the original circuit but

Use the original circuit but move the collector resistors to the emitters and tap off the emitters to your OR gate. Should invert the logic.

NAND gate

Hey guys thanks for all the help i figured out where to connect it and instead of using an OR I used NAND instead :smiley: (cause or could not do it)

 

Thread Closed :smiley: