Electrical – Very dim RGB LED strip when using MOSFET

arduinomosfet-driverrgb

I am trying to run an RGB LED strip using an ESP32 but I cannot get it to full brightness. Here is what I've done:

I started with a diffused RGB LED and a simple ESP32 sketch. This worked how it should. I was able to send a hex color code and varied the color of the LED correctly.

I then bought the REG LED strip above and some T220 mosfets (Datasheet) along with a 12V 6A power supply. I followed this example wiring. My ESP32 is powered by micro USB and the LED is powered by the 12+ from the power supply. The ground is tied to each MOSFET and the ground on the ESP32.

So using the same sketch I can vary the color correctly but they never get near full brightness. I.e. if I ground R, G, or B directly I get a nice bright pure color. However using the schematic I get maybe 10% light output? So I can send it FF0000 and get just the red but its barely lit, 00FF00 and just green dimly lit, 0000FF blue same thing.

What could be wrong or where can I test? I have a good multimeter but I'm not sure what I should be looking for. I pulled it all apart and went back to the diffused RGB LED and it is full brightness how it should be running off the ESP32 directly so I'm assuming the addition of the MOSFET's are the issue…like they are not being told to go full open (drain?). Or they can't react fast enough to the PWM on the ESP32?

Oh, and they do vary between 00 and FF so if I send #400040 I get a little blue and red. If I send #FF00FF I get more blue and red but still maybe 10 – 15% total instead of 100%.

Best Answer

The threshold voltage of the FET you linked is typically 3V, and can get up to 4V:

enter image description here

Which means that with the ESP32s GPIO you are not guaranteed to fully turn them on.

Try connecting the gate of a FET to 5V and see if the strips light up correctly (disconnect the ESP32s GPIO first).

If that solves the problem then you have 2 options:

1 - get a FET that is guaranteed to fully turn on at 3.3V (try looking for a Threshold voltage of around 2V)

2 - use something to drive the FETs gate to a proper voltage. A level shifter or a discrete transistor setup to drive the FETs gate, for example.

If that doesn't solve the problem, then the issue is something else.

p.s.: GND is not -12V