Arduino Forum

Using Arduino => Project Guidance => Topic started by: dgueorguiev on Nov 28, 2017, 06:49 am

Title: rectified AC phase control
Post by: dgueorguiev on Nov 28, 2017, 06:49 am
I need to power a coil with  variable DC pulses of 150-200V which have to be wide 2ms in synchronous with   the picks  of standard wave of AC( 60 Hz 120V)which is the power for second coil . I have arduino uno genuino  and used two triacs in line with zero crossing reference ,use rectified AC from up transformer  ,but i have not susses with programing the arduino. May be have flows in the schematic too. I am mechanical engineer and have little knowledge in electronics. I really need help ! See attachment
Title: Re: rectified AC phase control
Post by: TomGeorge on Nov 28, 2017, 09:24 am
Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html (http://forum.arduino.cc/index.php/topic,148850.0.html) 

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
We need to see your circuit, a picture is worth a thousand words.
Please include power supply and component labels.

Thanks.. Tom.. :)
Title: Re: rectified AC phase control
Post by: DrDiettrich on Nov 28, 2017, 10:24 am
DC cannot be controlled by triacs.
Title: Re: rectified AC phase control
Post by: TomGeorge on Nov 28, 2017, 10:34 am
Hi,

I think the OP is using rectified AC, so it is pulsed DC.
But I think the Traic controlling the AC primary.

A circuit diagram will help... :)


Tom... :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 02, 2017, 08:26 am
I think I have to use only one triac , but to be able to open and close the gate of the triac at the pick of the AC sinusoida .LIke if t is 8.333 ms(half wave) t1=1/3 t  and t2=2/3 t .After I have the wave cut I can rectified and supply to my coil.
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 02, 2017, 08:30 am
Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
We need to see your circuit, a picture is worth a thousand words.
Please include power supply and component labels.

It may help if you look at this page;

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

Thanks.. Tom.. :)
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 02, 2017, 08:50 am
In this case I'd be more interested in a sketch of the expected waveforms and timing required. That I can't really imagine from the description.

Pulsed DC you would at least in theory be able to switch with a triac but only if the zero is zero enough, so to say: stray capacitance and inductance in your circuit may cause a large enough current to flow when the DC is supposed to be zero, to keep the triac on. In case of AC, with the voltage crossing zero, it's guaranteed to switch off.

Probably a triac to switch the AC, and a MOSFET to switch the DC where the Arduino takes care of the whole sequence. A 2 ms pulse is no problem for it to produce, following a trigger from a zero crossing detection, possibly with a specific delay.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 02, 2017, 04:35 pm
I add a picture of my schematic on previous posting. I hope it will help and i will attach here to.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 02, 2017, 05:08 pm
OP's image:
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=235755)
Unfortunately too low resolution to be properly readable.

Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 02, 2017, 06:05 pm
Hi,
Your picture is not high enough in resolution to read everything you have written.

Did you look at this page?

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


Tom.. :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 02, 2017, 08:33 pm
Yes i look at  (https://playground.arduino.cc/Main/ACPhaseControl). But it is not clear how they get zero-crossing  signal from ( H11AA1). And I need to have triac open 3ms after zero-cross and close at 5.33ms after same crossing zero, for the remaining 3ms of half wave triac has to be closed. I am lost !.
Title: Re: rectified AC phase control
Post by: Wawa on Dec 02, 2017, 08:47 pm
I need to have triac open 3ms after zero-cross and close at 5.33ms after same crossing zero...
Not sure what you're trying to do, but you can't switch a triac off after you have turned it on.
A triac only turns off in the next zero crossing.
Leo..
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 03, 2017, 01:28 am
But it is not clear how they get zero-crossing  signal from ( H11AA1). 
The signal out of the H11 is a 5V square wave that changes state on each of the AC input crossing points.
Tom... :)
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 03, 2017, 06:18 am
As I understand you try to switch the DC side. In that case, if you replace the TRIAC with a MOSFET you can switch it on and off. A TRIAC switches itself off upon zero crossing, you can't switch it off any other way.

Need better image of that schematic to see what you're trying to do. Again an image of the expected waveform would be very helpful in this case.

Basically, with the MOSFET approach, what you need to do:

Code: [Select]

ISR () { // linked to a CHANGE on the zero crossing signal.
  zeroCrossed = micros(); // Record the microsecond time.
  zeroDetected = true;
}

loop() {
  if (micros() - zeroCrossed >= 5330) {
    // switch off MOSFET
  else if (micros() - zeroCrossed >= 3000 && zeroDetected) {
    zeroDetected = false; // ensure this can run only once per detected interrupt.
    // switch on MOSFET
  }
}


If you have more to do in your loop() and you're likely to be a little late in timing, you could use a timer interrupt for this.

When a zero crossing is detected, set the timer at 3000 us, when it's triggered set a new timer at 2330 us later and switch on the MOSFET, the next time switch off the MOSFET and reset the timer. Use a bool flags to keep track of which stage you are.

Code: [Select]

ISR () { // linked to a CHANGE on the zero crossing signal.
  zeroCrossed = micros(); // Record the microsecond time.
  zeroDetected = true;
  set timer at 3000 us.
}

timerInterrupt() {
  if (zeroDetected) {
    set timer at 2330 us.
    switch on the mosfet
    zeroDetected = false;
  else {
    switch off the timer (no more timer interrupts until set again in the ISR())
    switch off the mosfet
  }
}
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 03, 2017, 10:37 pm
Thank you very much for suggestion to use MOSFET , But I have no knowledge how to switch on the internal timer of the Arduino and I connect Zero-cross signal to pin 2 of Arduino, but what about pin 4 that is in CODE from(https://playground.arduino.cc/Main/ACPhaseControl).How this pin 4 is connected to the circuit? I have MOSFET IRF630 and IRF9z24N that I can try to use , but I have problems to suit the programing code to the schematic . and the problem is that i have about 50A current and most of the parts i use are not suitable and burn. Looks i have to give up and use less voltage and lower the  amps.
Title: Re: rectified AC phase control
Post by: aarg on Dec 03, 2017, 11:24 pm
It looks like your mosfet is shunting the supply. That doesn't seem right.
Title: Re: rectified AC phase control
Post by: Wawa on Dec 03, 2017, 11:49 pm
The IRF9z24N is rated for 55volt, the IRF630 is rated for 200volt.
The rectified pulses have peaks of 150*1.4= ~210volt (if I read your blurry diagram correctly).
50Amp?...
Leo..
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 04, 2017, 04:26 am
Much better readable image! Inlined for convenience:
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=235978)

You'll need a logic level MOSFET, the IRL series rather than the IRF series. Otherwise it won't open fully at 5V gate.

That coil L2 is your load? For inductive loads you must add a flyback diode. Every time you switch off the power you get a large reverse voltage peak.

Considering the image of your desired output wave, a TRIAC can not work as you never reach zero.
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 04, 2017, 10:41 am
Hi,
What is L1 for?

You might find this interesting;
https://www.homemade-circuits.com/how-to-use-triacs-for-inductive-loads/ (https://www.homemade-circuits.com/how-to-use-triacs-for-inductive-loads/)

What are you trying to make?

Tom.... :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 06, 2017, 11:15 pm
Hi  Tom, What I try do do is that I have one vertical coil and second coil is at 45 degree .I need the result of specific interfere between the two coils. The vertical coil  has to be powered by variable AC from  50V to  75V . The second coil need positive pulses synchronized with  pics in firs coil from rectified AC 100v to 150V or DC. The mechanical part is not a problem.I need help with electrical part of the project. May be somebody will give me different idea how to achieve my desire power for this two coils
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 07, 2017, 05:29 am
What is the peak voltage you expect, and peak current? That are two parameters you need to size your MOSFET.

Just looking at your proposed schematic again, you use an optocoupler to get the input voltage (100-200V or so) to the gate of the MOSFET. Bad idea: the maximum allowed Vgs of the IRL630 is 10V. That high voltage on the gate will kill it. Other MOSFETs will have higher Vgs(max) rating but its nowhere near the voltages you want to apply.

You could make a voltage divider with R1, R2 and a pull-down resistor on the gate (which is missing from your schematic) but that only works reliably when you you have a fixed high voltage. You're planning to regulate this.

You'll need some kind of fixed voltage supply to switch your MOSFET gate.
Title: Re: rectified AC phase control
Post by: Wawa on Dec 07, 2017, 06:18 am
The vertical coil  has to be powered by variable AC from  50V to  75V .
So a variable transformer (variac).
Leo..
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 07, 2017, 08:49 am
Hi,
OP diag.
(https://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=236351)

Tom.. :)
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 07, 2017, 09:43 am
that waveform looks easy enough to produce on an Arduino output.
Set an interrupt to trigger on the zero detection.
That interrupt sets a timer interrupt to switch on the signal.
When the timer interrupt is triggered, set the port (direct port write, digitalWrite() may be too slow) and sets the timer again for 2 ms later.
When that second timer interrupt is triggered, switch off the signal, and wait for the next zero crossing.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 08, 2017, 02:18 am
Thank you  to all of YOU for trying to help me.Dear "wvmarle" I do not know how to write the cod for Arduino. I try some programs written on ARDUINO playground, but no success for now. After reading all suggestion  I came to a new schematic  which I  will attach .  Could you  please check it and if you think it will need some changes to work, please give me your opinion.If you think the schematic will work  I will  really appreciate  if some of you write and send me a code to upload on my Arduino
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 08, 2017, 04:44 am
Thank you  to all of YOU for trying to help me.Dear "wvmarle" I do not know how to write the cod for Arduino. I try some programs written on ARDUINO playground, but no success for now. After reading all suggestion  I came to a new schematic  which I  will attach .  Could you  please check it and if you think it will need some changes to work, please give me your opinion
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=236505)
At L2 there's a flyback diode, that's good - make sure it's a type that can handle the current. A common 1N4007 will do fine. But you should not add that resistor there, as it completely negates the purpose of the diode which is to provide an easy path for the reverse current to flow.

The 4N35 optocouplers: why is there an LED in series? Any purpose for that? Also they miss a current limiting resistor.

Why two of them? You just need a pull-down resistor there. But it's getting tricky with the extra voltage divider. That one has the wrong values, 10k & 8750 Ohm is not going to divide 150V into (140+10)V.

The MOSFET: the Irf9z24n is a p-channel type. You need an n-channel. Also maximum VDS is 55V while you have 150V.

Quote
.If you think the schematic will work  I will  really appreciate  if some of you write and send me a code to upload on my Arduino
Can do.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 08, 2017, 07:27 am
Drawn out your schematic in KiCAD - using the actual symbols for the components where available.

(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=236511)
Added the missing resistors for the optocouplers and the MOSFET.

Can't read the part number for the phase detection, so didn't add that.

The IRG4PC is some kind of transistor, I'm not familiar with this special kind, but it seems to be a DC part that you put in an AC role. It will break right away as the reverse voltage is just 18V according to the data sheet and you're going to apply 150V AC. I think you want to use a TRIAC there. Your phase diagram in #24 suggest this:
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=236507)
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 08, 2017, 11:16 am
Hi,
@wvmarle good one, I think you got it all.

