Top Banner
1 R.K.College of engineering and technology
58

Pc Based Wireless Appliance Control Report

Apr 07, 2015

Download

Documents

ronak77
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Pc Based Wireless Appliance Control Report

1R.K.College of engineering and technology

Page 2: Pc Based Wireless Appliance Control Report

History

In the history of wireless technology, the demonstration of the theory of electromagnetic waves by Heinrich Rudolf Hertz in 1888 was important. The theory of electromagnetic waves was predicted from the research of James Clerk Maxwell and Michael Faraday. In the 1860s the British scientist James Clerk Maxwell predicted the possibility of generating electromagnetic waves that would travel at the speed of light. Twenty years later the German physicist Heinrich Hertz demonstrated this radiation (hence the word radio).

He found that when he generated sparks between two metal balls they could be found by a metal loop with a gap in it. Smaller sparks were seen jumping across this gap. Later experimenters managed to increase the distance across which Hertzian waves could be transmitted. Hertz demonstrated that electromagnetic waves could be transmitted and caused to travel through space at straight lines and that they were able to be received by an experimental apparatus.

David E Hughes, induced electromagnetic waves in a signaling system.

Hughes transmitted Morse code by an induction apparatus.

In 1878, Hughes's induction transmission method utilized a "clockwork transmitter" to transmit signals.

In 1885, T. A. Edison uses a vibrator magnet for induction transmission.

In 1888, Edison deploys a system of signaling on the Lehigh Valley Railroad.

In 1891, Edison attains the wireless patent for this method using inductance

In 1894 a British scientist, Oliver Lodge, sent Morse-code signals over a distance of half a mile.

In 1895 the Russian physicist, Aleksandr Stepanovich Popov, built a receiver to detect electromagnetism in the atmosphere and he predicted that it might be used to pick up generated signals. The next year he arranged a demonstration in the University of St Petersburg where messages were sent and received between different points.

Guglielmo Marconi improved Hertz's design by earthing the transmitter and receiver, and found that an insulated aerial enabled him to increase the distance of transmission.

2R.K.College of engineering and technology

Page 3: Pc Based Wireless Appliance Control Report

After patenting his wireless telegraphy system in 1896 he established the Marconi's Wireless Telegraph Company in London. In 1898 Marconi successfully transmitted signals across the English Channel and in 1901 established communication with St. John's, Newfoundland, from Poldhu in Cornwall.

In this way wireless communication came in to picture and slowly this field started growing and has reached to a mark where every communication can take place wirelessly.

Present Day Scenario

The term “wireless” is commonly used in the telecommunications industry to refer to telecommunications systems (e.g. radio transmitters and receivers, remote controls, computer networks, network terminals, etc.) which use some form of energy (e.g. radio frequency (RF), infrared light, laser light, visible light, acoustic energy, etc.) to transfer information without the use of wires.

Wireless operations permits services, such as long range communications, that are impossible or impractical to implement with the use of wires. Information is transferred in this manner over both short and long distances. Wireless communication is the transfer of information over a distance without the use of enhanced electrical conductors or "wires".

In present day scenario of communication, we do not require the transmitter and receiver to be in physical contact.

The wireless communication has following advantages as compared to wired communication:

• Mobility.• Elimination of unsightly cables.• Less installation time.• Devices can be “software” upgraded to meet new standards.• Guests can connect and move around freely.• Security.• Multiple Standards• Coverage - But the potential for radio interference due to weather, other wireless devices, or obstructions like walls can happen in wireless.

3R.K.College of engineering and technology

Page 4: Pc Based Wireless Appliance Control Report

Need

In many of the industries, firms and even at homes at offices we generally prefer to switch ‘on’ an ‘off’ the things wirelessly, for example at home we generally switch on and off the appliances through remote like air-conditioners, television sets etc. but nower days everything is operated through the computers. So in order to increase the comfort of living we require a thing which can interface the PC with different appliances. For that we have done this project which can help us interfacing eight appliances with the PC i.e. we can control eight different appliances through one PC without moving from one place to other.

This can be used in different industries, firms and offices where the things do get controlled with the help of computers. It can also be used at home where the tube lights, fans etc can be switched ‘on’ or ‘off’.

4R.K.College of engineering and technology

Page 5: Pc Based Wireless Appliance Control Report

5R.K.College of engineering and technology

Page 6: Pc Based Wireless Appliance Control Report

Figure 1(Block Diagram of PC based wireless appliance control)

Parallel Port

