ebook img

Fast Prototyping 24-Bit Sigma-Delta ADC With Energia Ecosystem PDF

34 Pages·2015·2.98 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Fast Prototyping 24-Bit Sigma-Delta ADC With Energia Ecosystem

TI Designs Fast Prototyping 24-Bit Sigma-Delta ADC With Energia Ecosystem TIDesigns DesignFeatures ThisTI DesignshowcasesaSigma-DeltaADC • EnergiaControlofADS1220 BoosterPack™forTILaunchPad™andhowto • EnergiaLibrariestoConvertData proceedtoafastprototypingevaluationwithEnergia • EnergiaLibraryfor ADCCodetoConvert leadinganalogperformancesevaluationwithin Temperature minutes. • 24-Bit ΔΣADC:ADS1220 DesignResources • PhysicalFormFactorinBoosterPackfor CompatibilityWithallTILaunchPadDevices TIDA-00647 DesignFolder • Scalable FromGenerictoSpecificEvaluation ADS1220 ProductFolder WithinMinutes TIDA-00648 ToolsFolder TIDA-00339 ToolsFolder FeaturedApplications • FactoryAutomationAndProcessControl • SensorsAndFieldTransmitters ASKOurE2EExperts Booster-Pack side Sinepnustor ADS1220 t Generic Sigma-Delta fast prototying LaunchPad <-> Booster Pack Connectors Debug USB to PC StateMachine FR5969t Control and debug side LaunchPad side AnIMPORTANTNOTICEattheendofthisTIreferencedesignaddressesauthorizeduse,intellectualpropertymattersandother importantdisclaimersandinformation. TIDUAH3A–September2015–RevisedNovember2015 FastPrototyping24-BitSigma-DeltaADCWithEnergiaEcosystem 1 SubmitDocumentationFeedback Copyright©2015,TexasInstrumentsIncorporated SystemOverview www.ti.com 1 System Overview 1.1 System Introduction Forsignalswithrelativelylowbandwidth,upto100kHz,Delta-Sigmaconvertersofferhigher performancesthanothertopologies[1][2].ThisTIDesignleveragesEnergiaanditsrapidprototyping capabilitiestoevaluatehardware,suchasahigh-performanceADC,withinminutes. Table1.DesignSolutionstoIndustryProblems INDUSTRYCHALLENGE TIDA-00468SOLUTION Reducingtimetomarketwindows Fastprototypingsolutionforlowpower24-bitSDADC Showcasehowtousetheplatformforuniversaltemperature Beclosetoendapplicationforrelevantevaluation inputevaluation 1.2 Key System Specifications Table2.KeySystemSpecifications PARAMETER DETAILS 2-wireRTDinput Section7.1 3-wireRTDinput Section7.2 4-wireRTDinput Section7.3 Thermocoupleinput Section7.4 Universaltemperatureinput Section7.5 2 FastPrototyping24-BitSigma-DeltaADCWithEnergiaEcosystem TIDUAH3A–September2015–RevisedNovember2015 SubmitDocumentationFeedback Copyright©2015,TexasInstrumentsIncorporated www.ti.com SystemDesignTheory 2 System Design Theory 2.1 Delta-Sigma TheDSconverterismadeofthreemainblocks:theDSmodulator, thedigitalfilter,anddecimation.The internalDSmodulatorshowninFigure1 coarselysamplestheinput signalataveryhighrateinto a1-bit stream.Thedigitalanddecimationfiltersthentakethissampleddataandconvert itintoahigh-resolution, slowerdigitalcode.Whilemostconvertershaveonesamplerate,theDSconverterhastwo—theinput samplingrate(f )andtheoutputdatarate(f ). S D Sample Rate(fS) Analog ∆Σ Input Modulator fS/fD=Decimation Ratio Data Rate(fD) Digital Digital Decimator Filter Output Digital/Decimation Filter Figure1.BlockDiagramofDSADC 2.1.1 ΔΣModulator Themodulatorcanbemodeledeitherinatimedomain(Figure2)orinafrequencydomain. Inthetimedomain,theinputsignal(xi)andtheoutput ofa1-bitDAC(x4)aredifferentiatedtogenerate an intermediateanalogvoltage(x2),whichisintegratedintoanotheranalogvalue(x3) andcomparedto a thresholdvalue.Theoutputvalue(x4)isclockedoutoftheADCaswellastotheDACfor differentiation againstthe inputvalue(keepinginmindthat theinput valueisconsideredalmostconstant against changesofx4). After acertaintime,thevaluex3reachesthereferenceandx4changessign, asdoesx2andthe slopeof x3.SuchamodulationschemeprovesthequantizationnoiseisasdescribedinFigure2.Higherorderof modulationswithbetternoiseshapingperformancescanbedesigned, butthesedesignsusuallycome at theexpenseoftheresponse. Difference Integrator Comparator Latch Analog + (cid:139) D Q Bitstream in – out 1-bit DAC Clock A D Figure2.BlockDiagramofFirst-OrderSigma-DeltainTimeDomain TIDUAH3A–September2015–RevisedNovember2015 FastPrototyping24-BitSigma-DeltaADCWithEnergiaEcosystem 3 SubmitDocumentationFeedback Copyright©2015,TexasInstrumentsIncorporated SystemDesignTheory www.ti.com e Sigma i Delta (Integrator) x + 1-Sample 1-Bit y i Delay ADC i Analog – Output to Input Digital Filter Magnitude Signal 1-Bit DAC Frequency f S Quantization Noise Figure3.First-OrderDSModulatorinFrequencyDomain 2.1.2 DigitalFilter ThedigitalfiltermentionedinFigure1 canbeimplementedasshownonFigure4;alternatively, more advancedfilterssuchassyncfilterscanbeusedaswelldependingonthedesiredoutcome. Themainfunctionofthefilteristoremovethequantizationnoiseinthehigher frequenciespresentat the outputofthe1-bitADC(seeFigure4).Sincethenoiseisnotflat,removingthehigher frequencycontent, willincreasethesignaltonoiseratio. Input Delay Delay Delay b b b b 1 2 3 i Σ Σ Σ Output Figure4.First-Order,Low-PassAveragingFilter 2.1.3 Decimator Thedecimatorrolemostlyprovidesamanageabledataoutputrate. 4 FastPrototyping24-BitSigma-DeltaADCWithEnergiaEcosystem TIDUAH3A–September2015–RevisedNovember2015 SubmitDocumentationFeedback Copyright©2015,TexasInstrumentsIncorporated www.ti.com SystemDesignTheory 2.1.4 Summary Figure5.OverviewofSignalsatDifferentStagesofSigma-Delta 2.2 TI Rapid Prototyping Environment TheTI rapidprototypingenvironmentismadeofthefollowingthreekeycomponents: • Energia:thegraphicaluserinterfacerunningonallmainoperatingsystems • Sketch:thenamethatEnergiausesfor aprogram;itistheunit ofcodethat isuploadedtoand runson aLaunchPadboard • LaunchPad:theboardonwhichresidesthemicrocontrollersfromTexasInstruments • BoosterPack:theadd-onboardsconnectedtotheLaunchPad, extendingthefunctionalitiesof theMCU (andexercisedthankstoasketch) CAUTION While simplifying the design, this rapid prototyping environment does not compromise on performances: the program running on the LaunchPad has been processed by Energia then compiled using the standard C++ compiler beforebeingloaded. TIDUAH3A–September2015–RevisedNovember2015 FastPrototyping24-BitSigma-DeltaADCWithEnergiaEcosystem 5 SubmitDocumentationFeedback Copyright©2015,TexasInstrumentsIncorporated SystemDesignTheory www.ti.com 2.2.1 Energia Energiaisanopen-sourceintegrateddevelopmentenvironment(IDE)for rapidprototypingbringing the wiringframework(theframeworkunderlyingotherrapidprototypingenvironment)totheTexasInstruments LaunchPadevaluationkit. Thewiringframeworkisanopen-sourceprogrammingframeworkfor microcontrollers.Thisframework allowscross-platformsoftwaretocontroldevicesattachedtoawiderangeofmicrocontrollers. Thewiring-basedEnergiaIDEisanapplicationwritteninJava,derivedfromtheIDEmadefor the processingprogramminglanguage(forinstance,thename"sketch"isderivedfromtheprocessingIDE). TheEnergiaIDEcomeswithaC/C++librarycalled"Energia", whichmakescommoninput/output operationsmucheasier. EnergiaprogramsarewritteninC/C++, thoughmost ofthecomplexityofC/C++codeishiddenbythe EnergiaIDE.Forinstance,onlytwofunctionsneedtobedefinedfor aprogram torun(thoughmore functionscanbedefined): • Setup():afunctionthatrunsonceatthestartoftheprogram,whichcanbeusedtodefineinitial environmentsettings • Loop():afunctioncalledrepeatedlyuntiltheboardispoweredoff 2.2.2 LaunchPadEcosystem LaunchPadsaremicrocontrollerdevelopmentkitsfromTexasInstrumentsthat focuseasyevaluations: • SimpleUSBinterfacetoPC(nomoreneedfor additionaldebuggertoconnecttotheJTAGportasthe logicisalreadyontheLaunchPadboard) • Standardizedinterfaceforextensionboards(calledBoosterPacks) LaunchPadscomplytotheelectricalinterfacespecificationsshowninFigure6,whichisavailable asa PDF here:http://www.ti.com/ww/en/launchpad/dl/boosterpack-pinout-v2.pdf All through-holes on 100-mil grid 1800 mil 3.3 V 1 1600 mil 20 GND Analog In PWM Out GPIO (!) UARTRX( MCU) SPI CSWireless GPIO (!) TX( MCU) Emulator GPIO** GPIO (!) RST Analog In MOSI SPI SPI CLK MISO GPIO (!) SPI CS Display GPIO (!) I2C * SCL SPI CS Other GPIO (!) SDA 10 11 GPIO (!) 20-pin MCU 5 V 21 40 PWM Out GPIO (!) GND PWM Out GPIO (!) Analog In LaunchPad PWM Out GPIO (!) Analog In PWM Out GPIO (!) Analog In Timer Capture GPIO (!) Analog In Timer Capture GPIO (!) Analog In WS 200 mil 200 mil GPIO (!) Analog In SCLK GND GND GPIO (!) I2S Analog Out SDout GND GND GPIO (!) Analog Out SDin 30 5 V 3.3 V 31 GPIO (!) 40-pin Figure6.ElectricalInterfaceSpecifications 6 FastPrototyping24-BitSigma-DeltaADCWithEnergiaEcosystem TIDUAH3A–September2015–RevisedNovember2015 SubmitDocumentationFeedback Copyright©2015,TexasInstrumentsIncorporated www.ti.com SystemDesignTheory 2.2.3 BoosterPackEcosystem BoosterPacksareplug-inmodulesthatfitontopofLaunchPads.Theseinnovativetoolsplugintoa consistentandstandardizedconnectorontheLaunchPadandallowdeveloperstoexploredifferent applicationsenabledbyanyTImicrocontroller. BoosterPacksareavailablefromTexasInstruments,fromthirdparties,andfromthecommunity. BoosterPacksincludefunctionssuchascapacitivetouch,wirelesscommunication,sensorreadings,LED lightingcontrol,andmore.BoosterPacksareavailablein20-and40-pinvariants,andmultiple BoosterPackscanplugintoaLaunchPadtoenhancethefunctionalityofadesign. 2.2.4 LaunchPad,BoosterPack,andEnergiaAbstraction BoosterPackscanbemechanicallyandelectricallyconnectedasdescribedinFigure7 andFigure8. BoosterPack 3 Sketch.ino BoosterPack 3 BoosterPack 1 LaunchPad Figure7.MechanicalandElectricalConnections Figure8.SimpleUSBConnectionFromLaunchPadto BetweenLaunchPadandBoosterPack PC TheEnergīaframeworkbindstheentirerapidprototypingenvironmenttogether: • Editingandsavingthesourcecode(calledsketch) • Compilingandlinkingthesourcetobinaries • LoadingthebinariesoverUSBtothetarget (LaunchPad) • Displayingthemessages(serialportoverUSB)fromtheLaunchPad 2.2.5 IDE TheIDE providesasimplifieddevelopmentwindowthat isidealfor engineerswhoarenotfamiliarwith softwaredevelopmenttoolssuchasCodeComposerStudio™(CCS). Engineers(shouldtheybe hardwareengineers,systemarchitects,orsoon)canthendevelopthelogicinsmallfilescalleda "sketch", whicharethenloadedontheLaunchPadfor execution. Energīaprovideslotofthemorebasicandcorefunctionalitiesneededfor introductoryapplicationsand projects. Onceproofofconceptapplicationsarerealized, developmentwilllikelyleverageCCS,afull- blownprofessionaldevelopmentenvironment that introducesmorecapabilitiesandfunctionalitysuch as fulldebug. TIDUAH3A–September2015–RevisedNovember2015 FastPrototyping24-BitSigma-DeltaADCWithEnergiaEcosystem 7 SubmitDocumentationFeedback Copyright©2015,TexasInstrumentsIncorporated SystemDesignTheory www.ti.com 2.2.6 CompilingandLoading Figure9 summarizeswhatEnergīadoesinthebackgroundbeforeloadingthecompiledcodeonthe LaunchPad. 9 When you press (verify) in Energia, this is what happens in the background r o s es er oc pil r m p - o e c pr C er a C bl Sketch.ino gi G m Sketch.out er 0 se er n 3 s k E 4 a n SInk Eetncehr gfiilae ItDypEed MSP TI TI li Btooni nbtoae r Lyloa fauiledn ecrdhe Padayd x EnergflD libraries Figure9.EnergiaBuildProcess Morespecifically,thefollowingeventsmust happenfor theEnergīacodetogetontotheLaunchPad board: First,theEnergīaenvironmentperformssomesmalltransformationstomakesurethecodeiscorrectinC orC++(twocommonprogramminglanguages)includingthe"Energialibraries"(#include“Energia.h”), whichcontainallthedefinitionsneededfor thestandardEnergīacore.If asketchcontainsmultiple files (tabs),alltabswithoutanextensionareconcatenatedtogether toformamainone.Tabswith.c,.cpp,or .hwillbecompiledseparatelywhileotherswillberenamed.ThenEnergīasearchesfor functiondefinitions andcreatesprototypesforthem.ThenEnergīaaddsthetarget main.cxxfiletothebottom ofthe sketch, whichincludessomeofthetargetspecificsettings(apart ofwhat allowstherapidprototypingasthecode canstart fromaknowngoodsetup). Theobjectfilesthengetpassedtoacompiler(MSPGCC), whichturnsthehumanreadablecodeinto machinereadableinstructions(orobjectfiles).Then, thecodegetscombinedwith(linkedagainst)the standardEnergīalibrariesthatprovidebasicfunctionslikedigitalWrite()orSerial.print().Theresult isa singleIntelhexfile,whichcontainsthespecificbytesthat needtobewrittentotheprogram memoryof the chiponthe LaunchPad. The.cxxfilecanthenbeuploadedtotheboard.It istransmittedovertheUSBorserialconnection throughthebootloaderalreadyonthechiporwithexternalprogramminghardwareduetothemspflasher. 2.2.7 Running Oncethefirmwarehasbeenuploadedandstoredinthenon-volatilememory(NVM),whichcanbeFlash memoryorFRAMmemory,thedebuglogicontheLaunchPadwillissueahardwarereset,whichwillthen launchthe newlyprogrammedfirmware. 2.2.8 Debugging WithEnergīa,thedefaultdebugconsistsmostlyinUARTtracesgoingovertheUSBintotheterminalof theEnergīaGUI. Formoreadvancedfeatures,itisrecommendedtoimportsketchesintoCCS(seeSection2.2.9). 8 FastPrototyping24-BitSigma-DeltaADCWithEnergiaEcosystem TIDUAH3A–September2015–RevisedNovember2015 SubmitDocumentationFeedback Copyright©2015,TexasInstrumentsIncorporated www.ti.com SystemDesignTheory 2.2.9 ImportingtoCCSv6 EnergīasketchescanbeimportedtoCCS. Importingsketchesallowsuserstoreuseandscaletheworkdoneduringtheearlyprototypingstagesby thesoftwareteams. Formoredetails,seetheEnergiasite [8] orSection11wherethetutorialwascapturedfor future.The onlycodechangeistoincludetheEnergialibrarytobeabletoleveragetheEnergiaAPI. 2.2.10 ScalabilityandReuse SketchesaswellasthebinariesgeneratedwithEnergiacanbeloadedonboardsotherthanLaunchPads withCCSinconjunctionwithanemulator. TheonlyconstraintisthattheallocationofpinsremainsthesamethanontheoriginalLaunchPadon whichthecodewasinitiallydevelopedandvalidated. Beyondbinaryreuse,sourcecodecanalsobereusedandintegratedinsoftwareprojectstoallowreuseof thefunctionalitiesvalidatedbytheprototypingteambythesoftwareteam. 2.2.10.1 AccessingMapFileforMemoryFootprintEvaluation Anotheraspectwhichcanbeofinterestwhentransitioningthecodefromafast prototypingenvironment toasoftwareproductionenvironmentisrelatedtothememoryfootprint usedbytheframework.While the toolsdonotkeeptheactual .mapfile,itispossibletore-runthetoolchainandbyaddingtherelevant flagstokeepthemapfile.inthelogwindowduringthecompile, findthefollowingoutput(oftenline8and 9fromthebottom): <Energia install folder>hardware\tools\msp430\bin\msp430-gcc -Os -Wl,-gc-sections,- u,main -mmcu=msp430f5529 -o <User folder>\AppData\Local\Temp\build2484947497227615311.tmp\sketch_aug18a.cpp.elf <User folder>\AppData\Local\Temp\build2484947497227615311.tmp\sketch_aug18a.cpp.o <User folder>\AppData\Local\Temp\build2484947497227615311.tmp\core.a -L <User folder>\AppData\Local\Temp\build2484947497227615311.tmp -lm Takethisandadd:-Wl,-Map "x.map" orrunintheoutputfolder(forexample, <User folder>\AppData\Local\Temp\build2484947497227615311.tmp): <Energia install folder>\hardware\tools\msp430\bin\msp430-size.exe -t sketch_aug18a.cpp.elf TIDUAH3A–September2015–RevisedNovember2015 FastPrototyping24-BitSigma-DeltaADCWithEnergiaEcosystem 9 SubmitDocumentationFeedback Copyright©2015,TexasInstrumentsIncorporated SystemDescription www.ti.com 3 System Description Thisdesignfocusesonbringingafastprototypingsolutionfor lowpower ΣΔ ADCtotheEnergia, LaunchPad,orBoosterPackecosystem. ItconsistsofanADS1220mountedonaBoosterPackmechanicalandelectricalboardasdescribedin Figure10: Booster-Pack side Sensor ADS1220 input t Generic Sigma-Delta fast prototying LaunchPad <-> Booster Pack Connectors Debug USB to PC StateMachine t FR5969 Control and debug side LaunchPad side Figure10.BlockDiagram 10 FastPrototyping24-BitSigma-DeltaADCWithEnergiaEcosystem TIDUAH3A–September2015–RevisedNovember2015 SubmitDocumentationFeedback Copyright©2015,TexasInstrumentsIncorporated

Description:
Fast prototyping solution for low power 24-bit SD ADC .. or C++ (two common programming languages) including the "Energia libraries" Texas Instruments, SAR ADC's vs Delta Sigma ADC's: Different science in electrical engineering (MSEE) from Supélec, an Ivy League university in France.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.