The zero crossing uses a H11AA1 opto.

The IRG4PC is an IGBT, but the Op has the driver for it completely wrong plus the IGBT has a recovery diode from C to E so it will fully conduct on the negative cycle.
(https://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=236519)
IGBTs do not like AC current.

Tom.... :)

Title: Re: rectified AC phase control
Post by: wvmarle on Dec 08, 2017, 11:44 am
Another thing, that H11AA1 opto. I just checked the spec sheet, so now I know how that works. It switches off for a moment every time there's a zero crossing, so that's easy enough to detect.

There is no need for a resistor in both lines, one of R6 or R7 can go.

Then the value. At 150V and total 300 Ohm you get 500 mA. That'll burn the LEDs very fast. A good forward current is 10 mA, at a drop of 1V over the LED (negligible on a total of 150V) that would require a resistor of 15k. So not 2x 150 Ohm.

Then we have to find proper values for the R4/R5 voltage divider, with it the R3 pull-down.

For that, we need to select a good MOSFET Q2, and a replacement for Q1 - a TRIAC. I don't recall any current ratings by OP for these parts, which is needed to make a selection. Fast switching is a requirement (for accurate timing - target <1 us), so gate capacitance becomes important (in combination with R3, R4 and R5).

Well, OP, I think you have your homework here. Looking forward to your input.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 08, 2017, 02:43 pm
Playing with this schematic again, another problem. The LED at the output of the H11AA1. It can not light up, ever (due to far too little current flowing through the 10k resistor), but together with the optocoupler it will prevent the voltage to drop low enough: about 1.8V for a typical red LED plus 0.4V for that phototransistor means the output voltage will vary between +2.2 and +5V. That +2.2 will not reliably register as a LOW.

I've replaced the IGBT for a TRIAC. That should at least work for switching the AC to the rectifier for L2.

Now I don't really understand how that TRIAC can switch on a DC supply, unless you want to switch only half the time. For switching the negative cycle it seems to need a negative pulse, and that's not provided here. So it won't work. When looking for Arduino/TRIAC circuits an optotriac is used. So all that brings me to this circuit diagram:
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=236530)

The zener is for protection of the MOSFET gate. The values as chosen for the voltage divider will allow about 1.5 mA of current to flow, resulting in 15V on the gate. The zener I set to 12V, may change that to 15V or so.

Just realise that I'm calculating at 150V for the DC which of course is wrong as the peak value is much higher, about 210V. However the moment the MOSFET has to switch, the voltage in the circuit is below peak, so we must keep that in mind as well. Maybe a bigger pull-down resistor is needed so the MOSFET can properly switch on when the wave reaches 100V or so (the current requirements are not like that but it's easy to allow for it now, hard to change after building the circuit).

Another question: what is the purpose of this TRIAC switch? It doesn't seem to me that it adds anything to the switching of that coil L2, which is switched fully by MOSFET Q1 already. I don't see any additional effect of it, except adding some serious complexity.

Title: Re: rectified AC phase control
Post by: wvmarle on Dec 08, 2017, 04:37 pm
OK, and now I should stop playing with this :-) It's a good exercise.

MOSFET I chose the IRF730 for sufficient voltage (500V) and 6A max current. Hope that's enough.

Based on that recalculated the resistors, keeping in mind that we'd want a 10µs switching time for the MOSFET. This results in a 20k, 5W resistor for R4.

Checking the data sheet I also noticed the 4N25 optocoupler is not suitable for this application as the breakdown voltage is 70V, and the peak wave here is more like 210-220V. So this needs a different part, one that can handle 300V or so.

(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=236535)
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 08, 2017, 05:08 pm
OK, and now I should stop playing with this :-) It's a good exercise.

Checking the data sheet I also noticed the 4N25 optocoupler is not suitable for this application as the breakdown voltage is 70V, and the peak wave here is more like 210-220V. So this needs a different part, one that can handle 300V or so.
Keep going. :)


Split R4 into two resistors in series and connect a zener to the midpoint and MOSFET source, that way you have a zener regulator.
To keep  Vmax to the collector below 70V of the 4N25, add a 10uF or so to give you some smooth gate voltage.
Tom... :)
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 08, 2017, 06:54 pm
Good idea. That could also help solve the massive 5W heat dissipation. The on switching is the real issue, I was thinking already of adding a cap somewhere to help giving that MOSFET gate a good push to get on.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 08, 2017, 07:30 pm
So like this.
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=236555)
Zener D7 limits the voltage over the cap to 25V. Every time the voltage goes over 25V on the rectifier (or over 150V if the optocoupler is on) the cap C1 will be topped up to 25V. Then when the optocoupler switches on, there's this 25V supply from the cap to help switch on the MOSFET faster. D4 prevents back flow from the capacitor when the wave goes below 25V.

The zener also manages the CE voltage of the optopcoupler.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 09, 2017, 06:53 am
OK ,you spend to much time for me.Thank you so much , but  I have some more details:
 1. What about if I lower R7 from 10K to 2.2K? Do you think it will work better for "0" crossing signal to Arduino?
 2. The idea for TRIAC is to open 3ms after"0" crossing and close at next "0" crossing, by itself. This will cut off first1/3 of half AC wave. ( I order TRIAC T-835H-6T) and (optoisolator triac driver 782-IL410 ). Modified AC after full wave rectifier bridge "+DC " go trough Mosfet ( I order logic mosfet  IPP200N15N3G) ,which will open at "0"cross and close 5ms. after that. the overlap of open circuit will give me 2ms pulses I need. May be there is easy way to achieve this goal, but I am not aware.
 3. I order zener   IN5253 .Is this correct? If not can you help me with new part number and the place to order

  Look like We are close to final view of the schematic. Can you help me with programing cod for the ARDUINO board? I have ARDUINO UNO board. And I have no idea how to write the program.
        Thank you ones again. You are amazing !!!
                                               Dimitre
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 09, 2017, 09:49 am
Hi,
We were puzzled as to why you needed the Triac to start the waveform.
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=236588)
You don't need it as the MOSFET can do the switch ON and OFF, as the MOSFET is switching a DC supply, even though it is pulsing.
All your timing is referenced to the zero crossing detector.

Tom.. :)


Title: Re: rectified AC phase control
Post by: wvmarle on Dec 09, 2017, 11:53 am
After posting I was thinking about my schematic again, and realised that as R3 and R4 are forming a voltage divider again, gate voltage will be limited to <4V with my suggested values. That doesn't work (plus the rise time of the gate is much too low).

The solution I was thinking of was to add a second optocoupler, in parallel with R3. Then R3 value can be increased drastically (to 220k or so) as it's main purpose is to keep the MOSFET off upon startup. R4 value can be lowered then, zener can also go down a bit, 15V would be fine.

The purpose of this is to make the switching as fast as reasonably possible - the fastest is to short the gate to either the higher voltage or the lower voltage: that's basically what those two optocouplers do. Well, with a current limiting resistor to keep things under control.

The reason of going to these lengths: you want the MOSFET to switch at specific points of the waveform, for a period of 2 ms. A delay of 20 us is 1% of that time, and that will start to influence any measurement you want to do. You must try and minimise this delay as much as possible.

A serious complication is the high voltages you have. You're delaying with about 210V peak, while the MOSFET can have no more than 30V on it's gate. So I'm looking to find a way to "kick" the MOSFET into on and off states respectively, providing the required 20+ mA to charge/discharge the gate which is needed to ensure fast switching.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 09, 2017, 12:02 pm
IPP200N15N3G

V(DS) = 150V.

Wrong part - your RMS is 150V so that means peak is more like 210V. Also running it at the limit is not a good idea, you may have voltage spikes. That's why I came up with a part that allows up to 500V V(DS).

Furthermore, it feels not very "logic level" when I read the data sheet. R(DS,ON) values are given for 8V and more. The graphs later also show very limited conductance at 5V V(GS). Now for this application you don't need a logic level anyway, as you have plenty of voltage available.

The maximum V(GS) for this part is 20V so that's another mismatch. If after fixing the schematic I posted you manage to get the full 25V of the zener to the gate, you'd destroy the part even before you blow it with the too high V(DS).
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 09, 2017, 03:26 pm
This should allow for ~2 µs switch times, using a single digital pin from the Arduino (which makes programming it just a bit easier).
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=236621)
Q1 on: gate >8V.
Q2 off: gate <3V.

D11 HIGH:
- U1 on, gate of Q1 pulled to 12V (with the help of the charge from C1) through R3, Q1 on, L2 on.
- At the same time: base of Q2 pulled high, Q2 blocks, U2 off.
- Current through R6 is irrelevant.

D11 LOW:
- Base of Q2 pulled low, current (1 mA) flows, transistor conducts, U2 on, gate of Q1 pulled to 0V through R4, Q1 off, L2 off.
- U2 off.
- Current through R6 is irrelevant.

D11 INPUT (upon startup):
- U1 off.
- Base of Q2 disconnected, Q2 off, U2 off.
- R6 pulls gate of Q1 low, Q1 off, L2 off.

D11 is to source/sink about 13 mA when active.

