Automatc lights on using ldr and mosfet at 31 volt?

Hello.

A while a go I made a super simple automatic lights on/off switch for my 4.5 volt chrismas leds (100 pieces) using a potentiometer and an ldr (gl5528) and an irlz44n mosfet.
This works great for a while now.

Recently I bought a string of 240 leds and wanted to the same but this string is using a 31volts power supply instead of 4.5 and I am stuck how to use the same construction since the voltage is way to high for the gate of the irlz44n. I have been looking for other mosfets with higher gate.source tolerance but they do not seem very common? I found some that can handle upto 30 volts but thats not enough.

I tried a setup with an extra voltage divider place after the pot/ldr but I could not turn the some of leds of completely (green ones stayed on but I am sure it was below 2 volts on the gate) and I think I turned the pot to far to zero ohms and things started smoking again.

I could of course use an arduino nano to switch the mosfet or maybe a buck converter but it feels like overkill and it needs a bigger box to put every thing in.

Any suggestions how to solve this with simple components?

I added 2 pictures of what I tried. The voltage is 31 not 36.

Happy hollidays

I can't find the LDR5528 Datasheet. Please post the dark and light resistance of this photocell.

It appears to be this one

In order to choose another mosfet you need to post the load current for the 240 led strings.
Mosfets are chosen for load current rating which you appear to have omitted (why?)

it should be obvious your voltage divider should be BEFORE the pot and LDR in order to protect it.

Also, the LDR can be incorporated in the voltage divider but the voltage divider values should be appropriate
for the LDR.
If you do the math, assuming the LDR resistance is 20k worse case: (highest light resistance=lowest light that it
responds to) (not sure what it should be for dusk)
4.5V/20000 = 0.000558A
36V/ 0.000558A= 4,444.444 ohms or, approx 4.7k, NOT 100k.
Try replacing moving the voltage divider to before the LDR and change the values to 4.7k for both resistors
Put the pot AFTER the 4.7k voltage divider and BEFORE the LDR.
The DESIGN CRITERIA is 4.5V@ 0.000225A to 1 mA.
4.5V/36V=0.125
Voltage Divider Vout=Vin*[R2/(R1+R2)]
Vin = 36V
Vout = (desired = 4.5V)
Let R2 = 680 ohms
R1 = 4700 ohms

Vout = 36*(680/(680+4700)
= 36*(0.126)
= 4.55V

R1 (upper resistor of divider) =4.7k
R2 (lower resistor) = 680 ohms
Put pot AFTER voltage divider.
Jury is still out on the mosfet but everything to the left of that should work as calculated.

4.5 V LED chains are battery operated and generally do not blink under synchronised control - individual flashing LEDs may be used.

31 Volt mains powered chains generally contain anti-parallel chains of (different colour) LEDs so that one group is activated by voltage in one direction and the other in the reverse direction. The controller module - two wires in and two wires out - implements an H-bridge with PWM to generate the various patterns.

Is this what you have and are you putting this switch before or after the controller? The latter will definitely not work!

This circuit also provides no hysteresis.

All I have to go on is "240 led lights". It doesn't say anything else about back to back leds or ac or anything else.
Not saying that you're wrong, just that there is nothing from the OP to indicate that.
You know as well as I that it is up to the OP to provide a vendor link or other reference to clarify the issue you
mention. We have not seen that so AFAIK , I do not know if that is relevant to the OP's post , although you may
turn out to be correct. I don't see we are there yet.

You should design your circuit so that mosfet has in the range of 5 to 10 volts on its gate when it is on and 0 volts when off. It should not be held in an intermediate state.

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.

Regards

Hans.

Often a Zener diode is used to limit voltage on a MOSFET Gate.

macron0:
I have been looking for other mosfets with higher gate.source tolerance but they do not seem very common? I found some that can handle upto 30 volts but thats not enough.

MOSFET gate drive voltages can be anything from a couple of volts for low-voltage logic
drive, upto 12V.

Note the gate drive voltage for your 30V example will be 12V (as determined by the Rds(on)
being given for Vgs=10V). The gate-source breakdown voltage is something you want to keep
well away from at all times as the device will fail instantly if the gate-oxide breaks down.

12V is assumed to be a 12V battery, which in practice means 10V to 14V range, so they always
give the specifications for 10V, the worst-case.

Its easy to drop voltage for your circuit using a resistor and zener diode, as the power requirements
of the pot/LDR are low. For dropping 36V to 5V at about 20mA a 5.1V zener and 1.5k 1W resistor
would work. 20mA should be enough for the LDR circuit I reckon.

BTW you want to run your LDR circuit at low-voltage ideally anyway, as self-heating in the
LDR might throw the results and it might overheat too.

"
BTW you want to run your LDR circuit at low-voltage ideally anyway, as self-heating in the
LDR might throw the results and it might overheat too"

It should be obvious that this is the reason the
voltage divider must be before the pit and LDR.
(and the divider should be the values I gave)

MOSFET gate zener diode voltage regulator can it be here somewhere bought as plug in module?

Hello every one.
Sorry for my late response.
I gave up the passive parts method and went for a nano clone ( and buck converter) to read the ldr and that switches the mosfet on or off.
I will try the zener solution for future projects. That should work. Very good advice. But after days of trying someting I thought to be so simple I lost my patience.
This way it works too. I did learn a lot from all the replies. So thank all very much for you help.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.