Page 1 of 2
Esp01 help with mosfet
Posted:
Sun Mar 11, 2018 12:45 pm
by boshkash1151
I am trying to control a led strip of 15 5mm leds through the Esp01, but the led strip is dimmed.
My configuration is as follows:
-AS1117 voltage regulator from 5v to power the esp01
- mosfet is irl540 controlled by gpio2
- gpio2 is pulled up with 10k to the 3.3v
- gpio0, rst, Chen, vcc are connected directly to 3.3v
Please advise
Re: Esp01 help with mosfet
Posted:
Wed Mar 14, 2018 5:34 pm
by btidey
What is the LED strip? What voltage are you connecting LED strip to?
The Mosfet you are using is a reasonably low threshold device which typically should turn on reasonably well with the 3.3V logic, but the data sheet only gives a RDS-On rating with a 4V gate voltage so there is no guarantee.
Re: Esp01 help with mosfet
Posted:
Fri Mar 16, 2018 4:13 am
by boshkash1151
The LED strip is a custom made strip of 15 LED rated at 20mA and 2.8V forward voltage each.
I was able to solve the problem by replacing the MOSFET which seems that it has been faulty.
I need help with making the GPIO2 boot as LOW instead of HIGH needed to boot the ESP01 in normal running mode
Thanks a lot for your help
Re: Esp01 help with mosfet
Posted:
Sun Mar 18, 2018 7:01 am
by btidey
GPIO02 has to be high during the reset period to get it to run code from the flash.
You can obviously set GPIO02 low as soon as you get into the sketch but it will be high for a few hundred millisecond until this happens.
If you want to avoid the effect on the LED strip you could consider using a p-channel MOSFET instead and reverse the LED strip logic. E.g. GPIO02 high to gate of MOSFET will mean it is off.