PC parallel port can be very useful I/O channel for connecting our own circuits to PC. The PC's parallel port can be used to perform some very amusing hardware interfacing experiments. The port is very easy to use when we first understand some basic tricks.

PC parallel port is 25 pin D-shaped female connector in the back of the computer. It is normally used for connecting computer to printer, but many other types of hardware for that port is available today.

Not all 25 are needed always. Usually you can easily do with only 8 output pins (data lines) and signal ground. I have presented those pins in the table below. Those output pins are adequate for many purposes.

pin function 2 D0 3 D1 4 D2 5 D3 6 D4 7 D5 8 D6 9 D7Pins 18,19,20,21,22,23,24 and 25 are all ground pins.

Those data pins are TTL level output pins. This means that they put out ideally 0V when they are in low logic level (0) and +5V when they are in high logic level (1). In real world the voltages can be something different from ideal when the circuit is loaded. The output current capacity of the parallel port is limited to only few mille-amperes.

The signals from the computer will be given to the transmitter circuit through the parallel port.

6R.K.College of engineering and technology

PCPARALLE

LPORT

ENCODER

RFX’MITTER

RFRECEIVER

DECODER

APPLIAN-CE

Page 7: Pc Based Wireless Appliance Control Report

Encoder

The encoder encodes the signals from the parallel port and passes it to RF transmitter. An encoder is a device, circuit, transducer, software program, algorithm that converts information from one format or code to another, for the purposes of standardization, speed, secrecy, security, or saving space by shrinking size.

Here in this project the encoder encodes the signals coming from the parallel port and forwards it for the further process and at last it is given to the RF transmitter.

RF Transmitter

Here we are using a pair of RF Transmitter-Receiver of Vegakit company.

The characteristics of transmitter module are as follows:

Model: FS 1000 A. Range LOS, Open Ground: 80m. Working Voltage: 3-12V. Dimension: 22 mm X 23 mm. Working Current:10-15 mA. Working Mode: AM. Transport Speed: 4KB/S. Transmit Power: 10mW. External Antenna: 315MHz.

There are four pin out in this transmitter module they are Data, VDD, VSS and Antenna.

Here in this circuit RF transmitter transmits the encoded signals towards the receiver where the receiver can get the signals and can be further processed.

RF Receiver

The characteristics of transmitter module are as follows:

Model: PCR 2A. Receive Sensitivity: 95dbm. Working Voltage: 5V. Dimension: 37 mm X 16 mm. Working Current: 0.5-0.8 mA. Working Mode: AM. Transport Speed: 4KB/S. Receive Frequency: 315/433 MHz. External Antenna: 18-25 cm.

7R.K.College of engineering and technology

Page 8: Pc Based Wireless Appliance Control Report

There are four pin out in this transmitter module they are Data, VDD, VSS and Antenna.

Here in this circuit the RF receiver gets the signals transmitted by the transmitter and forwards it for further process.

Decoder

The decoder decodes the signal received from the RF receiver and forwards it so that device can be switched on and off through the signal information

Appliance

The signal which was transmitted pass through the different processes as mentioned above in order to drive a simple circuit called relay driver circuit through which different appliances can be controlled.

8R.K.College of engineering and technology

Page 9: Pc Based Wireless Appliance Control Report

9R.K.College of engineering and technology

Page 10: Pc Based Wireless Appliance Control Report

This project is divided in to two parts

1. Software. 2. Hardware.

Software

In the software part we have made a project in visual basic language which will make a front panel which can be used to control the eight devices. Visual Basic is a language which can be used to control the interfaced devices and that is why we have selected it to control our appliances. By programming in the VB we can make a panel consisting of different switches which will be used in order to control the appliances. It will show with the help of a virtual led that the devices are ‘on’ or ‘off’ i.e. the signals from the parallel port are passed or not. If the LED of a particular device is glown then it means that the signal to on that device is transmitted and within seconds of the switch pressed the device will get on. The front panel is shown in figure below in which the first three devices are switched on by pressing switch and LED indicates that the switch is on i.e. that devices are on.

Figure 2 (Font Panel made in VB 6)

Hardware

In the hardware part the first thing we have done is designing the layout of circuit. Layout is the most important part in designing a circuit. Layout is generally made of copper clad. It can be of many types like single layer, double layer or multilayer.

In our project we have used single layer PCB. In PCB designing first step is cutting the PCB in given size. After that draw the PCB layout or circuit layout on PCB by permanent marker pen. After that wash the PCB in Mixture of FeCl3 for an hour or as

