Author Topic: Problem with DIY dimmer  (Read 8097 times)

0 Members and 1 Guest are viewing this topic.

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Problem with DIY dimmer
« on: August 19, 2018, 07:06:17 am »
I have built the dimmer shown in the attached file.
(the parts are the ones shown in the drawing)

It works fine with incandescent bulb and works fine with a Tecsol soldering iron I had.
(here let me note that I want it for this job, to regulate the temperature of the soldering iron)

I burned the Tecsol and I got a ZD-70D Double Power Tweezers 20Watt / 130Watt ...
Well, with this soldering iron the dimmer does not work !!!
Its temperature is constantly at the maximum no matter the position of the potentiometer !!


Why is this happening?


I tried again with the incadescent lamp and then with a motor: the dimmer with these works fine!
Only with this particular soldering iron I get this strange bahavior!

 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Problem with DIY dimmer
« Reply #1 on: August 19, 2018, 07:30:31 am »
This iron probably has an internal controller. It may also have a transformer, basic dimmers don't like inductive loads.
 
The following users thanked this post: panoss

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #2 on: August 19, 2018, 08:12:42 am »
The iron probably has a similar phase control circuit in it for its dual power feature.  As its normal operating power of 20W requires a TRIAC fired at a phase angle of 123 degrees, most or all of the range of your phase control circuit is ineffective.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #3 on: August 19, 2018, 08:24:02 am »
Guys, sorry to dissapoint you...but no internal controller, no transformer, no phase control circuit, no star wars tech.
Take a look at the attached photos (I just opened it up).
A f$$#ing diode in a switch!! :-DD
When the switch is pressed the diode is shorted, so you have the whole sinewave accross the resistor...(and, according to the manufacturer, goes from 20W to 120W... ::))
« Last Edit: August 19, 2018, 08:45:00 am by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #4 on: August 19, 2018, 08:40:54 am »
Well, that's unexpected.   The diode can only reduce the power by 50% in any full cycle.   The only way it could work as specified is if they used a PTC heating element, which could draw 120W when cold, but its resistance goes up enough when hot for it to drop to 20W at 50% duty cycle.   In that case, when you reduce power, the element cools and it draws more current till it reaches equilibrium, only slightly cooler.

To be certain what's going on,you'll need to measure the current it takes, preferably using an isolated current probe on a scope.  Alternatively, first measure the element resistance when cold (across mains plug L and N pins with the button held down), run the iron till its at max temperature, unplug it and immediately start measuring its element resistance (across mains plug L and N pins with the button held down), repeating the measurement every ten seconds as it cools till the solder on the bit solidifies.

The diode may be causing issues for your control circuit - You could try putting a 40W incandescent bulb in parallel with the iron so the TRIAC's load isn't Hi-Z on one half cycle, to see if that lets you get a usable control range.

« Last Edit: August 19, 2018, 08:46:37 am by Ian.M »
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #5 on: August 19, 2018, 08:52:20 am »
I 'll just replace the diode and the switch with a wire (or short the switch).
But because it must not work at 'full speed' for more than 20 seconds (according to the manufacturer) I 'll always use it in conjuction with my dimmer.
« Last Edit: August 19, 2018, 09:12:10 am by panoss »
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #6 on: August 19, 2018, 01:02:15 pm »
What about this:
1. replace the diode in the soldering iron with a wire
2. put the diode 'before' the dimmer (so the circuit is: mains->diode->dimmer-soldering iron)

Should this work?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #7 on: August 19, 2018, 01:13:30 pm »
Not any better - it doesn't matter what order the dimmer TRIAC, element and switch¦¦diode are, as they are all in a series circuit.

The only good option is to permanently attach its cord to the dimmer.   You can either short out the handle switch and put a 'boost' switch on the dimmer, or rewire with a four wire cord and use the extra wire to make the handle switch the 'boost' switch (which bypasses the dimmer pot so it goes to full power when pressed).   In series with the dimmer pot, put a preset so you can set max normal power to a bit more than 50% - 60% should be OK.

However at the end of the day, its still an unregulated firestick, and you'd have been better off getting a dirt cheap Hakko clone, then saving up to replace the bit and element with genuine parts.
« Last Edit: August 19, 2018, 01:16:19 pm by Ian.M »
 
The following users thanked this post: panoss

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #8 on: August 19, 2018, 02:22:52 pm »
I don't understand why the diode makes it work in 'full mode' no matter the pot 's position.
Can someone explain this?
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2084
Re: Problem with DIY dimmer
« Reply #9 on: August 19, 2018, 02:29:27 pm »
It's clearly not a diode. A diode would simply halve the power. Are there any markings on it? Can you provide a close-up, in focus picture of it?

 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #10 on: August 19, 2018, 02:45:43 pm »
It clearly is a diode, 1N4007.

 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2084
Re: Problem with DIY dimmer
« Reply #11 on: August 19, 2018, 03:00:02 pm »
There must be some nefarious activity elsewhere then :)

The DC component will alter the response of your phase controller, but that does not explain why it goes to full.

ed: negation added, oops !
« Last Edit: August 19, 2018, 03:15:46 pm by Andy Watson »
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #12 on: August 19, 2018, 03:06:25 pm »
but that does explain

Does or does not?
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2219
  • Country: mx
Re: Problem with DIY dimmer
« Reply #13 on: August 19, 2018, 03:12:27 pm »
The photo is too blurry to read the part number.

A possibility is that the “diode” is actually a SIDAC?
I used it once as a simple, one step dimmer.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #14 on: August 19, 2018, 03:14:11 pm »
I know that it 's blury but this is because of the camera.
I can see it my own eyes it 's a 1N4007 diode.
« Last Edit: August 19, 2018, 03:25:10 pm by panoss »
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #15 on: August 19, 2018, 04:12:34 pm »
I want to make a simulation of my dimmer in LTSpice (for educational purposes, to learn a little bit of LTSpice).

