I have the following question regarding this circuit: How is the opto being used to trigger the base of the triac?The collector of the photo-transistor is connected to the base of the triac. As per my understanding of npn transistors, the current flows from collector to emitter. But in this case the collector has no power source attached to it. So how would this photo transistor provide a signal pulse to the base of the triac?
This is a cool circuit.
The power supply formed by D1, D2, C1, C2, R3 provides a semi-regulated voltage of about -14.4 Vdc. It can't supply very much current - about 5 mA continuous. That means that the opto can't be turned on continuously but instead must turn on only when needed to supply a short pulse to the gate of the triac.
Because this is a triac, it remains conducting after the gate pulse goes away so long as the current through the triac remains above the holding current.
Assuming that the reservoir cap C1 is fully charged, the peak gate current is about 55 mA. I actually consider that to be on the low side but should be fine so long as this circuit is operated at room temperature. I would expect the triac to NOT fire reliably outdoors in the winter (-30C or colder).
The reason this circuit works is that the supply voltage is negative with respect the triac's MT1 terminal. The opto emitter lead and the transistor emitter lead are both more negative than the collectors, which means that the transistors operate normally with full current gain.
The triac will conduct on both cycles of the incoming AC Mains supply so long as the gate pulses are short enough that the reservoir cap maintains close to full charge. In other words, the triac is triggered in quadrants 2 & 3: MT2 (+), Gate (-) and MT2 (-), gate (-).
When the opto turns on, T1 base is pulled to its collector, turning it on. D1 & C1 provide a negative voltage, which will flow to the gate, turning the triac on. The only thing I suspect is this will only conduct on the 1/2 cycle where a negative gate enables flow in that direction.
IIRC opto-triac drivers provide both positive & negative gate drive.