All you experts, please comment :-) Hope I got it all correct now.
Title: Re: rectified AC phase control
Post by: DrDiettrich on Dec 09, 2017, 09:01 pm
I don't understand the coil between the transformers. Should it denote a filter of some kind?

Your circuit may work, except the two LED in series (opto coupler and external) may not work as expected.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 10, 2017, 01:57 am
I don't understand the coil between the transformers. Should it denote a filter of some kind?
OP explained that one before in this thread.

Quote
Your circuit may work, except the two LED in series (opto coupler and external) may not work as expected.
That's again original OP's doing - as it's in series why wouldn't it work? Resistor value is based on the total voltage drop expected (may have to be adjusted if OP's LEDs have different forward voltage).

Not that I really see the point of that LED, it'll simply flash very fast so look kinda dim.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 10, 2017, 02:18 am
Reply to Dr Diettrich: I explain in previous posts that L1 is my vertical coil(load) and L2  is second coil at 45 degree next to first. Reaction between the two coils is what I am interested.

Reply to "wvmarle ": Thank you very much .I think it is much simple now and I am prepared to build the circuit .I order zener diode 1N5349B(12V,,5W) and MOSFET _IRF730 (5.5A,400V),but I am not sure for PNP transistor .I have one BC636 . Do you think I can use it or I have to order something different ?
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 10, 2017, 02:47 am
Any small signal transistor is fine there, nothing special about it. All it has to do is switch 5V,  and about 12 mA. Yours will do just fine.
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 10, 2017, 02:56 am
I don't understand the coil between the transformers. Should it denote a filter of some kind?

Your circuit may work, except the two LED in series (opto coupler and external) may not work as expected.
L1 is another coil that is used with L2, L1 is constant flux, L2 variable, from what I understand.
We may be designing an antigravity device out of terrestrial parts from alien schematics. :o :o :o


Tom... :)
Title: Re: rectified AC phase control
Post by: DrDiettrich on Dec 10, 2017, 08:53 am
L1 is another coil that is used with L2, L1 is constant flux, L2 variable, from what I understand.
We may be designing an antigravity device out of terrestrial parts from alien schematics. :o :o :o
Then the zero-transition circuit does not reflect the proper phase. Every transformer adds another phase shift.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 10, 2017, 09:44 am
The zero detection is the correct phase for switching the MOSFET but indeed you're off (90 degrees - 1/4 wave, isn't it?) compared to L2.

So - assuming the pulse supplied to L2 is to be in phase with the peak voltage across L1, T2 should be connected to the input in parallel to T1 rather than in series.

Come to think of it, another problem is the voltage. T1 is a variable transformer, so the voltage over L1 and the input voltage of T2 is variable. That would result in a variable output of T2. Yet the output of T2 is said to be 150V, suggesting that's a constant value. Putting the two transformers in parallel would solve that, too.

Then I start to wonder: when is the magnetic field of L1 the strongest? When the voltage is at it's peak, or when the change in voltage is at it's peak (i.e. when the voltage is crossing zero).
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 10, 2017, 06:56 pm
The shift of phase I observe on the oscilloscope is so minimum that is not a problem. I think it will help for application I need, plus it is making the system floating and not connected to real earth ground.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 11, 2017, 09:12 pm
I have every parts except the zener diode. I start to check some parts of the schematic .
1.The "0" crossing signal to pin 2 is dropping from 5V to 2.6V when get close to 0, never go to real "0"V. Is this OK to be red from Arduino?
2. The current trough the coil L2  at 24V is 4.4A. The MOSFET  we choose IRF730 will not withstand the  load when i get close to 150V.  I was looking  for different and I think    STW40N90K5  (900V, 40A, zener protected ) will be better. Also FCPF099N65S3 N channel super FET( 650V, 30A ) may be will be OK because we will have pulses not full rectified current AC, Which is consider DC ,trough the MOSFET. Plus the reactive resistance will be higher at 150v when we have cut the wave and resultant current will be lower than 40A.
3. Is the 10 uf /25V for C1 is critical , can I use (30 uf  /25V) or( 10 uf/ 50V) .
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 11, 2017, 09:38 pm
More options for MOSFET  600V/50A
1  IXFH50N60P3

2 IXFQ50N60P3

 I really get lost .I have so little Knowledge and this is first time for me to choose electronic parts .
Sorry for stupid questions.
Title: Re: rectified AC phase control
Post by: DrDiettrich on Dec 11, 2017, 09:57 pm
You encounter the difference between static (DC) and dynamic (pulsed...) behaviour of circuits. You better start much smaller, with currents below 1A, until you get a feeling and understanding for the dynamic behaviour.
Title: Re: rectified AC phase control
Post by: cattledog on Dec 11, 2017, 11:32 pm
Quote
1.The "0" crossing signal to pin 2 is dropping from 5V to 2.6V when get close to 0, never go to real "0"V. Is this OK to be red from Arduino?
Something seems wrong here. The signal from the H11AA1 should be pulled high to 5v at zero crossing. There is a short positive spike read by the Arduino with an interrupt. When there is enough input current(10ma spec'ed) flowing through the input led to activate the output side, the output should be grounded.

Your levels are problematic as well. From the data sheet the maximum specified input low voltage is .3 Vcc or 1.5v and the minimum specified input high voltage is .6Vcc or 3.0v.

You might try reducing the 15K R6 if you don't actually have 150V input, but that doesn't explain the inverted behaviour from expected.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 12, 2017, 03:56 am
I have every parts except the zener diode. I start to check some parts of the schematic .
1.The "0" crossing signal to pin 2 is dropping from 5V to 2.6V when get close to 0, never go to real "0"V. Is this OK to be red from Arduino?
No - and the voltages are odd. It should be 0V and then peaks at 5V.

What is the voltage in that part of the circuit? If it can vary from 24V to 150V then you have to find another way of doing the zero detection. The resistor is specced for 150V, so at 24V the current in the photodiode will be too low.

Quote
2. The current trough the coil L2  at 24V is 4.4A. The MOSFET  we choose IRF730 will not withstand the  load when i get close to 150V. 
I recall asking you before on the expected current. Never got a response on that.

4.4A at 24V gives 27.5A at 150V. Peak current will be even higher: about 40A, and that's what your MOSFET has to deal with. After all you switch your coil at the peak of the wave, which is about 210V. Get a 60A MOSFET, then you have a comfortable margin

Your MOSFET may need a heat sink as well at these currents. The two types you mention won't do.

Quote
3. Is the 10 uf /25V for C1 is critical , can I use (30 uf  /25V) or( 10 uf/ 50V) .
Not critical.
Capacitance should be around this value, and 10 uF is a very common one. It's got to be much larger (at least >100 times, preferably >1,000 times) than the gate capacitance of the MOSFET, which for the IRF730 is about 1.8 nF.
Another consideration is the initial charge-up time of the MOSFET. At 10 uF that's 200 ms or so based on 150V, so fast you don't have to worry about it, that's faster than you will ever start pulsing after switching on the power. If you have a much bigger cap, that becomes a significant time. After initial charging of the cap it'll be easily held at it's voltage. At 24V however that'll be longer - a few seconds or so. So don't be too quick in starting the pulse from the Arduino after powering up the system.
The voltage rating is a minimum (as a rule of thumb at least twice the expected voltage, so 12V working voltage gives the standard 25V value for rating). Higher voltage ratings make the part bigger and more expensive, that's the main difference.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 12, 2017, 09:41 pm
I am sorry that I did not mention the high current in coil  L2. now I will look for different MOSFET. about zero crossing signal I steel puzzling .I install parallel to variable  transformer step down TR.( input 120V AC -output 24V  AC). I check with oscilloscope the zero cross signal to ARDUINO pin2 ,any time it cross zero, when going down slope ,I observe-  switch to +5v to pin2 and stay to next crossing and switch to-5V for the next half wave .there no short +5V pulls at every  zero crossing like every body explaining the zero crossing detection. what is going on with me? How could be so wrong ?I change the H11AA1 with new one and the same picture.Do I miss some pull down resistor or what? I am afraid for my ARDUINO board will be damaged. 
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 12, 2017, 11:13 pm
I am sorry that I did not mention the high current in coil  L2. now I will look for different MOSFET. about zero crossing signal I steel puzzling .I install parallel to variable  transformer step down TR.( input 120V AC -output 24V  AC). I check with oscilloscope the zero cross signal to ARDUINO pin2 ,any time it cross zero, when going down slope ,I observe-  switch to +5v to pin2 and stay to next crossing and switch to-5V for the next half wave .there no short +5V pulls at every  zero crossing like every body explaining the zero crossing detection. what is going on with me? How could be so wrong ?I change the H11AA1 with new one and the same picture.Do I miss some pull down resistor or what? I am afraid for my ARDUINO board will be damaged.  
How are you getting -5V on pin2 of the Arduino?
What do you have the gnd of the oscilloscope probe connected to?
The signal at pin2 should go between 0 to +5V.
Tom.... :)
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 13, 2017, 03:06 am
The voltage on the OUTPUT of the zero crossing detector depend on what YOU provide there. As you power that side using the Arduino, and as long as that pin is set to INPUT, you can not damage it. This also means that -5V is simply impossible. It can not go below 0V, or above +5V. If you see other voltages there's something wrong with either your wiring or your measuring.

The voltage on the INPUT side of the zero crossing detector are related to the power supply. If you measure across the pins of the detector you should see a small voltage, 1.8V or so, the forward voltage of the LEDs. See spec sheet for the actual voltage.

What's the voltage coming out of that second transformer?
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 13, 2017, 03:09 am
 The ground of oscilloscope probe is connected to "ARDUINO" Ground the probe is connected to wire that has to be connected to Pin2 ,but it was not. I try to check all parameters before connecting them permanently. Read my previous posting when I have drop to +2.6V when is crossing zero and go back to +5V  for the remaining time to next zero crossing. I never see spike pulse of +5V any time crossing zero.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 13, 2017, 03:23 am