In C:\Program Files\LTC\LTspiceXVII\examples\Educational I found dimmer.asc (I attached it in case you don't have it)

I want to change the Triac to the one I have (BTA12-600B) and the diac to BR-100. (in dimmer.asc I see just 'Triac', something generic and not a specific Triac)
How can I do this?

 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #16 on: August 19, 2018, 06:09:22 pm »
You'd need LTspice compatible models for the DIAC and TRIAC you want to use,  put the model files (.sub or .lib) in the same folder as the sim, add a .lib statement to invoke each of them and set the part no.s of the TRIAC and DIAC symbol each to the name of a model in your model files.

P.S. I *strongly* recommend measuring the iron element's hot and cold resistances by the procedure I described in reply#4.  The *ONLY* way that iron can meet its specs for power levels is if the element is a PTC resistance.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #17 on: August 19, 2018, 09:14:38 pm »
Here is what I did yesterday for the diac:
1. I created a file named 'BR100_diac.mod.:
2. I opened it with LTSpice.
3. I added this content (I found it here) and saved it:
Quote
.subckt diacBR100 1 2
*Based on BR100 measured data
*Convergence problems often occur with this model
*If you have a better model please tell me
Vdummy 1 5 dc 0
Ediac 5 2 TABLE {I(Vdummy)} =
+ (-10.06m,-20.46) (-9m,-20.5)    (-7.02m,-20.72) (-5.98m,-20.89)
+ (-5.05m, -21.11) (-3.26m,-21.91) (-2.15m,-22.96) (-1.6m,-23.99)
+ (-7.2n,   -32.5) (-4.0n, -32) (-3.2n,-31) (-2.9n,-30) (-2.5n,-28.03)
+ (-2.3n,-25.27) (-2n,-20.15) (-1.9n,-15) (-1.8n,-7.96) (-1.5n,-1.2)
+ (0,0) (1.6n,1.24) (1.65n,5.15) (1.7n,7.91) (1.8n,10.1) (1.9n,15)
+ (2.1n,20) (2.4n,25.28) (2.9n,28.26) (3.3n,30.5) (1.6m,23.21) (2.3m,22.16)
+ (3.1m,21.44) (4.05m,20.99) (5.01m,20.65) (6.04m,20.32)
+ (6.98m,20.14) (8.09m,20.02) (9.08m,20.02) (10.12m,19.91)
.ends diacBR100
4. Right click->create symbol
5. Component->AutoGenerated->diacBR100 and the part enters in the schematic.

I suppose the procedure is correct, but the model?
How shall I know if it 's correct?

And the model for BTA12-600B? I haven't found anything.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #18 on: August 20, 2018, 07:13:58 am »
I did as suggested:
When cold, Resistance=280 Ohm.
Time(seconds)Resistance(Ohm)
0"1100
10"1014
20"955
30"906
40"860
50"827
60"790
70"745
80"712
90"683
100"660
110"640
120"622
130"605
140"587
150"560
160"546
170"533
180"521
190"505
100"490
210"477
« Last Edit: August 20, 2018, 07:24:55 am by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #19 on: August 20, 2018, 08:40:51 am »
Yep. That's a PTC element.  At 230V RMS supply, it will initially run at 189W from cold, dropping to 48W (or maybe 44W if you extrapolate to allow for the time delay from disconnecting till the first resistance reading), so with the diode in circuit that would be 22W, which matches up well enough with the iron's specs.

The DIAC models from users.skynet.be/hugocoolens don't play well with LTspice.   The tabular behavioural voltage source model  is problematic due to all the breakpoints in the curve and because it breaches one of the required assumptions for a BV source:
Quote from: LTspice help
... However, it is assumed that the circuit element current is varying quasi-statically, that is, there is no instantaneous feedback between the current through the referenced device and the behavioural source output. ...
and the macro model isn't in LTspice compatible syntax.   
 
The following users thanked this post: panoss

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #20 on: August 20, 2018, 08:53:22 am »
Yep. That's a PTC element.  At 230V RMS supply, it will initially run at 189W from cold, dropping to 48W (or maybe 44W if you extrapolate to allow for the time delay from disconnecting till the first resistance reading), so with the diode in circuit that would be 22W, which matches up well enough with the iron's specs.
This (pleasantly) surprises me, I expected that the manufacturer would be too...optimistic  ::), as usually happens with these cheap electronics stuff.

The DIAC models from users.skynet.be/hugocoolens don't play well with LTspice.
So, where can I find the correct models for the diac and the triac (BR100 & BTA12-600B)?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #21 on: August 20, 2018, 09:32:11 am »
Well you can *try* converting the macro model from users.skynet.be/hugocoolens to LTspice syntax:
Code: [Select]
************************************************************************
* BR100: Diac, breakover voltage 32V, breakover current 10uA
* Pkg: Do-35, Ref: Philips, measured I-U characteristic by H. Coolens
* modelled phenomenologically as a current-dependent voltage source
* rise/fall times from parallel capacitance/serial resistance too small!
* BR100 rise time 1.5us typ. (discharge of 100nF with Ipeak=0.5A)
* DB3 rise time 2us max. (10%-90%, discharge of 100nF through 20Ohm)
* author: Detmar Welz
*
* Patched for LTspice syntax, but totally untested
************************************************************************
.subckt BR100 a b params: A=8.5 B=1u C=80m
Vdiac 1 a dc 0 ; ammeter
Cdiac 1 b 1n ; important for stability
Rdiac 1 2 1
Bdiac b 2 v={A}*atan(i(Vdiac)/{B})/i(Vdiac)**{C}
.ends BR100
************************************************************************
but don't blame me if it gives convergence errors or stalls the LTspice engine!  Use with misc\DIAC.asy.

