Go Down

Topic: Set Firing Angle TRIAC using optocoupler with PWM (Read 12428 times) previous topic - next topic

Ninonic

Good afternoon....
I decide to control TRIAC with PWM signal via opto coupler

so.. I watched this video...
Firing angle TRIAC control

Look like very simple,
but when I did that...
the result not like we have expected.



the cutted voltage not cleared to zero

my circuit :


to create the trigger pulse, I just use simple "blink" program which that I can manage pulse delay freely.

why this happen?
What I suppose to do?

be80be

Pwm doesn't work well it's like a hit and miss kind of thing without reading the zero cross that's not to say it can't be done but to work well you need to not fire the triac till it shifts from zero so you still need to no where zero is and delay the firing. 

Grumpy_Mike

Well I would say you can't do it with PWM because it is not synchronised with the zero crossing.

raschemmel

So did you use the push button to adjust the firing angle ?

Grumpy_Mike

Also in that blurred out part you have a direct connection to one side of the mains!

That could be fatal, don't do it.

MrAl

Good afternoon....
I decide to control TRIAC with PWM signal via opto coupler

so.. I watched this video...
Firing angle TRIAC control

Look like very simple,
but when I did that...
the result not like we have expected.



the cutted voltage not cleared to zero

my circuit :


to create the trigger pulse, I just use simple "blink" program which that I can manage pulse delay freely.

why this happen?
What I suppose to do?

Hello there,

First off it looks like you dont have the triac connected properly.  The triac two main terminals need to be connected in SERIES with the load, and i dont even see a load anywhere in that schematic.  I see a snubber, but no load.  The way the triac is connected in the schematic is such that when it turns on it shorts out the mains supply, which is not good and not the way it should be connected because after all you want to control the power in the LOAD, not short out the mains supply.
Also, that 10k resistor for R2 may be too high depending on what triac you are using.

So start by connecting a load in series with the triac, as that would be what you are turning on and off anyway.  It looks like you have some sort of sync, but make sure it is in the right place in time relative to the sine wave.


Satbeginner

#6
Jul 23, 2016, 02:47 pm Last Edit: Jul 23, 2016, 03:37 pm by Satbeginner
Hi,


I have build a Arduino based and controllable dimmer.

And yes, you do need a (Opto isolated) trigger at zero-crossing into the Arduino, and again opto-isolated, a duration changed firing pulse to the Triac.


Attached you find my code and schematic's. (Arduino IDE and TinyCad format)
I control the amount of power going into our water-heater to avoid feeding our surplus Solar energy back into the grid.

In short: We have a Wattson (They are out of business now) wireless solar power-meter.
This unit show by means of a green LED if there is surplus or not.

I use this LED-signal to (wireless) to control an Arduino based 'dimmer' to step-up or step-down so all the surplus energy is used in our waterheater.

So, the Wattson is connected with my 'transmitter'.
And the 'receiver' is also the dimmer controller.

I did put a lot of comments in the code, so maybe it is helpfull.


Un saludo,

Satbeginner
Hi, I am just discovering programming.

runaway_pancake

"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

Ninonic

I so glad for many people come here
First of all, Thanks everyone

Pwm doesn't work well it's like a hit and miss kind of thing without reading the zero cross that's not to say it can't be done but to work well you need to not fire the triac till it shifts from zero so you still need to no where zero is and delay the firing.  
Well I would say you can't do it with PWM because it is not synchronised with the zero crossing.
did you watch the video? Is it PWM? right?

As far I know PWM can't trigger directly, thats why we use MOC optocoupler, and ya I know. I need manage delay so then TRIAC's gate pulse sync with the main voltage phase & frequency.
my plan is using osciloscope, read signal, generate delay and sync manually. ya too conventional, and too hard too. Do you have better idea? Thanks :D


Also in that blurred out part you have a direct connection to one side of the mains!

That could be fatal, don't do it.
Actually blurred area are my another experiment(previous), lets say it LCD to display time/div or volt/div... and reading pulse In to arduino, but still in use. I want focus to control firing TRIAC, so thats why
Is it still fatal ?


