High Switching - Slow Fall Times

I am trying to dim an LED strip using an Arduino. It works but I can't dim it very low. I hooked it up to an old scope and realized that the fall time measured at D (between the LED strip and the NDP6020P) is very slow (upper curve on the scope). The voltage at G on the NDP6020P is very quick (lower curve on the scope), though. Why do I see this low fall time and how can I fix it?

b1.jpg

b2.jpg

mulu:
It works but I can't dim it very low.

I hooked it up to an old scope and realized that the fall time measured at D (between the LED strip and the NDP6020P) is very slow (upper curve on the scope).

How low. 1/256 of max brightness might not be that dim for the human eye.
Use at least 12-bit dimming if you want it to dim low.

That marked knee-point is probably Vf of the three LEDs in series (~9.5-10volt).
The LED strip is basically an open circuit below that voltage. Like a zener diode.
Drain of the mosfet is basically only pulled down to 0volt with the internal resistance of the scope probe (1Megohm).
Leo..

FYI, I am not using the built-in PWM as eventually I will control about 10 LED strip lights independently with a single Arduino Uno. Since there aren't enough PWM pins I am doing this in software. In any case, as I see it the problem isn't really driving the gate of the p-channel MOSFET. Instead, it seems the voltage to the LED strip light is not going to ground fast enough.

You said that that below ~10V the LEDs are like an open circuit (each LED needs about 3V to turn on). So are you saying that once the voltage drops below 10V the LED goes completely off and I shouldn't worry that the drop off is slow anywhere below 3x3.3V=10V?

As for the probes, I don't think they have any significant influence. I can't see any difference in diming at all when they are connected of disconnected.

If you want a good looking scope picture, add a 1k resistor from p-channel drain to ground.
Won't make any difference for the LEDs though.

Why aren't you switching the LED strips low-side, with a single logic level n-channel mosfet.

Another option is a PCA9685 breakout board (Adafruit, ebay).
16 channels of 12-bit hardware PWM.
Several boards can be daisy-chained.
Uses two Arduino pins (I2C).
Leo..

mulu:
I am trying to dim an LED strip using an Arduino. It works but I can't dim it very low. I hooked it up to an old scope and realized that the fall time measured at D (between the LED strip and the NDP6020P) is very slow (upper curve on the scope). The voltage at G on the NDP6020P is very quick (lower curve on the scope), though. Why do I see this low fall time and how can I fix it?

That's perfectly OK, your LEDs are a very high impedance load once the current stops flowing, so cannot pull
the drain of the pFET down to ground much. Note that the voltage drops nice and fast from 12V to about 7V,
which is when the LED current drops to nothing... If you had measured the current waveform it would have
looked fine.

Hi,
As suggested try this;
bbb2.jpg

The 6020 switches ON and OFF due to the Gate to Source Voltage.

Because you have a 7000 supplying the gate voltage with respect to gnd, the fact that your LED strip is in the gate - source circuit of the 6020 this causes a volt drop that effects the 6020 gate - source voltage level.

Tom.. :slight_smile:

An NDP6020P seems to be a p-channel mosfet, so the above diagram is not right.
The one from post#0 is (if the source was connected to 12volt).

Just use a single n-channel logic fet.
First diagram here. Load = LED strip, and no diode needed
Leo..

Thank you for the recommendation of the PCA9685. I purchased a couple. That should eliminate my 2N7000 and the resistor that is between the Arduino and 2N7000, I believe. I will still need the NDP6020P, though.

Also thanks for the recommendation to add that additional resistor. I am not going to add it, though, as it has no practical benefit and only makes the graph on the scope look better (as you pointed out) while introducing another point of failure.

I agree that a N-channel MOSFET would make things easier. In my case I have LED strip lights in closets. These strip lights are controlled from a central location. So in most cases there are about 20-50' cable runs from the PSU/Arduino/dimmer to the lights. With low switching there would ALWAYS be 12V on the cable (well, as long as the PSU is on). With high switching there will only be 12V on the cable if the light is on AND the PSU is on. At least that is how I understand it. I know it's only 12VDC. If my reasoning doesn't make sense then please let me know.

mulu:
Thank you for the recommendation of the PCA9685. I purchased a couple. That should eliminate my 2N7000 and the resistor that is between the Arduino and 2N7000, I believe. I will still need the NDP6020P, though.

I agree that a N-channel MOSFET would make things easier. In my case I have LED strip lights in closets. These strip lights are controlled from a central location. So in most cases there are about 20-50' cable runs from the PSU/Arduino/dimmer to the lights. With low switching there would ALWAYS be 12V on the cable (well, as long as the PSU is on). With high switching there will only be 12V on the cable if the light is on AND the PSU is on. At least that is how I understand it. I know it's only 12VDC. If my reasoning doesn't make sense then please let me know.

No, can't remove the 2N7000 level shifter if you use a p-channel fet (high-side switching), because the gate of the p-channel fet needs to rise to the voltage of it's source (12volt) to turn it off properly.
PCA9685 output can't go above it's own VCC (5volt).

I understand your concern, but 12volt won't be a problem unless there is a ground near. e.g. grounded metal cabinets.

This page might also interest you.
Leo..

Leo, ah, you are right. I need to get that up to 12V. Never mind then. Well, maybe I have a future project where the PCA9585 will be useful.

I saw that page before in this thread. Maybe it was you who posted it previously. It's VERY helpful and well written. I wish I would have come across it earlier as I spent hours googling exactly this before.

Hi,
Edited circuit, note drain and source pins.
b2 (1).jpg

Tom.. :slight_smile:

b2 (1).jpg