I have a silly question.
I want to control a 220V resistive load from arduino.
I ampify arduino pin output with a BC639, I pass the signal through opto isolator MOC3021 and I try to use a BTA12 for the load.
I failed.
I have seen a similar schematic which is:
I have made a mistake in the PCB and the connection is:
In your description you say you are using a
MOC3021 and the schematic shows a MOC3041.
These two ICs are different.
The MOC3041 has a ZeroCross circuit internally and the
the MOC3021 does not have this circuit.
The MOC3021 needs approximately 15 mA to trigger the
internal diac and consequently trigger the triac.
As the resistor in the LED of the MOC, (R1), is 1K2 and the voltage is 12V,
even if the transistor is saturated, the current will be only
10 mA. which will not be enough to trigger the diac.
Both circuits are complete nonsense, but for different reasons.
In the second, the opto-triac connects gate to MT1. There is no way to develop any voltage to actually fire the Triac.
Both circuits show a PNP transistor with emitter to 12 V and the base through a 2k2 resistor to the Arduino control pin. Since the Arduino control pin switches between 5 V and ground, the resistor sees either 7 V or 12 V and the transistor is always turned on.
If the MOC requires only 10 mA to trigger (as suggested by the 1k2 resistor "R1"), then driving it directly from an Arduino pin with a 330 Ohm resistor will work just fine. There is absolutely no need for the 12 V supply or transistor.
The designed circuit is shown on the upper side of the attached image.
I ordered a sample PCB that came as the lower one.
Is any of them correct?
Bottom does not fire the TRIAC.
BC639 is a NPN.
Sorry for the confusion. I found a similar circuit in the net and I attached it , just to focus on the TRIAC connection differences. Thank you all for your replies!