Proyecto Final SDIII

download Proyecto Final SDIII

of 18

Transcript of Proyecto Final SDIII

  • 8/13/2019 Proyecto Final SDIII

    1/18

  • 8/13/2019 Proyecto Final SDIII

    2/18

    IntroductionTo who we would not control start-up or shutdown of several electrical things in our home that donot already have a remote control, and power depend on us just press the buttons on a radiofrequency control, but: is it possible?.Clear that it is possible!, our project will be the creation of such a system.

    Justification:Today the technology is so daily present in our lives to such an extent, that have made us sodependent on it that always want everything to be automatic and easy to use to make life easier.Our project consists of the creation of a remote control that controls some things that we find inour homes as: lights off & running as well as the PWM modulation in these to lower its intensity,

    on automatic or manual water pump, and check the rotation of an engine that could be used invarious applications.The idea why, what utility would have? The advantages of this system are that people would havecontrol of most of the things in your home at your fingertips without having to make effort to turnthem on or off them, yes well there are many, many people would like to stop doing them(including us xD) in addition, elderly or impaired people to make physical effort them wouldhelpful. For these reasons, this will please price $.

    Aims and scope.The objectives that we have considered in the project are the following:

    * Achieving transmit and receive information via an RF remote control and that it

    has an adequate number of buttons for different orders that be sent him the

    microphone.

    * Interpret the information received on the microcontroller and execute tasks.

    * Turn on, turn off, as well as increase or decrease the potency of a focus using

    the technique of driving or phase angle.

    * Control the power on/off and rotation of a DC motor.

    * Maintain a desired temperature using the automatic ignition of an AC fan.

    * Easy to operate by anyone and used anywhere (obviously that expect the

    artifacts needed to operate).

    The scope of the project is to be something really useful and something that you

    would like to have the people, something that is part of our House, not essential

    but useful, even to improve it then adapted to the preferences of the people, this

    would be more than satisfied with our project.

  • 8/13/2019 Proyecto Final SDIII

    3/18

    Block diagram

  • 8/13/2019 Proyecto Final SDIII

    4/18

    Development of the prototype

    Our prototype as already mentioned above, recorded in different stages that will be usedfor the same purpose; the automate various electric and electronic objects in a houseusing a remote control. These stages are:Stage of UHF, power stage, temperature stage, turn of motor.The following diagram shows total project system, all these stages are alreadyintegrated in a quite simple to understand way

  • 8/13/2019 Proyecto Final SDIII

    5/18

    RF stageFor this step we use the Tx-Rx modules

    Tx FS1000A:

    This RF transmitter can be used to transmit the signal up to 100 meters (antennadesign, the environment and the power supply voltage can affect the scope). It isgood for transmissions of short distance and the development of devices to

    batteries. It can be adjusted to 315/330/433 MHz.

    Rx RX1D SATELLITE:

    This circuit is compatible with the used Tx since it has characteristics similarand therefore compatible. In addition both the Tx and Rx mentioned and usedare inexpensive (around $80 pair) $ compared to other similar modules.

    For what corresponds to the decoding of the signal in UHF is says the followingintegrated: HT12E and HT12D.

    The main reason for employing such circuits is the compatibility with these modules(Tx and Rx); the second reason is that they are inexpensive and the third reason is itsease of use.

  • 8/13/2019 Proyecto Final SDIII

    6/18

    HT12E:

    * Only need a strength of 5% of tolerance for his oscillator* It has transmission indicator and control of frames shot (/ tea)* Simple communication with transmission of RF modules* Uses very few external components* Operates with a voltage of 2.4-12V(por lo que facilita el uso de una batera de9V por ejemplo)* Saving of energy (Standby_0.1uA@VDD=5V)* High noise immunity.

    HT12D:

    * Only need a strength of 5% of tolerance for his oscillator (RC)* It has valid transmission indicator* Simple communication with transmission of RF modules* Uses very few external components* Operates with 2.4-volt

  • 8/13/2019 Proyecto Final SDIII

    7/18

    Schematic of RF stageThe following schemes are the way in which we will set up our remote control with theintegrated for radio frequency: TH12D decoder and encoder TH12E working at afrequency of 433.9 MHz.

  • 8/13/2019 Proyecto Final SDIII

    8/18

    Dimmer stagePrevious conceptsThe thyristor is a generic name for a series of power semiconductor devices.

    One of the thyristor most used is the TRIAC(Triode for Alternative Current), whichis asemiconductor device of three terminals, which is used to control the flow of average

    power to a load, with the particularity that leads in both directions and can be blockedby inversion of stress or decreasing the current below the value of maintenance. TheTRIACcan be triggered independently of the polarization of door, i.e. through a streamof positive or negative door.

    Thenomenclature anode 2 (A2) and anode 1 (A1) may be replaced by 2 main Terminal

    (T2) and 1 main Terminal (T1) respectively.

    Structure

    The structure contains six layers as shown in the Froom 2, although always works as athyristor of four layers. In sense T2-T1 leads through P1N1P2N2 and sense T1-T2through P2N1P1N4. N3 layer facilitates the intensity of negative door trip.Complication of its structure m makes itas delicate that a thyristor in regard to di / dtand dv/dt and capacity to support about intensities. They are made for some amps up toa current200 (A)effective and from 400 to 1000 (V)of repetitive peak voltage. TheTRIACare manufactured to operate at low frequency;those made for mid frequenciesare called alternistores.The TRIACacts as two rectifiers controlled Silicon (SCR) in parallel, this device is

    equivalent to two""latchs"(

  • 8/13/2019 Proyecto Final SDIII

    9/18

    Applications

    The versatility of the TRIAC and the simplicity of use makes it ideal for a variety ofapplications related to the control of alternating currents. One of them is used as a staticswitch offering many advantages over the conventional mechanical switches, whichalways require the movement of a contact, being the main which is obtained as a result

    of which the TRIAC always each half cycle is triggered when current passes throughzero, which avoided the arches and on tensions resulting from the switching ofinductive loads that store a particular power during operation.

    In short, some features of the TRIAC:

    - The TRIAC driving mode cut mode switches when the gate current is injected. Aftertrigger the gate has no control over the State of the TRIAC. To turn off the TRIACanode current should be reduced below the value of the current of retention Ih .

    - The current and the ignition voltage decrease with increasing temperature and theincrease in tension locking.

    - The application of the TRIACS, Thyristors unlike, is basically in alternating current.Its characteristic curve reflects a performance very similar to the thyristor appeared inthe first and third quadrant of the axis system. This is due to its directionality.

    - The main usefulness of the TRIAC is as a regulator of power delivered to a load, inalternating current.

    Curve Feature

  • 8/13/2019 Proyecto Final SDIII

    10/18

    DimmerBefore you begin with the explanation of circuits, we must understand that it is a

    Dimmer, a Dimmer is a circuit based on thyristors that allows us, by means of the

    characteristic curve of these, check the angle (in BC) in which the thyristor enters

    conduction, achieving thus vary the voltage on the line (120V - 220V).

    To facilitate compression of this, we can see the following graphs:

    Understanding previous concepts we can see that, achieving vary a thyristor conductionangle, we can vary the load power, but to do this we must be synchronized with thenetwork, by nature's own thyristor, this turns "off" whenever his current decreases itssustaining current (IH ) so it is very necessary to develop an external circuit that at everycrossing zero we detect or send a control signal for activate our second control systemthat will allow us to vary own thyristor conduction angle.

    So if we do not do proper synchronization, the result would be an "intermittent"adequate power (Pvariable, 0, Pvariable, etc...).

    Schematic for Dimmer

  • 8/13/2019 Proyecto Final SDIII

    11/18

    The Dimmer system will serve to control the brightness of the bulb and on fan,for this we need on crossing detection system by zero, these schemes are presented

    below:

  • 8/13/2019 Proyecto Final SDIII

    12/18

    Motor rotation stage

    This stage consists of an H bridge made through transistors, resistors and diodes toprotect the transistors. The implementation of this stage is to simulate the engine that

    have automatic doors of the parking lot, the sense of the rotation of the motor will makethe door down or raise depending on the order received by the microcontroller on the

    part of the user through control of RF.

    The term "H-bridge" comes from the typical graphical representation of the circuit. An

    H-bridge is constructed with 4 switches (mechanical or transistors). When the switches

    S1 and S4 (see first figure) are closed (and S2 and S3 open) applies a positive voltage

    on the motor, spinning it in a sense. Opening the switches S1 and S4 (and closing S2

    and S3), the voltage is reversed, allowing reverse motor rotation.

    With the nomenclature we are using, the switches S1 and S2 can never be closed at the

    same time, because this it this will short circuit the power supply . The same goes for S3

    and S4.

    The most common in this type of circuit is to use solid state switches (such astransistors), since their life times and switching frequencies are much higher.Grupher switches of diode (connected to them in parallel) allowing currents to circulatein opposite to the planned direction whenever be commuted the tension, since theengine is made by windings that for short periods of time will oppose that current vary.

    Schematic of rotation of motor

  • 8/13/2019 Proyecto Final SDIII

    13/18

    Temperature control stageThis stage is designed to maintain control of any temperature desired by the user, i.e.; Ifthe temperature for which it was programmed microcontroller (in our case we choosethe temperature of 28 C) is lower than that which is taken through the LM35 sensor fanwill remain shutdown, but when this temperature is higher than desired, themicrocontroller automatically send a signal to turn the fan with this tried to lower thetemperature. The scheme of the stage is shown below:

    Schematic of temperature

  • 8/13/2019 Proyecto Final SDIII

    14/18

    Source Code

    unsigned char push_down=4,push_up=0,off=0;unsigned char duty=10,duty_old;unsigned char on_off=0,on_off_m=0;float Tem = 0;unsigned int ADRESS;

    void main(){

    OPTION_REG&=0x7F; //Activar "Weak Pul-Up"WPUB=0xFE;ANSELH=0x00; //No hay entradas Analgicas en Puerto B

    ANSEL=0x01;TRISB.RB0=1;PORTB.RB1=1;PORTB.RB2=1;PORTB.RB3=1;PORTB.RB4=1;PORTB.RB5=1;PORTB.RB6=1;TRISD=0x00;PORTD=0x00;

    C1ON_bit = 0; // Disable comparatorsC2ON_bit = 0;

    INTCON.GIE=1; //Interrupcin Global activadaINTCON.PEIE=1; //Interrupciones Perifricas ActivadasINTCON.INTE=1; //Interrupcin Externa activadaINTCON.INTF=0; //Bandera de la interrupcin externa se limpia

    ADC_Init(); // Inicializa el Modulo ADC

    while(1){

    ADRESS = ADC_Get_Sample(0);Delay_us(20);

    Tem = (float)(ADRESS * 0.488);if(Tem>=28.0){PORTD.RD4=1;

    }else{

  • 8/13/2019 Proyecto Final SDIII

    15/18

    PORTD.RD4=0;}

    if(!PORTB.RB1) //Activar/Desactivar Foco{

    on_off=~on_off;

    delay_ms(250);}

    if(!PORTB.RB4) //Activar/Desactivar Motor{

    on_off_m=~on_off_m;delay_ms(250);

    }

    if(!PORTB.RB2 && on_off) //Bajar PWM

    {if(duty>=1 && push_down>0 && push_down

  • 8/13/2019 Proyecto Final SDIII

    16/18

    if(on_off_m){

    if(!PORTB.RB5){

    PORTD.RD6=0;

    PORTD.RD5=1;delay_ms(150);

    }

    else if(!PORTB.RB6){

    PORTD.RD5=0;PORTD.RD6=1;delay_ms(150);

    }}

    else{

    PORTD.RD5=0;PORTD.RD6=0;

    }

    }}

    void interrupt(){

    if (INTCON.INTF) //Si se produjo una interrupcin externa (se sincroniza frecuencia// // de lnea 60Hz)

    {if(on_off){

    PORTD.RD0=1; //se muestra en D0 el cambioduty_old=10-duty;PORTD.RD0=0;

    PORTD.RD7=0;

    while(duty_old>0){delay_us(833);duty_old--;

    }

    if(!off){

    PortD.RD7=1;PORTD.RD2=0;

  • 8/13/2019 Proyecto Final SDIII

    17/18

    }

    else if(off){

    PORTD.RD7=0;

    PORTD.RD2=1;}

    }

    else{

    PORTD.RD7=0;}INTCON.INTF=0; //Se limpia la bandera de interrupcin externa

    }}

    ResultsIntelligent lighting

    Control System:

  • 8/13/2019 Proyecto Final SDIII

    18/18

    Conclusion

    The development of this project can provide a solution that would offer convenienceand comfort as regards the management and control of light, temperature and rotation ofan engine that can be used either as a driver to open and/or close the door on a carportexample in houses similar to some of the schemes currently trading at large buildings,

    business and household characteristics. Use the remote to control lights and access tothe home is an efficient management of this unit. Was developed a System, of anintelligent home, affordable to market for everyone with an extensive list that meets

    basic needs and special features in the homes, with the lighting technology andautomatic control of some other variables described in the document.