I'd like to use an Arduino to change the voltage powering a 20W 12V cob LED. This is just a bare COB LED. AT 12V, it consumes less than 2A. I'd like to control the voltage with a precision of about 0.2V steps, and have not very noticeable flicker if PWM is involved. Being able to complete cutoff power to LED is also desired.
What kind of hardware can I use to do this? Some kind of higher power voltage regulator? I have some perf boards, and was hoping to be able to put it together without having to go out and get custom PCBs. So hoping to be able to use through-hole components, or even better if modules are cheaply available to has most things put together and I just have to add the Arduino.
I see cheap LED dimmers for 12V LEDs on Amazon. Something like this. I wonder how they control the voltage?
Consider studying electricity and electronics. A short, two year program will teach you enough to safely detect AC, smooth puled DC, and regulate the DC output. You will need to do the work.
Leds are current controlled.
So the COB or the amazon thingy will be a current controller...
For power led that is usually done with a mosfet and an inductor controlled with pwm.
Not really difficult, but if it runs from 220VAC it can be pretty dangerous to build yourself.
Not a big problem. As indicated by @build_1971, LEDs are current-driven devices, not voltage-controlled devices. You can control the LED with an Arduino (almost any model will work), an N-Channel MOSFET, two resistors, and an optional diode.
This circuit is straightforward and commonly used. Although the diagram may depict a motor instead of your COB LED, the circuit design is identical. Here's how it works:
Power Connection:
The positive side of the COB LED should be connected to your 12V power supply.
R1 (Current Limiting Resistor:
This resistor limits the current flowing into the MOSFET gate from the Arduino during switching.
R2 (Pull-Down Resistor):
This ensures the MOSFET remains off unless the Arduino actively drives it on. During reset or when the Arduino pin is floating, R2 prevents the MOSFET from partially turning on. Without this, the MOSFET could overheat and fail, especially under larger loads.
Optional Flyback Diode:
If there’s any inductive load in the circuit, a flyback diode should be added to protect the MOSFET from voltage spikes. This isn’t strictly necessary for a COB LED. If the wire leads are long it may be required.