You are on page 1of 17

InfraredTransmitterandReceiver

RoseHulmanInstituteofTechnology

ErinDixonGonzalezandKyleGiesen

ECE310:CommunicationsSystems
October16th,2015

TableofContents
Summary..2
Introduction..3
CircuitDocumentation....4
MeasurementsandDiscussion..12
Conclusion...22
Appendix.23

Summary
Thisprojectwasassembledandtestedoverthecourseof5laboratorysections,with
deliverableresultsatthecompletionofeachsection.Thelabdatesandttitlesareaslisted
below:

Lab1(Sept.4th)InterfacingtoInfraredTransducers
Lab2(Sept.11th)DigitalIn,DigitalOut
Lab3(Sept.18th)ModulationandReceiverFrontEnd
Lab4(Sept.25th)EnvelopeDetectorandSystemIntegration
Lab5(Oct.2nd)TimingRecovery

Thesystemiscomprisedof2maincomponentsatransmitterandareceiver.The
purposeofthissystemistotransmitapseudorandomsequenceofbits,intheformofaUnipolar
NRZbitstream,overashortdistanceviainfraredlight.TheIRradiationdrivesaphotoLEDon
thereceiverfromthisIRsignal,theoriginalbitstreamisrecovered.
Wewereabletosuccessfullytransmitthissignalatadistanceofover69inches,withno
discerniblebiterror.Thisseriesoflaboratorysessionsservedasagoodintroductiontoand
practicewithIRcommunications,circuitdebugging,andsignalprocessing.

Introduction
Communicationssystemsareahugepartofcontemporaryelectricalengineering,andin
theselabswewereabletogainhandsonexperiencewithsomeofthetheoriesandtechniques
usedinthesefields.Thegoalofthisprojectwasthesuccessfultransmissionofa
pseudorandombitsequenceoveratleast40inchesviaIRlight.
CircuitDocumentationdetailstheschematicsanddesignchoicesmadetoconstructthe
devices.TheMeasurementssectionincludeslaboratoryresultstakenduringeachsession.In
theDiscussionsection,wewillpresentconclusionsdrawnfrommeasurements,aswellasmore
indepthdiscussionoftechniquesandprocedureswewillalsoaddresstheimportanceofthese
experimentsandtheoverallsuccessofthelaboratoryproject.

CircuitDocumentation

Transmitter

PowerInandVoltageregulation

Powerissuppliedtothesystemviaa120/9Vedisonplugwalltransformer.This9volt
inputisregulateddownto5voltsbytheLM7805voltageregulator(Fig.1).C1andC2are
includedtoreducenoise.Thissectionprovidesaconstant5VDCrailtopowerseveralofthe
ICsonboththetransmitterandreceiver.
Figure1LM7805Regulator

PseudorandomSignalGenerator
APIC6F690microcontroller(Fig.2)isusedtoproducethepseudorandombit
stream.Thecodeusedwasprovidedbyinstructorbeforethesecondlabsession,andthechip
itselfwasprogrammedusingPICkit2connection.


Figure2PIC16F690

CarrierSignal
AnLM555(Fig.3)isusedtogeneratea40kHzcarriersignal.Thissignalwasusedto
carrythepseudorandomsignalatafrequencythatavoidedcommonnoiseranges,suchas60
Hzpowerlines.Thisisafundamentaltechniqueusedincommunicationsystems.Inthiscase,
weusedAmplitudeModulationtocarrythesignal.
Figure3LM555


ModulationandIRLED
A74LS08gateisusedtomodulatethepseudorandomsignalwiththe40kHzcarrier
signalfromtheLM555.TheoutputofthegatedrivesD1,aninfraredLED.
Figure474LS08andIRLED


Receiver