Answer to "wvmarle":  the additional transformer parallel to variable TR has input 120V and output  24V AC . I try to have not variable voltage ,but constant ,to avoid this behavior I have at my zero cross detection I try to explain in one of my previous posts. The two transformers in parallel will have the same Phase and this will not mess with my position of the pulses in L2.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 13, 2017, 03:38 am
Euhm... I have the feeling I missed something here. When did those transformers change to being wired in parallel?

So now you provide 24V AC to your zero detector? That was in your original schematic drawing 150VAC. All component values and the whole circuit is designed based on a 150VAC input, rather than 24VAC. That makes a huge difference.

If that same voltage powers L2 that means the rest of your circuit will change, too!

At 24V you have to reduce the resistor value in the input of the opto detector to 2k2. Otherwise the LEDs don't get enough current to light up, and you don't get a proper signal. That's the value suggested at this page (http://at this page) using the same detector for a 24VAC signal.

Note that they use a 1W resistor, which makes sense to me considering the expected currents. I probably suggested a too high resistor value even for the 150V that was originally mentioned.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 13, 2017, 04:24 am
I watch video posted by Lewis Loflin on you tube. He show exact schematic for 24V AC to get zero crossing signal I install resistors with value he show and again I have +5 v from zero cross when AC wave go below zero and +2.6V when wave is above zero for entire half way time 08 8.333 ms. I do not observe short picks of +5V like he explain.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 13, 2017, 04:27 am
Can you please post a drawing of the actual circuit with actual values you are using?
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 13, 2017, 05:24 am
I  just try to have constant input for zero crossing detection.The rest of the schematic is the same like the last (We agree for this) I order MOSFET N-chanel    XFQ50N60P3 (600V, 50A) .My input to rectifier bridge will be steel variable from 100 to 150V max . Voltage for L1 is variable from 50 to 75V max. I will go slow from starting value for the voltage to the max to see if I will have the reaction I expect from the two coils L1 and L2. Because my limit for L1 load is set to 75V AC. Other way I will have overheating.
 
From what I observe it is no difference if I stick to original zero cross detection or I use another transformer for zero cross detection. I just worry the ARDUINO board will not recognized this drop of input voltage on pin2 , because it do not drop to 0V

Everything else is ready for the test, but I have to wait to receive the Mosfet I ordered.
Is this is a problem what I observe on my oscilloscope or it will work?
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 13, 2017, 06:45 am
OP's images:
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=237161)
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=237163)

That scope signal doesn't make sense AT ALL for this circuit - assuming you indeed built the circuit exactly as the schematic drawing you posted.

The signal should make peaks at the transitions. It looks like one of the two diodes is blown, so there's light produced only for one half of the wave pulling the signal low (but apparently not completely), and the other half of the time the signal is pulled high as there is no light produced by the LED at all, and the transistor blocks.

The 8.3 ms you mention is what you expect for a half wave of a 60 Hz signal.

What voltage do you see when you connect the scope to the input pins of the H11AA1?
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 13, 2017, 11:21 am
Hi,
Can you post a picture of your setup of the H11AA1 and the connection to the scope please.
I agree with #wvmarle it looks like one of the diodes in the opto has failed.

It is really a H11AA1 as that is the sort of output you would get from a standard single LED input opto?

Thanks.. Tom.. :)
Title: Re: rectified AC phase control
Post by: cattledog on Dec 13, 2017, 04:48 pm
If you can get the output voltage levels correct, you could use the device you have with a CHANGE interrupt, and pick up the zero crossings.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 13, 2017, 05:35 pm
That's another thing indeed: the low level should be zero but is about 1/2 Vcc. That's not good either, and implying either the H11AA1 is defective, or there's another error in the circuit.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 13, 2017, 07:16 pm
I change the  H11AA1 again and now I have half wave +5V and half wave +0V. I think remarks of "cattledog" (If you can get the output voltage levels correct, you could use the device you have with a CHANGE interrupt, and pick up the zero crossings), are good and instead(  attachinterrupt, RISING)to use CHANGE. See attached photo of my oscilloscope with final reading.Now it is no matter what voltage I use the readings are the same only difference is the resistors in the input of H11AA1 (at 150V max , R=15K) and(at  24V, R=2.2K). May be with constant input of 24V is more safe for the optocoupler.

     Thanks everyone involved in this discussion !!!
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 13, 2017, 07:22 pm
Are those two halves equal length? It looks a bit different to me.

Indeed fixed voltage is better. Easier for the components.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 13, 2017, 07:42 pm
Yes, they are exact from zero cross to zero cross . Sorry I forgot to attach picture of voltage between pin 1 and pin 2 of H11AA1.Now I correct this -see the picture
Title: Re: rectified AC phase control
Post by: cattledog on Dec 13, 2017, 07:46 pm
It certainly looks like you have an H11A1 instead of an H11AA1. One is single channel and the other is double.

Quote
Are those two halves equal length? It looks a bit different to me.
Yes. With the single sided device, the transitions will be offset from actual zero by some amount relating to the threshold current required to illuminate the input led.

You may need to read the state of the input when the CHANGE interrupt triggers, and adjust the triac firing delay times accordingly.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 13, 2017, 08:02 pm
I check the optocoupler it is H11AA1 -0343K . I ordered from mouser electronic
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 13, 2017, 09:40 pm
Hi,
Can you put the DMM in AC Volts mode and measure the voltage across pin1 and pin2 of the opto-coupler please?

Thanks.. Tom.. :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 13, 2017, 11:16 pm
Voltage at TR output is 27.7V  AC ( it is not 24V),  and voltage across  pin1 and pin2 of optocoupler is  17V AC
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 13, 2017, 11:41 pm
Hi,
17Vac is way too high, it should be lower like 1.5Vac., due to the clamping of the 27Vac by the back to back diodes.

What is your series resistor value between the AC supply and the opto input?

Does your DMM have DIODE test, if so put it in that mode and tell us the readings between pin1 and pin2 in both directions of the test leads, you will need to take the opto out of circuit to test.

Then test a new opto that has not been used.

Thanks.. Tom.. :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 14, 2017, 01:27 am
Resistor between the AC supply and pin1 is 2.2K

diode test; red on pin1 black on pin2  reading 1.071  for brand new( not used)  1.073
                black on pin1 red on pin2               1.070                                       1.070
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 14, 2017, 02:23 am
Hi,
The opto sounds okay
27Vac == 38Vpk

(38 - 1.071)/2200 = 0.016A = 16mApk  or 11mArms within spec for opto.


How are you connecting your scope to the circuit?
Where are you connecting the probe gnds to?

What do you see on the scope if all you have connected is one channel between pin4/gnd and pin5/signal of the opto?
Completely disconnect the other channel.

Remeasure the ACvoltage between pin1 and pin2.

Tom... :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 14, 2017, 04:43 am
Voltage now between pin1 and pin2 is  1.2V and I have  short +5V picks on my oscilloscope. You are genius  Tom!!!  Why is this so confusing when I monitoring  input wave?
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 14, 2017, 05:17 am
Hi,
Your scope probes, the gnd on each is connected together at the scope.

So when you were monitoring the input and the output of the opto, the gnds from each channel were connecting the input and the output of the opto.
So it defeated the isolation you needed to be able to see full AC at the opto input.

Tom... :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 14, 2017, 06:02 pm
  Thank you TomGeorge , now I understand why I lost a year trying to use different components MOSFET, TRIAC,BTA,LGBT and never get the result for output I was looking. Plus I was using program codes for different schematics I found at different sources, not my own ,because I do not know how to program ARDUINO.

Now I am ready to build the schematic I like mostly (Dec 09, 2017, 02:26 pm Last Edit: Dec 09, 2017, 02:27 pm by wvmarle) . Can you help me, all of you, to write Program code specific for this schematic.  You work very hard to educate me and I am very very thankful. 
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 14, 2017, 06:35 pm
With that schematic a concern is the value of R5.
What is the voltage range for this part of the circuit? I've seen so many it's confusing (it should be a good value for 100-150V input range).
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 15, 2017, 07:06 am
Gate to emitter voltage has to be in range  30 >V(ge)>3 . I think R5 and R6  acting like voltage divider and to lover 150V DC with picks of 210V to range of 8to20v  ( if R6 is 220k -R5 has to be 260kOhm) Or may be I am wrong? I have no idea how to include R3 andR4 in this calculation.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 15, 2017, 07:41 am
No, it works differently due to the included zener.

R6 charges the capacitor C1 until it reaches 12V, then D3 starts to conduct limiting the voltage at that point to 12V. You can see D3 as a kind of automatic variable resistor, forming a voltage divider with R5, and changing its value to keep the mid voltage at 12V.

When output D1 is set high, U1 is switched on, and the gate of Q1 is pulled to +12V with the help of the capacitor. The R5-R3-R6 path indeed now acts as voltage divider - without the zener it would pull the gate to about 50V if you have 150V coming out of the rectifier - but D3 still limits it to 12V, or your MOSFET would be toast. 50V is too high for the gate.

When D1 is set low, U1 is switched off again and U2 switches on, providing a low resistance path for the gate to discharge via R4.

You will see that the gate can also discharge through R6, which is correct. R6 is there primarily to pull down the gate when there is no signal at all to the optos, such as when you switch on the system and the Arduino has not yet started up. A MOSFET with floating gate will start to switch on and off randomly. R6 prevents that.

In your situation it's important to be able to switch off the MOSFET fast, and the 220k makes discharge is too slow. This is why that U2 circuit is added: it allows for much faster discharge of the gate.

Another thing: a MOSFET doesn't have an emitter. The pins are called source, drain and gate.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 15, 2017, 04:32 pm
In this case are we  changing the value of this resistors R6 and R5 or they can stay the same ? I start to put together the components of the schematic.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 15, 2017, 05:33 pm
What is the actual voltage range supplied to that rectifier? That's important for the value of R5, though the exact value is not too critical.