Hello there,

First off it looks like you dont have the triac connected properly.  The triac two main terminals need to be connected in SERIES with the load, and i dont even see a load anywhere in that schematic.  I see a snubber, but no load.  The way the triac is connected in the schematic is such that when it turns on it shorts out the mains supply, which is not good and not the way it should be connected because after all you want to control the power in the LOAD, not short out the mains supply.
Also, that 10k resistor for R2 may be too high depending on what triac you are using.

So start by connecting a load in series with the triac, as that would be what you are turning on and off anyway.  It looks like you have some sort of sync, but make sure it is in the right place in time relative to the sine wave.

SHARP !!!
I just replace 10k with 150. then I connect lamp series next to TRIAC. and look like I cut all positive cycle. Just negative half wave come out, I tried to vary the delay, but still not work. need to sync it !!!

Hi,

I have build a Arduino based and controllable dimmer.

And yes, you do need a (Opto isolated) trigger at zero-crossing into the Arduino, and again opto-isolated, a duration changed firing pulse to the Triac.

Attached you find my code and schematic's. (Arduino IDE and TinyCad format)
I control the amount of power going into our water-heater to avoid feeding our surplus Solar energy back into the grid.

In short: We have a Wattson (They are out of business now) wireless solar power-meter.
This unit show by means of a green LED if there is surplus or not.

So, the Wattson is connected with my 'transmitter'.
And the 'receiver' is also the dimmer controller.

I did put a lot of comments in the code, so maybe it is helpfull.

Un saludo,

Satbeginner
WOW, Thanks You :D
I will look and learn for that, Salute :D

Thanks, that so kind

http://incredulist.blogspot.com/2012/11/ac-phase-control-triacs.html

Thanks Sir. I will read it carefully :)

Grumpy_Mike

Quote
did you watch the video? Is it PWM? right?
I did watch the video. It is NOT a PWM signal.

Quote
Actually blurred area are my another experiment(previous), lets say it LCD to display time/div or volt/div... and reading pulse In to arduino, but still in use. I want focus to control firing TRIAC, so thats why
Is it still fatal ?
It is hard to say because it is blurred and you can not see where it is going. Do not post schematics that are not what you have or are not true. Yes if you have connected mains directly to outside the isolated area it is fatal.

raschemmel

Quote
I did watch the video. It is NOT a PWM signal.
No, it is not. It is a triac gate trigger pulse and the width of that pulse is not important. It is the moment in time that it occurs that matters.

Pwm is not necessary to control the triac and wouldn't do any good anyway.

MrAl

Hi again,

Actually the width of the trigger pulse is important in some respects and so has to be payed attention to also.

First, if the pulse is too narrow it will not get the triac to actually latch 'on'.  This will vary for different triacs but there will be a minimum pulse width for reliable operation.

Second, if the pulse is too wide then it will cause a retriggering for low conduction angles so the entire half wave for that half cycle will appear on the output rather than just a tiny portion of the end of the last half cycle.
To avoid this there has to be a maximum 'delay' time that is equal to the half cycle time minus the pulse width time, minus a little more for safety.
So for example if the half cycle time was 10ms and the pulse width was 1ms, then the max delay should be 9ms minus a little more to cover slight variations in the line frequency half cycle period.

Also yes, the pulses must be synced to the line zero crossing or else it will be random and probably disruptive to the device being powered but there is also a second mode of operation that is not as critical.
This second mode is where several full cycles are allowed to pass unchanged, and then several full cycles are not allowed to pass at all.  This mode of operation does not regulate based on sub cycle switching but rather multiple cycle switching.  This does not always work but for some applications it seems very natural.  For example, many soldering iron stations use multiple cycle switching instead of sub cycle switching in order to regulate the temperature of the soldering iron.

Ninonic

I did watch the video. It is NOT a PWM signal.
No, it is not. It is a triac gate trigger pulse and the width of that pulse is not important. It is the moment in time that it occurs that matters.