IRReceiverandTransimpedanceAmplifier
TheMJE3055(Fig.5(saturatesinthepresenceofIRradiation.Thiscurrentdrivesthe
transimpedanceamplifierusingtheTL072.

Figure5TL072andMJE3055


DualAmplifierBandpassFilter
ThisfilterisimplementedusingtwoTL072s,andremoveshighfrequencynoisefromthe
signal.Thecenterfrequencyisaround40kHzinthiscase,41970Hz.
Figure6DualAmplifiers

RectifierandEnvelopeDetector
AnotherTL072isusedasavoltagerectifierhere.Theoutputoftherectifierisfed
throughanenvelopedetectorandlowpassfiltertorecoverastreamofbinarybits.

Figure7VoltageRectifierandEnvelopeDetector

TimingRecovery

AnotherPCI16F690isusedtorecoverthefrequencyofthereceivedsignal.Thisisfed
intotheDFlipFllptohelpavoidtimingerrors.
Figure8PIC16F690TimingRecovery

Memory
ThepseudorandomsignalisrecoveredandstoredintheDFlipFlopchip.Thisactsas
thememorythatoursystemwritesto.
Figure974LS74ADFlipFlop

Conclusions
Thereweretwomajorendgoalsforthisseriesoflaboratorysessions.First,wewanted
toassembleadevicethatwascapableofaccuratelytransmittingasignalfromfurtherthan40
inchesaway.Inourfinallabtests,werecordedsuccessfultransmissionsinexcessof69inches
thus,inatechnicalsense,thisprojectwasverysuccessful.Secondly,thisprojectwasmeantto
helpfamiliarizeuswiththeoriesandtechniquesusefulincommunicationssystems.Whilethis
canbedifficulttoobjectivelyquantify,consistentlygoodperformanceonlabsandabove
averageexamscoressuggestthatourunderstandingofthecurriculumdidbenefitfrom
participatinginthisproject.
ReflectionsandSuggestions
ThisseriesoflaboratoryexperimentsseemswelldesignedandrelevanttothecourseI
wouldnotofferanysuggestionsforimprovingthecontentofthelabitself.Forfuturestudents
takingthecourse,Iwouldoffertwopiecesofadvice
1Wireupyourbreadboardsascleanlyaspossible
2DontforgettosettheFGtoHighZOutput


AppendixAPICCode

Vce=[0.10.20.30.40.512345678]
Ic_6in=[.1251.272.052.462.793.373.533.663.783.904.044.17
4.31]
Ic_12in=[.0360.55.88.90.91.93.96.991.021.051.071.091.12]
Ic_18in=[.016.309.468.478.482.496.515.530.544.559.571.585.60]
Ic_off=[.005.085.126.129.128.132.137.141.145.149.151.154.158]
Ic_offh=[.001.009.010.010.013.010.010.022.019.025.025.030
.030]

plot(Vce,Ic_6in,Vce,Ic_12in,Vce,Ic_18in,Vce,Ic_off,Vce,Ic_offh)
legend('6inch','12inch','18inch','LEDoff','LEDoff&covered')
title('PhototransistorCharacteristicCurves')
xlabel('CollectorCurrentI_c(mA)')
ylabel('CollectorVoltageV_{CE}(V)')
gridon

ThiscodeprovidedbyinstructorasLab1.m

//FileName:ClockRecovery.c
//Date:
September2012
//Purpose:ClockRecoveryforUNRZUsingInterruptonChange
//Author:BruceA.Black
//Modifiedby:YongJinDanielKim on:March21,2014

#include<htc.h>

#pragmaconfigFOSC=INTRCIO,WDTE=OFF,PWRTE=ON,CP=OFF,MCLRE=OFF

#defineCOMPINRB5
#defineSAMPLECLKRB6

unsignedcharwaitforit,x
intcount

voidinterrupttimertick(void)
{
if((T0IE==1)&&(T0IF==1)) //Timerinterrupt
{
T0IF=0
//Clearinterruptflag
waitforit=0 //Letthemainloopproceed
}
if((RABIE==1)&&(RABIF==1))
//Edgedetected
{

count=0
SAMPLECLK=0
x=COMPIN //Cleartheedgedetection
RABIF=0
//Cleartheinterruptflag

}
return
}

voidmain(void)
{
//SetupportB
ANSEL=0x00//MaketheIOdigital
ANSELH=0x00
TRISB5=1//Input
TRISB6=0//Output
SAMPLECLK=0
IOCB5=1
//InterruptonchangeenabledforCOMPIN
RABIE=1
//EnableregisterA/Binterrupt
x=COMPIN //Clearanydetectededges
RABIF=0
//Clearinterruptflag

//Initializeclockrecoveryloop
count=0

//Setuptimer0
T0CS=0//Clocksourceisfosc/4
PSA=0//Useprescaler
PS2=0//Prescalersetfor1:2
PS1=0
PS0=0
T0IF=0//Clearinterruptflag
TMR0=0x00//Initializetimervalue
T0IE=1//Enabletimer0interrupt

//Andawaywego...
ei()
while(1)
{
waitforit=1
while(waitforit){}//Waitfortimerinterrupt
count++
if(count==10)
{
SAMPLECLK=1
}
if(count==20)
{
SAMPLECLK=0

count=0
}

}
}

ThiscodeprovidedbyinstructorasClockRecovery

You might also like