Go Down

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

Grumpy_Mike

Sorry but you seem to be too stupid to do what you are told.
There is no way you deserve to pass this assignment.
I am supprise that you have got so far with your course.

In what way is that code addressing the task of controlling ONE triac in the manner I asked you to write it?

You have had enough final warnings. I will nolonger be reading this thread.

sautech

As being pointed out previously, start by syncronizing with the mains wave.
Try Google 'zero crossing detector', and choose a circuit (I would prefer using an OP Amp)
Connect output from detector to interrupt input on processor.
Let interrupt start delay counter to send trigger signal.

Hope this is useful.

Svend

Ninonic

Thanks for coming :)
Sharing is Caring

As being pointed out previously, start by syncronizing with the mains wave.
Try Google 'zero crossing detector', and choose a circuit (I would prefer using an OP Amp)
I did it so far

Let interrupt start delay counter to send trigger signal.

Hope this is useful.

Svend
I ever think that method,
I read that on http://gammon.com.au/interrupts

there some requirement to do that
Quote
Keep it short
Don't use delay ()
Don't do serial prints
Make variables shared with the main code volatile
Variables shared with main code may need to be protected by "critical sections" (see below)
Don't try to turn interrupts off or on
As far I know,
If I use that, there two group in my code(code for writing quite long because it control three phase pulse)
Interrupt for reading input(counter), then another to writing pulse.

but if we do interrupt, the main code will wait interrupt disabled.

so it can't run at once.

how you think about that?

Go Up