The pull-down resistor R6 can stay the same, that's not affected by the input voltage at all. It just has to be big enough to not disturb the rest of the operation (as soon as that Arduino pin has been set to output it has no function any more, it's really there for start-up). The R3-R6 combo is a voltage divider, dividing the 12V from the zener (minus the 0.4V or so for the phototransistor). We want the gate to go to 12V or close to it, so R6 should be so big it's value is negligible compared to the 1k of R3. Hence the 220k value. Anything more than two orders of magnitude difference is negligible.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 15, 2017, 07:27 pm
When I was testing the coil  L2 ,the max voltage I can supply  is  AC 240V at this point coil start overheating. That why I want to have short Pulses in  L2 .Also Coil  L1 can not hold more than AC 75V. In this situation I will not go over 75V in variable transformer. This will give me  max 150V AC at the output of step up transformer. I do not know how dynamically will behave  the voltage and may will have some short picks of voltage which I can not predict. You have more experience and it is your call for value of R5 .
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 15, 2017, 11:27 pm
Hi,
What are the specifications of your coils?

Tom... :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 16, 2017, 03:47 am
Wire i use is 22AWG   L1   1" lengths, OD= 4" , ID=3.5",(inches)
                                L2   4" lengths, OD=1.15"  , ID=5/16"( inch. )

I did not count how many woundings they have. 
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 16, 2017, 04:00 am
What would you expect to be the minimum voltage then?

The concerns: overheating at the high end (no issue with this value and 150V); not enough current at the low end to keep the capacitor topped up (may become a concern below 50V, need to know the minimum for a quick calculation).
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 16, 2017, 06:18 am
Wire i use is 22AWG   L1   1" lengths, OD= 4" , ID=3.5",(inches)
                                L2   4" lengths, OD=1.15"  , ID=5/16"( inch. )

I did not count how many woundings they have.  
So you don't know their inductance or resistance, so how do you know they are suitable for the power supply you want to use?
Have you tested the solenoids first to calculate their impedance.
Tom.. :)
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 16, 2017, 06:22 am
Hi,
What are you trying to accomplish, what is the application.
What will it be used for?
I can see what you want to do with two solenoids, but why? ? ?

Tom... :)
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 16, 2017, 06:25 am
That notwithstanding - how can you ever do meaningful experiments if you don't know the magnetic properties of the two inductors? You said before you want to measure how the two interact, which means you should know the inductance of them, and the magnetic fields they produce.

It's also quite strange that while you wind your own spools, you don't bother to even count how many windings it has, or measure the resistance and/or inductance of it.

At the start of this thread, some 80-something(!) messages ago, I assumed you had a well thought-out magnetic experiment as the requirements posted were pretty sensible and unambiguous, just having trouble understanding the electrical controls... now it turns out a pretty fundamental part of the whole experiment that's missing!

Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 16, 2017, 08:33 am
first coil   L1 has (X=7.89 Ohm,R=6.3Ohm , and L=0.021  HENRY)

second     L2 has ( R=9.13 Ohm,X=11.8 Ohm and L=0.0313 HENRY)
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 16, 2017, 09:02 am
When I was testing the coil  L2 ,the max voltage I can supply  is  AC 240V at this point coil start overheating. That why I want to have short Pulses in  L2
I hope you also understand how very different a pulsed current is from a constant current when it comes to an inductor.
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 16, 2017, 11:03 am
Hi,
You are also aware that you will not have constant magnetic field.
With AC or pulsed it will either be an oscillating field, N - S - N - S  or a pulsing single direction with DC pulses.

Can you answer ALL of my last post please?  #88

Tom.. :)
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 16, 2017, 11:29 am
that as well - I meant the difference between constant DC, rectified DC (half waves) and the short pulses OP wants to produce. All will give different fields, and a different result of the experiment.

Some images of the setup would also be nice by now.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 16, 2017, 05:34 pm
Hi " TomGeorge" and "wvmarle", Of course I will explain the setting and everything how work .Let do the test and  see the results. We  solved so many problems together I am very thankful  but there  more ahead  I   need  help and this is just one part of the project.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 20, 2017, 06:43 am
With the given value of R3=1K ohm; R2=!k;R5=470K and R6=220K I have 0.4V at Gate of Q1. Q1 will not open to provide path for the current.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 20, 2017, 07:28 am
What voltages do you measure across the zener/C1? This should be about 12V.

How about across pin 4 & 5 of U1? This should be about 0.5V when it's switched on, about 12V when it's switched off. Same for U2.
Of course only one of them is supposed to be on at the same time, the other being off.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 21, 2017, 03:08 am
I check again all components of the schematic, removed damaged IRF730( left empty spot)Supply 120AC to the schematic and this is the results:
  across D3(zener diode)  I have 11.79V
  U1-across Pin4 and Pin5 with +5V on Pin1 I have 9.9V  and with 0V on Pin1  I have 11.79V
  U2                                                                   11.79V                                        3.6V   

Look like I was wrong not the schematic, Sorry,Sorry
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 21, 2017, 05:11 am
Pin 4 and 5 should have a much lower voltage drop when you have the optocoupler switched on.
Does that series LED light up brightly? Maybe the resistor has too high of a value.
What's the voltage drop over that LED? I assumed 1.8V which is common for a red LED but yours may be different.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 21, 2017, 07:51 am
  Voltage from pin1 of 4N25 to ARDUINO GND is  4.6V
              After LED(D2) to GND                    is       0.63V
D1  and D2 are white LED. They are bright ,but when i check them on diode mode show  2.6V

something I think we have to consider .I think the base of  Q2_pnp_BCE trough R9=470 Ohm has to be connected  not to DP 11 , but  close to the GND, may be after D1 (LED), or before. Other way has big drop of voltage at pin1 of U1(4N25)
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 21, 2017, 10:10 am
Then you have to reduce R1 to about 55Ω and R2 to about 25Ω (or the nearest higher - this is for 20 mA).

That transistor must be connected high side as it has to switch on that optocoupler when the signal on D11 goes low. It should not cause any voltage drop at D11 when switched off, as in that case there's no current flowing through R9.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 21, 2017, 08:00 pm
  I replaced R1 with 56 Ohm resistor and R2 with 27 Ohm .
 Now I have With +5V on pin 1 of U1 :  Pin5 11.76V   and Pin4  9.66V
                  with  +0V on pin 1         :  Pin5 11.76V   and Pin4  0.13V

  Thank you WVMARLE ,for not bail out on me. It will be good to have partner like you. I will need a lot of help if I get some sign that my idea is possible to work . I need program code for my Arduino board to check with actual coil to be able to do some measurements and adjustments. If you wont to communicate  on personal level, please let me know .


                    HAPPY HOLIDAYS     AND    PEACEFUL  NEW YEAR
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 22, 2017, 04:23 am
That looks a lot better. That's like the values you should see. The voltage drop is a bit high, though, I would expect 0.5V based on the data sheet. Possibly that's because you don't have the base of the transistor connected.
It's an interesting project. Not a trivial one for sure, that's what makes it interesting.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 22, 2017, 06:27 am
I look this program on Arduino play ground.It is may be close to what i need, but I do not understand how to set up time for "nMos" on place of "Ttriac Gate " to switch on and off correctly.

 
// AC Control V1.1
//
// This Arduino sketch is for use with the heater
// control circuit board which includes a zero
// crossing detect function and an opto-isolated TRIAC.
//
// AC Phase control is accomplished using the internal
// hardware timer1 in the Arduino
//
// Timing Sequence
// * timer is set up but disabled
// * zero crossing detected on pin 2
// * timer starts counting from zero
// * comparator set to "delay to on" value
// * counter reaches comparator value
// * comparator ISR turns on TRIAC gate
// * counter set to overflow - pulse width
// * counter reaches overflow
// * overflow ISR turns off TRIAC gate
// * TRIAC stops conducting at next zero cross


// The hardware timer runs at 16MHz. Using a
// divide by 256 on the counter each count is
// 16 microseconds.  1/2 wave of a 60Hz AC signal
// is about 520 counts (8,333 microseconds).


#include <avr/io.h>
#include <avr/interrupt.h>

#define DETECT 2  //zero cross detect
#define GATE 9    //TRIAC gate
#define PULSE 4   //trigger pulse width (counts)
int i=483;

