Optoisolated AC Switch (Resistive Load)


One of the first things in home automation is to be able to switch things on and off. For this, you will need to have a circuit that you can use a small DC voltage to switch on or off a much higher AC voltage. In this example, we have provided a schematic to switch a 120-240VAC power with as little as a 3.3v DC signal. You can also use 5v DC, but since we run it from a Pi, that’s how we tested it.With this schematic, please be mindful of the fact that portions are constantly at AC mains voltage potential and can cause serious injury or death if touched. Always ensure that the power is disconnected before touching any part of this circuit and take precautions with fuses and earthing when dealing with mains potential.

For our TRIAC box, we hooked 4 of these switches to a common mains socket and individually fused each switch to ensure good protection. The TRIACs used are rated at much higher values that are actually needed. They are also properly heatsinked and utilise thermal paste to dissipate the heat.

Later we will tell you how to use the Raspberry Pi to switch on a TRIAC switch like this from Python and the shell. Until then, take a look at the schematic and built circuit and see if you want to take a crack at it.

 

Optoisolated TRIAC switch schematic

Schematic for an optoisolated TRIAC switch using an MOC-3020 and a BTA16-600B TRIAC.

Assembled TRIAC switch prototype

An assembled prototype of a 4-TRIAC AC switch. Accepts a since mains in and outputs to four