Bedroom Project Problem

I’m pretty sure the IRF520 can’t handle logic level switching, e.g. the 3.3v output is not enough to drive the gate open. I use IRLB8721 mosfets do switch 12v led’s with an ESP.

oh, so that is why it is flashing?

doh.

Not tested yet but I think it should work fine with 3.3V… I will test it and come back to you

Edit:
After a few googling it seems @Lichtsignaal is correct and it is not gonna work with 3.3V… I’m really sorry for my bad sketch…

Hehe, it’s not a bad sketch, in this case it’s non-correct hardware. You guys don’t wanna know how much I’ve been swearing at the stupid mosfets…

Try with an Arduino, you’ll see it’ll work perfectly on 5v

Maybe you can give a mosfet a try. Mosfets are controlled by current instead of voltage. It consumes less power to control the light.
For what I understand is a mosfet good for dimming LED lights.

that’s what i have: http://www.vishay.com/docs/91017/91017.pdf

but I need to use a better one…

just ordered 10 x IRLB8721

we’ll see how they go…

what circuitry do these need? similar to the IRF520? will i be able to put them in the IRF520 module boards that i have? they are both TO220 package…

what are you using for your setup?

It’s exactly the same, just swap them :slight_smile:

1 Like

Have not seen it mentioned yet, go have a look through this guys 'ibble, he has a very detailed write up on the theory, I’ve built a few of his circuits and they work really well.

Edit: Forgot the link

1 Like

@Dave1829, @Lichtsignaal,
Board tested using 24V at DC_Supply and the WeMos miniD1 as PWM Digital Signal (D4 to see the onboard LED dimming)…Working Fine :sunglasses:

Set up:
->Slider from 0 to 1023 at D4.
->12V DC computer fan. Really fast and noisy at 100% (24V).
Tested using a Multimeter also.

Kind regards!!!

Thanks for testing!

But led is not quite the same as motor.

I think it is the fact the psu is “constant current” type?

I’m not sure why the fan would be working with and led’s not, are you sure the fan is running at 24v? Because a 12v fan running at 24v would explode in mere minutes I think. I couldn’t manage to get it working with a ESP/Wemos at 3.3v.

Yes @Lichtsignaal, the 12V fan was running at 24V.
It was only for a few seconds, I wanted to test if with 3.3V I could manage 24V, I was a bit surprise also.
It’s not a good practice what I did (I know). Please guys, don’t do that at home!!

1 Like

No time to study the way “constant current” works but definitely this should be the starter point.

1 Like

OK, so i tried with a non-dimmable LED driver and the IRF520 module works (with WeMOS D1).

my bad, sorry for the confusion…

i will report back once i have a conclusion regarding the “constant current” stuff, as anyone searching that term is bound to end up here, lol

(it could ALSO be that the dimmable LED driver i was experimenting with was over 38VDC output, which might not be in the range of the IRF520? i dunno which part of the specs this is! i thought it was the 100V spec but not sure - link to PDF)

1 Like

thanks @Bobbo_SA but that is dimming of MAINS voltage, i am not going to play with that,

i have ordered these for that:

Right, your driver’s primary input was AC hence the suggestion.

Edit-; Not applicable ZCD processing offloaded to the MPDM board anyway.

1 Like