10R.K.College of engineering and technology

Page 11: Pc Based Wireless Appliance Control Report

require, this will dissolve the unmarked copper from the surface and we will get our layout.

We have made layouts of three circuits i.e. of transmitter, receiver and device driver circuit. All the three circuits layout is shown in the figure.

Figure 3 (Layout of Receiver Circuit)

Figure 4 (Layout of Transmitter Circuit)

Figure 5 (Layout of Relay driver circuit)

After completion of layout and itching we started mounting components and prepared the PCB of transmitter, receiver and relay driver circuits.

11R.K.College of engineering and technology

Page 12: Pc Based Wireless Appliance Control Report

12R.K.College of engineering and technology

Page 13: Pc Based Wireless Appliance Control Report

Figure 6 (Circuit Diagram of transmitter)

FIG 6 shows the transmitter circuit for PC-based wireless appliance control. The receiver address to be transmitted can be set with the help of an 8-way DIP switch. If any switch is open the pin connected to that switch is at logic 1, and if it is closed the respective pin is at logic 0.the data pins are pulled high via resistors R2 through R5.

When pin2 of the parallel port pin goes high, the internal LED of the optocoupler (MCT2E) glows to drive the internal phototransistor into saturation and its pin 5 goes low.

Pin 10 (AD8) of HT12E goes low through pin 5 of MCT2E and a ‘0’ is sent at that data position, while other data pins represent the logic-1 state. The logic circuitry at the receiver decoder end decodes the data appropriately for controlling the switch of an appliance.

Figure 7 (Circuit after mounting components)

Fig7 shows the circuit of the fig6 (Transmitter) after lay-outing, drilling and placing components.

13R.K.College of engineering and technology

Page 14: Pc Based Wireless Appliance Control Report

14R.K.College of engineering and technology

Page 15: Pc Based Wireless Appliance Control Report

Figure 8 (Circuit diagram of receiver)

FIG 4 shows the receive circuit for PC-based wireless appliance control. Assuming that an identical address is selected on the encoder and decoder, when any one of the data pins D0 through D3 of the PC’s parallel port on the transmitter is high, the corresponding data pin of the demodulator goes low at the decoder (HT12D). The data outputs (D8 through D11) of HT12D are connected to inverters N1 through N4. The output of inverters N1,N2 and N3 are connected to address inputs A,B and C of decoder 74LS138, respectively. The outputs of inverters N4 and N5 enable the decoder to drive the flip-flop(CD4013).

IC CD4013 is configured as a toggle flip-flop. The output of the flip-flop (IC9(A)) drives transistor T2 into saturation and relay RL1 energises.D7 through D14 are used as free-wheeling diodes. The relay contacts are used for appliances. When any data is received, the valid transmission pin (Vt) goes high to drive the transistor into saturation and LED1 lights up.

Figure 9 (Circuit after mounting components)

Fig 9 shows the circuit of the fig 8 (Receiver) after lay-outing, drilling and placing components.

For remote control, we have used the Holtek encoder-decoder pair of HT12E and HT12D.Both of these are 18-pin DIP ICs.

HT12E and HT12D are CMOS ICs with operating voltage range of 2.4V to 12v. Encoder HT12E has eight addresses and another four address/data lines. The data set on these twelve lines (address and address/data lines) is serially transmitted when the transmit-enable pin (TE) is taken low. The data output appears serially on Dout pin.

The data is transmitted four times in succession. It consists of different lengths of positive pulses for ‘1’ and ‘0’. The pulse-width for ‘0’being twice the pulse width of

15R.K.College of engineering and technology

Page 16: Pc Based Wireless Appliance Control Report

‘1’.The frequency of these pulses may lie between 1.5 to 7KHz depending on the resistor value between OSC1 and OSC2 pins.

The internal oscillator frequency of decoder HT12D is 50 times the oscillator frequency of encoder HT12E. The values of the timing resistors connected between OSC1 and OSC2 pins of HT12E and HT12D, for a given voltage supply, can be found out from the graphs given in the datasheets of the respective chips. Here we have chosen the resistor values for approximately 3KHz frequency of the encoder (HT12E) and 150 KHz of the decoder (HT12D) at Vdd of 5V.

The HT12D receives data from the HT12E on its Din pin, serially. If the address part of the received data matches the levels on A0 through A7 pins four times in succession, the valid transmission (Vt) pin goes high. The data on pins AD8 through AD11 of the HT12D. Thus the device acts as a receiver of the 4-bit data (16 possible codes) with 8-bit addressing (256 possible channels).