You got lucky - BTA12-600B is in the Triac_st library at LTwiki.org:
http://ltwiki.org/files/LTspiceIV/lib/sym/ValVol/ST/thyristors_st/triac/Triac_st.lib
Download it and use with misc/TRIAC.asy by
Code: [Select]
.lib Triac_st.lib
« Last Edit: August 20, 2018, 09:34:22 am by Ian.M »
 
The following users thanked this post: panoss

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #22 on: August 20, 2018, 09:46:21 am »
Just a thought - I *think* that iron could be temperature controlled by a smart enough controller.    If you run it from DC, the current through it can be used to calculate the element resistance, which can give you the element temperature, and, if the thermal resistance to the tip can be characterised, the bit temperature could be modelled from the excess power required to maintain the element temperature over that with the iron at rest.

The devil would be in the details - maybe full wave rectify the mains then use a MCU to do fast PWM with a MOSFET, sensing the voltage and element current during the PWM on time.  However the firmware would be non-trivial to write.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #23 on: August 20, 2018, 09:59:20 am »
put the model files (.sub or .lib) in the same folder as the sim, add a .lib statement to invoke each of them and set the part no.s of the TRIAC and DIAC symbol each to the name of a model in your model files.
1. I created a file BR100.sub in the same folder as my .asc file
2. I put as content of BR100.sub the text you posted.
3 . I put op: .inc F:\LtSpiceProjects\dimmer_1\BR100.sub  (in folder F:\LtSpiceProjects\dimmer_1 are located the dimmer_1.asc and the BR100.sub files)
4. I don 't understand what you mean by 'set the part no.s', can you explain a bit more?

What I also did:
I put a generic diac, the one included in LTSpice, right clicked it and as 'SpiceModel' I entered 'BR100'. Is this correct?

Just a thought - I *think* that iron could be temperature controlled by a smart enough controller.    If you run it from DC, the current through it can be used to calculate the element resistance, which can give you the element temperature, and, if the thermal resistance to the tip can be characterised, the bit temperature could be modelled from the excess power required to maintain the element temperature over that with the iron at rest.

The devil would be in the details - maybe full wave rectify the mains then use a MCU to do fast PWM with a MOSFET, sensing the voltage and element current during the PWM on time.  However the firmware would be non-trivial to write.
Sounds very interesting.
But I would need a rather hard to find PSU, an SMPS that would convert 230VAC to 230VDC...(30 Watts??)
« Last Edit: August 20, 2018, 10:14:10 am by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #24 on: August 20, 2018, 10:34:58 am »
Place a DIAC (misc\DIAC.asy) and right click its attribute:value which is initially 'DIAC' and change it to 'BR100'.

If the model file is in the same folder as the sim, you don't need the full path in a .inc or .lib statement, so chop that down to:
Code: [Select]
.inc BR100.sub
For the DC supply, if the controller is measuring both the voltage and the current, simply full wave rectify the mains and *DON'T* use a reservoir capacitor.  The resulting waveform peaks at 325V (assuming 230V mains) but the RMS voltage is only 230V.   Use a separate supply for the MCU e.g. the board from a basic USB charger wallwart.

PWM the full wave DC at lets say 31KHz with 50% duty cycle, and you'll have the same power level as the switched diode gave.   Ideally the PWM should be just above the audio frequency range, but if you don't mind the risk of it 'singing' a bit, a lower PWM frequency could be used - which will be necessary if the MCU's ADC isn't fast enough to take at least two samples during the PWM period, one for voltage and the other for current.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #25 on: August 20, 2018, 11:08:34 am »
In the attached files you can see what I 've made so far. (in the second file is the LTSpice file and the other files needed).

So now I have to make the simulation command.
For load I have the resistor RL with value={X}, so that I can give it lots of different values?(have I done it correctly?)
I guess I 'll have to make a transient simulation (??) which I think that measures the voltages and currents from time 0 to the ending time that we define? With a time step that we also define?
Have I got it correctly till now?
« Last Edit: August 20, 2018, 11:30:04 am by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #26 on: August 20, 2018, 11:38:22 am »
You definitely don't want to run a small signal .AC analysis.  A transient analysis with .tran 0.1 would be a good start - that will run it for five cycles of the 50Hz AC.  Try .param X=1200 to start, as that's the approximate hot resistance of the element.

If you have problems with the DIAC models,  try one of the one in http://ltwiki.org/files/LTspiceIV/lib/sym/ValVol/ST/thyristors_st/diac/Diac_st.lib.  Type DB4 looks like a likely candidate.
 
The following users thanked this post: panoss

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #27 on: August 20, 2018, 01:56:20 pm »
I get this error when I try to run the simulation:
'Analysis: Time step too small; initial timepoint: trouble with u2:1:dak-instance d;u2:1;_dak1'
(u2 is the triac).

I changed the Triac 's value from 'BTA12-600B' back to 'TRIAC' (so it 's the generic triac that comes with LTSpice) and this also gives me an error!! :o : 'Unknown subcircuit called in: xu2 n001 n005 n007 triac'
« Last Edit: August 20, 2018, 03:39:55 pm by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #28 on: August 20, 2018, 04:33:47 pm »
There is *NO* LTspice default TRIAC model. The models for \examples\educational\dimmer.asc are embedded on the schematic.  Copy what you need to your schematic.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #29 on: August 20, 2018, 04:43:27 pm »
This one in the attachment works!
I change the value of R1 from 0 Ohm to 300k and I get logical results of voltage at B.
(I tried in this the BR100.sub but it fails, so I guess the model is not correct)

 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #30 on: August 20, 2018, 05:02:18 pm »
