220V zero crossing detection using AVR microcontroller with minimum components

Well, it seems strange that zero crossing being done directly using microcontroller with the help of two resistors only. AVR  application note 182 verifies that zero crossing of 220 AC is possible using two resistors only. Here is how it looks like:

There is no rocket science in the above arrangement. 220AC through 1M ohm resistor, being fed directly to the AVR microcontroller will not do any harm to it. This is because the microcontrollers have internal clamping diodes that limits the high input voltage to microcontrollers operating voltage. The resistors here are used to convert a high voltage AC sinusoid to low voltage square wave. Thereafter using interrupts of the microcontroller, one can easily do the zero crossing detection.

However, there are some issues regarding the above arrangement. First of all EMI (Electromagnetic Compatibility) issue can arise. This is due to the fact that there is no isolation between the Hot Line and the microcontroller and the induced noise may affect the functionality both in the inter or intra system.  Secondly, the resistor connected with AC lines act as a RC filter and thereby generating a minute phase delay. But this minute phase delay can be neglected in most of the applications. This method for the zero crossing detection is still considered very efficient. 

Care should also be taken that high AC voltage may not damage the other components. There have been cases, I personally know, that people have burned out their microcontroller just because of little carelessness.

Also refer to the following posts:

RMS Voltage Control Circuit with MOC3021 and BT136

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



For any queries, contact elprojects@ymail.com or fill up the contact form.

More to Follow!

01:42 | 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