Professional Documents
Culture Documents
P08 IRDataXR G1 - ReportFinal
P08 IRDataXR G1 - ReportFinal
Project: P08
IR Data Transceiver
Objective
IR data transmission and data receiver systems are very popular in recent
decade. In our project, we will combine two computers. One of the computers will
transmit data and the other computer will receive that data. The important issue is
the amplifying and modulating data. On the other hand transmission range is critical
parameter.
Group Members
Semih Yağbasan: RS 232 connection, Hyper Terminal, Amplifiers.
Umut Demir: Receiver circuit
Ozan Tuğcu: Transmitter circuit
1
İYTE - Department of Electrical and Electronics Engineering
Revision History
Week-5: We decided to amplify the current on the photodiode in order to get more
range at transmitter circuit up to 120mA of RMS value.
Week-6: We observed that 120 mA is too high for sending carrier and also it
generates more heat on photodiode. Then we reduce the current of photodiode to 35
mA.
Week-7: 55 kHz carrier frequency reduced to 37 kHz and baud rate is reduced from
9600 to 1200 baud rate.
Week-9: We replace the BJT with LM324 operational amplifier after envelope
dedector.
2
İYTE - Department of Electrical and Electronics Engineering
1. Introduction
In our project, we must overcome four major problems to transmit the data truly
1. Determining the oscillation frequency of transmitter circuit: There are several
baud rates when sending data from computer. Depending on these baud rates,
oscillation frequency must be changed in order to observe the signal well. For 1200
baud rate, 37 kHz oscillation frequency is good enough.
2. Driving IR LED: For achieving maximum 1 meter distance between LED and
phototransistor, there should be enough current through LED. We drove the LED by
using a BJT configuration. Current on LED become 35 mA.
3. Amplifying received signal in receiver circuit: Amplification without a noise is a
big problem in receiver circuit. Operational amplifiers amplify with some noise. We
used BJT configuration after photo transistor. We obtained up to 5V p-p voltage level.
This voltage level pretty enough for us. But after filtering, voltage again drops down to
0.5V-1Vp-p. So we used LM324 operation amplifier to amplify the voltage. We
obtained again 4V voltage level.
4. Filtering signal: Filtering the carrier from message signal is one of major issue in
receiver circuit. After some research, we thought that envelope detectors could be
enough for our circuit. We tried it but at first the results weren`t very convincing. So
we modified the capacitor and resistor values and we obtained the signal very well.
1.1. LED’s
Light emitter diode (LED), converts a current into an optical signal.In other
words,it transforms an electrical current to light. The wavelength of light emitted by
LEDs in the visible light region. However, there are some kinds of light emitted by
leds.These are infrared radiation and ultraviole radiation. LEDs can be different
colour to adjust proper wawelength of light which is needed.Thus, each different
colour, consist of different compound semiconductor material such as galium
arsenide,galium arsenide phoshide.These material’s kind is more important than their
colour. Because, if two leds have same colour but they are made different material,
they can have different wavelength.Thus, they are sold with its colour and their chip
materials in electronic markets [1] .When we look the IR’s wavelength spectrum, we
must chose LED which made from GaAs or GaAlAs in our project.
1.2. Photodiode and Phototransistor
Photodiode is the reverse of a LEDs.They tranforms light to an electrical
current.In our project LED emittes light and photodiode transforms this light to
current or voltage.Thus, we must use a photodiode in receiver circuit. In the curcuit,
photodiode must be reverse biased with other circuit. We can make photodiode’s
current change or adjust current’s magnitude ,if we conduct parallel a resistor with
photodiode.
3
İYTE - Department of Electrical and Electronics Engineering
1.4.Tuned amplifiers
Tuned amplifier is a necessary component for IR transmission. The principle
of a tuned amplifier is such a filter. It amplifies a narrow band of frequency with a
minor error such as 30kHz 0.01 kHz. There are several application areas for tuned
amplifiers. Spectrum analyser, satellite transponder, video amplification.[4] In
addition, tuned amplifiers can be used in filter design. Filters such as band-pass,
band-reject, high-pass, low-pass, Butterworth filters.[5]
Tuned circuits should be used in order to work the tuned amplifiers. Tuned
circuits has two different types, series and parallel. In addition, there is Q factor
affects the selectivity of tuned circuit. Q of a tuned circuit is the ratio of energy stored
in circuit to energy lost by the circuit. Another important specification is gain and
bandwidth of circuit. Bandwidth of the tuned circuit can be found by:
4
İYTE - Department of Electrical and Electronics Engineering
5
İYTE - Department of Electrical and Electronics Engineering
2. Technical Description
Binary information sent by PC via hyper terminal has maximum 9600 baud
rate but we used 1200 baud rate. In order to modulate and transmit this signal we
convert it to logic level using Rs232 converter. Transmitter circuit will multiply this
signal by carrier signal, thus it will be modulated. Carrier signal is a high frequency
signal compared to message signal. Major reason for modulating is extending the
range of broadcasting. After modulation we need to amplify the current of the signal
not voltage accros the infrared led because we need only the voltage of forward bias
voltage to drive the led. If this is the case, we use operational amplifier before
infrared led.
HYPER
TERMINAL SERIAL RS 232
CONVERTER MODULATOR
PORT
PC
SQUARE
WAVE
GENERATOR
AMPLIFYING OPERATIONAL
SIGNAL DEMODULATOR
AMPLIFIER
HYPER
TERMINAL SERIAL RS 232
PORT CONVERTER
PC
Figure 3. Block diagram of the infrared transmitter and receiver.
6
İYTE - Department of Electrical and Electronics Engineering
U1:A
message signal1
3 modulated signal
2
7408
carrier signal
Amplifying
By using an BJT, we amplified the current to 35 mA level. As I mentioned
before, current is important for us because of driving IRLED.
R1(1)
VALUE=6
R1
50
D1
DIODE-LED
R2 Q1
modulated signal
BC238BP
1k
7
İYTE - Department of Electrical and Electronics Engineering
8
İYTE - Department of Electrical and Electronics Engineering
0 MAX232E
9
İYTE - Department of Electrical and Electronics Engineering
------------Vout
2.6. Demodulation:
Envelope Dedector (Low pass filter)
We used envelope dedecor for demodulation. The most important thing is chosing
the capacitor and resistor. We chose them with this criteria. 1/fc<<R.C<<1/W, fc is
carrier frequency and w is bandwith of input signal. fc is 55 khz and bandwith is 2khz
in our circuit. Thus R.C must be bigger than 1.81*10 -5 and smaller than 50*10-5.We
chose C=30nF and R=1k ohm. However , we used 500 ohm instead of 1k ohm.
Because, when we increase the resistance , Vout duty ciycle increase. Thus,
according to our test result in laboratory, the ideal resistance is 500 ohm.
10
İYTE - Department of Electrical and Electronics Engineering
After demodulation, we get some ripple but this ripple does not effect to read
computer so it is neglectiable. Vin is nearly 3 volt and after demodulation we get 2,3
volt. Thus, we amplify again the signal with opamp.
U2:A
4
Filtered Signal 3
R 1 output
2
500
1
1
LM324 R
C 100k
10uF
11
İYTE - Department of Electrical and Electronics Engineering
3.Test Results
3.1 Generating Square Wave
First important step of transmitter circuit is generating square wave. 555 timer.
We changed the frequency of oscillation from 55kHz to 37kHz. Because the baud
rate seemed to give us some problems at receiver part. So the baud rate was also
changed from 9600 to 1200. In our oscillator, the duty cycle was about 48% which
was enough for us. As can be seen from the graph clearly, 0-6Vp-p 37kHz signal is
obtained.
12
İYTE - Department of Electrical and Electronics Engineering
13
İYTE - Department of Electrical and Electronics Engineering
14
İYTE - Department of Electrical and Electronics Engineering
4.Conclusion
When we first tested the generation of square wave signal, we couldn`t
obviously obtained the signal. After modifications on resistors and capacitor which
goes from threshold to ground. We solve the problem by only changing the capacitor,
we changed the frequency of oscillation. Modulation is made by AND gate 7408. The
results were very convincing. When we used LM741 op-amp, we failed to transmit
the original signal. There were a lot of noise on the signal. We changed it to BJT and
we successfully transmitted the signal. The current on the LED is up to 35mA now.
We didn`t have much trouble on the transmitter part. On the receiver part, first we
couldn`t obtain what we were looking for. After the right photo transistor configuration
, we obtained 50-100mVp-p voltage on photo transistor. As we read from datasheet of
photo transistor, we understood that resistor value should change according to
distance. First we tried to amplify the signal with LM741 which resulted fail. So we
change it to BJT again and we successfully amplified the signal. But there was some
noise on the signal again and we needed to filter it. The easiest way to demodulate
AM signal is using envelope detector. So we used an envelope detector such a filter.
So we expected to see demodulated signal. But in our tests, the voltage level
significantly decreases on filter part. So first we amplified the signal twice then filtered
but it was not conclusive. We changed our perspective then we amplified the signal
once then filtered. After that we amplified the signal again with LM741 again. The
signal was very corrupted. So we changed the LM741 to LM324. Using LM741 was a
very bad idea because it contributes noise on the original signal. So we changed
LM741 to LM324 which results so much better compared to LM741. After this
modification, we obtained the signal at the voltage level of 5V p-p. Receiver part was
the hardest part of this project. We had some troubles about impedance matching.
We changed the resistors to match input and output impedances. In addition, when
we first tried to use 9600 baud rate, we couldn`t get the signal very well. So we
changed it to 1200 baud rate which resulted so much better compared to 9600. After
changing the baud rate we needed to change the carrier signal as well. We put
820pF instead of 500pF in timer circuit to change the oscillation frequency. The
frequency was down to 37kHz. After we were sure about both transmitter and
receiever circuits were operating truly, we used MAX232 IC to connect computers to
circuits. We configured the IC as it was said on the data sheet. So we connected the
whole circuit. We set the baud rate to 1200 and parity bit to Mark. We used stop bits
to 1 and flow control to Xon/Xoff. The expected signal at the output of receiver circuit
should be carrier signal. To obtain the carrier signal, we changed the trimpot values.
We observed that it is very sensitive. When you change it a little bit, the signal
vanishes. So, after setting right resistor value, we send the signal. At our last test, we
received the transmitted words partly true. For example: when we send “semih”, we
receieved “remih”. We send “123”, we receive “$23”. There is a problem at the
moment. If we don`t adjust the trimpot value true, the receiver gets random
characters such as #$% etc. We observed that if the voltage level of MAX232 output
is higher than 3.5Vp-p we can partly transmit the data very well.
15
İYTE - Department of Electrical and Electronics Engineering
5.Component List
Component description Part Number Manufacturer Supplier
NE555 timer NE555 Philips www.datasheetcat
Semiconductors alog.com
Operational amplifier LM324 National Semicon. www.national.com
Rs 232 converter Max232CPE Maxim www.maxim-ic.com
And Gate 7408 - -
NPN BJT BC238 Fairchildsemicond. www.fairchildsemi.
com
16