Triac BT138

Hi, I connect my circuit as in the image I attached it, I disconnected all terminals of Triac with MOC3021, but still the problem is appearing.
the problem is the lamp is flickering one time as soon as I put the plug in the power socket.
is there problem in the triac BT138? if no, what is the problem?

Thank you all

Triac.jpg

Hi,
Just that will not give you reliable dimming, you have to have synch wih the AC mains.

You haven't shown how you connected to the MOC3021 and the Arduino you are using.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

This will help explain how to go about phase control.

https://playground.arduino.cc/Main/ACPhaseControl

Tom... :slight_smile:

Hi Tom,
Thank you for your help, the circuit is attached, I connected pin 1 of MOC3021 with pin 4 of arduinoMega and pin 2 with ground of arduinoMega, the circuit works correctly when i set pin 4 of arduinoMega on/off.

but either I connect terminals of Triac or I disconnect its terminals with MOC3021,the problem is still appearing that when I put the plug in the power socket, immediately the lamp is flickering one time.

I'm begginer in electrical & electronic subjects,so I didn't understand when you say "you have to have synch wih the AC mains.".
I get the circuit from the internet, and I don't know if there is practical solution or there is problem with Triac.

Thank you :slight_smile:

Hi,
You need a current limit resistor between the output of the Aduino and the opto-coupler.
optores.jpg
From data, Vf = 1.2V put 30mA through it.

R = V /I = (5 - 1.2) / .03 = 126R so 120R or 180R will do the trick.

The setup you have will let you turn the lamp ON and OFF, but will not allow dimming.

Tom.. :slight_smile:

optores.jpg

I'm begginer in electrical & electronic subjects,so I didn't understand when you say "you have to have synch wih the AC mains.".

That's ONLY required for dimming. If you are not dimming, don't worry about that.

If you can't turn the light on/off with 5V, you may have fried the opto-coupler because you didn't have a resistor. It's also possible that you fried your Arduino, so just check the opto-coupler/TRIAC with 5V first (no Arduino). When that works, try it with the Arduino.

I'm begginer in electrical & electronic subjects

Since you're (apparently) not dimming, a MUCH SIMPLER alternative is a [u]Solid State Relay[/u]. (You are building a solid-state relay with the opto-coupler and TRIAC.... But your's isn't working... :frowning: )

HI,
If you take the opto out and just have the lamp and the BT138 does it still flicker?

If yes, please check you connections to the triac.

Tom... :slight_smile: