Gradually Fade ON and Fade OFF 220v LED Bulb using Arduino Uno or Nano

I always would like to develop a circuit that make an LED AC 220v bulb gradually ON and OFF when I press the switch ON/OFF either its physical or from remote trigger with a relay. In that way the room ambient can bring more dramatic lighting feels and also ease the eyes to adjust sudden ON and Off. I want the development looks like:

  1. Any LED bulb from 1watt to 60watt will slowly turn ON/OFF when switch is ON/OFF
  2. I can adjust the fade-in and fade-out time
  3. The light will turn OFF in a adjustable delay when I turn it OFF
  4. If its possible to control couple of lights with same idea by one Arduino

Can I do it with Arduino Uno or Nano? If yes, kindly guide me to the diagram, codes and if any electrical components are required.
Thank you :slight_smile:

IF your any LED bulb runs on 220 volts, then it has an internal DC power supply. It will allow fading ONLY if it is designed for fading. Not all are designed that way.
Yes, you can use an Arduino to control a solid state relay to do what you want, if the bulb allows it.

1 Like

Hi leonardbd,
possible, when the LED component is supporting it and you are using the right power electronics (like PAIL_KD7HB is explaining).

That's what devices like
shelly-dimmer2
are doing.

220V AC is dangerous. Don´t tinker around with that, if you are not absolutely aware, what you are doing.

You can start to learn how to do that by looking at the Basic Sample called Fade. The next few lessons you need based on what you said are how to use WiFi to control a remote circuit, and most important how to safely connect 220VAC devices.

Common LED bulbs are rarely more than 12watt.

Dimming a mains power LED bulb requires special bulbs and specialised and/or dangerous electronics. Why don't you start with low voltage LEDs. A Nano with a string of addressable LEDs can do what you want much safer.
Leo..

1 Like