Light-Sensitive, Motion-Sensitive, Lighting

Thread Starter

iONic

Joined Nov 16, 2007
1,662
hi ion.
I did point out that sometimes after being powered up, the PIR On times are erratic, sometimes for a couple of minutes before it settles down.
Thats why its a bad idea to control the PIR via its power supply, ANDing the Sig and Comp output is more reliable.
E
Is the NMOSFET faulty.?
Yes, you did point that out! But with this issue, even after being powered on for hours, sometimes the LED is erratic. Thought maybe the power supply itself might be causing this, but when it is acting up(dim strobing LEDs) the supply voltage is at 12.1V. The 6V regulator that powers all but the LEDs is also steady at 6.0V. Even the voltage from gate to ground is steady at 3.29V. The 10k resistor did about as much as the 47k resistor. I'm running out of things to ponder. Even eliminated the possibility of the Indicator LED causing feedback to the comparator via the LDR and oscillating. What is curious, though, is when the motion sensor activates the LEDs via the MOSFET, it quite often starts out in this low voltage oscillation mode....and simply touching the source pin with my finger, it instantly turns on at full brightness and no oscillation!

Will likely be replacing the MOSFET soon.

UPDATE:
Q: ...ever use a cap across MOSFET, drain to Source?? Not 100% sure why I'm doing it, but it has worked on several successive tries.
CAP.PNG
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,502
Yes, you did point that out! But with this issue, even after being powered on for hours, sometimes the LED is erratic. Thought maybe the power supply itself might be causing this, but when it is acting up(dim strobing LEDs) the supply voltage is at 12.1V. The 6V regulator that powers all but the LEDs is also steady at 6.0V. Even the voltage from gate to ground is steady at 3.29V. The 10k resistor did about as much as the 47k resistor. I'm running out of things to ponder. Even eliminated the possibility of the Indicator LED causing feedback to the comparator via the LDR and oscillating. What is curious, though, is when the motion sensor activates the LEDs via the MOSFET, it quite often starts out in this low voltage oscillation mode....and simply touching the source pin with my finger, it instantly turns on at full brightness and no oscillation!

Will likely be replacing the MOSFET soon.
It may indeed be the MOSFET, one additional option would be to go back to an NPN transistor and have the transistor drive an actual relay. Then the LEDs would be either off or on, nothing in between. AND you could use more LED power if you chose to. If the system is not running on battery power then the extra power for the relay will not be a big deal.
 

Thread Starter

iONic

Joined Nov 16, 2007
1,662
It may indeed be the MOSFET, one additional option would be to go back to an NPN transistor and have the transistor drive an actual relay. Then the LEDs would be either off or on, nothing in between. AND you could use more LED power if you chose to. If the system is not running on battery power then the extra power for the relay will not be a big deal.
Well, a relay is a thought. I'll have to see what I have. Would still like to understand the WHY if the current circuit.
 

ericgibbs

Joined Jan 29, 2010
18,848
What is curious, though, is when the motion sensor activates the LEDs via the MOSFET, it quite often starts out in this low voltage oscillation mode....and simply touching the source pin with my finger, it instantly turns on at full brightness and no oscillation!
hi Ion,
An obvious point, is the Light from the LED's being 'seen' by the LDR.? This would explain a possible cause of slow oscillation.

E

Try increasing the hysteresis by reducing R3 value, say 680k
 

MisterBill2

Joined Jan 23, 2018
18,502
If there were some sort of failure of the intrinsic diode of the MOSFET that could explain the problem, or if it were connected in reverse, source and drain exchanged, that could be a problem, except that I don't think it could control at all under those conditions. So it certainly is a puzzle.
 

Thread Starter

iONic

Joined Nov 16, 2007
1,662
hi Ion,
An obvious point, is the Light from the LED's being 'seen' by the LDR.? This would explain a possible cause of slow oscillation.

E

Try increasing the hysteresis by reducing R3 value, say 680k
Yes it would. But this has been debunked. In-other-words, it was not happening. I did, however, take steps to avoid it from becoming an issue.
The backside of the LDR is pretty sensitive to light as well so I took a black marker to it to stop light from passing through. I did the same to the backside of the 3mm indicator LED. I may just relocate the LED. As it is now I only have about 12mA passing through it.

The question I really want to understand is why is the capacitor making the circuit work properly.

OOPS!
This makes a little more sense, but still not completely understanding this. The cap was NOT across Drain-Source, but rather from Gate-Source as seen below. I take it that the MOSFET will turn on and off more slowly, but is it doing something else?
This is with no resistor from gate-source.
The cap value was random...was sitting on my work bench.
Capture.PNG

I also tried using a identical NMOSFET, touching the pins to the same pins of the NMOSFET in the circuit, but the problem persisted. Not sure if a "good" MOSFET would override the effects of a "bad" one(if it is bad).

Currently, with the capacitor in place, the circuit has been operating for hours....overnight into the next day.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,502
Since the 47 MFD capacitor from gate to source appears to have solved the problem it seems to me that the probable must have been some form of electrical noise reaching the gate. That noise could have been skinny pulses that would not show up on a voltmeter but would switch on the MOSFET enough to produce a visible amount of light. Others may be able to say where the pulses were originating, I have not done an analysis to say what the source was. But feedback loops do arise and adding a capacitor to solve the problem is a simple fix. And the proof is that it works.
 

Thread Starter

iONic

Joined Nov 16, 2007
1,662
Managed to get the capacitance down to 1uF and still have the circuit perform well. I want to try an alternative power supply as this one had be placing the "inductive filter" inside the circuit housing close to the circuit. I tried wrapping the inductor thing-a-ma-jiggy in aluminum foil to no avail. This is what initially made me wonder about noise and a capacitor. Perhaps the capacitor might act similarly if I just place it across the supply??!! Will try that also.
 

MisterBill2

Joined Jan 23, 2018
18,502
Adequate power supply filtering is almost always rather important. I had not considered that the power may not be adequately filtered. YES, try a cap right across the supply. AND, note that aluminum foil provides not much shielding against magnetic fields.
 

Thread Starter

iONic

Joined Nov 16, 2007
1,662
Update:
A cap across the supply did not remove the flickering light syndrome. I replaced the MOSFET with no aid as well. Will either rebuild or just use the cap from Gate-Source.
 
Top