Controling a fan with a triac

Ian0

Joined Aug 7, 2020
9,847
Ok. I've just soldered the RC (39ohm and 10nF) and the result is the same as before. I can't see any difference. Anything else you think I could try?
PS: correct me if I'm wrong, bu the order of R and C does not matter here, right?
PS2: see attached diagram - this is how I've made the change.
The order doesn’t matter.
I suspect your trigger pulse is too long. If it overlaps into the next half cycle, it will retrigger the triac. If you’re on a 50Hz mains, I’d suggest you turn off the trigger no later than 9ms.
 
Couple of things:

Zero cross detector should be right on.

Did you create power times based on V*2? e.g. the integral of sin(wt)^2
Since (V^2)/R is power, power is likely proportional to V^2
If speed is proportional to voltage, then use the integral of sin(wt)

Are you constantly triggering the triac?
 

Thread Starter

dragilla

Joined Jan 15, 2012
18
I suspect your trigger pulse is too long. If it overlaps into the next half cycle, it will retrigger the triac. If you’re on a 50Hz mains, I’d suggest you turn off the trigger no later than 9ms.
The trigger is right. It works on the other fan. Besides once I cross a certain level I cannot go back. Decreasing the pulse length does not cause the fan to slow down. Hell, even killing the pulse does nothing.
 

Thread Starter

dragilla

Joined Jan 15, 2012
18
Zero cross detector should be right on.
What do you mean? I tested it and it works as expected - at least as I would expect it to work? What should I check to make sure?
Again - it works with the other fan in full range.

Did you create power times based on V*2? e.g. the integral of sin(wt)^2
Since (V^2)/R is power, power is likely proportional to V^2
If speed is proportional to voltage, then use the integral of sin(wt)
I do use the integral indeed :) And I am very happy with the results on the other fan. It speeds up and slows down in equal intervals.

Did you create power times based on V*2? e.g. the integral of Are you constantly triggering the triac?
I'm triggering it every cycle (50 times per second). Only I delay the triggering by a certain value.
That is - I'm triggering it every cycle when I want it to run. When I want it to stop, I just stop the triggering. And it stops.

Actually you got me thinking here. If my stopping works, then it means the triac works fine, doesn't it? It means that maybe zero triggering is offest by half a cycle - thus I only have half a cycle left to use....
If this is true - Is there a way to fix the zero crossing detection? It works with the first fan, but the second would have to do something to disturb it. See the schematic for reference. Thanks!
 

Thread Starter

dragilla

Joined Jan 15, 2012
18
You should be triggering it 100 times a second not 50.
Yes, you're right. And I do. My mistake.
I've used my oscilloscope to check the zero detection again... and it works as expected. It's not affected by the fan in any way. Looks the same in the whole range of delay and also for both fans.
You may wanna look at the attached pics to better understand what I do in the software.
To be clear, the delay starts at the zero crossing. If I decrease the delay, the red signal starts earliear and lasts longer, so more current is fed to the fan.

So back to my question :) what to do next?
 

Attachments

Thread Starter

dragilla

Joined Jan 15, 2012
18
Hell, even killing the pulse does nothing.
I must correct my previous statement. When I kill the signal and I stop sending pulses to the MOC, the triac stops conducting and the fan stops.
So this is really wierd to me... because the signal looks good in the whole range. I mean the scoped signal that I attached in the previous post. Even when the fan starts going full speed and the triac seemingly locks, I can still slow down the signal, it looks the same as before. Also the zero crossing is the same. Only the fan stops reacting to changes in the delay and goes full speed. I cannot find logic here :(
 
With a motor, voltage and current are not in phase. You detect zero crossings, but the triac stops conducting at 0 voltage and zero current which don't occur at the same time. During the sine wave, you have to continuously "pulse" the triac. With dimming, just turning it on is sufficient.
 

Ian0

Joined Aug 7, 2020
9,847
With a motor, voltage and current are not in phase. You detect zero crossings, but the triac stops conducting at 0 voltage and zero current which don't occur at the same time. During the sine wave, you have to continuously "pulse" the triac. With dimming, just turning it on is sufficient.
The triac stops conducting at zero current (voltage doesn't matter)
If the current waveform is so far retarded by the inductance that it doesn't reach zero until the start of the new trigger pulse, then it will be on all the time.
 

Ian0

Joined Aug 7, 2020
9,847
Do you know the inductance of the load?
A good enough figure would be to measure the motor current, then calculate Z=V/I
Then calculate X = √(Z^2-R^2) where R is the motor resistance
Then calculate L = X/(2πf)
 

Thread Starter

dragilla

Joined Jan 15, 2012
18
The triac stops conducting at zero current (voltage doesn't matter)
If the current waveform is so far retarded by the inductance that it doesn't reach zero until the start of the new trigger pulse, then it will be on all the time.
Correct, but then I would not be able to stop the fan from my program. But I can. When cut the signal to MOC, the triac stops conducting.
 

Thread Starter

dragilla

Joined Jan 15, 2012
18
The triac stops conducting at zero current (voltage doesn't matter)
If the current waveform is so far retarded by the inductance that it doesn't reach zero until the start of the new trigger pulse, then it will be on all the time.
But wouldn't that happen from the very begining once I switch it on? It only happens half way. And I can switch it off, but stopping the signal going to the fate - it's not on all the time, which, I think, contradicts the statement above.
 

Thread Starter

dragilla

Joined Jan 15, 2012
18
Can you show the current waveform? That might be the biggest clue to what is going on.
The waveform reaching the fan, you mean? The original waveform is on the second screen above, together with the zero crossing detection signal. I only have 1:10 divider, so it cuts off at about 20 volts. But I will do that later today or tomorrow. I will show it together with the delay signal maybe, to see what's going on.
 

Thread Starter

dragilla

Joined Jan 15, 2012
18
Do you know the inductance of the load?
A good enough figure would be to measure the motor current, then calculate Z=V/I
Then calculate X = √(Z^2-R^2) where R is the motor resistance
Then calculate L = X/(2πf)
Ok. Should I take the currect taken by the fan at maximum speed?
Also, what is "f" in the last formula? What am I actually calculating here (what is Z, X, L)? Sorry for my ignorance - noob here :)
 
Last edited:

Ian0

Joined Aug 7, 2020
9,847
The waveform reaching the fan, you mean? The original waveform is on the second screen above, together with the zero crossing detection signal. I only have 1:10 divider, so it cuts off at about 20 volts. But I will do that later today or tomorrow. I will show it together with the delay signal maybe, to see what's going on.
I assumed that was the voltage waveform.
 

Thread Starter

dragilla

Joined Jan 15, 2012
18
I assumed that was the voltage waveform.
Yeah, that was the voltage waveform, but the one coming directly from the wall socket, not limited (cut) by the triac. How do I show the current waveform?
Anyway. I fixed it :D
I've had a great Eureka moment after I've realised it must be software not hardware, as turning the triack off actually works when I just stop the signal. In my SW i was turning off the signal when I got the zero crossing signal to make it simple. So the signal to open the triac was started with the zero crossing + the delay and it was stopped with the next zero crossing, at which a new timer was started for the next delay. Now, after the fix, once the timer is reached i start another short timer and stop the signal. So I'm just sending a short pulse to the triac to turn it on, instead of a long singnal, which was obviously lasting longer that is should, because the triac would only turn off if the current would be below its treshold and the gate signal would be off... and with this fan this was not in sync.
I hope this makes sense. If not, and you would like to understnd - please ask. I wll try to explain.
Anywyays - thank you VERY MUCH. Thanks to you all I managed to realise it was just a stupid bug ;)
 
Top