2 wire led strip to Arduino

Hello, I am just starting to explore with Arduino and im having my first barrier.

I have a uv led light strip with 2 wires (black and red), I want to be able to create a fade out effect on the less using an Arduino one.
I saw different tutorials but they are always using 3 wired led strips. So my question is what do I need to build the circuit? Since there is no data cable.
Im planning to power the circuit with a 12 v adaptor that is going to be plugged into the Arduino.

Thank you for your help.

Pablo

Two wires is a plain single colour strip.

You need a logic level mosfet and two resistors to control/dim this strip.

Strip(+) to power supply(+).
Strip(-) to drain of mosfet.
Source of mosfet to power supply(-) and Arduino ground.
220ohm resistor from PWM pin to gate of mosfet.
10k resistor from PWM pin to Arduino ground.
Leo..

^^ That'll do it.

Use the LED fade example to see how a simple fade is done with delay and for loop. Alter to your liking.

And if you want to fade without blocking and with neat gamma correction, have a look at FadeLed :slight_smile: