Need help receiving dimmable input (TRIAC In) and converting to PWM (12V PWM out)

Hello guys,

First post in the forum.

I'm planning a make over at home, where I'll have some automation-enabled dimmers (probably TRIAC-style), but for some specific reasons (color control, lamp fixture design etc) I'll be using LEDs (not LED bulbs, mind you) which work out of 12V DC.

I would like to receive the TRIAC input on the Arduino, and convert it to two channels 12V DC with PWM control - two channels because they would slowly switch colour along the day, powering a mix of two LED CCT colour temperatures (3500K and 5500K).

There are lots of topics on controlling dimmable lights with Arduino, but I have seen none talking about the opposite: dimmable input into the Arduino, for retro-compatibility reasons.

Any help would be appreciated.

Best regards

Please expand on what you want and what the signal will look like. Do you have a TRIAC circuit example you are working with?

Well a TRIAC is a sort of PWM for AC, for dimming incandescent and halogen bulbs.

Some information can be found here:

It’s not completely unlike PWM, except it’s at mains voltage, and the pulses aren’t square - they’re a portion of the mains sine wave.

It’s still a proportional ‘on’ duration to determine the lamp brightness, but I’m interested if you find any pre-made ‘compliant’ adapters.

Sorry sir, what do you mean by "pre-made 'compliant' adapters"?

I’m guessing there’s a box you can buy at your local electrical wholesaler or from ebay that will do this.

It’s a simple enough proposition, and I’m sure ‘somebody’ has wanted to do it in the past.

Just remember these two words -
SAFETY and INSURANCE

I highly doubt it. There's a chance such "adapter" might exist, but it's so niche it's not even possible to find on Google for me. At least I haven't been able to find...

Besides, such adapter would still have to be "processed" by arduino so that it would drive the two separate PWM channels. This is starting to seem like an impossible task... :confused:

There are off-the-shelf mains drivers available which are driven directly by appropriate dimmer units.
I doubt you'll find anything @12v though as most operate up around 28 to 35v output mark.
If you want to "play" with mains devices, perhaps this approach would be better given the low voltage.
Exercise care even then as some of the "el-cheapo" drivers may not be isolated supplies.

Could you point me out to a few of those units please? I think that would help a lot!

Try enquiring about something like this..
Two minutes on Giggle.

Thank you so very much!

Though not the perfect solution, I'll see what I can do with it and input it into Arduino (or go through some electronic wizardry first) and mark it as solved.

Best regards!

While we're at it, are there any 5V supplies designed to work at the "load" end of a (standardish) triac dimmer? Assume that I'd like to do something like have the dimmer setting control the NUMBER of LEDs illuminated, instead of just dimming them.

You will have to be more specific and perhaps a good idea to start your own thread.

Good question. Early in this thread I was thinking of a DIY solution with an opto coupler and series resistor. However, there may be some leakage, say via a snubber, which has to be taken into consideration. Measuring the duty cycle and switching leds would of course be trivial.