MOC3021 Circuitry for Inductive Load with Snubber Circuit

Remember, as a thumb rule, that whenever the inductive load is used in the circuits; depending upon the nature of the load, there can be or can not be a need for a snubber circuit. Snubber circuit is basically used to cater for the dv/dt and di/dt side effects. We mostly used capacitors and inductors in designing snubber circuits. Usually a RC snubber is used with the thyristors so that false turn on of the thyristor due to the high dv/dt can be avoided.  The values of these passive components are calculated depending upon the load and the selection of components. Since most of the AC loads are inductive in nature, so there is often a need of the snubber circuit with MOC3021 and BT136. Here is the modified version the MOC3021 circuitry for an inductive load.
Here you can see that there are snubber circuits, one for the triac and the other for the opto triac. A combination of 39 ohm resistance and 0.01u is a protection for the triac BT-136, similarly 470 ohm/0.05 u is for the opto triac. The above circuit had been tested practically.

More to follow.

Also see:

11:03 | Posted in , , , | Read More »

AVR C code for RMS voltage control using BT-136 and MOC-3021

To accomplish the firing angle (RMS) firing angle control of an AC load, please refer to the hardware arrangement explained here. Here is the schematic taken from the application notes of MOC3021 :


There is a need of zero crossing detector, that will provide the reference point. Just after the microcontroller detects the zero crossing of 220V AC, it will turn on the BJT C828 (shown above) with some delay. This delay will determine the RMS voltage across the AC load. Say for example on 50 Hz AC,  the time period comes out to be 20ms. That means the microcontroller will detect the zero crossing every 10 ms. So the range of delay, after which the microcontroller will trigger C828, comes out to be 0-10ms. At delay of 0ms, whole sinusoid will pass through the AC load. Similarly at 5ms i-e firing angle of 90', the RMS voltage across the AC load will be 110V. Therefore we can say that by varying the delay from 0-10ms, we get varying RMS voltage from 220V to 0V.

I have tested the above circuitry using AVR ATmega16L. What microcontroller needs to do is to generate an interrupt on zero crossing and then call the delay routine. How zero crossing of 220V AC is accomplished on microcontroller, will be discussed later. Here is the C code for AVR studio, to test the firing angle control of AC load:

#include <avr/interrupt.h>
#include <avr/iom16.h>
#include <util/delay.h>


volatile int int_flag=0;


ISR( INT0_vect )
{
int_flag=1;
}


void int0_init( void )
{
    MCUCR = (0<<ISC01)|(1<<ISC00);  // enable any level change interrupt
    GICR = (1<<INT0);               // enable INT0
}


int main( void )
{
        DDRB   = 0xFF;     // PORTB as output
DDRA   = 0xFF;     
DDRC   = 0xFF;


  
    int0_init();                    // configure INT0

    sei();                          // enable global interrupts

    while (1)                       // loop forever, 
        
{
asm("nop");

if(int_flag==1)
{

PORTB=0x00;
PORTA=0x00;
PORTC=0x00;
PORTC=0xFF;
PORTB|=(1<<PB0);
_delay_ms(0.625);
PORTB=(1<<PB1)|(1<<PB0);
_delay_ms(0.625);
PORTB=(1<<PB2)|(1<<PB1)|(1<<PB0);
_delay_ms(0.625);
PORTB=(1<<PB3)|(1<<PB2)|(1<<PB1)|(1<<PB0);
_delay_ms(0.625);
PORTB=(1<<PB4)|(1<<PB3)|(1<<PB2)|(1<<PB1)|(1<<PB0);
_delay_ms(0.625);
PORTB=(1<<PB5)|(1<<PB4)|(1<<PB3)|(1<<PB2)|(1<<PB1)|(1<<PB0);
_delay_ms(0.625);
PORTB=(1<<PB6)|(1<<PB5)|(1<<PB4)|(1<<PB3)|(1<<PB2)|(1<<PB1)|(1<<PB0);
_delay_ms(0.625);
PORTB=(1<<PB7)|(1<<PB6)|(1<<PB5)|(1<<PB4)|(1<<PB3)|(1<<PB2)|(1<<PB1)|(1<<PB0);
_delay_ms(0.625);
PORTA=(1<<PA0);
_delay_ms(0.625);
PORTA=(1<<PA1)|(1<<PA0);
_delay_ms(0.625);
PORTA=(1<<PA2)|(1<<PA1)|(1<<PA0);
_delay_ms(0.625);
PORTA=(1<<PA3)|(1<<PA2)|(1<<PA1)|(1<<PA0);
_delay_ms(0.625);
PORTA=(1<<PA4)|(1<<PA3)|(1<<PA2)|(1<<PA1)|(1<<PA0);
_delay_ms(0.625);
PORTA=(1<<PA5)|(1<<PA4)|(1<<PA3)|(1<<PA2)|(1<<PA1)|(1<<PA0);
_delay_ms(0.625);
PORTA=(1<<PA6)|(1<<PA5)|(1<<PA4)|(1<<PA3)|(1<<PA2)|(1<<PA1)|(1<<PA0);
_delay_ms(0.625);
PORTA=(1<<PA7)|(1<<PA6)|(1<<PA5)|(1<<PA4)|(1<<PA3)|(1<<PA2)|(1<<PA1)|(1<<PA0);
int_flag=0;

}

}
    return(0);
}

