I want to turn an incandescent light bulb on and off using a triac. Specifically, I made this circuit: LightBulb \ Learning \ Wiring
But instead of using the TRIAC BTA08-600C, I used an BT137-800 triac and it doesn't work, I can't switch on/off the light bulb from arduino. In rest, I followed exactly the schematics, so I used the moc3021 octocoupler.
Why it doesn't work? It will only work with that triac(BTA08-600C)? How can I be sure that I buy only triacs that are compatible with arduino?
I've succesfully made a similar circuit with an relay. But now I want to make it with a triac. And after that I want to experiment with phase control.
Indeed it is a bad move to use a breadboard when I'm playing with the AC. But I'll be extremely carefull. I just want to see that it works and I will turn it off.
You are saying that it's not working because the schematics that I followed were wrong? In that case, the triac that I used is compatible with arduino?
Post your code. IIRC, Triacs automagically turn off every cycle, and you may have some syncing issues for generating your pulses. I've had to do something similar (but not arduino) and it can be awkward and sometimes dangerous.
PS, house wiring + breadboards = flames Use solder, and lots and lots of electrical tape instead of trying to use the bread board. Breadboards are not designed to handle such voltages.
int optocouplerPin = 8; // Optocoupler anode (+) pin connected to digital pin 8
void setup()
{
pinMode(optocouplerPin, OUTPUT); // sets the digital pin as output
}
void loop()
{
digitalWrite(optocouplerPin, HIGH); // switch ON the triac
delay(1000); // waits for a second
digitalWrite(optocouplerPin, LOW); // switch OFF the triac
delay(1000); // waits for a second
}
Just to turn the light bulb on and off. No phase control, or other things.
I'm using this for 230V. And I'm testing it with an 40w incandescent bulb, at least the current is small so probably the breadboard would take, at least, a few seconds to see that it works and then I'll shut it down.
If you have a multimeter, check the voltage across the input (low-voltage) side of the opto-isolator. It should be around 2V (when turned-on). If it's somewhere around zero, or close to 5V, something is wrong. (You can check the specs to see what the forward voltage is supposed to be.)
Do you have an extra opto-isolator and an extra TRIAC to try? It's easy to burn-out parts when playing with high voltages & currents, so it's always good to have some spares.
When I was experimenting with these kinds of circuits, I tested the opto-isolator & TRIAC circuit with a 9V battery before connecting an Arduino. And as soon as it was confirmed working, I "sealed it" in heatshrink for safety. (It was built on a small perfboard.)
Why it doesn't work? It will only work with that triac(BTA08-600C)?
The only thing I can think of is gate current might be different.
I also think if you remove the opto-isolator and connect the 100 Ohm resistor between A2 and the gate(with AC power applied), the TRIAC will turn-on. But I'm NOT 100% sure you can do that without blowing the TRIAC, so do it at your own risk or do some research about how to test a TRIAC.
Or, you should be able to simulate turning-on the opto-isolator by shorting-out the opto-isolator's output (high-voltage) pins. Again, do so at your own risk.
If all else fails, you can always buy a solid state relay... You are essentially building your own solid-state relay. Building the circuit yourself if cheaper (if you don't blow-up too many parts during development & testing), but solid state relays are usually more reliable (and easier to wire-up since you only have to make 4 connections).
constantin23:
You are saying that it's not working because the schematics that I followed were wrong?
I'm saying that Line should go to MT2 and the lamp (load) should be between MT1 and Neutral. And, for the record, MT2 and MT1 are not interchangeable.
And watch out for that tab, too. It's not "ground" or "isolated" - it's MT2 (!).
constantin23:
In that case, the triac that I used is compatible with arduino?
The triac is compatible with the Opto, and that's what matters there.
Are you sure of your resistors?
Are you sure that lamp is good?
DVDdoug:
If you have a multimeter, check the voltage across the input (low-voltage) side of the opto-isolator. It should be around 2V (when turned-on). If it's somewhere around zero, or close to 5V, something is wrong. (You can check the specs to see what the forward voltage is supposed to be.)
I measured it and I got 1.25V. I also checked the forward voltage specs and they say: "Typ - 1.15V, Max - 1.5V". So it works so far. I also measured the output voltage of the opto-isolator and I got: 02.1mV. Is that fine? I tested the other opto-isolator that I have(it's also moc3021) and it showed 0(zero)mV.
Do you have an extra opto-isolator and an extra TRIAC to try? It's easy to burn-out parts when playing with high voltages & currents, so it's always good to have some spares.
Yes, I do, they are both the same type(moc and triac). But I think I will risk to do the same thing(burn-out probably) untill I find out what I'm doing wrong.
The only thing I can think of is gate current might be different.
I also think if you remove the opto-isolator and connect the 100 Ohm resistor between A2 and the gate(with AC power applied), the TRIAC will turn-on. But I'm NOT 100% sure you can do that without blowing the TRIAC, so do it at your own risk or do some research about how to test a TRIAC.
I think that it would be safer to test this circuit using a 12v transformer and a 12v incandescent lamp. I mean, the triac would still work on 12v? I know that it will only work on AC, and it would still be AC but on a much smaller voltage. The breadboard would handle it better and also safety would greatly improve.
I will try what you say. I also checked the resitors and the lamp. They are fine.
Should I continue the investigation on 12V AC? In that case, do I need to change the resistors values?
Indeed that it is what it says. But what does "less" mean? They also show the full specs in precise detail and a previous user said that the triac was compatible with the opto-isolator. But, yes, maybe they aren't. I don't know what to look for in the specs to make sure that they are compatbile. The opto with the arduino and the triac with the opto-isolator. I'm new to all this stuff...
Any advice? What triac should I buy that works with the moc3021?
I'm saying that Line should go to MT2 and the lamp (load) should be between MT1 and Neutral.
And, for the record, MT2 and MT1 are not interchangeable.
I did that and still doesn't work. I also tried on 12v AC with the same resitors and a 12v incandescent lamp and it doesn't switch the lamp. What could it be?
"Sensitive gate" is for connection to logic gates and so on, which this example is not.
"Sensitive gate" is not incompatible with non-sensitive gate drive circuitry.
constantin23:
I'm new to all this stuff...
That's not the half of it.
And this ain't blinking LEDs.
constantin23:
Any advice?
Yes, get in there with the voltmeter.
Attach a picture of your setup, with all the gory detail and arranged so that some sense can be made of it.
Here are some pictures:(I removed the AC power and the lamp)
The 2 resistors that connect to arduino ground and the moc are each 100 ohms(I didn't had one 200 ohm resistor)
The black wire from the triac is connected to A1, to A2 the blue wire + the 100ohm resistor from moc and to G the orange wire that comes from the opto-isolator.
Thanks for sharing that, but it's on 120V, I'm on 230V AC.
And still, I want to found out what I'm doing wrong here, and then I'll proceed to more complicated things, like phase control.
The resistor connected to A2 on one end is not connected to the opto on its other.
There is a yellow wire in the slot adjacent, but there's no connection that way.
Yes, that was the case, I corrected it and now it works! Thank you so much! And also thanks to the other users that tried to help me. I can't beleive that I missed it. All this time I was suspecting the triac, and it was a bad breadboard connection, pfff.
Believe it or not, this is not the first time that a "n00b" has logged on, contending that everything was right, nothing was wrong, and that it must be the parts.
Check your wiring, check it again, and then re-check it. Especially with "this stuff".
Seriously.
I did checked them, I even tried the cables, I thought that maybe some of them are broken. The problem is that I missed that one, and it was an easy one. And also when I didn't used the given triac in that schematics, it become an easy suspect for why this is not working. I think I got distracted by this. But lesson learned!