void setup(){

  // set up pins
  pinMode(DETECT, INPUT);     //zero cross detect
  digitalWrite(DETECT, HIGH); //enable pull-up resistor
  pinMode(GATE, OUTPUT);      //TRIAC gate control

  // set up Timer1
  //(see ATMEGA 328 data sheet pg 134 for more details)
  OCR1A = 100;      //initialize the comparator
  TIMSK1 = 0x03;    //enable comparator A and overflow interrupts
  TCCR1A = 0x00;    //timer control registers set for
  TCCR1B = 0x00;    //normal operation, timer disabled


  // set up zero crossing interrupt
  attachInterrupt(0,zeroCrossingInterrupt, RISING);   
    //IRQ0 is pin 2. Call zeroCrossingInterrupt
    //on rising signal



//Interrupt Service Routines

void zeroCrossingInterrupt(){ //zero cross detect   
  TCCR1B=0x04; //start timer with divide by 256 input
  TCNT1 = 0;   //reset timer - count from zero
}

ISR(TIMER1_COMPA_vect){ //comparator match
  digitalWrite(GATE,HIGH);  //set TRIAC gate to high
  TCNT1 = 65536-PULSE;      //trigger pulse width
}

ISR(TIMER1_OVF_vect){ //timer1 overflow
  digitalWrite(GATE,LOW); //turn off TRIAC gate
  TCCR1B = 0x00;          //disable timer stopd unintended triggers
}

void loop(){ // sample code to exercise the circuit

i--;
OCR1A = i;     //set the compare register brightness desired.
if (i<65){i=483;}                     
delay(15);                             

}
Title: Re: rectified AC phase control
Post by: cattledog on Dec 22, 2017, 07:19 am
Quote
but I do not understand how to set up time for "nMos" on place of "Ttriac Gate " to switch on and off correctly.
Please post the final circuit.  When do you want to turn on and turn off the mosfet in relation to zero crossing.
The code you referenced provide a short pulse to turn on the triac and relys on the next zero crossing to turn it off.

The code delays the triac trigger from zero cross by the value of OCR1A., and writes the trigger pin high with a compare interrupt. This effectively cuts out part of the sinewave. Then the timer count is moved forward, close to the overflow/reset point. The pulse only stays on for a short time and is turned off with the timer overflow interrupt.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 22, 2017, 07:45 am
I want to turn ON the Mosfet 3 ms after Zero cross and turn OFF the Mosfet  2ms after it is switch ON (5ms after same Zero crossing) .   
 3ms =187 counts
 5ms =313 counts
 1 count = 16 microseconds
 "A single half cycle of the 60 Hz AC signal contains 133,333 clock cycles. This is important because we will be determining the time intervals by clock counts in the Arduino code, not by seconds."

How to use all this numbers ,if i do not understand the programing language ?
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 22, 2017, 08:21 am
about schematic it is the same #3 on autocad drawing only I have parallel transformer to variable TR with constant output 27.6V AC  to supply input to zero cross detector U3(H11AA1) and R7=2.2k ohm.The rest of the schematic is not changed only some data for the parts. :
D3(X00IFM1uF7) 12V 5W
R1=56 Ohm
R2=27 Ohm
Q1 (IXFQ50N60P3) 600V,50A,0.145 Ohm
R5=405K Ohm

Everything else is the same.
Title: Re: rectified AC phase control
Post by: cattledog on Dec 22, 2017, 08:36 am
First, you can improve the sensitivity of the code by using a prescaler of 8 instead of 256, and each count will be .5 microseconds instead of 16.

Three milliseconds will become a count of 6000 and the timer is zero referenced so that becomes 5999.
Five milliseconds will become a count of 10000 which becomes 9999.

Instead of using the Compare A interrupt and Overflow interrupts, it is simplier to use the compare A and compare B interrupts. The compare A interrupt at 3 ms will turn your pin on, and the compare B interrupt at 5 milliseconds will turn it off. I'm not sure if you are writing the mosfet gate high or low to turn it on, so take a look at that piece of the code.

With those modifications, the code becomes

Code: [Select]
// Mosfet control
//
// This Arduino sketch is for use with the 
// control circuit board which includes a zero
// crossing detect function and an opto-isolated MOSFET
//
// Timing control is accomplished using the internal
// hardware timer1 in the Arduino
//
// Timing Sequence
// * timer1 is set up but disabled
// * zero crossing detected on pin 2
// * timer1 starts counting from zero.
// * comparator A set to "delay to on" value
// * comparator A ISR turns pin on
// * comparator B set to  time to off value = 2ms from delay to on.
// * comparator B ISR turns pin off

// The hardware timer runs at 16MHz. Using a
// divide by 8 on the counter each count is
// .5 microseconds.  1/2 wave of a 60Hz AC signal
// is about 16667 counts (8,333 microseconds).


#include <avr/io.h>
#include <avr/interrupt.h>

#define DETECT 2  //zero cross detect
#define GATE 9    //mosfet gate
//#define PULSE 4   //trigger pulse width (counts)
//int i=483;

void setup(){

// set up pins
pinMode(DETECT, INPUT);     //zero cross detect
digitalWrite(DETECT, HIGH); //enable pull-up resistor
pinMode(GATE, OUTPUT);      //mosfet gate control

// set up Timer1
//(see ATMEGA 328 data sheet pg 134 for more details)
OCR1A = 5999;      //initialize the comparator values
OCR1B = 9999;
TIMSK1 = 0x06;    //enable comparator A and comparator B interrupts
TCCR1A = 0x00;    //timer control registers set for
TCCR1B = 0x00;    //normal operation, timer disabled


// set up zero crossing interrupt
attachInterrupt(0,zeroCrossingInterrupt, RISING);   
  //IRQ0 is pin 2. Call zeroCrossingInterrupt
  //on rising signal



//Interrupt Service Routines

void zeroCrossingInterrupt(){ //zero cross detect   
TCCR1B=0x02; //start timer1 with divide by 8 input
TCNT1 = 0;   //reset timer1 - count from zero
}

ISR(TIMER1_COMPA_vect){ //comparator match A
digitalWrite(GATE,HIGH);  // turn on mosfet gate HIGH or LOW??
}

ISR(TIMER1_COMPB_vect){ //comparator match B
digitalWrite(GATE,LOW); //turn off the Mosfet gate HIGH or LOW??
TCCR1B = 0x00;          //disable timer stop unintended triggers
}

void loop(){
// place code here to modify the timer and do other things                         
}


EDIT:
I had made an error in the code to enable the compA and compB interrupts the TIMSK1 setting needs to be B00000110 or 0x06.  I'm sorry for my mistake. The mosfet would not have be turning on at 3ms and I hope that didn't mess anything up. :-(
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 23, 2017, 04:05 am
Compare the two codes , the one from arduino playground and the one which posted by" cattledog" , after   "   ISR(TIMER1_COMPA_vect){ //comparator match A
digitalWrite(GATE,HIGH);  // turn on mosfet gate HIGH or LOW??"
I did not see value for TCNT1
}   
 when will switch Mosfet  and after that is not clear for me when the Mosfet will switch OFF .
Also I can  be OK with divide by 256 on the counter instead of 8.
half wave time is 8.3333ms
 switching HIGH  ,Gate  with delay from zero crossing point t1=3ms=187 counts
 switching LOW ,gate (close mosfet) t2=2ms=125 counts after mosfet isON
 switching LOW ,gate  with delay from zero crossing t3=t1+t2=5ms=313 counts
how to implement this in the code ?
Title: Re: rectified AC phase control
Post by: cattledog on Dec 23, 2017, 05:07 am
Quote
I did not see value for TCNT1
TCNT1 happily ticks on by itself and does not need any external changing. The original code pushed TCNT1 to nearly the top value of the timer to create a short pulse. You do not want to create a short pulse. You want a 2 ms pulse.

It is more transparent to me to turn the pulse low with the CompB interrupt, than it is to readjust TCNT1 so that the overflow interrupt occurs 2 ms after the CompA interrupt and turns the pulse off in the overflow interrupt.

Quote
when will switch Mosfet  and after that is not clear for me when the Mosfet will switch OFF .
You will turn the Mosfet off in the COMPB isr when the timer count (TCNT1) matches the OCR1B value.

Quote
Also I can  be OK with divide by 256 on the counter instead of 8.
half wave time is 8.3333ms
 switching HIGH  ,Gate  with delay from zero crossing point t1=3ms=187 counts
 switching LOW ,gate (close mosfet) t2=2ms=125 counts after mosfet isON
 switching LOW ,gate  with delay from zero crossing t3=t1+t2=5ms=313 counts
how to implement this in the code ?
Why would you possibly want 16us resolution when you can get .5 us. You are using the 16 bit timer,so you might as well take advantage of it. The difference in count differs by 256/8 = 32

32x 187 = 5984
32x 313 = 10016

My values are 5999 and 9999. The suggested x256 resolution would make more sense if you were using an 8 bit timer. The difference betweenb 9999 and 5999 is 4000 counts at .5 us or 2 ms.

Have you tried what was written?

If you absolutely insist on maintaining the structure of the TRIAC code with the forced jump of TCNT1, the turn off in the overflow interrupt, and the 256 prescaler that can be done. But giving me some reason why would help motivate me.

Do you have any plans to change the start or stop points, or are they forever fixed at 3 and 5 ms?

Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 23, 2017, 05:30 am
I just try to understand how this timer is switching on  and how this program will work with the MOSFET  N- channel. I do not want to damage any components of the schematic. For me is very hard to troubleshooting and fine if something get wrong. Tomorrow I will try with the code you suggesting. Tonight I have some other things to finish. Thank  you very much ,and I am sorry if I am so annoying.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 23, 2017, 09:15 pm

I upload the program on Arduino board and check- NO output from MOSFET . Check signal from Dpin9 (of Arduino)-  0V, nothing on the oscilloscope also. Upload different program and I have pulses on DPin 9 of Arduino  +4.96V .The problem is not the arduino board. what could be?
Title: Re: rectified AC phase control
Post by: cattledog on Dec 23, 2017, 09:27 pm
Quote
I upload the program on Arduino board and check- NO output from MOSFET . Check signal from Dpin9 (of Arduino)-  0V, nothing on the oscilloscope also.
Have you verified the zero cross input on pin 2?
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 23, 2017, 09:36 pm
Yes, this was the first thing I checked. I have short picks on oscilloscope to pin2.
Title: Re: rectified AC phase control
Post by: cattledog on Dec 23, 2017, 10:41 pm
There's something I don't quite understand about the persistance of the OCR1A and OCR1B values in the normal mode, but if  you reset them everytime in the zero cross interrupt, my testing indicates the output will turn on and off.

Code: [Select]
void zeroCrossingInterrupt() { //zero cross detect
  TCCR1B = 0x02; //start timer1 with divide by 8 input
  TCNT1 = 0;   //reset timer1 - count from zero
  OCR1A = 5999;
  OCR1B = 9999;
}
Title: Re: rectified AC phase control
Post by: cattledog on Dec 23, 2017, 11:12 pm
If you are not getting the results you require with OCR1A and OCR1B being set in the zero cross interrupt, here is the original sketch using the COMPA and overflow vectors with a pulse width of 2ms. The prescaler is still at 8 instead of 256. If OCR1A is not set in loop() like the example code, you may need to set OCR1A explicitly in the zero cross interrupt.

Code: [Select]
#include <avr/io.h>
#include <avr/interrupt.h>

#define DETECT 2  //zero cross detect
#define GATE 9    //mosfet gate
#define PULSE 4000   //2ms trigger pulse width (counts)


void setup(){

  // set up pins
  pinMode(DETECT, INPUT);     //zero cross detect
  digitalWrite(DETECT, HIGH); //enable pull-up resistor
  pinMode(GATE, OUTPUT);      //TRIAC gate control

  // set up Timer1
  //(see ATMEGA 328 data sheet pg 134 for more details)
  OCR1A = 5999;      //initialize the comparator 3 ms delay
  TIMSK1 = 0x03;    //enable comparator A and overflow interrupts
  TCCR1A = 0x00;    //timer control registers set for
  TCCR1B = 0x00;    //normal operation, timer disabled


  // set up zero crossing interrupt
  attachInterrupt(0,zeroCrossingInterrupt, RISING);   
    //IRQ0 is pin 2. Call zeroCrossingInterrupt
    //on rising signal



//Interrupt Service Routines

void zeroCrossingInterrupt(){ //zero cross detect   
  TCCR1B=0x02; //start timer with divide by 8 input
  TCNT1 = 0;   //reset timer - count from zero
  OCR1A =  5999; //maybe required if OCR1A is not set in loop like the example
  //EDIT -- The line above setting OCR1A need to be uncommented
}

ISR(TIMER1_COMPA_vect){ //comparator match
  digitalWrite(GATE,HIGH);  //set mosfet gate to high
  TCNT1 = 65536-PULSE;    //move TCNT1 to create trigger pulse width pulse = 4000 for 2ms

ISR(TIMER1_OVF_vect){ //timer1 overflow
  digitalWrite(GATE,LOW); //turn off mosfet gate
  TCCR1B = 0x00;          //disable timer stopd unintended triggers
}

void loop(){}
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 24, 2017, 12:10 am
Re: rectified AC phase control
Now after I have add OCR1A=5999 and OCR1b=9999, I have signal to pin 9 of Arduino, but i have some other problems in the schematic. I have to fined what is wrong. IF I cannot fined any problems I will try with the original sketch you suggested.  Probably it will take some time. Thank you and HAPPY  HOLIDAYS
Title: Re: rectified AC phase control
Post by: cattledog on Dec 24, 2017, 12:40 am
Both sketches (COMPA /COMPB interrupts and COMPA/OVF interrupts)should generate the same two ms pulse (three ms after zero cross) at pin9. 

I don't have a scope but if you see any differences of the pin 9 output between the two sketches, I'd appreciate seeing the traces.

Good luck working through your issues. I'm sure that wvmarle and Tom George can help you sort though any circuit/hardware problems. I'm useless in that regard.

I have found that holiday drinking does not help my programming.  :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 29, 2017, 06:33 pm
Everything was working when i was checking elements of the schematic and the Arduino program cod, but when I introduce the coil and program to entire schematic start to happened weird things .The zener diode lost resistance, one of 4N25 optocouplers failed  on pin4-pin5(0 V).My oscilloscope probe melt ground lead . Mosfet failed too. I am in real trouble.  Can you help me?
Title: Re: rectified AC phase control
Post by: TomGeorge on Dec 29, 2017, 06:47 pm
Hi,
Can you post a latest version of your circuit, and indicate where you had the gnd of your scope connected.

Can you post some pictures of your project so we can see component layout?

Did you have the scope probes connected when you turned it ON.

Tom... :)
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 29, 2017, 06:50 pm
That sounds bad! And like a typical risk of working with high voltages.

Did you try it without the coil in place? If so, did you get the correct signal on the MOSFET? That would at least confirm that the software and the switching circuits work.

My best guess is that you've got hit by the reverse voltage of the switching coil. Did your flyback diode survive the ordeal? If not, then that's a very likely candidate for the cause of this catastrophe.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 30, 2017, 05:54 am
I use for GRD lead 10K resistor to minus of rectifier bridge and for probe 10K resistor connected to "+ " input to the coil  L2 . I  check voltage to Mosfet gate it was weird curves  mostly with "-" values  (probe on gate , GRD lead to (- )of rectifier bridge  . I have only one probe for the oscilloscope.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 30, 2017, 06:03 am
schematic view is attached
Title: Re: rectified AC phase control
Post by: DrDiettrich on Dec 30, 2017, 06:40 am
If your scope has a USB connection, you most probably short the Ardino Gnd to the scope Gnd. You cannot have both the Arduino and the scope connected to the PC, at the same time.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 30, 2017, 06:45 am
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=239073)
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=239075)
I don't really understand what that scope image shows, you have to give a bit more detailed description - and/or post an annotated image.

For the setup itself: I see you're using a solderless breadboard, but I recall you mentioned currents of a few Amps. That's too much for such a breadboard. I don't think it's the cause of your problems but it may very well be part of it. This will have to be soldered on perfboard or similar. The MOSFET you may need to place in a socket for easy replacement, or leave some space to solder in another one. Be prepared to break stuff, it's part of the game, I've seen my fair share of smoke and am not using your high voltage level.

You have a scope which is a great tool.

What I'd suggest you is to start off without the coil (as coils, being inductors, can cause problems) and first make sure everything else works as expected.

1) make sure the software works: get the zero crossing pulse working, and make sure your Arduino outputs the correct signal for the optocouplers (use your scope).

2) add the optocoupler part: make sure the signal as presented to the gate of the MOSFET is as you expect. You now know the software is good, so any issues are in the hardware.

