Simple switch to turn on AC light...

I need a very simple circuit to turn off and on a 7watt (a/c) night light bulb. I figure i can just use a triac, but there are many different types it seems. Without using a relay what would be the easiest way to do this to get an UNO to turn the a/c cicruit on and off (no dimming needed). My knowledge of triacs/optocouplers is limited. I thought I'd just be able to hook the a/c and light directly to the triac, correct? Where i'm confused is that the triac uses a photodiode, and a diode only allows current to flow in one direction, so will this work with a/c? Or is this what a zero cross triac is for? Please enlighten me.

Thanks!

Why not use a transistor and some bright LEDs instead? Use a couple RGB LEDs, can fade in & out, change color, etc. Run the whole thing from a 5V wallwart.

The [u]MOC3010[/u] is an example of an opto-coupler designed to drive a TRIAC. The datasheet shows how to connect it.

Or, you might want to buy a solid state relay (which has all of this stuff built-in).

I thought I'd just be able to hook the a/c and light directly to the triac, correct?

Yes, but you also need to connect the TRIACs gate.

Where i'm confused is that the triac uses a photodiode, and a diode only allows current to flow in one direction...

There is no photodiode in the TRIAC. The photo-device (similar to a low-power TRIAC) is in the opto-isolator. The LED in the opto-isolator is DC, but the photo-triggered device/switch is AC (DC-in, AC-out).

TRIACs work with AC. The gate can be controlled by AC or DC. There is no photodiode in a TRIAC. (An SCR is similar to a TRIAC, but current only flows in one direction in the triac.

The opto-isolator keeps you and the Arduino safely isolated from the dangerous line voltage. Don't skip the opto-isolator!

Or is this what a zero cross triac is for?

Again, it's the opto-isolator that's zero-crossing. A zero-crossing device is "cleaner" but you can't use it for dimming.

If you decide to build this yourself, I recommend that you get a 12VAC transformer and a 12V lamp to use for testing & debugging purposes. Once everything is working, you test it with lethal line voltage.

http://www.powerswitchtail.com/Pages/default.aspx

http://www.powerswitchtail.com/Pages/PowerSSRTail.aspx

If you decide to build this yourself, I recommend that you get a 12VAC transformer and a 12V lamp to use for testing & debugging purposes. Once everything is working, you test it with lethal line voltage.

Working with mains voltages is not advisable for anyone who has no previous experience and with no supervision. Issues like proper earthing and circuit protection need also to be addressed.

Thank you for the advice!