[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself

Search:


View post   

>> No.1742392 [View]
File: 9 KB, 400x400, tegaki.png [View same] [iqdb] [saucenao] [google]
1742392

>>1742384
Normally this is done with a DIAC, and I think you could maybe still use a DIAC in an electrically-variable PWM circuit with resistor biasing or something, but I'd go for something more like a standard comparator-based PWM system. Generate a sawtooth wave (just an integrator?) from a zero-crossing detector (detector can be on the mains side with the sawtooth gen on the other side of an opto). Then feed the sawtooth in one side of a comparator and a variable DC voltage in the other side. Feed the output of the comparator into another opto and then into the TRIAC. If you've done this correctly, a potentiometer or other variable voltage source will cause a voltage that corresponds directly to the duty-cycle. If you want an MCU to choose the duty-cycle itself, you'd need to output a high-frequency PWM, and low-pass filter it into an approximate DC voltage. If you do just want to use a potentiometer for dimming, use a normal TRIAC circuit.

The more synchronous options would be to somehow have the MCU running on a multiple of the mains frequency (possible with a PLL) or else using an interrupt each zero-crossing, and a simple delay before activating the TRIAC. Not sure whether the continuous interrupts will cause havoc to other parts of your circuit, I know some peripherals won't like having other interrupts in your code.

>>1742390
Yes, I think that's a semi-common 0-crossing method. At the very least I'm pretty sure I've seen something like it, perhaps with two antiparallel LEDs heat-shrunk next to LDRs in an audio circuit or something.

Navigation
View posts[+24][+48][+96]