Once the frequency of the pair is aligned, then on ground of any data pin on the encoder, LED1 on the decoder should light up. We can also check the data transfer on pins AD8 through AD11, which is available on pins D8 through D11 of the decoder once TE pin is momentarily taken low by making it ground.

RF Transmitter and Receiver:

Figure 10 (RF transmitter and receiver module)

The RF transmitter TX-433 is AM/ASK type. It features:

1. 5V-12V single supply operation

2. On-off keying (OOK)/amplitude shift keying(ASK) data format.

3. UP to 9.6kbps data rate.

4. +9db output power (a range of about 200 meters)

5. SAW-based architecture

6. For the antenna, a 45cm wire is adequate.

16R.K.College of engineering and technology

Page 17: Pc Based Wireless Appliance Control Report

Software Description

In our project we will require a front panel which will control the appliances, for that we have used visual basic. We have made a program in visual basic which will help us in controlling the different appliances.

When we will run this program we will get below shown panel.

Figure 11 (Front panel)

It has eight switches and virtual LED’S which will glow when we press a particular switch.

When we will press exit switch it will close that panel. Here LED’S indicate whether the device is on or off.

Now let us see how we have created this front panel in brief.

Using the command button tool in the Visual Basic toolbox, add a new command button to the main form in our program. Next, in the properties window, change the name property of this button from command 1. Similarly using the command button add seven other command button and similarly change the name and keep it as Dev1, Dev2,….. up to Dev8. After that add another command button and name it as Exit. Now we have added eight different shapes and change that shape to round from the property of that shape. Also we have added a text with the help of text button given in the toolbox. That completes the preliminary design, After this our panel is ready after making required changes like color, font’s etc.

17R.K.College of engineering and technology

Page 18: Pc Based Wireless Appliance Control Report

Now we’re ready to write some code. Now we will write the code and after writing the code when we will run the program we will get the font panel, it will display the buttons and will display the screen which we have made. Now if we will press the Dev1 button then it will execute the program for it and it will pass the signal to the parallel port and that signal will pass to transmitter.

When we will press Dev1 then the LED above it will glow up as shown in the figure below.

Figure 12

The glowing of an LED will indicate that the program of that switch is executed and the signal to ‘on’ the device has been transmitted, now through parallel port the signal is passed to the transmitter circuit for further processing and at last to transmit it.

Similarly in the figure shown below the device 1 is turned off and another device 2, 5, and 7 are turned ‘on’. The process after pressing the switch will be same as described above, the only difference will be Dev1 is turned off and other devices are turned on.

Figure 13

18R.K.College of engineering and technology

Page 19: Pc Based Wireless Appliance Control Report

19R.K.College of engineering and technology

Page 20: Pc Based Wireless Appliance Control Report

We have successfully developed a front panel in visual basic in software part and had written a code in order to interface our transmitter circuit with PC.

Then we interfaced transmitter, receiver and relay driver circuit. Also we had connected the power supply and given required voltages and have arranged the things in a manner they should be and had run the project successfully.

Fig 14 shows the arrangements we have done in order to run the project and here we had only connected one device i.e. we have only controlled a single device LED. In the similar manner we can connect other devices so that it can be controlled with the help of PC.

Figure 14 (Project Setup)

20R.K.College of engineering and technology

Page 21: Pc Based Wireless Appliance Control Report

21R.K.College of engineering and technology

Page 22: Pc Based Wireless Appliance Control Report

Now in our day to day life the PC plays such a vital role that without which the life would have been difficult in every aspect. For example in banks, firms, industries, etc PC’s are needed to handle more than one operations. More and more PC based products are being made and used in our day to day life. One of the project which will control the appliances through PC is done here to make our life simpler and we can control the appliances sitting at single location through PC.

This project can be used where the control of different appliances is to be done with PC i.e. in some industries and firms in order to ‘on’ and ‘off’ the different mechanisms and machines.

This can also be used in some offices where different appliances like fan’s, tube light’s, etc are needed to switch ‘off’ and ‘on’ according to the need.

Also this can also be used at home as comfort of life are increasing day to day and every electronic appliances are being remote operated so this can be used so that different appliance can be controlled with the help of PC.

There is no need to go at different places to switch the appliances on and off, instead many of the appliances which are needed to on and off at regular interval can be interfaced with this circuit and we can control all the appliances from a single location.

