Hello every one. Thank you very much for your replies.
I really tried to make a complete post. But I failed. sorry. I just figured that I have a 31 volt load (I should have mentioned that is was 3.6 watts) and I want to switch it off and on with a simple circuit. I choose a mosfet because it gets triggred by voltage. Maybe over kill but (I thought) easier to understand.
About the load: It is a simple string of colored leds 20 meters long and has 240 leds that are on or off nothing fancy. Ie plug it adapter in and you have light. take it out and it 's off.
It is a 31v dc adapter. 3.6 watt (multimeter shows me 29 volts)
3volt,15ma,240L. That is what is on the paper attached to the cord.
I don't know how to translate that. Ie 240 in series would be 240 x 3 volts is nothing close to the 31 volt of the adapter and in parallel it would stay 3 volt. The wiring is just 2 wires. (I have an other 240 led single color string that has the same values attached to it)
But the total power is 3.6 watt /240 = 0.015 watt per led. not mA?
My first try with a voltage divider was with a 10k/10k divider. The 100k pot was just to have a wide range to experiment with.) So Thought lets try 100k so it would have less impact on the first divider (pot/ldr)
But I just realized the divider has to be before the pot if only to prefent smoke for apearing when I turn the pot to 0 ohm in bright light and all power.
I checked this datasheet for the ldr: gs5528 GL5528 pdf, GL5528 description, GL5528 datasheets, GL5528 view ::: ALLDATASHEET ::: but I cannot make much sense of it. I seems to suggest a resistance between 10k and 20k (2nd row of 2nd table) but my multimeter shows me +- 500 ohm in current cloudy daylight and goes over 2 Mega ohm in the dark. (the meter cannot even measure it)
I add the circuit I used for the 4.5 volt 100 led string. Which was a 3XAA battery powered string which I replaced with a 4.5v adapter. This is an old style transformer type adapter which is at about 7 volt with no load and goes down to 5/4.5v with load. It is a bit weird since when the voltage on the gate gets high enough for the mosfet to let current flow the voltage drops a little and the flow should show again which raised the voltage... but it works perfect for weeks now. with only 3 parts.
@6v6gt I agree that what you suggest is the best way. How would I go about that? I have not found a way to turn things on or of at a certain voltage level so far. Suppose I want to power a nano with solarpanel the will be a prety login time spent in and intermediatestate bounceing on and off. But that's an other project.
I am going to try RASCHEMMEL's suggestions (thank you!) . and if that fails. I will just go use a buck converter and finda bigger box to put every thing in.