What is happening in the code? The two ports of AVR ATmega16 is dedicated to test the RMS voltage control of an AC load. Any pin of PORTA and PORTB can be connected to the BJT. Pin 0 of PORTB will trigger the transistor at a delay of 0ms, Pin 1 at a delay of 0.625 ms. In fact the the firing angle is divided into 16 steps (as their are 16 pins dedicated), therefore as you move from PINB0 to PINB7 and then from PINA0 to PINA7, you get an increment of 0.625ms each time you move from one pin to another. If the BJT is connected across PINB0, you get RMS voltage 220 across the load. This RMS voltage will decrease as you move to PINB1 and further till PINA7, as the delay is increasing. 

The above code has been tested successfully. Contact elprojects@ymail.com for any queries.

22:49 | Posted in , , , | Read More »

RMS Voltage Control Circuit with MOC3021 and BT136


Triac is a power electronic component that conducts in both directions when triggered through gate. Figure below shows a generic working of triac.As it can be seen that at time t1, angle of sinusoid is 45' which means that if we triggered triac at this angle i-e at 45', only shaded blue area will pass through the triac and hence through the load. Observe that shaded blue are has RMS Voltage less than the pure sinusoid. This is the basic principle by which RMS Voltage control is accomplished. Firing needs a small pulse at gate that can be give through microcontroller also. Similarly at firing angle 90' (firing angle is an angle with reference zero crossing at which the triac is triggered using gate pulse) , only red part of sinusoid will pass through the triac giving us the RMS 110V for 220V.



Coutesy of Motrola,Inc

MOC3021 is an optotriac (product of Motorola) that is used for isolation between power and driving circuitry. Note that when C828 on the base is applied voltage>0.7V, optotriac gets triggered. As the triac gets triggered now, the positive or negative voltage (whatever maybe) get pass through the gate of BT136 (triac) and hence triggered it. It should be noted here that by using above arrangement we can control the RMS voltage in both directions. What needs to be taken care of, is the triggering time or firing angle.

There is a need of a zero-crossing detector that will give us the reference for providing delay for desired firing angle. In above example, for firing angle to be 90' for 220V 50Hz AC signal, we need to have a delay of 2.5 ms (t1=2.5ms) right after each zero crossing. Usually MOC3021 is driven through microcontroller, which gives the firing pulse on the basis of interrupt generated by the zero-crossing detector. 

The above circuit is mainly used as a dimmer and is often used speed controlling of AC motor. There are other versions of the above circuits available that caters for the inductive load which will be discussed later.

More to follow!

21:16 | Posted in , , , , | Read More »

Labels

Recently Commented

Recently Added