Dark sensor circuit using LM393 question.... unstable OFF/ON... flickering

sghioto

Joined Dec 31, 2017
8,634
Will need diode D1 in series with the digital input to block the 12 volts on pin1 of the LM393.
Pullup resistor required on the digital input pin or enable a pullup in the code.
The PIR is read when the digital pin is LOW which happens when the LDR triggers the LM393.
Note the arrangement of R1.
1768696662003.png
 
Last edited:

Thread Starter

johnaustinkaty

Joined Jul 16, 2021
284
Will need diode D1 in series with the digital input to block the 12 volts on pin1 of the LM393.
Pullup resistor required on the digital input pin or enable a pullup in the code.
The PIR is read when the digital pin is LOW which happens when the LDR triggers the LM393.
Note the arrangement of R1.
View attachment 362267
Fantastic!! You and eetech00 are both on board with this. I'll re-post my schematic shortly. Will the pull up be a 1k to 5v?
Any suggestion for the diode to use?
 

Thread Starter

johnaustinkaty

Joined Jul 16, 2021
284
I also added a circuit for a low battery function using the LM393 that will ultimately blink the RA rapidly for several seconds when battery is below 11v.
Resistor size is not critical at this point as I will choose and place them myself.

1768774311236.png
 

sghioto

Joined Dec 31, 2017
8,634
That won't work as the reference voltage drops as the battery voltage drops.
Configure using the 5 volt regulator as the source.
Notice pins 5 and 6 reversed from your schematic.
1768776771315.png
 
Last edited:
Top