AC Dimming with PR36MF21NSZF

Hi guys. I'm trying to make a simple AC Dimmer with this IC. You can get the datasheet from here I tried with PR36MF12NSZF, but it's not zero cross type, so I bought this one, which is Zero Cross Type.

When I connect it with the simple circuit (shown on page 10 of the PDF) i can't dim light. Using a multimeter, without the load (the lamp) I'm getting variable voltage (PWM signal - 1 = 60VAC, 255 = 240VAC), but when I connect a load (lamp) it's 1 = 240VAC and 255 = 240VAC. What do I need so I can make it a functional dimmer?

Thanks in advanced.

First, you can't dim AC with a zero-crossing device! *

Incandescent AC dimmers work by triggering (turning-on) a TRIAC at some point during the AC half-cycle. Once triggered, the TRIAC continues to conduct until the current goes to (nearly) zero at the next zero-crossing.

Assuming the trigger signal is no longer present, the TRIAC turns-off at the zero crossing.

If you trigger at (actually just after) the zero crossing, the TRIAC somes on and stays-on for the full half-cycle and is NOT dimmed.

If you trigger just before the zero crossing, the lamp will come on for a short period of time and it will be very dim.

That means you have to sense the zero crossing or some constant point along AC waveform (with transformer or optical isolation), delay for some part of the half-cycle, and trigger the TRIAC (or TRIAC- based relay). This is something like PWM, but regular PWM will NOT work because it will trigger the TRIAC at some random non-synchronnized point along the waveform, and the TRIAC will remain on for the remainder of the AC half-cycle.

(PWM signal - 1 = 60VAC, 255 = 240VAC), but when I connect a load (lamp) it's 1 = 240VAC and 255 = 240VAC.

A digital multimeter will not reliably measure the average of a voltage that's switching on & off or jumping around unless it has a "ture RMS" feature. An old analog "mechanical" meter will work better, and since there is often some leakage, you'll get better readings with a lamp connected.

  • You can make a simple high - low - off dimmer that turns lamp on for only the positive (or negative) half cycle. But, you can't do full-range dimming with a zero-crossing device.

So I bought this relay for nothing :astonished: Thanks! Is there something I can do, so I can dim properly my LED ceiling lamps?

Thanks! Is there something I can do, so I can dim properly my LED ceiling lamps?

Look for some example projects. I've done it a long time ago but with a different processor.

An AC solid state relay will work as long as it's not the zero-crossing type.

As I said above: 1 - Detect the zero crossing (with a safe-isolated circuit). I built my own (linear) power supply and used the same transformer that was powering my microcontroller to give me safe low-voltage AC into the comparator I used for zero-crossing detection. (I didn't try to find the exact zero crossing. I looked for a small voltage just-after the zero-crossing. Then did some expermentation, and compensated in software.)

2 - Delay for some part of the AC half-cycle.

3 - Send a trigger pulse to the TRIAC or slid state relay. (If you use a TRIAC, use a non-zero-crossing opto-isolator designed for TRIACS, such as the MOC3010.)

...I don't remember if I did this, but if you just detect the positive-going zero-crossings you know when the next (negative-going) zero crossing is, so you don't have to detect the negative-going zero-crossings.