Anda di halaman 1dari 18

Universidad de Guadalajara

Centro Universitario de Ciencias Exactas e Ingenieras

Mtro. Eduardo Velzquez Mora Sistemas Digitales III Proyecto Final CASA INTELIGENTE

Integrantes: Fernando Hermosillo Reynoso Jacob Zendejas Guerrero Diego Jonathan Rocha Cortez

Introduction
To who we would not control start-up or shutdown of several electrical things in our home that do not already have a remote control, and power depend on us just press the buttons on a radio frequency 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 so dependent 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 in our 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 in various applications. The idea why, what utility would have? The advantages of this system are that people would have control of most of the things in your home at your fingertips without having to make effort to turn them 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 would helpful. 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.

Block diagram

Development of the prototype


Our prototype as already mentioned above, recorded in different stages that will be used for the same purpose; the automate various electric and electronic objects in a house using 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 already integrated in a quite simple to understand way

RF stage
For this step we use the Tx-Rx modules Tx FS1000A:

This RF transmitter can be used to transmit the signal up to 100 meters (antenna design, the environment and the power supply voltage can affect the scope). It is good 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 similar and therefore compatible. In addition both the Tx and Rx mentioned and used are inexpensive (around $80 pair) $ compared to other similar modules.

For what corresponds to the decoding of the signal in UHF is says the following integrated: 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 its ease of use.

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 de 9V 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

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

Dimmer stage
Previous concepts The 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 a semiconductor 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 blocked by inversion of stress or decreasing the current below the value of maintenance. The TRIAC can be triggered independently of the polarization of door, i.e. through a stream of positive or negative door.

The nomenclature 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 a thyristor of four layers. In sense T2-T1 leads through P1N1P2N2 and sense T1-T2 through 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 / dt and dv/dt and capacity to support about intensities. They are made for some amps up to a current 200 (A) effective and from 400 to 1000 (V) of repetitive peak voltage. The TRIAC are manufactured to operate at low frequency;those made for mid frequencies are called alternistores . The TRIACacts as two rectifiers controlled Silicon (SCR) in parallel, this device is equivalent to two" "latchs"(

Applications The versatility of the TRIAC and the simplicity of use makes it ideal for a variety of applications related to the control of alternating currents. One of them is used as a static switch offering many advantages over the conventional mechanical switches, which always 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 through zero, which avoided the arches and on tensions resulting from the switching of inductive 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. After trigger the gate has no control over the State of the TRIAC. To turn off the TRIAC anode current should be reduced below the value of the current of retention Ih . - The current and the ignition voltage decrease with increasing temperature and the increase 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 in the 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, in alternating current.

Curve Feature

Dimmer Before 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 conduction angle, we can vary the load power, but to do this we must be synchronized with the network, by nature's own thyristor, this turns "off" whenever his current decreases its sustaining current (IH ) so it is very necessary to develop an external circuit that at every crossing zero we detect or send a control signal for activate our second control system that 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

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:

Motor rotation stage


This stage consists of an H bridge made through transistors, resistors and diodes to protect 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 make the 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 as transistors), since their life times and switching frequencies are much higher. Grupher switches of diode (connected to them in parallel) allowing currents to circulate in opposite to the planned direction whenever be commuted the tension, since the engine is made by windings that for short periods of time will oppose that current vary.

Schematic of rotation of motor

Temperature control stage


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

Schematic of temperature

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; C2ON_bit = 0; INTCON.GIE=1; INTCON.PEIE=1; INTCON.INTE=1; INTCON.INTF=0; ADC_Init(); while(1) {

// Disable comparators

//Interrupcin Global activada //Interrupciones Perifricas Activadas //Interrupcin Externa activada //Bandera de la interrupcin externa se limpia // Inicializa el Modulo ADC

ADRESS = ADC_Get_Sample(0); Delay_us(20); Tem = (float)(ADRESS * 0.488); if(Tem>=28.0) { PORTD.RD4=1; } else {

PORTD.RD4=0; } if(!PORTB.RB1) { on_off=~on_off; delay_ms(250); } //Activar/Desactivar Foco

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<=4 && off==0) { duty--; push_down--; push_up++; delay_ms(150); } else if(push_down==0) { off=1; delay_ms(150); } } if(!PORTB.RB3&& on_off) //Subir PWM { if(duty<=9 && push_up>0 && push_up<=4 && off==0) { duty++; push_down++; push_up--; delay_ms(150); } else if((off) && (!push_down)) { off=0; delay_ms(150); } }

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 cambio duty_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;

} else if(off) { PORTD.RD7=0; PORTD.RD2=1; } } else { PORTD.RD7=0; } INTCON.INTF=0; } }

//Se limpia la bandera de interrupcin externa

Results
Intelligent lighting

Control System:

Conclusion
The development of this project can provide a solution that would offer convenience and comfort as regards the management and control of light, temperature and rotation of an engine that can be used either as a driver to open and/or close the door on a carport example 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 to the home is an efficient management of this unit. Was developed a System, of an intelligent home, affordable to market for everyone with an extensive list that meets basic needs and special features in the homes, with the lighting technology and automatic control of some other variables described in the document.