Hi All -
I’m trying to get the Arduino to control low-voltage AC loads (18v in a toy train system). My thought is to use a triac, detect the zero crossing of the AC supply, and pulse the triac for phase control.
I’ve got the zero crossing detect working, but I’m very confused about how to set up the triac, since nearly all examples I find involve optocouplers and mains voltages. I know that the commercially available toy train products drive triacs directly from microcontrollers. Some of them use this this triac, which I’m using for my experiments.
Figure 3 of this application note seems to suggest that the microcontroller Vcc should be connected to the AC line, and no connection to microcontroller ground. Does it also indicate that a LOW pulse to the gate turns on the triac?? It also doesn’t say anything about where the load is placed relative to the triac - elsewhere I have read that it matters. I have a feeling the application note is presuming more knowledge than I have.
If it matters, the Arduino will in the final application be powered from a supply drawing from the AC line (bridge rectifier + 7805 or switching module).
If anyone can tell me exactly how the triac, AC supply, and load should be connected, I’d be very obliged!