Id like to a dim a standard 60watt bulb. I've seen this done using the PWM of the arduino but it was connected either to a large triac or some other component. I cannot remember what. Can someone help here?
Ive searched the forums for dimmers and the likes and the results tend to suggest purchasing entire kits (DMX or the K8064) and while I imagine these are more reliable they have a larger barrier to entry (I cant get the at the local electronics parts store) so Id like to work with the simple solution which I have seen but have not found mention of on this forum. If you know of somewhere I can look, Id be grateful. thanks
(PS to moderators: google search returns more results than a search on the forum itself, fyi)
If this is temporary, and you have an RC servo lying around, you could use the servo to turn a normal dimmer switch.
hmm, might try that. thanks!
X10 (Google if necessary) is one way to do it. There are 2 ways to interface the Arduino to X10 so you could send DIM commands to the socket. It might cost about 35USD to get started, but the stuff always will come in handy.
A triac would be simpler, cheaper, quicker to implement, less safe, and less extensible - IMO.
X10 would be more stable, but I want to build from scratch, to understand why I eventually want to switch to X10. Simple over stable for now.
I think triac or a 220v solid state relay are the way i might try. Can I dim the 220v light like I would an LED: PWM? Perhaps with a capacitor or something in-between the PWM and relay?
Use a triac and opto isolator to phase switch the bulb. This will switch the bulb on for part of the AC cycle and is known as phase angle switching. However, in practice you will get large amounts of interference that can stop the micro working or make it work intermittently. This will require some filtering in the load to reduce the rate of rise of current with respect to time, known as di by dt.
Also you are playing with mains which can be fatal if you make a mistake. You would be better off if you could get one built up in a sealed unit.
but I want to build from scratch, to understand why I eventually want to switch
As others have alluded, one of the reasons for switching to a pre-built solution is to avoid fatally electrocuting yourself--that's one thing you probably don't want to understand from experience.