Hello, Im trying to use a 3w led for a project, I want it to light and fade according to the movement of a servo. The code is not the problem, but I'd like to know HOW do I connect the led to the arduino, I know I need to use some kind of current driver, so I bought a current driver with an input of 85-265v and an output of 3-14V. The problem is that it has 4 cables, two for ground and positive, that would go to AC current, but in this case I imagine would go to ground and 5V on the Arduino, and two that go to negative and positive on the led. I don't know how the Arduino can read it without the extra cable (the pin number), or if I need another kind of driver. As you may noticed I know nothing about electronics, just the really basics of Arduino, so im lost. I really need your help! thanks
so I bought a current driver with an input of 85-265v and an output of 3-14V.
You need a [u]dimmable LED power supply[/u]. The industry standard is a 0-10V (or 10V PWM) control voltage, so you need an ~10V power supply and little transistor or MOSFET "booster" circuit to amplify the Arduino's 5V PWM.
...The 85-265V spec with no dimmer information is a clue that's going to try to hold constant brightness as the AC voltage varies over that wide range. (It won't work with a regular wall-switch dimmer in your house.)
but in this case I imagine would go to ground and 5V on the Arduino,
High power LEDs (1W or more) should have a constant-current power supply.
For those you can also build a constant current driver (using either a switching driver - if you're making a PCB - or a linear one if you're just tacking together breakout boards). There are dozens of switching driver IC's available with different parameters, and most of them let you dim the LED via PWM. Fewer linear ones, but there are some - AMC7140 is one of my go-to parts for driving ~3W LEDs, and it also lets you dim via PWM. It's not as efficient as a switcher, and you may need to heatsink it - but it is a viable option if efficiency isn't important; unlike switching supplies, these can be wired up with breakout boards and work (switchers are layout sensitive).
In any event, you do need an external supply; you can't pull 3W from a computer USB port, nor can you run it off external barrel jack, because the regulator on the board would overheat trying to supply that.