I have relay conected with arduino and high voltage bulb, now how can I control voltage to fade in and out bulb? I know that a relay is an on off device so maybe a triac or IGBT would be needed?Would an optpcoupler be good for isolation? Should I use a PWM output on the arduino?
Electronic – arduino – How to fade in and out light bulb(220V) (Arduino)
arduinorelay
Related Topic
- Electronic – arduino – How to switch a 220V AC electric bulb using a relay through Arduino
- Electronic – arduino – Dimmer effect (fade) on 12v LED using transistor and Arduino
- Electronic – arduino – Modify PWM controlled 230v incandescent bulb dimmer circuit
- Electronic – arduino – How to use an Arduino to turn a supply voltage to another device on and off
- Electronic – Arduino To Control Light Intensity
- Electronic – arduino – 220v universal motor Arduino control
- Electronic – arduino – Advice on Arduino project for smart light bulb planning
Best Answer
With a relay? You can't.
The relay contacts are either open (lamp fully off) or closed (lamp fully on) and can't switch a relay fast enough to give a dimming effect.
simulate this circuit – Schematic created using CircuitLab
What you're looking for is a triac controlled dimmer.
simulate this circuit
In this case an opto-coupled triac is used. Your micro would switch the LED D1 on at the appropriate point in the mains half-cycle turning on the triac. The triac stays on until the next zero-cross of the mains and then turns off. At 100 (50 Hz) or 120 (60 Hz) half-waves per second the flicker is not noticeable.
Your code would have to monitor the mains zero-cross somehow, ramp the delay in triggering the triac and pulse the optoisolator at the right time. Plenty of examples on a web search.