I have a project powered by a solar panel which is supposed to charge a battery and then light up an LED only when it's dark outside. I made the initial circuit using an LDR and a potentiometer and although it was a success, it had a serious drawback. The LDR in the circuit board, when placed near the LED, would sense dark and light up the LED, but then it would pick up the light from that same LED and sense it as light and turn the LED off and this would repeat in an endless loop. Since I don't want to place the circuit board with LDR far away from the circuit, I thought I should get rid of it altogether and use the solar panel itself as a light sensor.
So I modified my circuit accordingly but I need help to know whether it would work as I intended. Also I don't know which value resistor I should use for the 2N7000 MOSFET Gate.
The LED has an internal resistor so it doesn't need a series resistor in this circuit.