audio transmision with laser
TRANSCRIPT
-
7/29/2019 Audio Transmision With Laser
1/20
Laser Audio Transmitter
Jehhal Liu (jl589), Daniel Zuo
(dyz2)Shared by:
http://hello-engineers.blogspot.com/
Introduction
Project DetailsDesign Details
Results
Conclusions
Appendices
Introduction
Thisprojectisaproof-of-conceptdevicethattransmitsanaudiosignalusinga
laserbeam,whileremovingtheneedfortheusertoalignthebeamthemselves.
Forourproject,wecreatedamono-axialtransmitter/receiversetupthatconvert ananalogaudiosignal,viaastandard3.5mmjack,andtransmitsitviaalasertoareceiver,whichconvertsthesignalbackintoaudio.Thereceivercanberotatedwithinitshorizontalplane,andusesaservomotorcontrolledbyamicrocontrollertoautomaticallyalignitwiththereceiver.Theendresultisawirelessaudiosignalthatcannotbeoverheardbyotherdevices.
ProjectDetails
Rationale
Lightisalreadybecomingapopularmeansofcommunication,thankstofiberoptics,whichcanguideopticaldatamuchlikeawiretransmitscurrent.Itmightseemimpractical,then,touselaserswithoutaguidingmediumtotransmitinformation.However,incontextswhereaphysicalconnectionisimpossibleor
unfeasible,andtheneedforafocusedbeamarises,itwouldseemlogicaltouselaserlight.Inparticular,freespacelasercommunicationhasusefulapplicationst
-
7/29/2019 Audio Transmision With Laser
2/20
militarylogistics,whereinformationonthefrontmustbekeptlimitedtofriendlyears,andground-to-airlinksareimportant.Wedecidedtocreateasimpleandinexpensiveproof-of-concepttodemonstratetheadvantagesofthisseeminglyimpracticalscheme.
InspirationforthisprojectcamefromadesigninthebookGonzoGizmos:Projects&DevicestoChannelYourInnerGeek,abookwrittenbySimonQuellenField,inwhichalaser/solarcellcombinationallowedforthetransmissionofanaudiosignalusinglight.AtopicofresearchatMITLincolnLaboratory(http://www.ll.mit.edu/news/freespace-lasercom.html )inspiredustoincorporatetrackingcapabilitywhilekeepingtheprojectbudgetaffordableatahobbyistlevel.
LogicalStructure
Ourprojectisdividedintotwodistinctsections:audiotransmissionviahardware andalignmentcontrolviasoftware.Theformercanbeaccomplishedoncethelatterhassucceeded,makingthetwotasksmutuallydependentforoverallfunctionality.Thealignmentisaccomplishedusingaservomotortorotatethetransmitteruntilitalignswiththereceiver.Thisisdonebydetectingthelightemittedfromthereceiverslaserusingaphototransistor.Thetransmitterscans
overitsfreerangeuntilitfindsthereceiver,atwhichpointthetransmittinglaseristurnedonandtheaudiosignalispickedupbyanarrayofphotodiodes.Thedetailsofthisprocessareexploredbelow.
SafetyandStandards
Sinceweareusinglasers,theeffectsofexposureneedtobeconsidered.Thelasersweusedwerepurchasedcommercially,andcomplywithclassIIIApowerandsafetyspecifications,asdesignatedbytheANSIZ136.1consensus.IntheUS,ANSIandOHSAstandardsspecifytheparametersunderwhichlaserscanbesafelyoperated.ForaclassIIIAlaser,thebeamsaregenerallynothazardouswithouttheuseoffocusingequipment,thoughdirectexposuretotheeyeshouldbeavoided.Withthisinmind,weoperatedthedeviceinaplanethatlackedreflectiveobjectsandwaswellbeloweyelevel.Additionally,thetransmittinglaseristurnedoffwhentheexactdirectionofthelaserisnotknown(i.e.whenth transmitterisscanningthearea).Thereceiverslaserislimitedtobejustbrightenoughtobedetectedbythetransmitter,butnotatthepeakamplitude.
-
7/29/2019 Audio Transmision With Laser
3/20
Hardware/SoftwareTradeoffs
Theaudiosignalsentbythetransmitterisprovidedexternallyratherthanviathemicrocontroller,sinceexternaldevicesrepresentmoreflexibilityandmobilityintheinformationthatcanbesent.HavingtheaudiosynthesizedbytheMega644wouldrequiresomeformofexternalmemoryandamethodofflashingfromanexternalsourceanyways,sowedecidedtocutoutthemiddleman.
Theaudiosignalissentviaananalogtransmissioninsteadofdecodingitintoadigitalsignal.Opticaltransmissionisusuallydoneusingwithdigitalsignals,requiringhardwarefordecodingatthereceiverend.Bytransmittingtheanalogaudiosignalthroughlaseramplitudemodulation,wecutdownonthetransmitterandreceiverhardwarebyeliminatingtheneedforencodinganddecoding
processors.
DesignDetails
Hardware
Transmitter
Figure1:Transmittercircuit,readyforoperation.
-
7/29/2019 Audio Transmision With Laser
4/20
Thetransmitterisbrokendownintothreecircuits.Thefirstcircuit,whichissimilartothereceiverend,isthelaseraudiotransmissioncircuit.Thistransmitterworksbymodulatingtheamplitudeofthelaserbasedontheamplitudeoftheaudiosignalthatwearetryingtotransmit.
Theaudio,whichisfedtothecircuitthroughastandard3.5mmaudiojack,issenttoanaddercircuit.Theadder,shownbelow,consistsoftwoinputsandanegativ feedbackresistorthatwillbesummedtogether.Thetwoconnectionstothenon-invertinginputoftheop-amparetheaudiosignalandaDCbiassignalthatisgenerallykeptataround3V.Thisvoltagecanbemodifiedbyadjustingapotentiometer.
Thesignaltotheinvertinginputoftheop-ampishalfthatoftheoutput,whichisobtainedbyusingavoltagedivideroftwoequalresistors.Thisfeedbackallowstheop-amptofollowtheamplitudeofthenon-invertinginputasitattemptstoequatethevoltagesatthetwoinputs.
Theoutputoftheop-ampissentdirectlytothelaser.Theamplitudeofthelaseri proportionaltothevoltagethatisappliedtoit.Theamplitudelinearlyfollowsthevoltageuptoroughly4V,atwhichpointtheresponseismoreexponential.Wear takingadvantageofthelinearregionoftheresponsetosendamostlyunmodified
audiosignaltothereceiverforplayback.
Thelaserneedstobeturnedoffwhilethetransmitterisscanningforthereceiver mainlyforsafetyandpowerreasons.Toachievethis,the9Vsupplytotheop-am iscontrolledbyanNPNtransistor,whichcanactasaswitchcontrolledbythemicrocontroller.
-
7/29/2019 Audio Transmision With Laser
5/20
Figure2:Maintransmittercircuit.Modulateslaseramplitudebasedonaudioinput.
Thesecondcircuitinthetransmitterisbasedonaphototransistorthatresponds
toredlight.WhenVCEofthetransistorissetto5volts,thecurrentflowingthroughthetransistorisproportionaltotheamountofredlightthatisincidentuponthedetector.Thecurrentflowsthroughthe10Kresistor,resultinginameasurablevoltagethatisproportionaltotheincidentlight.Thisvoltageisfedtotheanalog-to-digitalconverterofthemicrocontroller,anddetermineswhetherthereceiverandtransmitterareproperlyalignedandreadyfortransmission.
Figure3:Transmitterphotodetectorusedforalignmentpurposes.
-
7/29/2019 Audio Transmision With Laser
6/20
Thelastpieceofthetransmitteristhemotorcontrollingcircuit.Weareusingaservomotortocontrolthedirectionofthetransmission.Themotorisopto-isolatedfromtherestofcircuit,andparticularly,themicrocontroller.Thismeansthatthemotorispoweredbyadifferentpowersupply,andhasnodirectconnectionswithanyterminalofthemicrocontroller.
Theservomotoriscontrolledbyapulse,whoselengthcorrespondswiththedesiredpositionofthemotor.Servoscanachieveabsolutepositioning,whileothertypesofmotorscanonlybepositionedrelativetothecurrentstate.The
preciselytimedpulseissentthrougha330resistortotheinputoftheisolator.Theoutputoftheisolatorissimplythesamepulsewitha5voltamplitude,whichisthensenttothemotorforpositioning.
Figure4:Motoropto-isolatorcircuit.Pulseoutputgoestomotorforanglecontrol
Receiver
Thereceivercircuitsomewhatresemblesthetransmittercircuit.Ratherthanasinglephototransistor,however,itinsteadusesthreephotodiodes,whichhavemuchlargersensitiveareascomparedtothetransistor.Sincetheresponseofthediodesdirectlyaffectstheaudioquality,amorecomplexcircuitiscalledfor.Thediodesthemselvesareplacedbetweenthetwoterminalsofanop-amp,whoseoutputvoltageisdeterminedbythecurrentthatflowsthroughthediodes.Usinganop-ampinsteadofbiasingthediodesallowsustoutilizeanear-idealshort-circuitcurrent.Withthreediodesinparallel,weeffectivelytripletheareaupon
whichwecanreceiveasignal.Afteramplifyingthesignalwithasecondop-amp,
-
7/29/2019 Audio Transmision With Laser
7/20
theresultisthenfeddirectlytoanaudiojack,wherethesignalcanbeheardusin anycompatibledevice.
Figure5:Receivermaincircuit.Readsdetectorvoltageandamplifiesbeforesendingtoaudiojack.
Figure6(left):Receiverlasercircuit.Usedforalignmentpurposes.Figure7(right):Receivercircuit,readytooperate.
-
7/29/2019 Audio Transmision With Laser
8/20
Software
Thesoftwareisdesignedtobecompletelyinterrupt-driven.TimingisbasedaroundtheabilitytocontrolanoutputpinwithaprecisePWMoutput,allowingustoaccuratelycontrolthemotorforscanningpurposes.Theinterruptserviceroutineiscalledonceeveryfivemicroseconds.Uponeachinterrupt,theprogramupdatesitstimingcounters,readstheoutputoftheanalog-to-digitalconverterwhennecessary,andperformsstateupdatesforreceivertrackingpurposes.
TheStateMachine
Figure8:Softwarestatemachine,usedfortransmitterscanning.
WeuseasimpleMooremachinetocontroltheactionsofthetransmitter.Thediagramaboveoutlinesitsbehavior.
-
7/29/2019 Audio Transmision With Laser
9/20
HardwareControl
Throughourtimingcontrolourhardwareisrelativelysimpletomanipulate.Theservomotorweusedusesthedurationofapulsetodetermineitsangularposition.Tocontrolthisposition,wesetapinhigh,andturnitoffwhenavariableamountoftimehaselapsed.Sincetheexecutionofotherinstructionscanhaveanoticeableeffectonthetruepulsewidth,thistogglingishandledpurelybythetimercompareinterrupt.
Enablingordisablingthelaserisassimpleastogglingaseparatepin.
AttemptedDesigns
Weattemptedtoimplementahandfulofdesignsthatdidn tworkoutintheend.
Hardwareinparticularwentthroughalot.Initiallywethought(naively)thataservomotordidnotneedtobeopto-isolated.Ourmotordisagreed,andvibratederratically.
Thereceiverwentthroughmultiplephotoreceptivedevices.Weweregoingtous asolarcell,butsawthattheresponseofaphotodiodewasgoodenough,soweusedoneofthoseinstead.Whenwesawthatthesensitiveareaofthephototransistormadealignmentusingtwoofthemnexttoimpossible,we
switchedtoanarrayoflargerphotodiodes.
Thepowersupplyforthemotorwasoriginallyanother9Vbattery,butwequickl foundthatthecurrentitsuppliedwasinsufficient.
Lastly,topoursaltonourwounds,ourcustomMega644proto-boardmysteriouslydiedonceeverythingelsehadbeencompleted,takingourmicrocontrollerwithit(orviceversa?).WedecidedtoswitchtoanSTK500asourcontrolsource,lackingthetimeorresourcestomakeanotherproto-board.
Thetransmitterslasercontrolalsowentthroughseveraliterationsbeforewelandedonthefinaldesign.Specifically,thecircuitdesignedtothelaseronoroffduringthescanstagewasmodified.Originally,theDCbiasinputtotheadderwouldbecontrolledbyapotentiometer,whichcouldbeadjustedtozerowhenduringscanning.Howeverthismethodwasnotautomatic.Wethentriedtocontroltheop-ampsupplyvoltagewithanoutputpinofthemicrocontroller,butfoundthatsupplying5voltscausedcircuittobeunabletooutputgreaterthan3
voltsattheoutput,whereasweneededanaudiosignalcenteredatroughly3.5volts.WealsooriginallyhadaBJTthatcontrolledabattery s9voltconnectionto
-
7/29/2019 Audio Transmision With Laser
10/20
theop-ampsupply,butfoundthatifthetransistor sbasevoltagewaskeptat5volts,thenthesupplycouldnotexceed5volts.Wefinallyimplementedthedesig describedaboveandkeptitasourfinaldesign.
Results
HardwarePerformance
Audio
Whendealingwithaudiotransmission,animportantconsiderationishowwellarangeoffrequenciesispreservedintheoutput.Generally,theaudiblefrequencie rangefrom20to20,000Hz.Tothatend,werantestscomparinginputwaveform
withthesignalsgeneratedbythereceiverforvariousfrequencieswithinthisrange.Anexampleoscilloscopetraceisshown(barely)below.
Figure9:Oscilloscopetraceofinputvs.output(smallersignal).Ataudiblefrequencythecorrelationishigh.
Throughourtestswefoundthattheoutputfrequencyremainsthesameastheinput,andthattheshapeofthesignal(asinusoidinourtests)waspreservedwithintheaudiblerange.Ataround50kHztheresponsetimeofthephotodiodeisnolongernegligibleandsomedistortioncanbeseen,asshownbelow.
-
7/29/2019 Audio Transmision With Laser
11/20
Figure10:Asthefrequencyclimbsbeyondtheaudiblerange,thecircuithastroubleresponding.
Therelativeattenuationofdifferentfrequencieswasalsomeasured.Thegraphbelowshowshowtherelativeamplitudedependsonfrequency.
Figure11:Receiversfrequencyresponse.
-
7/29/2019 Audio Transmision With Laser
12/20
Whilehighfrequencysignalsaretransmitteduniformly,theresponsedropsoffatthelowend.Thesystemactsonawholeasahigh-passfilterwithacriticalfrequencynear100Hz.Therefore,audiowithheavybasscomponentswillsufferthemostwhileothercomponentswillbelargelyunaffected.
MotorandAlignment
Thesmallservomotorperformsadmirablyundertheloadofthetransmittercircuit,operatingsmoothlyandconsistently.However,thephysicalconnectionstothepowersupplyforthemotorandthestk500causesthebasetoslideonallbuttheroughestofsurfaceswithoutadhesives.Onceanchored,thisisanon-issue
Thetransmitterandreceiveralignmoderatelywell.Caremustbetakeninplacingthereceiver,asitslasermustpointtowardsthecenterofrotationofthetransmitter.Evenwiththissatisfied,thereremainsadegree(nopunintended)offlexibilityintheangleofthetransmitterwhileintheLOCKstate,whichmeansthatthetransmitterbeamcanmissthephotodiodesofthereceiverasthedistancebetweenthetwoincreases.Whenweswitchedtothearrayofthreephotodiodes,thefrequencyofthismisalignmentoccurringdecreasednoticeably.Partialmissescanalsooccurwhenthebeamisbetweentwodiodesorslightlyoff
oneofthem.Theresultisthatdifferentvolumesarerequiredinthesourcetopreventdistortion.Theimpactonsafetyisnegligible,however,giventhatthenormalprecautionsassociatedwithlasersarekeptinmind.
Interference
Wefoundthattheonlyinterferencecamefromaudiocontaminationduetonearbyelectronics.Thelevelsofnoisedidnotseemgreaterthanwhatyoumighthearincheapaudioproducts,however.
SoftwarePerformance
Onitsown,thesoftwarecontrollingthetrackinglogicworkswithoutanyflaws.Thetimingofthemotorsignalexecutesconsistently,asevidencedbytheoperationofthemotoritself.Thedeviceiscapableoftrackingamovingbeamfairlywell,thoughitcaneasilyloseabeamthatdisplacesconsistentlyfasterthanapproximately5degreespersecond.Ifitguessesincorrectlywhichdirectionthebeamwent,thebeamcanbelostmoreeasily.Acquiringalockworksconsistentlyhowever,andwedidnotwitnessanyoccurrencesoffalsepositivesinourtesting.
-
7/29/2019 Audio Transmision With Laser
13/20
Usability
Ingeneral,thedevicecanbesuccessfullyoperatedbyanyonewithtwohands,functioningeyesight,andasurplusofpatience.Theamountofconstantvoltagesuppliedtobothlaserscanbemanuallyadjustedviatrimpotstocompensateforvariousvisibilityconditions,andtheaudiosignalscanbesuppliedandreceivedwithanythingusingastandard3.5mmstereojack(thoughtheoutputismono).
Conclusions
Expectations,Retrospect,andPossibleImprovements
Ourfinalproductnearlymetourinitialexpectations.Wedidn texpecttheaudioqualitytobeasgoodasitwasgiventherelativeeaseofdesigningthecircuits,buttheunreliablenatureofthealignmentwassomethingwehadn tanticipated,anddidnthaveasolutionreadilyavailablefor.Thesoftwaretooklessgriefandmiserythanwethought,andgenerallyworkedwithoutmuchcajoling.
Withthesepointsinmind,thereareafewthingswewouldhavedonedifferently.ThesoftwarecouldbeexpandedtoallowforthetransmissionofadigitalI/Ostream,usingtheRS232capabilitiesoftheMega644andmoresymmetryinthetransmitter/receivermodules.Thiswouldallowustotapmoreofthepotentialof
themicrocontrollersandbroadentheusefulnessofthedevice.
Asforhardware,wefoundthatconsideringeverydeviceasiftheoperatingconditionswereidealcostustimeandmoneythatcouldhaveotherwisebeenmoreproductive.Notconsideringtheareaofthephototransistors,forexample,wasanavoidableoversight.Additionally,withmoretimeandanexpandedbudge wecoulddealwiththealignmentissueandbuildonit:withmoreinvestmentinopticalhardwarethelaserscouldbesecuredwithmoreprecision,andtheir
beamscouldbebroadenedandre-collimated.Additionally,withamorecostlygimbalsetupanotherdimensioncouldbeaddedtotherangeofthedevice,andwithinfraredimagingwecouldmakethealignmentprocessmoreaccurate.
Thelast-minutefailureoftheproto-boardcameasaheavyblowtouslateinthegame.BeingmorepreparedfortheworstmighthavesavedussomegriefifwedsampledmorethanoneMega644andmademorethanoneproto-board.
Standards
Ourlasersarealwaysoperatedatpowerlevelsequaltoorlessthanthatoftheiroriginaldesign.Toreducethechancesofstraybeams,thetransmitterisdisabled
-
7/29/2019 Audio Transmision With Laser
14/20
untilitacquiresalock.Additionally,thelasersthemselvesscatterafairamounto redlightfromtheircavities,makingtheiroperationobvious.Giventhesefactors,andthelowpowerofthelasersthemselves,webelievewehavefollowedthelase safetystandards.
IntellectualPropertyConsiderations
Allofourcodeisoriginal,andthedesignsforourcircuitswerenottakenfromanoutsidesource.Sincetheideaforlasersignaltransmissionisalreadyalargepartofmanyapplications,weareconfidentthatourdevicedoesnotinfringeupontheintellectualpropertyrightsofotherparties.Bearingthatinmind,wedonotfeelourdevicemeritsapatentclaim.Theresultsoftheproject,whilesomewhatnovel,arenotexactlyunheardofanddonotmeritpublication,saveasaDIY.
Ethics
ReferringtotheIEEECodeofEthics,webelievewehaveactedresponsibleaselectricalengineerstotheextentthatourprojectallows.Byfollowingstrictprecautionsinusingourlasers,wehaveavoidedsafetyriskstoourselvesandothers.Sinceourworkwasindependentofoutsidepartiesandpurelyintheinterestoffunandlearning,weavoidedconflictsofinterestandbribery,aswellasslanderorintellectualdishonesty.Lastly,wehopethatourdeviceisableto
demonstratetoothersthecapabilitiesandlimitationsofopticalcommunication.LegalConsiderations
Sinceourdeviceisalowpowersetupthatproducesminimalinterferingnoise,therearenolegalissuesathand.
-
7/29/2019 Audio Transmision With Laser
15/20
Appendices
SourceCode
SourceCode
SchematicsTransmitter:MainCircuit
-
7/29/2019 Audio Transmision With Laser
16/20
TransmitterAlignmentUnit
MotorOpto-isolator
-
7/29/2019 Audio Transmision With Laser
17/20
Receiver:MainCircuit
ReceiverAlignmentUnit
ProjectBudgeting
Source PartNo. Description UnitPrice
Quantity
ECE4760Lab -- STK500 $15.00 1
ECE4760Lab -- 9VBattery $2.00 2
ECE4760Lab -- SolderBoard $1.00 2
ECE4760Lab -- DIPSocket $0.50 3
-
7/29/2019 Audio Transmision With Laser
18/20
ECE4760Lab -- 1-pinJumperCable
$0.50 5
ECE4760Lab -- 3.5mmStereoJack -- 2
AdamShapiro -- Adjustableclamp -- 1dealextreme.com 22334 RedLaserPointer $1.91 2
jameco.com hs-244 ServoMotor $19.95 1
digikey.com BPW46 Photodiode $1.01 3
digikey.com LM358ANFS-ND
Op-amp $0.39 2
digikey.com 160-1304-5-ND
Opto-isolator $0.32 1
digikey.com 2N3904FS-ND
NPNTransistor $0.11 1
digikey.com 3386F-103-ND
10kPotentiometer $1.14 2
digikey.com AE9919-ND 3.5mmAudioCable
$5.10 1
allelectronics.com LT9593-91-0125
IRPhototransistor $0.65 1
Total $61.04
DivisionofLabor
Task TeamMember
ProtoboardAssembly Dan
PhotodiodeTesting Dan&Jehhal
SolarCellTesting Jehhal
TransmitterCircuit JehhalReceiverCircuit Dan
TransmitterBase Dan
HardwareDebugging Dan&Jehhal
SoftwareDesign Dan&Jehhal
SoftwareDebugging Dan&Jehhal
WeeklyUpdates Dan&Jehhal
FinalReport Dan&Jehhal
-
7/29/2019 Audio Transmision With Laser
19/20
References
Mega644DataSheet(http://instruct1.cit.cornell.edu/courses/ee476/AtmelStuff/mega644full.pdf)
LM358Op-ampDataSheet(http://instruct1.cit.cornell.edu/courses/ee476/labs/s2009/LM358.pdf)
LT9593-91-0125Phototransistor(www.ledtechusa.com/data/datasheets/LT7-9X/LT959X-91-0125.pdf)
BPW46Photodiode(http://www.vishay.com/docs/81524/bpw46.pdf)
HS-422ServoMotor(http://www.imagesco.com/servo/motors/HS-422.html )
Inspirationforthisdevicecameinpartfromthebook GonzoGizmos:Projects&DevicestoChannelYourInnerGeek,bySimonQuellenField.Itsanexcellentintroductionintovarioususefulscientificphenomena.
(http://www.amazon.com/Gonzo-Gizmos-Projects-Devices-Channel/dp/1556525206)
MITLincolnLaboratoryisworkingonasimilar,butmuchmorecomplex,conceptforlong-rangelasercommunication.(http://www.ll.mit.edu/news/freespace-lasercom.html )
ThanksgotoAdamShapiro,whoprovidedsomehonestfeedbacktoourinitialideaandprovidedausefulstandforourreceiver.
Additionalthankstothefollowingpartsvendors(youcansamplemostofthecomponentswepurchasedforfreeifyouarepatient):
(http://www.digikey.com/)
(http://www.jameco.com/)
(http://www.dealextreme.com/)
-
7/29/2019 Audio Transmision With Laser
20/20