22R.K.College of engineering and technology

Page 23: Pc Based Wireless Appliance Control Report

23R.K.College of engineering and technology

Page 24: Pc Based Wireless Appliance Control Report

To transmit and receive the signal we needed transmitter and receiver module. The module mentioned in the circuit diagram of transmitter was of four pin and of receiver was of eight pin, but the pair of transmitter and receiver available was of four pins each. If we want transmitter of four pin and receiver of eight pin then we have to buy it separately and it may be possible that the transmission and reception of the signals do not take place properly, so in order to overcome this problem we have bought a transmitter-receiver pair, each having four pin. We changed some connections in order to overcome this problem.

We were not getting signal from the parallel port which we were transmitting through our PC, so we checked the parallel port of that PC with the help of LED and we found that some of the pins were not working in that port. In order to overcome that problem we tried on another PC and in that we got the required results i.e. we were getting the signals from the parallel port which we wanted.

24R.K.College of engineering and technology

Page 25: Pc Based Wireless Appliance Control Report

In this project we have created software in Visual Basic 6 in that we have made a front panel having different switches in order to ‘on’ and ‘off’ the devices and virtual LED’s for indication which will indicate whether the device is ‘on’ or ‘off’. In hardware we have first of all made transmitter, receiver and relay driver circuit and then interfaced transmitter with the parallel port and also interfaced receiver with the relay driver circuit and appliances. Then we have coded in such a manner that the signal of switch pressed will pass to the transmitter via parallel port. The receiver receives the transmitted signal and it gives to the relay driver circuit through which the appliances are attached and thus, appliances are controlled in the sense of ‘on’ and ‘off’.

25R.K.College of engineering and technology

Page 26: Pc Based Wireless Appliance Control Report

Software

Visual basic 6 programming (black book), By “Steven Holzner”.

Hardware

http:// www.efy.com/mag2009/intro

http://www.datasheetcatalog.com/datasheets_pdf/H/T/1/2/HT12E.pdf

http://www.datasheetcatalog.com/datasheets_pdf/H/T/1/2/HT12d.shtml

http://www.datasheetcatalog.com/datasheets_pdf/M/C/T/2/MCT2E.shtml

http://www.efymagonline.com/data.asp?id=116

26R.K.College of engineering and technology

Page 27: Pc Based Wireless Appliance Control Report

27R.K.College of engineering and technology

Page 28: Pc Based Wireless Appliance Control Report

28R.K.College of engineering and technology

Page 29: Pc Based Wireless Appliance Control Report

29R.K.College of engineering and technology

Page 30: Pc Based Wireless Appliance Control Report

30R.K.College of engineering and technology

Page 31: Pc Based Wireless Appliance Control Report

31R.K.College of engineering and technology

Page 32: Pc Based Wireless Appliance Control Report

32R.K.College of engineering and technology

Page 33: Pc Based Wireless Appliance Control Report

33R.K.College of engineering and technology

Page 34: Pc Based Wireless Appliance Control Report

34R.K.College of engineering and technology

Page 35: Pc Based Wireless Appliance Control Report

35R.K.College of engineering and technology

Page 36: Pc Based Wireless Appliance Control Report

36R.K.College of engineering and technology

Page 37: Pc Based Wireless Appliance Control Report

37R.K.College of engineering and technology

Page 38: Pc Based Wireless Appliance Control Report

38R.K.College of engineering and technology

Page 39: Pc Based Wireless Appliance Control Report

39R.K.College of engineering and technology

Page 40: Pc Based Wireless Appliance Control Report

40R.K.College of engineering and technology

Page 41: Pc Based Wireless Appliance Control Report

41R.K.College of engineering and technology

Page 42: Pc Based Wireless Appliance Control Report

42R.K.College of engineering and technology

Page 43: Pc Based Wireless Appliance Control Report

43R.K.College of engineering and technology

Page 44: Pc Based Wireless Appliance Control Report

44R.K.College of engineering and technology

Page 45: Pc Based Wireless Appliance Control Report

45R.K.College of engineering and technology

Page 46: Pc Based Wireless Appliance Control Report

46R.K.College of engineering and technology

Page 47: Pc Based Wireless Appliance Control Report

47R.K.College of engineering and technology

Page 48: Pc Based Wireless Appliance Control Report

48R.K.College of engineering and technology

Page 49: Pc Based Wireless Appliance Control Report

49R.K.College of engineering and technology