Electrical – Control LED strip with MOSFET and PWM Arduino

arduinopwmtransistors

I want to control the brightness of my LED strip. In this way, I'm thinking about using a MOSFET N-channel. Can you see what I conceive below :

Circuit planned

I want to manage the Id current by shifting the Vg voltage thanks to PWM of Arduino. Can you see below my idea :

enter image description here

May I have your opinion about :

  1. Can I control Id current by shifting PWM on the pin D6 of Arduino MEGA (i.e by controlling Vg)?
  2. I have big trouble to understand MOSFET datasheet, could you help me and explain me which one could I use ?

Thank you for your help !

EDIT

I have added an example of the Vg voltage which is a PWM applied on the GATE.
Could someone says me if :

  • Does voltage on the GATE of the MOFSET (here Vg) control the current flowing between the DRAIN and the SOURCE ?
  • If yes, can I control the current flowing through the MOSFET by applying a PWM on the GATE of the MOSFET ?

Best Answer

Your circuit won't work the way you imagine. You are trying to control the DC current flowing by changing the voltage across the LED strip (I assume that the strip has inbuilt resistors for the LEDs).

While you could add extra capacitance across the gate of the FET and produce a changing Vg it will be quite difficult to control.

However if you select a PWM frequency well above any optical perception you can use the PWM to simply alter the period of time it is on compared to off.

For example, if you set the PWM frequency to say 490 Hz and have the PWM duty cycle at 50% ...then the LEDs will be about half brightness. You can then simply set the duty cycle to get the required brightness.

The Arduino has a function (analogwrite()) which does this exactly.

Read the analogwrite() documentation then follow any of the endless bouncing ball projects with a single LED to test it out.

Since you are buffering the LED strip via an inverting amplifier (the FET) the values will be inverted for you, but you should be able to handle that.