3) optional extra step: add a resistor (1k would be a good start - make sure it can handle the heat, 100V = 100 mA so 10W of power to dissipate!). No inductive problems to deal with now. Then you can make sure that the resistor (later the coil) is switched the way it should be.

4) add the coil, with appropriate flyback diode.
You may use a Schottky as it is much faster than a regular diode (around 50ns reverse recovery, against 500ns to a few ms for regular diodes, which is plenty of time to fry other components at these currents and voltages). I don't know how to calculate back current, but as you put some 4A through that coil I'd go for a diode that can handle a >40A peak. Also make sure the reverse breakdown voltage is at least 200V, maybe even 300-400V to make sure.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 30, 2017, 07:04 am
Thank you for all suggestions wvmarle. I will follow all of them and will give you update.It will take some time.

 answer to DrDiettrich :     NO, the oscilloscope is RIGOL and is powered by 115V  AC. That is why I use 10K  ohm resistors to my probe and probe GRD to prevent from damages, but look like is not enough.  I have only my ARDUINO board connected to my laptop.
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 30, 2017, 07:06 am
I just see your added schematic.

Your voltage has gone up a lot! Now 200V to the rectifier, which means a peak of 282V! A lot more than the 150V I calculated with.

The symbol for the MOSFET is wrong, that's a PNP transistor (which is a totally wrong part, an NPN transistor could work but a PNP definitely not). The MOSFET type you indicate is suitable: 600V, 60A.

Another thing to test, before connecting the coil: make sure the 470k resistor can keep the 50 uF cap well charged, as you continuously charge the MOSFET gate. Especially at lower voltages that may be an issue.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 30, 2017, 06:54 pm
Hi everyone and Peaceful NEW YEAR!!!
I look again the original schematic and I think that we have switching circuit parallel to L2 and current trough D5 and D4 can make trouble. If we connect the switching circuit after L2 It will be better by mine opinion, but I am not sure. (see attached new version of the Schematic) .Plus Voltage drop inL2 will help to lower the voltage in switching circuit.
Q2 is a PNP transistor and I connect +5V to pin 3 (emitter) and (collector) pin2-  to pin1 of 4N25 . Is this wrong?
 about Q1 (IXFQ50N60P3) Gate is pin1 ,Drain is pin2 and source is pin3 - Is this is correct connection?
Original schematic R6 =220K  see the attached new schematic (R10) I do not see what is the function, because I think draining to"0"V the gate of Mosfet is trough pin 5-to pin 4 of U2(4N25) when U1 is shut off and we have current trough pin1 and pin2 of U2. Is this R6(R10) for protection, or It could be removed ?
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 31, 2017, 02:41 am
Hi everyone and Peaceful NEW YEAR!!!
I look again the original schematic and I think that we have switching circuit parallel to L2 and current trough D5 and D4 can make trouble.
Where is D5?

Quote
Q2 is a PNP transistor and I connect +5V to pin 3 (emitter) and (collector) pin2-  to pin1 of 4N25 . Is this wrong?
 about Q1 (IXFQ50N60P3) Gate is pin1 ,Drain is pin2 and source is pin3 - Is this is correct connection?
Check the data sheet. That's where you can find the pinouts.

Quote
Original schematic R6 =220K  see the attached new schematic (R10) I do not see what is the function,
It's to keep the MOSFET switched off when both optocouplers are off. Never keep a gate floating.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 31, 2017, 07:30 am
  See attachments:
"photo jpg" is signal to pin1 of U1  Like suppose to be 2ms wide pulse.
"photo(1) jpg" signal to pin1 of U2  close to expected.
"Photo (3) signal to Gate of MOSFET   Negative value ,no idea why?
"photo(2) voltage curve across 10K resistor I put on place of Coil L2, L1 is not connected needer.

I change C1 to 10uF,50V  no changes.
I checked all components could not fine the problem. I am not very good  with troubleshooting .I will appreciate any suggestions.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Dec 31, 2017, 07:50 am
I do not know why photo(3) was not posted .I try again -no result ,but it is the same like in previous post when I use the load coil L2 and L1. Look like some component is failing ,but I can not catch this. I will order new diodes and Mosfet.
Title: Re: rectified AC phase control
Post by: DrDiettrich on Dec 31, 2017, 08:32 am
Photo(2) suggests that the FET is never fully off.. OTOH a 10k load is far away from the intended coil impedance. What if your try with 1k or less?
Title: Re: rectified AC phase control
Post by: wvmarle on Dec 31, 2017, 11:56 am
Indeed, it looks like the MOSFET didn't switch off for some reason. That image should be very close to the image you see in photo.jpg, basically mirroring the signal placed on gate - the second opto is just to help it switch off faster - it pulls the gate very fast to about +0.6V, the forward voltage of the phototransistor in the opto, which should be low enough to fully switch off the MOSFET.

