PIR turn ON two loads, one of them ONLY during the dark

Thread Starter

FranciscoB

Joined Feb 8, 2014
107
I have a PIR sensor turning ON a camera (load A) when it detects movement, which then sends me an image through Wifi.

I would like to use the same output signal to turn ON a 10W LED (load B), but only during the night.

The circuit I attached isn't working but hopefully gives you an idea of what I'm trying to do. https://tinyurl.com/2bzf7ats


My thought process was:

1) the PIR output HIGH signal is 3.3V, current limited by its 1.5K resistor;
2) It currently is used to turn ON an n-mosfet, which turns ON the p-mosfet that allows power to the camera (this is working fine).
3) I would like to use the same trigger to turn ON the 10W LED, but only during the night. Therefore the n-mosfet through which the LED current passes should be open during the day. For this, a second n-mosfet would be used, with its gate voltage set by an LDR voltage divider.

Is there a better way to do this?circuit-20230203-2347.png
 
Last edited:

LowQCab

Joined Nov 6, 2012
4,314
The LDR needs to provide a varying Voltage to a Voltage-Comparitor,
( the Comparitor having some built-in Hysteresis ),
before going to the second, LED-controlling FET.
This is so the FET will not be "partially" turned-on as the ambient Light-level decreases,
but will have an exact, and adjustable, Light-level,
that will completely, and instantly, "enable" the LEDs.

Usually, You don't want to have a situation where a FET is "partially" turned-On.
It needs to be a hard and fast change of state, for both on and off.

If You don't know how to go about doing this,
provide your current Schematic, and I'm sure You will get plenty of suggestions.
.
.
.
 

djsfantasi

Joined Apr 11, 2010
9,188
If You don't know how to go about doing this,
provide your current Schematic, and I'm sure You will get plenty of suggestions.
And provide the schematic within the post and not via an external link. Many members won’t (and rightfully so) click on an external link. Also, if that link becomes invalid for any reason, the post is no longer useful.

Also, schematics with a black background are hard to read.
 

LowQCab

Joined Nov 6, 2012
4,314
You supposed "Schematic" is very hard to understand.
It leaves-out very important pieces of information all over the place.

This is what I think will do exactly what You want ...........

Mistake in Schematic has been corrected, Feb-4-2023, 6:30-PM.

Loose-ends .........
Input and Output of Motion-Sensor is an unknown.
Value Range of LDR is unknown.
.
.
.
Camera and LEDs Control .png
.
 
Last edited:

Thread Starter

FranciscoB

Joined Feb 8, 2014
107
Thank you so much for your time. The PIR works at 5V and outputs HIGH (3.3V) when motion is detected (model HC SR501). The LDR measures 10kOhm under daylight and around 150K Ohm when it's dark. I will try to breadboard your circuit.

PS: Earlier today, while riding my bike, I used the 1W LED 555IC blink circuit you showed me last year.
 

LowQCab

Joined Nov 6, 2012
4,314
The question regarding the Motion-Detector is whether or not the Output
will actually "sink" Current when "Off".
If it will not sink-Current,
then the 10K Resistor on its Output is a good idea for reliable operation.

As far as the LDR, the actual light-level, while installed and in use,
is what I was referring to.
But my guesses are probably good enough to get it working,
( 100K Trim-Pot, and 1M Hysteresis-Resistor )

The TL431 Voltage-References are cheap, and come in a small TO-92 Transistor-Package.
They conduct to Ground when any Voltage greater than exactly 2.5-Volts is applied to the "Ref" Pin.

The 1M Hysteresis Resistor makes sure that Light from the LEDs does not
get back into the LDR and cause the LEDs to flash on and off.
This makes sure that once the LEDs are switched-On,
they will not turn off until the Motion-Detector turns everything Off.
.
.
.
 

Thread Starter

FranciscoB

Joined Feb 8, 2014
107
Thank you once again for your time. I didnt known about the TL431, it looks like it's working simultaneously as a comparator and a mosfet. Looking at its datasheet, it seems to be a very versatile IC and it´s only 0.40 Euro here in Portugal. I will order a few and experiment.

Before reading your reply, I put together this circuit on Falstad simulator, which seems to work - at least in theory.

Just to clarify, the LED I'll be using has it's own driver. I need to find an adequate p-mosfet to switch it. The LED works at 12V with a constant current of 900mA.
 

Attachments

LowQCab

Joined Nov 6, 2012
4,314
Here's a PFET with very conservative Specs, which will be appropriate for many different projects.
It has a very low Rds/On-Resistance of ~0.020 Ohms,
( this is about 1/10th of the average Rds/On of most common PFETs ),
so it will run cool, and not need a Heat-Sink in many cases.
This is, of course, if You are careful to Switch it hard-On, and hard-Off,
with very little time spent in "in-between" states.

DigiKey has ~640 of them for ~$3.20-each, ~$2.86-each for 10 of them.
https://www.digikey.com/en/products/detail/vishay-siliconix/SUP53P06-20-E3/2623103
.
.
.
 
Top