Pwm is not necessary to control the triac and wouldn't do any good anyway.
Seems like I miss understood about PWM.
PWM (pulse Width Modulator) which in arduino consist of 0 - 1024 that for generate voltage around 0 - 5.

Ok, actually I using TRIAC trigger pulse(not PWM, I miss understood the name about it) in my program like

Code: [Select]

delay(2);
digitalWrite(13,HIGH);
delay(1);
digitalWrite(13,LOW);
delay(9);


I using 50 Hz main, so it around 0.02 s or 20 ms per cycle,
so I triggered in 10 ms per pulse, next need to sync the pulse to main.
could be research for default delay (early delay) by looking wave in osciloscope.

Hi again,

Actually the width of the trigger pulse is important in some respects and so has to be payed attention to also.

First, if the pulse is too narrow it will not get the triac to actually latch 'on'.  This will vary for different triacs but there will be a minimum pulse width for reliable operation.

Second, if the pulse is too wide then it will cause a retriggering for low conduction angles so the entire half wave for that half cycle will appear on the output rather than just a tiny portion of the end of the last half cycle.

I looked TRIAC BT 136 datasheet, it need 0,3 ms to trigger TRIAC.
So if I make 1ms pulse, I think that good enough for that.

then second, ya... its around 10ms per pulse. but need sync it first the I can configure delay for firing, is it?

OK next point,
Is about the result
I can't cut clear when firing a TRIAC like video did.
like pic in osciloscope before, I tried fix the circuit, but still not work. any better idea?

MrAl

Seems like I miss understood about PWM.
PWM (pulse Width Modulator) which in arduino consist of 0 - 1024 that for generate voltage around 0 - 5.

Ok, actually I using TRIAC trigger pulse(not PWM, I miss understood the name about it) in my program like

Code: [Select]

delay(2);
digitalWrite(13,HIGH);
delay(1);
digitalWrite(13,LOW);
delay(9);


I using 50 Hz main, so it around 0.02 s or 20 ms per cycle,
so I triggered in 10 ms per pulse, next need to sync the pulse to main.
could be research for default delay (early delay) by looking wave in osciloscope.

I looked TRIAC BT 136 datasheet, it need 0,3 ms to trigger TRIAC.
So if I make 1ms pulse, I think that good enough for that.

then second, ya... its around 10ms per pulse. but need sync it first the I can configure delay for firing, is it?

OK next point,
Is about the result
I can't cut clear when firing a TRIAC like video did.
like pic in osciloscope before, I tried fix the circuit, but still not work. any better idea?
Hi,

I am not sure what you are saying here.

If you use a 1ms pulse width that is probably ok.  However, if you do that then you can not use a 10ms delay you must use less than 9ms.

So typically you would use a very small delay like 10us up to the max of 9ms.
A delay of 10us would turn on almost fully, while 9ms would be almost completely off.
A delay of 5ms would give you roughly a 1/4 cycle, where the wave would jump up suddenly to the peak, then curve down like the second 1/4 cycle of a sine wave.

So try a delay of 5ms and see if you can get that 1/4 cycle to show up.  You should get that 1/4 cycle twice per full cycle of the 50Hz line.

The power into a resistive load will be about 1/2 of the full power when triggering for 1/4 cycle on both positive and negative half cycles.  The power will go up if triggering sooner (less delay) and go down if triggering later (more delay).

If the triac does not seem to be able to be turned off at all, then test the  triac to make sure it is working properly.


Grumpy_Mike

Quote
but need sync it first the I can configure delay for firing, is it?
Not the best sentence ever produced in English.

You are wasting your time doing anything without synchronising the whole thing with the zero crossing.

Do not try and look at mains voltage on an oscilloscope unless you know what you are doing otherwise the whole thing will explode as it will short out the mains.

So write code to synchronise the delay with the zero crossing and post all of it. Update the schematic to one that shows what you actually have, no more no less.

Go Up