Go Down

Topic: Dimmer and correct circuit (Read 1 time) previous topic - next topic

PelleS

I just wanted to ask whether or not this is a good circuit for an MCU controlled triac dimmer. I am very unsure about the optimum values for R2 and R3. Right now they are very high, so I think you could actually short the load pins without problems. I consider adding a thermal fuse as well, but where would I place it, and what value should it have? Are there any other obvious issues here or something that I should improve upon? Mains here are 230 AC 60 Hz.


wvmarle

Those 250k resistors are in the wrong place. They should connect to an opto that provides the zero crossing signal.

Lots of working circuits on Google. Frequency is not really important for the circuit (it is for your programming of course), voltage is for proper current limiting for your zero detector.

Without zero crossing the best you can do is on/off.

That said, if you don't know what you're doing don't mess with line voltages. It can cause fire, explosions, and death by electrocution. There are lots of light dimmer modules out there that you can buy and just connect to your Arduino. Much safer that way (you still have to be careful to not touch the dimmer when in use, best to place it in an enclosure).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

PelleS

#2
Jan 11, 2019, 02:45 pm Last Edit: Jan 11, 2019, 02:50 pm by PelleS
The opto is on the drawing (MOC3020). It has an inbuilt zero crossing circuit. As for the voltage you mentioned; i know that, hence R1 before the opto.

wvmarle

the datasheet doesn't mention this. So I don't think it does, and even if it did, you didn't connect it back to your Arduino. Without zero crossing signal your Arduino doesn't know when to fire the opto (and with it the triac).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

PelleS

I see. I can switch it with a MOC3041. As far as I understand, the zero-crossing circuitry inside the MOC3041 only activates the internal triac on zero-crossing. So, if a signal goes in, it won't activate the triac before the signal crosses. Or am I wrong?

wvmarle

You're wrong. Completely.

Even if it worked like that, you would have NO control whatsoever.

This is how it's done.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

MarkT

I just wanted to ask whether or not this is a good circuit for an MCU controlled triac dimmer. I am very unsure about the optimum values for R2 and R3. Right now they are very high, so I think you could actually short the load pins without problems. I consider adding a thermal fuse as well, but where would I place it, and what value should it have? Are there any other obvious issues here or something that I should improve upon? Mains here are 230 AC 60 Hz.


Your triac is across the AC mains, it will explode with considerable violence and take several fuses with it.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

PelleS

#7
Jan 11, 2019, 03:39 pm Last Edit: Jan 11, 2019, 03:45 pm by PelleS
Your triac is across the AC mains, it will explode with considerable violence and take several fuses with it.
On almost all circuits I've seen on triac dimmers, they have been wired like this (like here: https://www.instructables.com/id/Arduino-controlled-light-dimmer-The-circuit/). And I've done several spice simulations. I must have seriously misunderstood then.

Edit: I've probably been a little quick with the connectors to the mains and load on the right, I think. I might have gotten them switched. Can this be the issue? Just been struggling a little with placing them because I'm learninig the software. So, if that might be the reason, please let me know.

PelleS

#8
Jan 11, 2019, 03:51 pm Last Edit: Jan 11, 2019, 03:53 pm by PelleS
I attached an image of my circuit in LTspice. The load is R4. If this is not about the same circuitry, then I just made a mistake in the other software.

Edit: ofc a resistor in series with the load (forgot to add in LTspice).

wvmarle

On almost all circuits I've seen on triac dimmers, they have been wired like this (like here: https://www.instructables.com/id/Arduino-controlled-light-dimmer-The-circuit/). And I've done several spice simulations. I must have seriously misunderstood then.
The circuit in that post looks good at a first glance.

It has little resemblance to your circuit. Do note the second optocoupler for a start (for the zero crossing) and how the triac is wired very differently.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

PelleS

The circuit in that post looks good at a first glance.

It has little resemblance to your circuit. Do note the second optocoupler for a start (for the zero crossing) and how the triac is wired very differently.
I can only see one optocoupler at any circuit in that article.

PelleS

According to LTspice, there is just about 1.2 mA peak current through the triac in the second circuit I posted. I don't think that is too much, or is it?

wvmarle

That's because you have a 300k resistor where your load should go. A halfway decent triac can do a few amps at least.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

PelleS

That's because you have a 300k resistor where your load should go. A halfway decent triac can do a few amps at least.
Will the circuit be correct if I increase the resistor to the opto? 20k, for instance?

wvmarle

No.

Did you actually read (and make sure you understand the circuit in) the tutorial I linked to? Or one of the thousands of other tutorials about the subject...
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up