First of all thanks to all the forum members that helped me with my light detector circuit, it now works great.

I now would appreciate some help with my darkness detector. The attached circuit is very similar to my light detector except I swopped the inverting and non-inverting connections around. Is this OK?

The circuit runs off a standard 9V battery. I measured the output at pin 1. When the LDR is in light, pin 1 is at 6.4V. When the LDR is in the Dark the voltage at pin 1 drops to 1.8V.

Would it be possible to connect my camera (DSLR)to pin 1 so that when the LDR detects darkness the camera is activated? I suppose I could use a relay but would prefer some sort of an optoisolater so that there is less chance of the camera being damaged in any way.

That's going to depend on your camera, and what you mean by "activated". Just applying power would be relatively easy, but controlling the camera functions might be tough. Does the camera have any connections to allow this? Most consumer cameras have only a mechanical button to trigger a picture. A few support a remote, but still mechanical, trigger. So you may need to construct some sort of plunger to act like a robot finger.

BTW, another way to switch the logic would've been to switch the relative positions of the sensor and the variable resistor. This would cause switching to occur at the same light level it used to. Switching the inputs as you did is fine too, but might require a small adjustment.

Many modern DSLR cameras have a simple remote shutter input, it's usually pulled up through a relatively high impedance to 3.3Volts, all you would need is a switch to ground- an opto-coupler would work fine.

Thanks Sensacell, I'll try replace the Led with an optoisolater and see what happens. I dont need the autofocus at this stage so its only two wires that need to be closed to trigger the shutter. Any other suggestion will be appreciated. Thanks for your help- JDR04

A MOSFET is a handy way to replace a switch. A regular MOSFET will probably work, but a logic level one would be more of a sure thing. The regular one needs about 10V to reach it's lowest resistance, whereas a logic level MOSFET can be fully on below 5V.

Either way, the source pin goes to ground, shared by your circuit and your camera, and the gate goes to your switching signal. The two contacts for your camera are attached to drain and source. Turning on the gate voltage will "connect" the drain and source. You may need to use a multimeter to determine which contact is which n your camera.

I've also removed the led and put a small optoisolater (SFH618-2)In its place and it triggers the camera as well. Can you or anybody else forsee any problems developing with this method? Thanks again!!!

Not knowing what's in the camera, I'd be a bit nervous to use 9V and only a 200Ω resistor (and the comparator) to limit current. Also, since the high sides are connected, be sure not to also connect your circuit and your camera grounds, as this could allow current to flow from one to the other.

You've raised a point I forgot about......I was told the spare comparator input pins 5 and 6 should be tied together to prevent oscillations. Anyway, thanks so much for all your input and advice.....JDR04