by JoshMac » Thu Dec 27, 2012 3:43 am
Hi Jeniaainej,
If I am understanding you correctly. There is an easier option that allows you to avoid the gates all together.
There are outdoor PIR's that are available off the shelf that have a day-night compensation to avoid them activating during the day. Have you looked into these?
But if you are deadset on using gates, using 1x 74LS00 would solve your problem (assuming the light sensor is binary, not analogue). The 74LS00 is a quad channel 2-input NAND gate. NAND gates are fantastic, because they can do pretty much any job if you have enough of them. OR, NAND, AND, NOR etc..
In this case you would use 1 IC, but use 3 of the 4 channels on the 74LS00. The fact that you mention gates, gives me the impression you have a base understanding of electronics and gates, so I havent including pin numbers, but if you are unsure, there are plent of tuts you can find on google that will give you a run down on them.
Channel 1 will invert the light sensors output, so when there is no light, the sensor will output a '0', that will be inverted to a '1' by the IC.
Channel 2 will act as a inverted AND gate (NAND), giving a 0 when the PIR gives a '1' [u]AND[/u] the output of the channel 1 gives a '1'.
Channel 3 will invert the output of channel 2.
I have attached a diagram to help you understand a little better.
Hope this helps.
Josh
- Attachments
-

- circuit.jpg (6.3 KiB) Viewed 4498 times