1
CATHOLIC UNIVERSITY OF CUENCA AZOGUES CAMPUS
Faculty of Electronic Engineering
Project Report
Power Electronics II
DimirDigital with LCD Screen
Author:
Angel Ismael Velecela Santander
Professor: Eng. Paul Mata
Azogues, 25 de enero del 2018
2
Digital Dimmer with LCD Screen
Resumen- In this project we will use applications what require shot isolated
knowledge researched for the realization of of TRIAC. An opto coupler, also called
this small circuit, as well as knowledge optoisolator or optically coupled isolator, is a
dictated by the teacher. emission and reception device that works as
We will use new materials, intelligence for the a switch activated by the light emitted by a
Arduino programming to achieve LED diode that saturates an optoelectronic component.
carry out this practice. normally in the form of a phototransistor or photo triac.
this way they are combined in a single device
semiconductor, a light emitter and a light receiver
whose connection between both is optical. These elements
I. INTRODUCTION they are found within a casing that for
It is of the DIP type. They are usually used for isolation.
Having the same operating principle, the electrically to very sensitive devices.
220 watt light bulbs are commercially derived.
in two types, of direct current connection and of
connection to alternating current. With the initiative
fundamentals of saving and energy efficiency in
220V lamp has a digital dimmer designed.
coupled to a 220V direct current light bulb.
II. THEORETICAL FRAMEWORK
WHAT IS ARDUINO?
Arduino is an electronic prototyping platform for
open-source hardware based Fig 2. MOC 3021
flexible and easy-to-use software. It is designed for
artists, designers, as a hobby and for anyone
interested in creating interactive objects or environments. What is a 4N25?
The 4N25 is an arsenide infrared light-emitting diode.
of gallium, along with a silicon phototransistor. An opto
coupler, also called optoisolator or isolator
optically coupled, it is an emission device and
reception that acts as an activated switch
through the light emitted by an LED diode that saturates a
optoelectronic component, usually in the form of
of the phototransistor or photo triac.
Fig1: Arduino Uno
What is a MOC 3021?
The MOC3021-M consists of an emitting diode
optically coupled gallium arsenide infrared
a bilateral silicon switch in a package
DIP-6. This device is designed for use in
3
Fig3. 2N25
WHAT IS A TIC 226?
TIC226 is aTriac(alternating current period), which does not
it is more than a devicesemiconductorof
threeterminales what is used to control the flow of
corriente promedio a una carga, con la particularidad de
which drives in both directions and can be blocked
forvoltage inversionor by decreasing the current due to
below the maintenance value.
Fig 6. Resistances
III. FUNCTIONING
A current of 120v enters the circuit at a
rectifier bridge, rectifying the wave in order to
Fig4. Tic 226 to be able to use it with this optocoupler
internally it has a diode that when crossed by
Zero saturates and comes out to the Arduino board.
the zero crossing detected gives us a time of
WHAT ARE BUTTONS? cut
A pulse is sent from the Arduino with the help of the
It applies to thecurrentelectricity generated by
asuccessionof directed impulses in asame button is sent to another coupler of the same sender
sensevariabledesde cero untila maximum value. the Triac which takes the values and turns on the load
IV. DEVELOPMENT
Fig5. Button
DEFINITION OF RESISTANCES:
It is called a resistor or resistance to the component
electronic device designed to introduce a resistance
electric current determined between two points of a circuit.
This is the main circuit that will be made.
In other cases, such as in plates, heaters,
, resistors are used to produce heat using the components already mentioned
taking advantage of the Joule effect.
CIRCUIT CODE
#include <TimerOne.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); // ( RS, EN, d4,
d5, d6, d7
4
volatile int i=0;
volatile boolean zero_cross=0; if (digitalRead(button1) == LOW)
int AC_pin = 3; {
int button1 = 4; if (dim < 127)
int button2 = 5; {
int dim2 = 0; dim = dim + step;
int dim = 128; if (dim>127)
int pas = 10; {
int freqStep = 65; dim=128;
}
}
}
void setup() { if (digitalRead(button2) == LOW)
{
[Link](16, 2); // Set the number of characters and of if (dim>5)
rows {
POWER 2 dim = dim - step;
delay (2000); if (dim<0)
//[Link](); {
ISMAEL VELECELA dim=0;
delay (2000); }
[Link](9600); }
pinMode(button1, INPUT); }
pinMode(button2, INPUT); while (digitalRead(button1) == LOW) { }
pinMode(AC_pin, OUTPUT); delay(10); // waiting a little bit...
attachInterrupt(0, zero_cross_detect, RISING); while (digitalRead(button2) == LOW) { }
[Link](freqStep); delay(10); // waiting a little bit...
[Link](dim_check, freqStep); //if (B1)
dim2 = 200 - 2 * dim;
if (dim2 < 0)
} {
dim2 = 0;
void zero_cross_detect() { }
zero_cross = true;
i=0; [Link]("dim=");
digitalWrite(AC_pin, LOW); [Link](dim);
} [Link](" dim2=");
[Link](dim2);
void dim_check() { [Link](" dim1=");
if(zero_cross == true) { [Link](2*dim);
if(i>=dim) { [Link]('\n');
digitalWrite(AC_pin, HIGH); [Link]();
i=0; //[Link](1,0);
zero_cross=false; LIGHTING
} //delay (100);
else { [Link] (6,7);
i++; // increment time step counter [Link](dim2);
} %
} //delay (2000);
} //[Link]();
}
void loop() {
//lcd clear ();
digitalWrite(button1, HIGH);
digitalWrite(button2, HIGH);
5
VII. ANNEXES
DATASHEET
MOC 3021:
TRIAC 226:
V. CONCLUSIONS
- When carrying out this project, it was taken into account
a lot of information collected about the use
of the dimmer
- It was not an easy process since in the matter
the programming got a little complicated
- The use of optocouplers is very important
in this type of projects because if something happens
as a short circuit or another inconvenience protects the
microcontroller
- It is important to consider the value of the
resistances since if they are not put on the
the circuit does not work. RECTIFIER BRIDGE:
VI. BIBLIOGRAPHY
[1] [Link]
[[Link]
integrateds/[Link]
6
OPTOCOUPLER 4N25