Laser Based Voice and Data Communication
Laser Based Voice and Data Communication
CHAPTER 1
INTRODUCTION
1.1 Introduction to Project
Our final year project is based on the concept of laser (Light Amplification by Stimulated Emission of Radiation) for transmitting analog as well as digital signals. We have used phototransistor to receive the signal at receiver.
For voice transmission amplitude modulation of laser pulse was used to transmit the voice signal. Condenser microphone converts the voice into electric pulse which was then amplified and transmitted through laser. Photo detector at receiver detects the laser light and voice was output through loud speaker.
Data transmission is based on pulse width modulation by the use of microcontroller. Different width of laser pulse was used for different number and character. The second microcontroller was used to decode the different characters and the received data was displayed in LCD.
CHAPTER 2
LITERATURE REVIEW
2.1 Literature Review
Laser based project has been attempted before but data were inputted through computer. We have tried to simplify it by using 4x3 keypad which provides the complete set of alphabetical letters. We have also tried to enhance it by implementing voice communication as well. Laser communication is a modern technology in the world of communication where bandwidth allocation, power requirement, and dispersion parameter are becoming major hurdle due to rapid increase in number of user. So considering these facts we put our interest in this project.
There were various methods for implementing this project but due to scarcity of resources, components, we decided to use simple modulation and demodulation techniques.
Hence we have designed communication system based on LASER that could be implemented commercially facilitating the general people in terms of convenient friendly system. Also it reduces the complexity for communication in some cases where optical fiber or any wired communication is very difficult and expensive.
CHAPTER 3
BACKGROUND THEORY
3.1 The general principle of laser
Every atom has a certain energy levels, which may be high or low. Once excited by heating, it goes to high energy level. After certain time in high energy level, it return back to original energy level, consequently emitting energy in the form of light having energy E=hf.
Incident photon with energy to E2-E1 interacts with an atom in conduction band, causing it to return to low energy level with the emission of second photon. This photon has same phase, frequency and polarization as first. This whole phenomenon is known as stimulated emission, which gives the laser its spectral properties such as narrow spectral width, highly directed beam and intense light.
Einstein demonstrated that for stimulated emission to dominate it was necessary that the photon radiation density and population density (N2) of the upper energy level must be increased relative to lower energy lever (N1). Thus when density of atom in higher energy level is greater than lower energy level (i.e. N2>N1), this phenomenon
is known as population inversion and is fundamental condition for stimulated emission. To achieve population inversion it is necessary to excite atoms in upper energy level E2.This process is called pumping.[1] Pumping energy
Active medium
A photon incident in or near the depletion region of this device which has an energy greater than or the equal to the band gap energy Eg (i.e. hf Eg) will excite an electron from the valence band to the conduction band. This process leaves an empty hole in the valence band and is known as the photo generation of an electron-hole (carrier) pair. Carrier pairs so generated near the junction are separated and swept under the influence of electric field to produce displacement by current in the external circuit in excess of any reverse leakage current.
The depletion layer must be sufficiently thick to allow a large fraction of the incident light to be absorbed in order to achieve maximum carrier-pair generation. [2]
electronic communication, most commonly for transmitting information via a radio carrier wave.
The envelope of the amplitude modulated signal embeds the information bearing signal. The total power of the transmitted signal varies with the modulating signal whereas the carrier power remains constant.
The main defect of this modulation is that in an AM wave the signal is in the amplitude variations of the carrier, practically all the natural and man noises consists of electrical amplitude disturbances. As a receiver cannot distinguish between amplitude that represents noise and that contain the desired signal so reception is generally noisy.
There are special IC chips for serial data communication, which are commonly known as the UART (universal asynchronous receiver-transmitter) and USART (universal synchronous-asynchronous receiver-transmitter). UART is basically the chips, a piece of hardware that translates data between parallel and serial forms. UART is the
communication protocol to define the data formats need to be maintained to transmit the data.
The UART usually does not directly generate or receive the external signals of various connected equipment. Separate interface devices are used to convert the logic level signals, such as RS-232 and RS-485. Some signaling schemes use modulation of carrier signal (with or without wires like Bluetooth, Infra-red, optical fiber etc.) communication may be full duplex or half duplex [4].
Transmitter
Receiver
D0
D1
D2
D3
D4
D5
D6
D7
Stop
TH1 (Hex) FD FA F4 E8
3.8.3 Transistor
A transistor is a semiconductor device used to amplify and switch electronic signals and electrical power .It is composed of semiconductor material what at least three
terminals for connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals changes the current flowing through another pair of terminals.[5] Because the controlled (output) power can be higher than the controlling (input) power, a transistor can amplify a signal. Today, some transistors are packaged individually, but many more are found embedded in integrated circuits. The transistor used is BC 548, BC547 and BD139.
The circuit symbol for an op-amp is shown to the right, where: V+: non-inverting input
V: inverting input Vout: output VS+: positive power supply VS: negative power supply
The amplifier's differential inputs consist of a V+ input and a V input, and ideally the op-amp amplifies only the difference in voltage between the two, which is called the differential input voltage. The output voltage of the op-amp is given by the equation:
When the circuit is operated as a non-inverting linear amplifier, Vin will appear at the (+) and () pins and create a current i through Rg equal to Vin/Rg. Since Kirchhoffs
current law states that the same current must leave a node as enter it, and since the impedance into the () pin is near infinity, we can assume the overwhelming majority of the same current i travels through Rf, creating an output voltage equal to Vin + i Rf. By combining terms, we can easily determine the gain of this particular type of circuit.
I=Vin/Rg Vout = Vin +i*RF=Vin+ (Vin/Rg*RF) =Vin +Vin*RF/Rg = Vin (1+RF/Rg) G=Vout/Vin G=1+RF/Rg
3.8.6 LM 386 IC
General Description: The LM 386 is a power amplifier designed for use in low voltage consumer applications. The gain is internally set to 20 to keep external part count low, but the addition of an external resistor and capacitor between pins 1 and 8 will increase the gain to any value from 20 to 200. The inputs are ground referenced while the output automatically biases to one-half the supply voltage. The quiescent power drain is only 24 mill watts when operating from a 6 volt supply, making LM 386 ideal for battery operation.
Features:
1. 2. 3. 4. 5. 6. 7. 8. Battery operation Minimum external parts Wide supply voltage range: 4V-12V or 5V-18V Low quiescent current drain: 4mA Voltage gains from 20 to 200 Ground referenced input Self-centering output quiescent voltage Low distortion: 0.2% (Av =20, Vs = 6V, R = 8ohm, Po = 125mW, f = 1kHz)
3.8.8 AT89C51
AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has 4KB of Flash programmable and erasable read only memory (PEROM) and 128 bytes of RAM. It can be erased and program to a maximum of 1000 times.
In 40 pin AT89C51, there are four ports designated as P1, P2, P3 and P0. All these ports are 8-bit bi-directional ports, i.e., they can be used as both input and output ports. Except P0 which needs external pull-ups, rest of the ports have internal pull-ups. When 1s are written to these port pins, they are pulled high by the internal pull-ups and can be used as inputs. These ports are also bit addressable and so their bits can also be accessed individually.
Port P0 and P2 are also used to provide low byte and high byte addresses, respectively, when connected to an external memory. Port 3 has multiplexed pins for special functions like serial communication, hardware interrupts, timer inputs and read/write operation from external memory. AT89C51 has an inbuilt UART for serial communication. It can be programmed to operate at different baud rates. Including two timers & hardware interrupts, it has a total of six interrupts.
Pin Diagram:
Pin Description of Microcontroller AT89C51: Pin No 1 2 3 4 5 6 7 8 9 10 Reset pin; Active high Input (receiver) for serial communication RxD 8 bit input/output port (P3) pins 8 bit input/output port (P1) pins P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 Reset P3.0 Function Name
11 12 13 14 15 16
Output (transmitter) for serial communication External interrupt 1 External interrupt 2 Timer1 external input Timer2 external input Write to external data memory Read from external data memory
17 18 19 20 21 22 23 24 25 26 27 28 29 30
Read
P3.7 Crystal 2
8 bit input/output port (P2) pins / High-order address bits when interfacing with external memory
P2.2/ A10 P2.3/ A11 P2.4/ A12 P2.5/ A13 P2.6/ A14 P2.7/ A15
Program store enable; Read from external program memory Address Latch Enable Program pulse input during Flash programming External Access Enable; Vcc for internal program executions
31
Programming programming)
enable
voltage;
12V
(during
Flash
32 33 34 35 36
8 bit input/output port (P0) pins Low-order address bits when interfacing with external memory
37 38 39 40 Supply voltage; 5V (up to 6.6V) Table 3.2: Pin Description of Microcontroller AT89C51
Features:
1. Sixteen bits program counter and data pointer. 2. Eight bits CPU with resistors A and B. 3. Eight bits programs status word. 4. Eight bits stack program. 5. Internal ROM and EEPORM. 6. Internal RAM of 128 bytes. 7. Four resistors banks each contain eight registers. 8. Sixteen bytes, which may be addressed. 9. Eight bytes of general-purpose data memory. 10. Thirty-two input/output pins are arranged as four 8 bit ports. 11. Two 16-bit timers/counters T0 and T1. 12. Full duplex serial data receiver/transmitter. 13. Two external and three internal interrupt sources. 14. Oscillator and clock circuits.
3.8.9 Keypad A 4x4 keypad has 3 columns and 4 rows. The rows and columns are connected with micro-controller port. There are 12 buttons in a 4x3 matrix keypad. The clear advantage of using matrix keypad is that only 8 micro controller pins are connected for 12 buttons. Circuit layout for 4x3 matrix keypad is shown in figure below.
Rows are used as input and columns are used as output. All eight pins are set high at first. Row 1 is the set low. All four columns are checked if anyone is low. A low would appear if first column were pressed. If no column was low, row 1 is set high and row 2 is set low. Again the columns are checked for low. If no key was pressed row 2 was set high and row 3 is set low and process continued. To get the value of the key pressed, as soon as a column is low for a low row is obtained, 8-bit binary value of the key was returned. For example if first column key were pressed the binary value would be 11101110.
3.8.10 LCD LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments and other multi segment LED. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.
The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD.[6]
Pin Description:
Pin No 1 2 3 Function Ground (0V) Supply voltage; 5V (4.7V 5.3V) Contrast adjustment; through a variable resistor Name Ground Vcc VEE
Selects command register when low; and data Register Select register when high
Low to write to the register; High to read from Read/write the register
Sends data to data pins when a high to low pulse Enable is given
7 8 9 10 11 12 13 14 15 16 Backlight VCC (5V) Backlight Ground (0V) Table 3.3: Pin Description of LCD 8-bit data pins
DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 Led+ Led-
CHAPTER 4
METHODOLOGY
4.1 Algorithm
Algorithm for Voice Communication:
1. First the input voice is taken through condenser microphone. 2. The voice signal is amplified through preamplifier phase. 3. Then, the signal is transmitted through laser light. 4. The phototransistor at receiving side converts the signal into electrical signal. 5. The electrical signal is passed through two transistor amplifier phases. 6. Then LM386 audio amplifier amplifies the signal and drive speaker to generate voice output.
Condenser Microphone
Laser Torch
Loudspeaker
Audio Amplifier
Phototransistor
LCD
Laser Source
Phototransistor
Micro Controller
Micro Controller
Keypad
LCD
Modulate voice signal using laser light And transmit the voice
Receiver
Stop
Transmitter Start
Display on LCD
4.3.1 Data Communication In our project, the information is carried in the pulse duration of the laser beam. The information is quantized, i.e. the pulse duration within a certain period denotes one character, whereas the pulse duration within another period denotes other character. This is achieved by associating delays along with the output of the port to which the laser is connected (P3.1).
The program basically takes the input from the keypad, and compares it with each of 26 alphabets and the other three symbols. After identifying the character, the output port was set high (SETB P3.1), and the associated delay was run before setting it low (CLR P3.1). In this way, the particular information was transmitted.
The laser beam would strike the photo detector and the signal would be sufficiently amplified and fed to one of the ports of the microcontroller at the receiving side (P3.0). The port is set as an input port.
The microcontroller checks the status of this port continuously to check for any transmitted data. When the port is high, it initiates a counter which is incremented on each 1s delay. When the port goes low, the counter is stopped. The microcontroller then read the character serially from SBUF register and displays it in the LCD.
The LCD used was a 16 pin 16*2 LCD. The pin configuration and other information are described in hardware aspect. The software aspect of LCD is described below. RS, Register select:
There are two register inside the LCD. The RS pin allows for the selection of the registers. If the RS pin is low, it selects the instruction command code register, allowing us to send control command such as clear screen, cursor position setting etc. When RS pin is high, it selects data register, allowing us to send data to the LCD for display.
R/W, Read/Write: It allows for the user to read information from LCD or write information to it. If R/W =1 it allows for reading of data from LCD whereas if R/W=0, it allows writing data into LCD.
E, Enable: This is used to latch information presented to its data pins. When data is sent to the data pins, high to low pulse of at minimum 450ns width needs to be applied to this pin to latch the data.
Data Pins, D0-D7: The data are from the microcontroller are sent in parallel format to the LCD to display through these pins. These pins are also used to send control or command codes to LCD for various functions. The command codes are briefly listed below:
1H: Clear Display Screen 2H: Return home 4H: Shift cursor to left 6H: Shift cursor to right 5H: Shift display right 7H: Shift display left 8H: Display off, cursor off AH: Display off, cursor on CH: Display on, cursor off EH: Display on, cursor blinking FH: Display off, cursor blinking 10 H: Shift cursor position to left
14H: Shift cursor position to right 18H: Shift the entire display to the left 1CH: Shift the entire display to the right 80H: Force cursor to beginning of the first line C0H: Force cursor to beginning of the second line
In our configuration, the data pins were connected to port 0. Similarly the RS, R/W and E pins were connected to P2.0, P2.1 and P2.2 respectively. Upon initialization, the LCD would call command subroutine, which would be enable RS= 0 for command and R/W=0 for write. Then the commands for cursor on, and cursor position would be transmitted to LCD. After that, the data would be moved on to P0 and latched with a high to a low pulse on E. further, the data write subroutine would be called, which would move data onto P0 and then put RS=1 denoting data to be displayed on the LCD. The LCD was used in byte mode. Therefore, the Enable pin E was strobe only once.
Photo transistor at receiving side detects the incidence laser light which causes it to switch from low current condition to the high current condition. The output voltage of photo transistor is then amplified and fed to the receiving port of second microcontroller. When micro-controller detects the logic 1, data are serially read from the SBUF register. The received data are then displayed on LCD.
Resistors R5 and R6 of its value acts as a voltage-divider network, thus it gives a fixed voltage at the non-inverting pin. Input inverted audio signal is applied to the inverting pin. Op-amp works on the differences into the applied two input voltage and provide an output at pin no. 6. Since, input is applied to the inverting pin the output is also an inverting one. Thus, again we get in phase high power and high amplitude level audio signal. Capacitors C3, C4 and resistor R7 are acting as diffusion capacitors and feedback resistor respectively. These diffusion capacitors stored the carriers like holes and electron sin the base and thus provide self-biasing of the transistor. Power dissipation rate of UA741 is very high, which is not practical for driving other electronics devices, so heat sink power transistor BD139 is used. Power transistor BD139 absorbs most of the power and supplies the suitable power to drive the laser torch. This in turns modulates the laser beam, since laser torch acts like a balanced modulator, where two signals one is message signal (audio signal) and carrier laser signal, superimposed. So, laser beam modulates and transmits the signals to large distances.
RECEIVER:
The receiver circuit uses an NPN phototransistor (L14F1) as the light sensor. the phototransistor receives the audio signal of low power and low amplitude that is followed by a two-stage transistor pre-amplifier. In the pre-amplifier stage R8 is a source resistor, which is directly connected to the power supply. The pre amplifier stage is RC coupled amplifier in CE configuration.C5, C6 are the junction capacitances, which are taken in to the account when we consider high frequency response, which is limited by their presence. Resistors R9 and R12 are used to establish the biasing of the transistor BC548. R11 is self-bias resistor, which is used to avoid degeneration.C7 is a bypass capacitor, which acts as to prevent loss of amplification due to negative feedback arrangement. Transistors BC548 are the amplifier transistors, which amplifies the signal because the signal obtained by the phototransistor is of few mV. C8 is the blocking capacitor, which is connected to the variable resistor VR2, which in turn followed by audio power amplifier IC LM386. Here,
Pin no. 1 and 10 is followed by C10, which is an external capacitor, used to compensate internal error amplifier and thus avoid instability. Volume control can be adjusted from variable resistor VR2 of 10 kilo- ohms.LM386 provides suitable power output useful for drive the loudspeaker of 0.5W. From the pin no. 5, the high power as well as suitable amplitude received audio signal is taken as output.R14 and C13 are bypass arrangement used to prevent loss of amplification. C12 capacitor is used for preventing the noise as well as the hum produced. From the loudspeaker, the audio output is heard.
4.5 Laser Interfacing In our circuit, we have salvaged a laser diode off a laser pen torch. The batteries were discarded and the electrodes were connected to corresponding power source. Although any color of laser could be chosen, the red laser diode was chosen because of its ease of availability and due to higher wavelength of red light, relatively longer distances could be covered.
For data communication laser is interfaced with a microcontroller at port 3.1. The program present in the micro controller drives the laser. For voice communication laser is driven by the output of the Op amp.
CHAPTER 5
Conclusion
The final year project Laser based Voice and Data Communication was completed successfully. The project completely based on wireless communication system. Although, wireless communication predominantly means the use of radio frequency for communication, we explored the use of light based carriers for transfer of information.
The emphasis of the project was to study various wireless technologies that are used for data communication between two microcontroller controlled devices. Besides this we have gained practical knowledge of microcontroller interfacing and the project software development.
Although the optical data communication technology is prevailing from last decade as optical fiber communication devices available in the market, the project was carried out to get all ideas that are behind such wireless system. And by now, we think we are successful in the respect. Also we hope our effort will be worthwhile if the project work will be hopeful for those who seek to carry out any project related to optical data communication using laser technology.
Limitation
1. The factors such as beam dispersion, background light, shadowing, rain, fog, snow, pollution, smog causes an attenuated received signal and lead to higher bit error rates. 2. Limited up to the range of 500m. 3. For longer distance communication high power laser is required which is costly.
Future Enhancement
1. Multiple voice, data, picture, video can be multiplied simultaneously to perform communication using Multiplexer. 2. Half duplex or even full duplex communication can be achieved by software implementation 3. 4. A more power laser can be used to increase the range of communication. Laser can be replaced by IR laser that cant be visible by bare eye.
REFERENCES
Books 1. Gerd Keiser, Optical Fiber Communication, Second Edition. 2. John M. Senior, Optical Fiber Communications, Second Edition, 2004. 3. Sharma D.K., (1999), Communication System-I; Course Manual, Institute of Engineering, Tribhuvan University, Kathmandu. 4. Douglas V. Hall, Microprocessor and Interfacing, Tata McGraw-Hill.1999 5. Sedra, Adel.S and Smith, Kenneth C, Microelectronic Circuits, Oxford University Press, 1998. 6. Mazidi Muhammad Ali, Mazzidi Janice Gillispie, The 8051 Microntroller and Embedded Systems, Pearson Prentice Hall. 7. Krishna Kandel, Learning by C, First edition, 2007.
BIBLIOGRAPHY
i. Excerpt from Mazidi Muhammad Ali, Mazzidi Janice Gillispie, The 8051 Microntroller and Embedded Systems, Pearson Prentice Hall ii. Excerpt from Datasheets of LM741 published by National Semiconductor
APPENDECES
COST ESTIMATION
S.N.
Components
Quantity
Cost
piece (Rs) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 AT89C51 LCD Laser Touch Resistor and Capacitor Transistor(BC548,BC549,BD139) LM386 741 IC Op-Amp Photo Transistor(LI4F1) Condenser Micro-Phone Speaker Keypad Matrix Board Crystal Oscillator Potentiometer Wires Total Cost 2 2 2 Few Few 1 1 2 1 1 1 4 2 2 Few 300 100 50 400 30 30 200 100 50 10 50 200 400 500 400 800 1000 200 300 100 50 800 30 30 200 400 100 20 50 Rs.4500
CIRCUIT DIAGRAM
Data transmitter
Data Receiver