MOSFET gate voltage is best measured with the source pin as reference, and as close to the pins as possible, preferably right at the pins. Of course it should never be negative, unless your ground reference is off somehow.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 08, 2018, 03:16 am
I change all parts of the schematic strictly as required by  #3 ( of wvmarle) schematics with the exception of Mosfet which is IXFQ50N60P3 instead of IRF730 and part # for Q2 is 2N4403. I include the coil L1 and L2 in the circuit  too. I tested and it was showing 4.6 A  up to 120V input to the bridge rectifier. Vgs at the Mosfet was 5.6V . But when i analyze the  attached picture of the oscilloscope seamed to me that I do not have 2ms pulse and this high picks are 180 degree apart .When I increase the voltage above 120V AC ,my Mosfet stop working and I have to replace with new one. I am confused and do not know what to check next.
Title: Re: rectified AC phase control
Post by: cattledog on Jan 08, 2018, 03:29 am
Did you follow the recommended sequence of post #124? Where did things begin to look wrong?
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 08, 2018, 06:06 am
Yes, I follow this recommendations , but I have  negative pattern for gate signal. I check voltage with my multimeter and is showing   Vgs= +5.6V . This make me decide to try with the coil, because i have no explanation were this negative wave is produced at the Mosfet GATE. I connect the coil between + of the bridge and drain of the mosfet and source to the "-"of the bridge. Is this correct or I am wrong again?
Title: Re: rectified AC phase control
Post by: wvmarle on Jan 08, 2018, 06:31 am
Yes, I follow this recommendations , but I have  negative pattern for gate signal.
At which stage do you see this negative pattern? How do you see it? You say your multimeter gives a positive signal.

Switching capacitors produces negative voltage peaks, and that's what you're doing: that MOSFET gate is also a small capacitor. You charge VGS up to about +12V, then you switch the optos, pulling the gate to 0V, and with it the source to -12V. Of course this very quickly charges back to 0V, switching off the MOSFET, and you're likely to measure some halfway point of this voltage.

Quote
I check voltage with my multimeter and is showing   Vgs= +5.6V .
Which is an averaged voltage, as your multimeter is not following the peaks. You're not supplying a constant voltage to the gate, so a multimeter can never give a reasonable number here.

In testing I'd leave out the coils and the voltage at its minimum until confident everything else works. This as it keeps damage to a minimum if things go wrong. Also the coil with its kick-back when switching can cause interference. Also go step by step, making sure it works before you move on. So if you see something odd, make sure you understand what's going on before connecting more stuff.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 09, 2018, 04:13 am
Hi , every one. I received  new prob for my Oscilloscope and now i have two again.
But my disasters continue .My rectifier bridge get in smoke and same time my variable transformer start making strange noise and output voltage drop. the fuse on step up TR#3 burn. I decide  to use regular suply voltage supply  119V AC which is at my place ,but I can not get full wave rectified image (see attached photo. I keep changing the bridges with new ones ,but same result . I am afraid something happened to my oscilloscope . I am on DC settings for probe 1 , and AC for probe 2 . I have 5 new
 KBPC5010 -  Bridge Rectifier Diode, KBPC Series, Single, 1 kV, 50 A, Module, The one it burn was KBPC2510(25A)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 09, 2018, 08:30 pm
 see attached photo : this is with half wave rectified 119V AC ,without coil ,channel 1 is set to 20V DC  and showing voltage at Mosfet gate . Probe at gate,  GND at source of MOSFET.
 channel 2  is set to100V DC and show voltage across resistor 1.5K(which I use instead of coil L2). I do not see pulse I was expected across the resistor. There only small cut of tip of the positive portion of the wave representing on channel 2. I have  0A trough the resistor.Look like the Mosfet is not switching at all. What could be the problem?
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 10, 2018, 02:34 am
I change U1(4N25 ) with new one (4N35) and have amps passing trough the Mosfet (0.15 A),but I still have no pulses I expect for the DC going trough resistor. See attachment. on channel 1 I have monitoring Gait voltage for Mosfet ( going from+9.81V to - 62V ), and on chanel2 DC going trough resistor. every thing on the side of the ARDUINO commands to optocouplers is like I expected and luckily nothing change since first photos I posted for this part of the schematic . What I can do next ?
Title: Re: rectified AC phase control
Post by: wvmarle on Jan 10, 2018, 06:38 am
I see a square pulse - that's the Arduino's signal?

What to do next.... check your wiring, very carefully and thoroughly, as I suspect there's something wrong. A solder bridge or so, maybe a part that's connected wrong - something at least.

The schematic that I designed should keep the gate voltage (referenced to GND) to about 0-12V. The voltage you report are too high for your MOSFET: most can handle no more than +/- 25-30V on the gate, referenced to the source pin. More than that will kill a MOSFET.

Actually without the MOSFET in place you should be able to see the VGS pulses. That should be the output of the two optocouplers. Back in #101 you reported some good values for that. Make sure that hasn't changed - it's what you provide to the gate that counts.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 13, 2018, 11:56 pm
Hi everyone, I have checked everything and I monitoring on ( photo jpg) signal from ARDUINO on pin1 of U1 on channel 1(setting  5V). I monitoring on channel 2 signal on pin1 of U2 (setting 5V) looks normal.
On photo(1)jpg you can see I am monitoring on channel1 voltage on pin4 ofU1 and channel 2 monitoring pin4 ofU2. This is looking totally wrong. Why this is happening to me? I do not see how it will switch on the MOSFET and how it will drain the charge at gate of MOSFET to switch off. I do not have any load or MOSFET in the schematic and I am waiting for new rectifier bridge ,because the one I (received 10 Each),do not give me full wave rectified picture. See on right upper corner of the oscilloscope,  I have register -68V .Both probe ( channels)are set to monitoring DC
Title: Re: rectified AC phase control
Post by: TomGeorge on Jan 14, 2018, 12:33 am
Hi,
Can you post a new up to date schematic please.

Can you mark on it where you are connecting the scope probes and the gnd clip of the probes when you show a multi channel scope diaplay.

All your scope patterns are of little help if you have a circuit with parts of it floating or biased with respect to the the
main reference point, where ever that is.

You must be aware that ALL of the scope probes' gnd clips are connected together and to gnd of your mains supply.

This may explain you blowing up probes and rectifiers and other components.


Quote
Yes, I follow this recommendations , but I have  negative pattern for gate signal. I check voltage with my multimeter and is showing   Vgs= +5.6V .
Where did you have the gnd probe of the scope connected for the negative pattern

Vgs = +5.6V would be correct as your reference is the MOSFET source.

Can I suggest before posting your images,  you use a graphics editor, like PAINT and add some text pointing to what each trace is, some of  your images you cannot read the CH numbers.

Thanks... Tom.... :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 14, 2018, 03:00 am
Sorry for this  bad drawing. Like I sed I get back to original drawing , but for the test I do not connect L2 (or any resistor) and I did not connect the MOSFET.When I  draw,  I sow that it is bad Idea to monitoring Pin4 of U2, because this is directly connected to the GRD (or "-" of the bridge)
Title: Re: rectified AC phase control
Post by: TomGeorge on Jan 14, 2018, 03:16 am
Hi,
Thanks...
Ops circuit.
(http://forum.arduino.cc/index.php?action=dlattach;topic=514029.0;attach=241065)

Tom.. :)
Title: Re: rectified AC phase control
Post by: TomGeorge on Jan 14, 2018, 03:18 am
Hi,
Your scope should have the provision to do    Ch1 minus Ch2 trace.
Can you see what that displays please.

Thanks.. Tom... :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 14, 2018, 05:12 am
I went to math,A-B(channel 1-channel 2) and I have strait line  at "0" V, see attachments
Title: Re: rectified AC phase control
Post by: aarg on Jan 14, 2018, 06:07 am
Your scope setting must be wrong. The difference signal is bull.
Title: Re: rectified AC phase control
Post by: TomGeorge on Jan 14, 2018, 06:25 am
Hi,
Make both channels the same V/cm.
And  both channels DC coupling.

Tom... :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 14, 2018, 06:37 am
I set Chanel1 at scale 50V ,Chanel2 at 50V ,and math scale 10V, after that I lower to5V and going down steps up to100mV .No changes to Math line  "0"V strait line.
Title: Re: rectified AC phase control
Post by: TomGeorge on Jan 14, 2018, 07:38 am
Hi,
Where are you probe gnds connected?

Tom.. :)
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 14, 2018, 04:15 pm
Hi Tom, for the Arduino circuit both probe GND are connected at the point were ARDUINO GND is connected to the schematic. for the high voltage both probe GND are connected were "-" from the rectifier bridge is connected to the schematic .(I show on last posted schematic),but may be is not readable .
Title: Re: rectified AC phase control
Post by: TomGeorge on Jan 14, 2018, 05:44 pm
Hi, 
Okay ,I understand what connections you have.

Now in the high voltage trace you have gnd of both probes connected to the -ve output of the rectifier.
You have Ch2 probe connected to pin4 of the lower 4N35, U2?.
Your circuit shows Pin4 connected directly to -ve output of the rectifier, so how are you able to measure a 68V signal.
You should have a flat trace at probe gnd reference.

PLEASE double check your wiring, TURN the power off and use your DMM to measure the resistance between -ve rectifier terminal and pin4 of the 4N35.

Can you use the full screen of the scope please for the two channels.
I don't see a need for a 100nS sweeping display when we are looking at 60Hz signals. so just get rid of it.


Thanks.. Tom... :o :o
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 14, 2018, 07:37 pm
Resistance is 0.6 Ohm. looks like I have damaged GRN of my scope , that is why I have all this weird pictures that have no sense .

one more attempt.  I install parallel to U1(4N35)  optocoupler MOC3041 and connect pin 6 with same signal that is going to pin5 of U1 ,and you can see now what i have on channel 2 of my scope monitoring pin4 of this MOC3041.
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 14, 2018, 08:00 pm
I am sorry I forgot to connect pin4 of MOC3041 to "-" of rectifier bridge in previous post. now the picture of signal is the same
Title: Re: rectified AC phase control
Post by: dgueorguiev on Jan 14, 2018, 09:00 pm
Looks  like my scope adding half wave with minus value to the 0 V value of "-" point of the rectifier bridge. There no other explanation .
Title: Re: rectified AC phase control
Post by: TomGeorge on Jan 14, 2018, 09:28 pm
Looks  like my scope adding half wave with minus value to the 0 V value of "-" point of the rectifier bridge. There no other explanation .
I would say you have damaged your scope, probably because you do not understand about gnd and mains supply.
Until you get the problem fixed, all you scope displays will be invalid.
Just the fact that you connect gnd of the probes to a DC rectifier that is DIRECTLY connected to the mains supply is where you scope will have been damaged.
DO NOT CONNECT gnds to ANY LIVE directly connected circuit.
Tom... :)