Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC controlling AC loads

Status
Not open for further replies.
Hi all i found a zero crossing optocoupler.
This is what in my mind and i want to ask you guys if it will work this way.

since we are using zero crossing optocoupler does it mean we dont need anymore to use a zero detection circuit?

Hi,

You need a separate zero-crossing point trigger input for the PIC, so the PIC can effectively control the TRIAC. Otherwise the PIC has no idea when the zero-crossing point occurs.

Unless you want to use the technique FvM suggested, unsynchronized PWM control.

FvM:
It uses a zero-crossing-detector triac. As I previously explained, you can use it with slow pwm control (e.g. 1 to 4 secs period) without synchronization to the AC voltage.

BigDog

---------- Post added at 16:02 ---------- Previous post was at 15:44 ----------

Here's a datasheet of a similar device:

OPTOCOUPLER TRIAC-OUT ZERO-CROSSING 6-DIP

The datasheet has some example applications towards the end of the document.
 
The application requirements decide about the suitable control method and if a zero-crossing signal is needed by the micro controller. In terms of control theory, it's the characteristic of the "plant" or control process.

- a slow heated zone, e.g a metal block with heater cartrige and time constants in a several 10 seconds to many minutes order of magnitude. It can be easily controlled by unsychronized PWM.
- a fast heating zone, e.g. a solder tool with a small tip and a time constant of a few seconds maximum. You should use synchronized PWM or the above described full wave sigma delta modulation scheme.

In both cases, a zero crossing opto coupler can be used.
 
Re: PIC complete discussion for all

HI,
If I use MOC3041M still I have to use zero crossing detector circuit?
Thanks
 

Thanks FvM,
I think synchronized PWM is better,other wise sometimes Humming the motor.For eliminate that problem I'm gonna use zero crossing detection.If I use MOC with zero crossing detection do I need extra Zero crossing circuit to MCU? Im using PIC12F615
TKS
 

Microchip's document "Interfacing to AC Power Lines" showed a series 5M ohm resistor from 120v AC power line to PIC External Interrupt port. Peak current calculation-
Ipeak = 162V/5 M Ω = 32 µA
This 32 µA current has been said as a safety margin of the PIC16C5X. But I want to know why such extremely low current is used here. Max current capability should be the range of mA.

I want to test this with PIC16F628A and 230V power line. What should be limiting resistor value for 230v AC?
In the data sheet of 16F628A, "Maximum output current sunk by any I/O pin is 25mA. So, If I user 1M ohm resistor the max. current will be 325µA. Which is also in the safe margin. Am I correct?
 
Last edited:

The datasheet is specifying 20 mA input clamp current under absolute maximum ratings. Strictly spoken, you can't conclude a clamp current specification for regular device operation. It may be e.g. the case, that forward biasing of clamp diodes injects excessive leakage currents to other circuit parts, e.g. analog input pins, or the internal ADC circuit, causing errors beyond the specification.

I have observed similar effects with clamp diodes of CD405x analog multiplexers.

The datasheet doesn't mention clamp diode operation in any other place. This may explain, why the author of AN521 suggests a resistance value near the maximum value according to the input delay calculation.

I personally think, that 1 MOhm will be O.K., but there's no reliable datasheet specification you could rely on. If you want to utilize clamp diode operation in a product design, you probably should verify with own measurements that it doesn't affect analog specifications or other critical parameters. Or try to get a clear statement from Microchip about it.
 

Current has been reduced to such very small value using 5M ohm resistor but what about the voltage? I didn't find the maximum reverse voltage in the data sheet. Did you know this rating? What is the maximum voltage it can cater?
 

I've used resistors between 120kΩ and 2.2MΩ and they've all worked; none of them burned the microcontroller. But I usually use 1MΩ. I tested these when making a remote-controlled speed regulator with a 12F675. It sensed zero-crossing all the way from the mains 220V, so that's safe for the microcontroller and won't burn it. I haven't gone higher than that, but 220V AC Mains is fine.

Hope this helps.
Tahmid.
 

