Help with fade in/out led stripe

Hi everyone,

I'm trying to design a project using an RC circuit to create a fade-in/fade-out effect for a COB LED strip, but I can't seem to get it working correctly.

I've spent several days tweaking the circuit in easyeda and trying to simulate it, but I’m not getting the expected results.

Circuit Specs:

  • Power Supply: 5V.
  • Trigger: A TTP223 touch sensor acts as the switch to open/close the circuit.

I understand this could be done via PWM, but I cannot use a microcontroller in this specific part of the circuit.

What I’m looking for:

  • Fast Response: I want the initial delay when pressing the button to be very low (the LED should start lighting up almost immediately).
  • Fade-In Effect: I want a noticeable fade-in lasting about 1 second (though I’m open to suggestions).
  • Fade-Out: I don't have a strong preference—a 1-second fade-out or an instant shut-off both work for me.

The Issue: This is the first circuit I've ever designed. Currently, it isn't working well because it takes too long for enough current to reach the MOSFET gate to open it and make the LED shine.

So now I'm trying something like this (which I can't quite get to work). The idea is to use higher-value capacitors to make the curve more pronounced and thus extend that 1-second fade-in duration.

With D2, I’m trying to create a voltage divider from the main source V1 (since V3 is just a pulse source to emulate the TTP).

I want this divider to keep the circuit 'pre-charged'—very close to the MOSFET's threshold (around 1V)—so that when the TTP circuit opens, the LED starts turning on instantly and fades over the intended time.

R4 & D4 are only there to emulate the resistance of my LED strip.
There are two capacitors because I am using ceramic capacitors.
I’ve done some tests, but I’m not sure where to place another diode to make the fade-out immediate (though I don't mind if it isn't).

Are there any online resources for this circuit or any suggestions?

Thank you so much :)

TTP223 is KEY TOUCH PAD DETECTOR IC.
Datasheet:
"TTP223 datasheet(1/11 Pages) TTELEC | 1 KEY TOUCH PAD DETECTOR IC
If it is a different component, please provide the datasheet.

Yes, this is the IC that i plan to use in my circuit. I put V3 as pulse voltage source for simulate the button press. (Because i want to feed this IC with 5V i will receive 5V output)

The TTP223 can be configured as a latching/flipflop/toggle/button-press by shorting I/O to VCO.

To fade the LED, search: "RC fade circuit"

I have an RC circuit, but I'm running into an issue: the MOSFET doesn't conduct when the voltage is very low.

Consequently, there is a delay before it starts conducting while waiting for the voltage to exceed the threshold.

The resistor determines 'how fast' it charges and the capacitor determines 'how much' it needs to charge; therefore, to achieve a controlled and noticeable fade effect, I need a high RC constant.

This causes a 'dead time' or lag until the voltage reaches the threshold where the MOSFET begins to turn on. If I were to reduce this time simply by lowering the RC constant, the fade effect would become too fast—almost imperceptible.

That’s why I’m thinking of trying to keep the MOSFET gate always at a voltage above 0V, close to the turn-on range. Since I’m using an AO3400A, I imagine this should be around 0.7V

Do you know what range of voltage you need on the MOSFET gate to go from LEDs just off to fully on, and how linear the LED brightness is as a function of voltage between those two limits?

If you don't know, then it might be worth doing a simple test using this circuit:

The potentiometer value doesn't really matter, so long as it's not low enough to dissipate too much power.

When you do know the voltage range, and if you are satisfied that a linear voltage ramp would meet your requirements then you could move on to working out how to generate such a ramp.

Alternatively you might consider a voltage controlled current sink circuit in the place of Q1, or have a 555 voltage controlled PWM circuit driving the gate of Q1.

Hi Dave,

Im not sure, i think that i'll need 0.7V in the gate for my LED Strip starts shining, and when my Vgate is up to 4.5 my LED is fully on.

I plan to use an AO3400A MOSFET.

Im already triying with LM358N, but im having almost the same issues...

Hi, @glee26

Instead of a pulse input, see if the simulator will do a RAMP input.
That will be the only way to check your MOSFET output response.

Tom.... :smiley: :+1: :coffee: :australia:

From its data sheet

IDK how much current your LED strip takes, and hence don't know how much differece to the LED brightness would be caused by the on resistance changing from 50m Ohms to 20m Ohms.

Did you try a Vgate < 4.5? From the datasheet curve, I'd assume you wouldn't notice much difference in brightness between 2.5V and 4.5V, but I could be wrong about that as I've not actually tried it.

If I were you I'd plot apparant brightness versus gate voltage to see if a linear ramp is going to meet your requirements.

I dont find RAMP option. Im using a PULSE to simulate a touch in a TTP223 module that sends a 5V signal. What im doing wrong?

Hi Dave,

I really appreciate your help because im very lost.

I plan to use a COB LED Strip that consumes 10W per meter. I plan to use 75cm so 7.5W at 5V its around 1.5 amp.

I didn try anything because i dont have the component phisically, im creating a custom PCB, for this i want to be sure that im not doing anything wrong.

regards

I suggest you try it on a bread board before getting a PCB made. I do all of my verification using real hardware. TBH I've not put the effort into learning how to use / trusting a simulator.