LDRs have few 10KOhm at bright light and increase resistance into the MOhm range at dark.
Using an OpAmp as comparator having the circuit turn on an LED the non-inverting input must have a higher voltage than the inverting, thus switching the output high which in turn loads the gate of the MosFet and makes the transistor conduct.
The 10K pulldown resistor at the OpAmp output is a pull down resistor for fast gate discharge when the circuit turns off.
yikes something happened last night when looking with the scope.. I went to change the way the resistor was and I turned the pot to adjust and spark and smoke.. and if you turn it full range it causes my power supply to short.
That was weird..
not sure yet if it effected the lm339 but I picked up an extra just in case and I picked up 2 replacement potentiometers.
to be 100% sure the gate is from the 339 output with the resistor, the drain goes to one side of the coil which also has a relay and the source goes to the common?
Where I get confused at is after the pullup resistor it should go to the coil, no?