Let's Make Robots!

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

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

 

Thread Closed :D

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.

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 gateldr circuit

to get me that table though xDDD

 

Thanks for the replies :D

Fair enough. I should have said "I don't know if the second is possible with an or gate." A NAND would definitely get you that table.

yet again. :P

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.

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

 

When you say you want to logically "or" them together, do you mean you want to use them each as an input to a shared "or" gate? I didn't see an IC in the schematics in that link. Which are you using? Which state (light or dark) do you want to be logic in/out high (the line that says "the input is the LED output..." is a little confusing) for each LDR? The first table is definetly an and gate-don't know if the second is possible. A true or gate would be 000/ 101/ 011/ 111-I don't know how you could invert the out put of only the two high inputs without writing it into a programmable micro.