But all in one file is better (see attachment), this is the LTSpices 's example and this works fine too.
It 's better to have the models of the diac and of the triac on the schematic so I can very easily modify them. (I think)
So what should I change in the diac 's model?
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #31 on: August 20, 2018, 08:53:31 pm »
The Triac_st.lib is for PSpice:
'***********************************************************************
*             Triacs PSpice Models                  *
***********************************************************************'
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #32 on: August 21, 2018, 12:29:30 am »
So? 

As LTspice is propritary to Analog Devices (formerly Liner Technology) and PSpice is from Cadence, who have no direct interests in semiconductor fabrication, many competing manufacturers release models in PSpice format. 

There are only a few syntax differences between PSpice and LTspice, which means many PSpice models will work unchanged. However when one doesn't work with LTspice one has to be somewhat of a SPICE expert to figure out why, and possibly patch it.

Models found on LTwiki.org *generally* run OK unless you are unlucky and hit an edge case.

Try the attached, which uses the ST DIAC and TRIAC models from LTwiki

N.B. if you have previously downloaded older versions of Diac_st.lib or Triac_st.lib *AND* installed them to your LTspice lib\sub directory, they may throw errors.  Either disable them (rename to .off) or replace them with the more recent ones this sim ferrets.
 
The following users thanked this post: panoss

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #33 on: August 21, 2018, 09:33:24 am »
This works fine! (except for the .ferret commands but I downloaded them manually, so no problem)

I think I found something.
The circuit (see attached files) without C2 and R2 seems to work fine (plot_a). (the DLoad is the diode inside the iron)
With C2 and R2 when R1 gets over 50kOhm the output voltage begins to...drop...(plot_b)

