Continue to Site

pwm to 240v sine wave triac control

Status
Not open for further replies.

think_ed

New Member
Hello,
I am thinking about a circuit to interface a pwm signal to control a triac.

I have an application where I have a pic producing PWM where I want to then control (dimm) using a triac on 240 Volts.

The usual circuit for a triac uses (basic) a cap and resitor to set the firing point/voltage on the 240 volt sine wave.

Is there a way to convert PWM to say a digital variable resistor to control the triac output ?

I know there are ways of doing triac control with a pic - but this involves tracking the sine wave, then timming the pulse to fire the triac each cycle.

I am after an way of using a simple PWM output from the PIC to dim 240 volts.

any bright ideas ?

Triac turns on and stays on till the load current reaches zero (end of the cycle).

They don't do PWM.

Sorry thought I was clear.

I dont want a triac to do PWM.

The usual way do do a triac is to have a variable resistor and capacitor to control the gate timing. Cap charges though the resistor until it reaches the gate threashold where every thing fires. Depending on the time taken to charge the capacitor - thats where it fires in the sin wav cycle.

So if you had a resistor that could be controlled via pwm.
eg 25% Duty - resistor = 100 ohms 50% resistor=200 ohms etc etc

Then you could control the timing of the gate firing to allow you to have a triac controlled by the PIC PWM .

So you want to use a PWM input to control a phase controlled triac?

I've done this, by using a low voltage to control a current source. (You would convert your PWM to the control voltage first). During each half-cycle, a capacitor charges at a rate determined by the control voltage. When (if) the capacitor charge reaches a threshold, a comparator creates a signal that fired the triac. A zero cross detector resets the capacitor charge at the end of every half-cycle.

I think you're looking for a way to convert the PWM to the variable current source?

Sounds about right but I am looking at 240 Volt AC control rather than current

Have found one circuit that seems to do it simply with a LED and a LDR.

You replace that standard restistor with an LDR and that gets lit by a LED.
This would work out ok depending on the LRD response to the LED in PWM - may have to smooth that out to revent "flicker" on low % PWM.

The whole plan is to have some neat ethernet PICs (SBC65EC) which have a web interface to control PWM and other outputs to control lighting.

Because I dont want to do a lot of reprograming, I thought using the PWM outputs to dim 240V AC lights via a circuit to control the triac via PWM.

so i you have two modules - one check the status of its inputs (the light switchs on the wall) - if you put up button or down button - it transmitts that over the ethernet to the other unit which inc or Decr the pwm output - then so the lights are dimmed up and down.

My stage from low voltage to current control was just an intermediate step.

The LDR is one good possibility for that current control stage, as you probably wanted it to be isolated anyway.

This seems to be a nice solution.

https://www.electro-tech-online.com/custompdfs/2009/11/LS7642_LS7642FO.pdf

VOLTAGE CONTROLLED LIGHT DIMMER with SOFT ON/OFF

BCV (Pin 2) Brightness control input. The voltage applied at the BCV
input controls the triac conduction angle and hence the brightness of
the lamp. The brightness varies in direct proportion to the applied voltage.
For manual control of brightness, the BCV voltage can be supplied
from the center tap of a potentiometer connected between VDD
and VSS. In non-manual instrumentation application where a uC is the
controlling agent, the BCV voltage can directly be provided by the uC.
The dynamic range of the BCV voltage is between 25% and 88% of
the applied power supply. For VDD = 5.0V this translates to a range between
1.25V for the minimum brightness and 4.4V for the maximum
brightness. There are 81 discrete brightness steps of 1.4o/39mV increments
in the dynamic range of 1.25V and 4.4V of the BCV voltage.
The corresponding conduction angles are 45o at the dimmest and
159o at the brightest.

If that chip were available in 1979, it would have saved me a lot of time.

But doing it in analog was fun.

It is amazing what you can get now. Supose if I really searched I could find a chip to do everthing I want with no external components.

Remembering my fist SRC project with cmos - How was I sposed to know (apart from reading the spec sheets) you had to isolate the gate from the logic - nice the smell of vaporised copper and chip packaging.

I will get back with how it goes - thanks for the input.

Remembering my fist SRC project with cmos - How was I sposed to know (apart from reading the spec sheets) you had to isolate the gate from the logic - nice the smell of vaporised copper and chip packaging.
Only wimps read spec sheets (and those who actually want to avoid sparks, smoke emission, and vaporised plastic and copper during the first smoke test of their circuts.)

I never did find it mentioned in the data sheet about the gate becoming a voltage source, once a triac is triggered. It sure was fun tracking down all the false triggering. The stored energy in the pulse transformer was coming back and triggering the triac at the beginning of the next half cycle.

Status
Not open for further replies.

Replies
27
Views
9K
Replies
9
Views
4K
Replies
10
Views
2K
Replies
15
Views
4K
Replies
6
Views
3K