Current has been reduced to such very small value using 5M ohm resistor but what about the voltage? I didn't find the maximum reverse voltage in the data sheet. Did you know this rating? What is the maximum voltage it can cater?
The operation principle of clamp diodes limits the reverse voltage to VCC + one diode forward voltage (0.7 V). In so far, the reverse voltage will be safe as long as the input current doesn't raise VCC. This can happen, if no other loads besides the processor exist in the circuit and the processor is operated at low clock frequencies or even in idle or sleep mode. This problem may be another reason, why Microchip suggests a low input current in AN521.

Another point to consider are expectable mains voltage transients (surge) and resistor voltage rating. For safe operation, the current limiting resistor must withstand expectable overvoltages and surge pulses. Without effective MOV input protection, you need at least Cat. II, 2500 V surge and 1350 Vrms/1 min with 230 VAC.
 
If only switch On & off is required, zero crossing detector is not required. Any opto TRIAC driver IC (e.g, MOC30XX series) can be used to fire gate of the driver TRIAC. If the MCU output PIN is always on it will be "on". If MCU pin is zero it will be off. Am I right?

Is this the right way to make a SSR which can replace electromechanical Relay?
 

Any opto TRIAC driver IC (e.g, MOC30XX series) can be used to fire gate of the driver TRIAC. Use MOC3043 for driving the gate of the triac.:-:grin:
 

SSR for resistive load should use full wave switching (by zero crossing detector) to reduce avoidable interferences. Switching of inductive loads (coils, unloaded transformers) may be problematic with zero crossing Optotriacs or SSR. The voltage across the triac is rising fastly after zero crossing, so the switch possibly not triggered. At worst case, only one halfwave is triggered, the load may be damaged by applied DC voltage.
 
For switch on means gate firing angle is zero. i.e. no delay after zero. So, firing angle control is not required. Why zero crossing is required here?
 

No zero crossing detector means power is switched on at arbitrary times, e.g. when the AC voltage is at it's maximum. That won't matter for an infrequently switched load. A mechanical switch does essentially the same, there's even a high likelyhood that contact closure is made when the instantaneous voltage is high. But SSR are also used for short period full wave switching, e.g. for heating control. In this case, generated harmonic (non-sinoidal) currents matter. According to power quality regulations, they must be minimized.
 
I've made a dimmer circuit using MOC3021 and PIC microcontroller. PIC detects zero cross point of the power line and provide high output to teh output PIN depending on the con figured delay. Hence, the TRIAC get fired after the zero cross at a specified delay upto 9ms. Our Power line voltage is 230v and frequency 50Hz.

If the delay is 9ms the light is in the dimmest state. At the decrease of the delay, the light becomes brighter. So, to get full bright light should I not make 0ms delay? or I need at least some delay linke1ms or 0.5ms?
 

Hi Sam,

This depends on the triggering pulse width. Triggering at about 0.0ms, the voltage on the power triac is close to 0V. If the pulse is very short, it cannot pass a current to trigger itself. Therefore, if the trigger pulse should be short, it should be delayed (say 1ms) so that V_power is high enough to keep the triac on.

In any case, it is the timing of the falling edge of the triggering pulse that determines if the triac can stay on by the load current or not. In other words, if the load is light (hence its current is relatively low), the trigger pulse end should be delayed more so that the instantaneous V_power becomes high enough to pass the minimum latching current of the triac through the load and vice versa.

Note:
About the output power in case the load is resistive, we can find by calculation that:
@0.60 ms power delivered is 99.9%
@1.14 ms power delivered is 99.0%

Hope this help.

Kerim
 
Thanks Kerim

Currently configured pulse width is 1ms. So, even if the delay is 0 ms TRIAC gate should be fired within the 1ms (pulse width) period. Is it okay? I can also make 1ms delay for the brightest position. No problem.
 

Hi Sam,

Just to be sure, what type of light you are using?
I was referring on my previous post to the old filament bulbs.

Please note that the pulse should be wide for inductive load for two reasons:
(1) The triac is still on by the magnetic current of the previous half-cycle at zero crossing and possibly up to 5ms (ideal inductor).
(2) The current of the inductive load doesn't increase at the same speed of voltage (lagging current) as it is the case of a resistive load.
 

I'm currently using incandescent bulb. But later I'll test FAN speed control and fluorescent lamp for just on & off.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top