So, for a start, I should remove C2 and R2. (don 't ask me why I put them there in the first place, I found the circuit on the internet and I used it because it was commented (by others who built it) as a good working dimmer)
« Last Edit: August 21, 2018, 09:40:02 am by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #34 on: August 21, 2018, 11:18:02 am »
I don't see the problem.   It isn't the output voltage that matters, its the proportion of the cycle for which the TRIAC is on.  R2 & C2 just increase the maximum phase shift so the load power can be dropped all the way to near zero.

However, without a better model for the BR100 DIAC, this is all just a sim-w@nk as its behaviour critically interacts with the RC network to determine the firing delay.   If you don't have a good model for it, you cant determine its influence on the firing angle.

You also need to distinguish between three layer DIACs and five layer SIDACs which may be misnamed as DIACs as their application usage is very similar. See https://www.radio-electronics.com/info/data/semicond/diac/diac.php
A DIAC has a continuous I V curve, but a SIDAC does not, so a good DIAC model wont be a good SIDAC model and visa versa.

See http://www.semicon-data.com/js/geoms/Va/BR/BR100.jpg
The curve is continuous so its obviously a true three layer DIAC.

Unfortunately, if you set up a simple test jig sim with a DIAC driven by a current source, to sweep the current through the DIAC, then plot the current on the vertical axis and the voltage across it on the horizontal axis, you can plainly see the DIAC models from examples\educational\dimmer.asc and LTwiki Diac_st.lib  have characteristics nothing like the curve in the (better) BR100 datasheets.  The tabular model from users.skynet.be/hugocoolens you first tried to use is close, but, as we found out the hard way, gives simulation problems in realistic dimmer circuits.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #35 on: August 21, 2018, 02:04:15 pm »
I don't see the problem.   It isn't the output voltage that matters, its the proportion of the cycle for which the TRIAC is on.
But 'proportion of the cycle that the Triac is on' and 'output Voltage'...aren't these two magnitudes proportional?

I think I made a mistake, I checked the output at B while it woud be more correct to check the output A-B (VA - VB to be more accurate), right?
So:
I hovered the crosshair mouse pointer over A, it turned to a red probe, left-clicked the mouse and holding it down, I drag it to point B, where it got black (probe) and released it. So I have the plot of VA-VB (for various values of R1). Am I doing it right?

Also, there is a second 'small circuit' (B1, R22 and C3), I suppose this gives the plot of the power?
I clicked on loadPower label and a new plot was created. I edited it and changed it's algebraic expression to 'V(A,B)*I(Rload)'.
This is how it 's supposed to be used?

(see the attachment)

 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #36 on: August 21, 2018, 03:23:10 pm »
Because the TRIAC is switching a sinusoidal waveform, and is synchronised to that waveform, the average (or RMS) voltage is *NOT* proportional to the duty cycle.   On-time near the 'tails' of the half-sinewave has far less effect than in the middle of the 'hump'.

Yes, the click-drag method of selecting a signal and a reference is correct.  The only caution is that if you don't drag to a valid point to probe (e.g. because the wire between two components is too short to probe), it will use ground as the reference so check the trace V() expression has a comma in it.

Yes the small circuit is for load power as stepped data sets cant be integrated, so you cant just zoom to N full cycles then Alt-click the load resistor to compute it.  The circuit computes the average power in the load via a behavioural source feeding a voltage numerically equal to the instantaneous power through a low pass filter with a time constant of 50ms.    To plot averaged load power, plot V(LoadPower)*1A.  The *1A converts the units to watts so it gets its own vertical scale on the plot.   If you don't mind reading it out as a numerically equal voltage, you can omit the *1A.

It has quite a bit of ripple and you need to run the sim for at least 200ms for it to settle, hence the original run time of 300ms.  Increasing the time constant to further reduce the ripple would require a proportionately greater runtime. Zooming in closer than 50ms full width isn't useful as it wont show enough cycles of the ripple for you to estimate the average power, so your plot above isn't useful.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #37 on: August 21, 2018, 09:37:35 pm »
Ok but after all this I still don 't know how to 'evaluate' this circuit. To say if it 's good or bad, or to say how good it is, what should be improved and how the internal diode of the soldering iron affects on it 's functionality.

To check if it works as expected I should check the duration of conduction of the TRIAC in a period.
This is what I did (please tell me if it 's the correct way).

I removed the directive '.step param X blah blah...'.
I entered manually the value for R1=1k.
I run the simulation and measured the time the TRIAC conducted (take a look at the attachment).

(I repeated the process for other values of R1):

f=50Hz->f=1/T->T=1/f->T=1/50Hz=0.02s, convert to ms:0.02s*1000=20ms.
D = Ton/T. (Ton=time the TRIAC is on)

R1(ohm)Ton (ms)Duty cycle (D=Ton/T)
1k1.42ms1.42ms/20ms=0.071=7.1%
3k1.69ms1.69ms/20ms=0.0845=8.45%
6k2.03ms2.03ms/20ms=0.1015=10.15%
10k2.42ms2.42ms/20ms=0.121=12.1%
15k2.8ms2.8ms/20ms=0.14=14%
30k3.81ms3.81ms/20ms=0.1905=19.05%
50k4.93ms4.93ms/20ms=0.2465=24.65%
70k6ms6ms/20ms=0.3=30%
90k7.19ms7.19ms/20ms=0.3595=35.95%
100k7.94ms7.94ms/20ms=0.397=39.7%
110k10ms10ms/20ms=0.5=50%

We have halfwave because of the soldering iron 's internal diode, so maximum Duty cycle is 50%, everything looks fine, the dimmer works fine.
Am I correct?
« Last Edit: August 22, 2018, 07:01:58 am by panoss »
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Problem with DIY dimmer
« Reply #38 on: August 21, 2018, 10:35:47 pm »
TRIACs (and all thyristors) can have difficulty turning off when driving an inductive load including the leakage inductance of a transformer.  The usual solution is to add an RC snubber across the TRIAC to limit dV/dT allowing the TRIAC to shut off.

AN1048 - RC Snubber Networks For Thyristor Power Control and Transient Suppression
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #39 on: August 22, 2018, 06:29:37 am »
TRIACs (and all thyristors) can have difficulty turning off when driving an inductive load including the leakage inductance of a transformer.
We don 't have an inductive load here. Our load is a diode in series with a resistor (DLoad, RLoad).
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #40 on: August 22, 2018, 12:47:31 pm »
TRIACs (and all thyristors) can have difficulty turning off when driving an inductive load including the leakage inductance of a transformer.
We don 't have an inductive load here. Our load is a diode in series with a resistor (DLoad, RLoad).
A snubber network is still advisable, because even with a pure non-inductive resistive load, the TRIAC 'sees' all the wiring inductance, to the element and also back to the wall and from there to nearby appliances with a class X filter cap between L and N.  Also, most mains soldering irons use a wound element so, depending on the winding structure, may not be non-inductive.

-------------------------------------------

I've put together a hopefully improved BR100/03 DIAC model:
Code: [Select]
* Parameterised three layer DIAC model
* for LTspice to match cuve of BR100/03
* without dicontinuities.
* Hand-crufted by Ian.M 22/08/2018
*
.subckt BR100 T1 T2 params: Vbr=30.5V, Ibr=30uA, Vfr=10.2V, If=10mA,  Rs=1, Cp=1nF
*Precalculate consts.
.param K1={1.0141*Vbr}, K2={2.1481/Ibr}, K3={Vfr/Vbr}, K4={-7.0/If}, K5=(Vbr-Vfr)/Vbr
Rdiac N001 N002 {Rs}
Vdiac T1 N001 0 ; ammeter
Cdiac N001 T2 {Cp}
B1 N002 T2 v={K1}*tanh({K2}*I(Vdiac))*({K3}*exp({K4}*abs(I(Vdiac)))+{K5})
.ends BR100
I've tested the model under LTspice in the classic series dimmer circuit.

I don't think it can be improved without a selection of BR100/03 DIACs and a curve tracer with a low duty cycle pulsed mode to avoid self-heating.

The subcircuit parameters are similar to those in the Philips datasheet, but actual values apart from Ibr matched to Hugo Coolens curve data.
The magic numbers in the precalculate constants .param line are:
K1, 1.0141, match peak voltage to Vbr
K2, 2.1481, match 98% Vbr @ Ibr - increase to increase %
K4, 7.0, Match exponential to curve data - increase to sharpen

Attachments are the dimmer sim and a test jig sim to trace (and compare) model DIAC curves that has this model, the LTspice DIAC model from examples\educational\dimmer.asc, and Hugo Coolens' table based model (the one LTspice barfs on in an actual dimmer circuit).
« Last Edit: August 22, 2018, 04:14:42 pm by Ian.M »
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #41 on: August 22, 2018, 02:55:08 pm »
How about my last post?
Is it correct what I wrote or not?
« Last Edit: August 22, 2018, 04:09:06 pm by panoss »
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #42 on: August 25, 2018, 11:24:00 am »
Well, I rebuilt the circuit on a proper PCB...
Result? The same as before !! :o
The soldering iron works at maximum no matter the position of the potentiometer ...

I have put the multimeter in parallel with the soldering iron (at the exit of the dimmer that is) and this is what I get:
at DC range: from 0Vdc to 123Vdc.
at AC range: 225Vac to 274Vac.
« Last Edit: August 25, 2018, 11:32:37 am by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #43 on: August 25, 2018, 12:19:35 pm »
The *only* thing that is unusual about your load is the series diode.   I expect it will work the dimmer will work normally with an incandescent bulb in parallel with your element + diode load.     

Edited for clarification
« Last Edit: August 25, 2018, 02:38:43 pm by Ian.M »
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Problem with DIY dimmer
« Reply #44 on: August 25, 2018, 01:49:29 pm »
A diode or a light dimmer circuit does not regulate the temperature of a soldering iron. When the diode is active or the light dimmer is turned down then the soldering iron sitting doing nothing gets hotter and hotter and hotter and hotter and …., but when you use it to solder things it gets colder and colder and colder and colder and ….

My old Weller soldering iron does not have many parts (that soon fail) for an adjustable temperature, it uses the Currie magnetic temperature regulating feature so its tip is always at the correct temperature when sitting all day long and when soldering things all day long. I never need to adjust the regulated temperature of my soldering iron. 
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #45 on: August 25, 2018, 02:28:20 pm »
Also, the iron in question has a PTC element (see reply #18), so the variation of temperature with RMS voltage applied will be fairly small over a wide voltage range.   

The PTC element already acts to regulate the temperature (poorly as its regulating the element temperature not the bit temperature and theer is a considerable thermal resistance in between) to a predetermined temperature determined by its design.   Reduce the duty cycle and thus the RMS voltage, and the element temperature drops, but that decreases the resistance, increasing the current till it reaches a balance at nearly the same power level and at only a slightly lower temperature.  As there will typically be a several hundred degree difference between the tip temperature and the solder melting point, unless you have a thermocouple meter designed to measure tip temperature, you'll barely notice the temperature decrease.   
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #46 on: August 25, 2018, 08:12:45 pm »
Also, the iron in question has a PTC element (see reply #18), so the variation of temperature with RMS voltage applied will be fairly small over a wide voltage range.   

The PTC element already acts to regulate the temperature (poorly as its regulating the element temperature not the bit temperature and theer is a considerable thermal resistance in between) to a predetermined temperature determined by its design.   Reduce the duty cycle and thus the RMS voltage, and the element temperature drops, but that decreases the resistance, increasing the current till it reaches a balance at nearly the same power level and at only a slightly lower temperature.  As there will typically be a several hundred degree difference between the tip temperature and the solder melting point, unless you have a thermocouple meter designed to measure tip temperature, you'll barely notice the temperature decrease.
So this is why this iron 's temperature stays at the same level no matter the position of the potentiometer!
Right?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: Problem with DIY dimmer
« Reply #47 on: August 25, 2018, 08:21:17 pm »
Also, the iron in question has a PTC element (see reply #18), so the variation of temperature with RMS voltage applied will be fairly small over a wide voltage range.   

The PTC element already acts to regulate the temperature (poorly as its regulating the element temperature not the bit temperature and theer is a considerable thermal resistance in between) to a predetermined temperature determined by its design.   Reduce the duty cycle and thus the RMS voltage, and the element temperature drops, but that decreases the resistance, increasing the current till it reaches a balance at nearly the same power level and at only a slightly lower temperature.  As there will typically be a several hundred degree difference between the tip temperature and the solder melting point, unless you have a thermocouple meter designed to measure tip temperature, you'll barely notice the temperature decrease.
So this is why this iron 's temperature stays at the same level no matter the position of the potentiometer!
Right?
Yes. When the temperature drops slightly, due to the potentiometer setting being reduced, the resistance decreases, resulting in increased power dissipation, causing it to heat up more.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #48 on: August 25, 2018, 08:27:58 pm »
So this is why this iron 's temperature stays at the same level no matter the position of the potentiometer!
Right?
If that's what its doing with a resistive load in parallel with the element + diode, or with the diode shorted out, yes.   

You can probably see the difference if you put a suitable thermocouple directly on the bit, or if you have a large enough value pot in the dimmer to get the RMS voltage down to about 70V (on a true RMS multimeter's AC V range).   
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #49 on: August 26, 2018, 06:24:25 am »
If that's what its doing with a resistive load in parallel with the element + diode, or with the diode shorted out, yes.   
I have no load in parallel with the element + diode.
The diode is not shorted out.

or if you have a large enough value pot in the dimmer to get the RMS voltage down to about 70V (on a true RMS multimeter's AC V range).
How large?


I guess the simulation is wrong because RLoad is a simple resistor.
Will it be correct if I replace it with a PTC?
(btw I found no thermistor in LTSpice)

EDIT: I tried with a 1 megohm pot and seems to work! I think it 's (kind of) dimming the iron!
« Last Edit: August 26, 2018, 07:31:15 am by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #50 on: August 26, 2018, 07:54:23 am »
If your dimmer circuit is a two terminal one (i.e. is entirely in series with the load), you should have a resistor across the load so the trigger circuit still gets current even when the diode in the iron is reverse biassed.   3x 27K 1/4W in series would probably be suitable. (Don't use a single resistor as it almost certainly wont have a high enough voltage rating.)

If your dimmer circuit is three terminal (L, N and Load), you shouldn't need the extra resistor as the control circuit always 'sees' the full mains waveform.

To fully simulate the circuit, you'd need a thermal model of the iron + a well characterised resistance vs temperature curve for the element.   IMHO its not really worth the effort unless you are trying to implement closed loop temperature control using the element resistance for temperature sensing as I proposed in reply #22.  Also the thermal time constants are fairly large, so your sim runtimes would be absolutely horrendous. You would probably end up needing to simulate for 10000 mains cycles to get good quality results.  |O  :'(
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #51 on: August 26, 2018, 08:08:14 am »
If your dimmer circuit is a two terminal one (i.e. is entirely in series with the load)

If your dimmer circuit is three terminal (L, N and Load)

My dimmer circuit is the one published in my first post.
Is this a two terminal or a three terminal?

With a 1Megaohm potentiometer I read at AC range of my (non true-RMS) multimeter from 20Vac up to 230Vac.
And temperature seems to follow the voltage level.
So it 's dimming!
« Last Edit: August 26, 2018, 09:24:47 am by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #52 on: August 26, 2018, 10:09:56 am »
Great, its working.
Your first post had:

That's a two terminal dimmer.   IMHO you should add the 3x 27K (series) resistors across OUT-1 and OUT-2, to prevent the diode in the iron totally blocking the reverse voltage to the TRIAC and its trigger circuit. 

N.B. temperature stability when heavily 'dimmed' will be very poor.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #53 on: August 26, 2018, 10:44:46 am »
My real circuit has two differences from the above circuit:
1. R3 is 1k
2. R1 (the pot) is 1Megohm.
« Last Edit: August 26, 2018, 10:52:12 am by panoss »
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #54 on: August 26, 2018, 11:36:21 am »
My main goal of this topic is to understand (using LTSpice) how a dimmer works.
And how to use LTSpice for understanding how a circuit works.

So, let 's consinder RDLoad as a normal resistor...not a PTC one...and there is no DLoad (in it 's place there 's a simple wire).

I thought that what the potentiometer does is to change the voltage accross C1.

I also thought that (because BR100 has VBO=32.40V):
- when Voltage accross C1 >32.40V then Triac conducts.
- when Voltage accross C1 <32.40V then Triac does not conduct.

So:
-when potentiometer has low value, C1 has a higher voltage, it stays longer over 32.40V, TRIAC conducts for more time, output RMS voltage is higher.
-when potentiometer has big value, C1 has a lower voltage, it stays shorter over 32.40V, TRIAC conducts for less time, output RMS voltage is lower.

Are these thoughts of mine, wrong?
« Last Edit: August 26, 2018, 01:27:25 pm by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #55 on: August 26, 2018, 12:54:48 pm »
Not quite right.   The TRIAC is a bistable device that latches on.  For an ideal one, to set it on, apply gate current.  To reset it to off, reduce the current through it to zero.   


The BR100 DIAC holds off the voltage on C2 till it reaches its breakover voltage.  It then allows C2 to discharge rapidly into the TRIAC gate, turning it on, and it stays on till the current though the load falls to zero.

I've drawn up the sim, and adjusted it for 10W to the iron. Attached.

N.B. I don't like your circuit because its control range with a load containing a diode is very poor and rather unstable, and also the way its arranged with the load on the Neutral side of the dimmer makes it much harder to understand what is happening in the sim.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #56 on: August 26, 2018, 01:16:52 pm »
I run the simulation of dimmer_6 but I don't have the model of BA158, I get an error: 'Can't find definition of model "BA158")'.

Why don't you remove the diode so that we will simulate a normal soldering iron with a normal resistor?

The BR100 DIAC holds off the voltage on C2 till it reaches its breakover voltage.  It then allows C2 to discharge rapidly into the TRIAC gate, turning it on, and it stays on till the current though the load falls to zero.
How can I see this on the simulation?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #57 on: August 26, 2018, 02:40:18 pm »
Its just a fairly generic 1A 600V diode, so replace it with the default diode model 'D'
However if you *really* want it:
Code: [Select]
.model BA158 d(is=5u rs=0.1 cjo=22p bv=600 iave=1 vpk=600 type=silicon)
The diode in your iron causes a major problem for your dimmer circuit.  Please compare the results with the diode and with it replaced with a wire link.

To see what's happening, plot the voltage across C1, and C2, and the current into the TRIAC gate.  Put the supply voltage (PWR230) and the load current in another plot pane.
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #58 on: August 26, 2018, 03:02:45 pm »
At dimmer_6.asc I short circuited D1 and run the simulation.
At the attached image you can see the first full wave, from 0ms up to 20ms.
VR1 takes 5 different values: 1k, 40k, 70k, 110k and 130k.

VR1=10k (Green)   from 0ms-2.04ms, rises gradually from -23.97V up to 80.57V. Suddenly at this point (2.04ms) rises to 253.76V.
VR1=40k (Blue)    from 0ms-3.48ms, rises gradually from -23.97V up to 57.16V. Suddenly at this point (3.48ms) rises to 333.33V.
VR1=70k (Red)     from 0ms-4.77ms, rises gradually from -23.97V up to 49.36V. Suddenly at this point (4.77ms) rises to 364.54V.
VR1=110k (cyan)   from 0ms-6.24ms, rises gradually from -23.97V up to 40.00V. Suddenly at this point (6.24ms) rises to 336.45V.
VR1=130k (purple) from 0ms-7.15ms, rises gradually from -23.97V up to 40.00V. Suddenly at this point (7.15ms) rises to 253.76V.


The voltage accross C1 begins at -23.97V. Isn't this strange? I was expecting it to begin at 0V.

When VR1=10k (Green) at simulation time 2.04ms, something happens and voltages suddenly goes from 80.57V to 253.76V.
What happens?
If it was that BR100 's break voltage was reached, It should lower suddenly the voltage of C1, not increase it.
« Last Edit: August 26, 2018, 03:08:22 pm by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #59 on: August 26, 2018, 03:14:58 pm »
Plot the voltage *across* C1: V(vc,out2)
 
The following users thanked this post: panoss

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #60 on: August 26, 2018, 03:31:59 pm »
I run it for VR1=40k. To see the voltage across C1: V(vc,out2)... :-[
In the attached, I have written some remarks (-questions), are they correct?

« Last Edit: August 26, 2018, 03:34:03 pm by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #61 on: August 26, 2018, 03:48:47 pm »
Maybe.  Its hard to be certain unless you add a trace for the voltage across the DIAC or for the DIAC gate current.

I've redrawn the schematic to move the dimmer to the low side of the load to make it easier to probe voltages in the dimmer control circuit.  I've also put a resistor to short out the diode you can .step  so you can directly compare the waveforms with and without the diode.   
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #62 on: August 26, 2018, 04:31:58 pm »
At the attached you can see:
voltage across C1 on the top pane and
voltage across the DIAC at the botom pane (dimmer_7.asc).

But in each pane there are two lines, a green and a blue...
What does this mean?

I see the voltage accross the DIAC rises at 0ms-7.90ms,  from -28.92V to 29.03V...
Never reaches break out voltage...(32.40V)
I don't know...I can't explain how it works.
« Last Edit: August 26, 2018, 04:40:09 pm by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #63 on: August 26, 2018, 04:55:38 pm »
You've got two lines for each trace because the sim runs twice, once with the resistor shorting the diode open (1 Gigaohm) and once with it shorting (1 milliohm).

Mod the .step command to:
Code: [Select]
.step param Rshort list 1G 1Meg 1mand you'll see what happens if the series diode in the iron is leaky.

When the diode is shorted out, the dimmer needs a much smaller pot setting for the same firing angle.   When the diode heats up (and it will in the iron handle) its leakage current will shift the firing angle towards 180 deg, eventually stopping it firing.  If you press the boost button it will probably also stop firing!

If you don't want to step shorting the diode, comment out its .step command and add:
Code: [Select]
.param Rshort=1G
so Rshort defaults open.
« Last Edit: August 27, 2018, 10:06:19 am by Ian.M »
 

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #64 on: August 27, 2018, 09:25:01 am »
See attached files.
dimmer_4_2.asc: I 've deleted everything not absolutely necessary. For simplicity.
R1 is the potentiometer.

R1=10k
TRIAC conducts from 101.727ms to 109.813ms=8.086ms.
At 101.706ms BR100 (red) begins to conduct (Vc=56.31V (green), VC2=28.23V(blue)) and ends at 101.730ms=0.024ms conduction time of BR100.
At 101.727ms, TRIAC (cyan) begins to conduct. Latches on and remains latched till 109.813ms (conduction time of TRIAC=8.086ms), when current through TRIAC falls at 15,32mA(purple).
At this point the TRIAC stops conducting, current through it falls to 0.

R1=80k
TRIAC conducts from 104.919ms to 109.813ms=4.894ms.
At 104.883ms BR100 (red) begins to conduct (Vc=41.31V (green), VC2=29.67V(blue)) and ends at 104.922ms=0.039ms conduction time of BR100.
At 104.919ms, TRIAC (cyan) begins to conduct. Latches on and remains latched till 109.813ms (conduction time of TRIAC=4.894ms), when current through TRIAC falls at 15,32mA(purple).
At this point the TRIAC stops conducting, current through it falls to 0.

So change of R1 caused a change of Vc which caused a change in time when TRIAC latches on:

with R1=10k->Vc=56.31V->latches on at 101.727ms,
with R1=80k->Vc=41.31V->latches on at 104.919ms,
while the time it goes off (109.813ms) remains stable.
This way, the duration that the TRIAC stays on changes.

Please correct me if I 'm wrong in something.
« Last Edit: August 27, 2018, 10:41:43 am by panoss »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #65 on: August 27, 2018, 10:28:49 am »
LTspice has a nasty little gotya - you cant have two names for the same net, and  Gnd (node 0) overrides any other name you assign to that net.  Therefore naming the supply side of the load 'A' currently has no effect in your sim.  The fix for that is to put a 1u resistor between 'A' and the Gnd symbol to split the nets.  I've also added a few node labels, and fixed the power voltage source expression so the result is positive.  Fixed up sim plus plot file attached.

Apart from that, you seem to have gained a good understanding of what's going on in the actual circuit.   Now you have that, you should be able to determine why it misbehaves if you leave the series diode + shorting boost switch in your soldering iron active.   Hint: look at the charge on C1  at the start of the active half-cycle with the diode and with it bypassed.
« Last Edit: August 27, 2018, 10:30:20 am by Ian.M »
 
The following users thanked this post: panoss

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: Problem with DIY dimmer
« Reply #66 on: August 27, 2018, 04:48:50 pm »
I can 't understand how excactly the value of the potentiometer defines the time the DIAC will start conducting. (the time that the voltage accross the DIAC will become equal to it's break out voltage)
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Problem with DIY dimmer
« Reply #67 on: August 27, 2018, 05:10:19 pm »
That's *HARD*.  Start by simplifying it by getting rid of R2 and C2, with the DIAC direct to C1 and make C1 200nF to compensate for removing C2.   Now consider a half cycle of mains.   C2 charges through R1+R3 till it reaches the DIAC breakover voltage (+ a tiny bit for the forward drop of the TRIAC gate PN junction).  The DIAC then conducts and the TRIAC fires.  1/(R1+R3) is the constant of proportionality between V(L)-V(vc1) and the charging current into C1. If you halve the resistance it charges twice as fast for the same voltage differential *BUT* the voltage differential does *NOT* stay the same so the firing angle will *NOT* be exactly halved.

You can write an equation for C1 charging, given the initial voltage and the value of C1, R1 and the RMS main voltage, and solve for when it reaches the breakover voltage, but it isn't a nice simple linear or exponential equation because the supply voltage is varying sinusoidally.  Also the residual charge on C1 from the previous half cycle is dependent on the length of time the TRIAC was fired for and on poorly documented parts of the DIAC's characteristic curve, so although you can get some idea by working it out in full or letting a SPICE package solve the equations for you if you've got good enough models, there is no practical alternative to testing the actual device to determine the relationship.
« Last Edit: August 27, 2018, 05:14:20 pm by Ian.M »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf