Using PWM dimming through relay?

I have 8 LEDs wired up to a 19V power supply(a laptop adapter). I was wondering if I could dim the LEDs by wiring them to a relay controlled by the arduino, and then just use PWM to dim. Can I do this?

You could, but you are going to need a power transistor or mosfet to handle the current requirements; when you say you have them "wired up", how exactly do you have them wired up?

It's a pretty simple set up. I have two circuits, 4 LEDs each, in series, 3.7V supplied to one and then 3.2 or 3.1V to the other. Both circuits are powered by the 19VDC/3.15A lap top adapter connected to the mains.

Not a PWM as you are thinking. A relay is a fairly slow device. It may not survive rapid switching but it might work if you use it and a capacitor. You turn it on briefly and the capacitor charges and then discharges into the LEDs. The longer it's on the brighter. A current limiting resistor will be needed just in case.

It would be better to use PWM and a transistor rated at 33.5V (19*1.75) and 8*0.025A*1.75=0.35A i.e. 350ma. A 2N2222 should do this well as it's rated at 40V and .6 to 1a depending on manufacturer. With a current limiting resistor either for the array or better for each LED you should do ok.

I picked the transistor with 75 percent over rating. 2N2222 transistors are cheap. You can find some with various part numbers in older electronics that can be reused if you can find a datasheet or info about it online.

This will help with hooking a transistor up to the arduino. The same transistor can drive 8 LEDs with 8 resistors in parallel just fine. Just calculate R1 for your LEDs.

no, relay will not work, use the transistor

How about the solid state relay?

Oki doki. I was just going for ease. I still need to learn how to make a transistor switch, and then put one together.

Could I possibly use a digital potentiometer to dim my LEDs. I dont need them to gradually fade out. I'm trying to light up a reef tank, so PWM isnt optimal as corals need continuous illumination. I mean a graded change in the light would be just dandy.