Forum: µC & Digital Electronics ESP8266 RGB LED Strip Controller

von rjhllr (Guest)

Rate this post
0 useful
not useful
Good day everyone,
I'm currently planning a project on a low-cost WiFi-enabled RGB LED 
controller and could use some help in looking over my parts list and 
general concept.
What I'm wanting to do is a build a relatively low-cost, WiFi-enabled 
RGB LED (strip) controller. In the end it should be controlled via an 
Android App which is already being developed in my free time.
For the WiFi module I want to use the infamous ESP8266 board, namely an 
The plan is to flash it with nodemcu (http://nodemcu.com/index_en.html), 
write a simple TCP server implementation which allows to manipulate 3 
GPIO pins' duty cycle over the network. I have no problems related to 
the software or the programming of either the MCU, the App or anything 
else. What I'm unsure about are the electronics involved here. I've come 
to understand that I want to use transistors or MOSFETs to drive the LED 
Strips 12v using the 3.3v logic of the ESP8266. From what I know, I 
should choose a FET that can be switched fast (requirement for PWM) and 
has a maximum gate threshold voltage below 3.3 Volts.
Based on these requirements and the availability at my supplier I've 
chosen the IRFZ44N 
(http://www.irf.com/product-info/datasheets/data/irfz44n.pdf) and I want 
to wire it directly to the three GPIO outputs of the Microcontroller. Is 
there any reason for this being a bad idea? Should I maybe add a diode? 
I don't think so since LEDs are resistive load and not inductive (so 
there shouldn't be voltage spikes or any of the likes, but I'm a layman 
when it comes to electronics, far more involved in programming..)
Please tell me if there are any pitfalls to this plan and thank you for 
taking the time to read through my plan.
- rjhllr

von stefan us (Guest)

Rate this post
0 useful
not useful
The large MOSFET transistors have a large gate capacity, usually 1nF or 
so. The direct connection to the microcontroller causes high current 
flowing when the signal changes from LOW to HIGH and vice versa.

You should check the maximum current that the microcontroller drives. 
Most microcontrollers limit the current already. For example ATmega 
controllers drive approximately 40mA on each pin but the sum of all 
currents must be below 200mA. So for an Atmega, it would be Ok to do 
that with 3 pins (3x40mA + a little other current is far below 200mA).

The Power supply must be able to deliver that current without becoming 
unstable. Your peak current on the 3,3V line will be much higher thatn 
the average current. The peak could be 100x higher than the average 

You can reduce the peak current by putting a resistor in series to the 
MOSFET's gate. But then then charge and discharge times increase and 
therefore you loose more energy in the MOSFET's which makes them warmer 
or hot.

You may use MOSFET driver chips and P-Channel mosfets. Thus you can 
drive the MOSFETS with the unstable high-voltage of the LED stripes 
while keeping the load of the 3 logic signals from the microcontroller 
at a minimum.

Last you should check the temperature in a long-time running test under 
realistic conditions.

von rjhllr (Guest)

Rate this post
0 useful
not useful
Thank you for the thorough and clear explanation Stefan,
What I was (and still am) worried about is the MOSFETs gate voltage 
threshold, according to the Typical Output characteristics graph I fear 
that it wouldn't even switch at 3v3 logic level at its gate. There is no 
line for 3v3, it starts at 4.5V.
What I thought about to make everything more stable (and make sure it 
switches) is to give the MOSFET 12v from the same PSU as the LED strips 
and switch it with another transistor, but I cannot for the love of god 
figure out which transistor type and characteristics to choose to switch 
the MOSFET more reliably.

von Touliloup (Guest)

Rate this post
0 useful
not useful

I've made a project similar to yours and present it on this website:
Don't hesitate to take or improve the design and code there. The PCB and 
code are on github and everything is available open source. The PCB can 
also directly be ordered from DirtyPCB.
I'll try to improve the site and complete it with more information, also 
adding some alternative code for whom doesn't want to use souliss 

von http://ow.ly/yp7a50x1rlh (Guest)

Rate this post
0 useful
not useful
This  internet site  is my  intake ,  very   superb   style  and perfect 
content material .


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.