How zero-cross triac control is implemented

A triac doesn’t need any turn-off time, right? It turns off by itself when the voltage drops to zero in the half-wave. So we need to turn it on every 10 ms with a pulse of at least 2 µs (screenshot from the datasheet). I drive it with a 1 ms pulse (just to be safe). So, relative to the zero crossing, if you send the pulse right away, that’s 100% duty cycle; if you send it after 7.8 ms, that’s almost 0% duty cycle. If you send it later than 7.8 ms, it’ll start catching the next half-wave too (the pulse is 1 ms after all). So my PID goes from 0 to 100 and adjusts the pulse delay. And that way it heats linearly. So it ended up being this kind of PWM. That’s what I’m asking about — how is it implemented in this firmware? I should download it and take a look, of course :blush: But I never had the time. I’ll try tomorrow.

🇷🇺 Оригинал

Симистору время отключения не нужно же, он сам выключится как напряжение до нуля упадет в полуволне. Поэтому мы его должны включать каждые 10мС импульсом не менее 2 мкС(скрин из даташита) . Я включаю импульсом 1мС(чтоб наверняка). Так вот относительно прохождения нуля если сразу импульс подать , это 100% заполнение если через 7.8 мС это почти 0 заполнение. Если позже чем 7.8 мС подавать, начнет хватать следующую полуволну(импульс то 1мС). Поэтому у меня пид от 0 до 100, регулирует задержку подачи импульса. И таким образом линейно греет. Такой вот ШИМ получился. Я и спрашиваю как в этой прошивке организовано? Скачать ознакомится нужно конечно😊. Но времени всё не было. Завтра попробую.

On our side, the PWM duty cycle runs off a timer with 10,000 ticks (resolution: one ten-thousandth of a second) between zero crossings (50 Hz period = 1 / 50 = 0.02 s, half-period = 0.02 / 2 = 0.01 s)

when a zero-crossing interrupt is received, the triac gets the turn-on signal and turns off when the timer triggers

🇷🇺 Оригинал

у нас скважность ШИМ работает по таймеру на 10 000 тиков (дискрет 1 десятитысячная секунды) между переходами через ноль (период 50 Гц = 1 / 50 = 0.02с, полупериод 0.02 / 2 = 0.01 с)

при получении прерывания при пересечении нуля симистор получает сигнал на включение и отключается когда таймер сработает

Well, to be safe it could be 10 times shorter, i.e. 20 µs, but not 1 ms — why keep it on that long?

🇷🇺 Оригинал

ну наверняка это может быть в 10 раз больше, т.е. 20мкс, но не 1мс, зачем так долго?

Agreed. That was a test version, and I just kept going with it. I’ll reduce it, of course. But that’s not really the point.

So does that mean the triac always turns on immediately? And it doesn’t matter how long before the pulse is removed, because the triac will only close at the end of the half-wave anyway.

So you’re not really controlling the heater power then? Just on/off?

🇷🇺 Оригинал

Согласен. Это был тестовый вариант, так на нем и двигался. Убавлю конечно. Но это не суть важно.

А это получается что симистор сразу всегда включается? И не важно через сколько импульс снят, симистор закроется в конце полуволны же только.

А вы мощностью не рулите выходит грелки? Только вкл выкл?