基于STM32的数据采集系统英文文献Word文档格式.docx
《基于STM32的数据采集系统英文文献Word文档格式.docx》由会员分享,可在线阅读,更多相关《基于STM32的数据采集系统英文文献Word文档格式.docx(8页珍藏版)》请在冰豆网上搜索。
dataacquisition;
embeddedsystem;
uC/OS-II;
1.1.Introduction
Thereal-timeacquisitionofvibrationinrotatingmachinerycaneffectivelypredict,assessanddiagnoseequipmentoperationstate,theindustrygetsvibrationdataacquisitionRapidlyandanalysisinreal-timecanmonitortherotatingmachinerystateandguaranteethesaferunningoftheequipment。
Inordertopreventfailure,reducemaintenancetime,improvetheeconomicefficiency,Thepurposeoffaultdiagnosissystemcandetectthesedevicesthroughthevibrationsignalacquisitionofrotatingmachinery,andprocessthedataacquisition,thenitwillmaketimelyjudgmentofrunningstateofequipment。
Whilethedataacquisitionmoduleisthecorepartofthefaultdiagnosissystem[1—4]。
Thepracticalapplicationintheindustrialfield,istheequipmentoperatingparameterswillbeacquiredtomonitorequipmentoperatingstate.Intraditionaldataacquisitionsystems,thedatafromacquisitioncardaregenerallysendintothecomputer,andspecificsoftwarewillbedevelopedforthedataacquisition。
ThemaincontributionofthispaperhasdesignedtheSTM32platformwithARMtechnology,thathasbecomeatraditionalmainstreamtechnologyinembeddedsystems,andthecollectingdatatowardthedirectionofhighreal-time,multi—parameter,high—precision,whiledatastoragebecomelargecapacity,moreminiaturizationandportable,andthedevelopmentofmulticommunicationmodeandlong—distancefordatatransmission.Soastomeettheactualacquisitionsystemmultitaskingrequirements,thisarticlehasdesignedbasedonSTM32micro—controlleruC/OS-IIsystemofsignalacquisitionsystem.Therefore,inordertomeettheactualacquisitionsystemmultitaskrequirements,thisnoveltyofthisarticlehasdesignedasignalacquisitionsysteminmicro—controlleruC/OS-IIbasedonSTM32.
2.Architectureofdataacquisitionsystem
Dataacquisitionaskeytechnologyformonitoringequipment,recentlyalotofworkhasbeendoneonit。
AnembeddedparalleldataacquisitionsystembasedonFPGAisOptimizeddesignedwhichwillmakeitreasonabletodivideandallocatehigh—speedandlow-speedA/D[5]。
Instead,ithasuseahigh-speedA/D
converterandStratixIIseriesofFPGAfordatacollectionandprocessing,inwhichthemaincontributionisusedoftheCompactPeripheralComponentInterconnect,thesystemhasthecharactersofmodularization,sturdinessandscalability[6]。
ButremotecontrolwillbeneededinSpecialConditions,thispaperintroducetheembeddedoperatingsystemplatformbasedonWindowsCEanduC/OS-IItodesignaremoteacquisitionandcontrolsystemwiththeGPRSwirelesstechnology[7-8]。
Inordertoachievethedatasharingofmulti-user,ithasbuildtheembeddeddynamicwebsitefordataacquisitionmanagementanddisseminationwiththeARM9andLinuxoperationsystem[9]。
AdatacollectionterminaldevicesisdesignedbasedonARM7microprocessorLPC2290andembeddedreal-timeoperatingsystemuC/OS-IItosolvethereal-timeacquisitionofmultichannelsmallsignalandmulti-channeltransmission[10]。
Ontheotherhands,twoparallelDSP—basedsystemdedicatedtothedataacquisitiononrotatingmachines,andtheinnersignalconditionerisusedtoadaptthesensoroutputtotheinputrangeoftheacquisition,andthensignalpost—processingbythedesignsoftware,whilethemostfrequentlystructureistouseDASandFPGA—based,andsuchprogramsarealsodependentontheDAScost.
Inordertomeetmarketrequirementsoflowpowerconsumption,lowcost,andmobility,Fig.1inthispaperpresentsthedesignoverallstructurediagramofdataacquisitionsystem.ThroughSPIinterface,thesystemgetsthedatacollectionwiththreeaxisaccelerationsensorintotheSTM32controllerofinnerA/Dconversionmodulewith12—bit,thisprocessisnon-interferingparallelacquisition。
Oursystemuses240x400LCDandtouchscreenmodulereal—timetodisplaythecollecteddatainrealtime。
2。
1。
STM32micro—controller
A32bitRISCSTM32F103VET6,usedastheprocessorinoursystem,comparedwithsimilarproducts,theSTM32F103VET6workat72MHZ,withcharactersofstrongperformanceandlowpowerconsumption,real-timeandlow-cost.Theprocessorincludes:
512KFLASH,64KSRAM,anditwillcommunicatebyusingfiveserialportswhichcontainaCANbus,aUSB2.0SLAVEmodeandaEthernetinterface,whatsmoretwoRS232portsarealsoincluded。
ThesysteminourpaperextendtheSST25VF016BserialmemorythroughtheSPIbusinterface,thatwillregardasthetemporarystoragewhencollectlargenumberofdata,furthermore,wehavetheA/Dconverterwith12bitsresolution,andthefastestconversionupto1us,with3。
6Vfull-scaleofthesystem.Inadditiontodesignofthesystempowersupplycircuit,theresetcircuit,RTCcircuitandGPIOporttoassurancesystemneedsandnormaloperation.
2.Dataacquisition
Themachinestateisnormalornotismainlydependedonthevibrationsignal.Inthispaper,toacquirethevibrationdataofrotatingmachineryrotor,wehaveusedvibrationaccelerationtransducersMMA7455Lwhichcouldcollectthedatafromaxisx,y,andzofthecompanyofFree-scale。
Thekindofvibrationaccelerationtransducershasadvantageoflowcostandsmallsize,highsensitivityandlargedynamicrangewithsmallinterference.MMA7455Lismainlyconsistsofgravitysensingunitandsignalconditioningcircuitcomposition,andthissensorwillamplifythetinydatabeforesignalpreprocessing.Indataacquisitionprocessofoursystem,theerrorofsamplingstageismainlycausedbyquantified,andtheerrorisdependedonthebitsoftheA/Dconverter,whenweregardthemaximumvoltageasVmax,theADconverterbitsisn,andthequantizationQ=Vmax/2n,then,thequantizationerrorisobeyeduniformdistributionin[-q/2,q/2][13].
ThedesignedSTM32couldbuiltatmostthree12-bitparallelADCinthispaper,whichtheoreticalindexis72dBandtheactualdynamicrangeisbetween54to60dBwhile2or3bitsisimpactedbynoise,thedynamicrangeofmeasurementcanupto1000timeswith60dB。
Forthevastmajorityofthevibrationsignal,themaximumsamplingrateof10kHZcanmeetactualdemand,andthehigherfrequencyofcollectionisgenerallyusedinthe8-12bitsAD,thereforeoneofcontributionofthisworkistochooseabuilt-in12—bitA/Dtomeettheaccuracyofvibrationsignalacquisitionandlowercostinthisexperiment.
3。
Softwaredesign
TransplantationofC/OS
Inordertoensurereal-timeandsafetydatacollectionrequirements,inthissystem,akindofRTOSwhosesourcecodeisopenandsmallisproposed.Italsocanbeeasilytobecutdown,repottedandsolidified,anditsbasicfunctionsincludingtaskmanagementandresourcemanagement,storagemanagementandsystemmanagement。
TheRTOSembeddedsystemcouldsupport64tasks,withatmost56usertasks,andfourtasksofthehighestandthelowestprioritieswillberetainedinsystem。
TheuC/OS-IIassignsprioritiesofthetasksaccordingtotheirimportance,theoperationsystemexecutivethetaskfromtheprioritysequenceandeachtaskhaveindependentpriority.Theoperatingsystemkernelisstreamlined,andmulti-taskingfunctioniswellcomparedwithothers,itcanbetransplantedtoprocessorsthatfrom8—bitto64—bit.Thetransplantinthesystemaretomodifythethreefilesystemstructure:
OS_CPU_C.HOS_CPU.C,OS_CPU_A.ASM.Maintransplantationprocedureisasfollows:
A.OS_CPU_C.H
Ithasdefinedthedatatypes,thelengthandgrowthdirectionofstackintheprocessor.Becausedifferentmicroprocessorshavedifferentwordlength,sotheuC/OS-IItransplantationincludeaseriesoftypedefinitiontoensureitsportability,andtherevisedcodeasfollows:
typedefunsignedcharBOOLEAN;
typedefunsignedcharINT8U;
typedefsignedcharINT8S;
typedefunsignedshortINT16U;
typedefsignedshortINT16U;
typedefunsignedintINT32U;
typedefsignedintINT32S;
typedeffloatFP32;
typedefdoubleFP64;
typedefunsignedintOS_STK;
typedefunsignedintOS_CPU_SR;
Cortex-M3processordefinestheOS_ENTER_CRITICAL()andOS_EXIT_CRITICAL()asopeningandclosinginterrupt,andtheymustsetto32bitofthestackOS_STKandCPUregisterlength。
Inaddition,thathasdefinedthestackpointerOS_STK_GROWTHstackgrowthdirectionfromhighaddresstoloweraddress。
B。
OS_CPU。
C
TomodifythefunctionOSTaskStkInit()accordingtotheprocessor,thenineremaininguserinterfacefunctionsandhookfunctionscanbenullwithoutspecialrequirements,theywillproducecodeforthesefunctionsonlywhentheOS_CPU_HOOKS_ENissetto1inthefileofOS_CFG.H.ThestackinitializationfunctionOSTaskStkInit()returntothenewtopofthestackpointer。
OS_CPU_A。
ASM
Mostofthetransplantworkarecompletedinthesedocuments,andmodifythefollowingfunctions。
OsStartHighRdy()isusedforrunningthemostpriorityreadytask,itwillberesponsibleforstackpointerSPfromthehighestprioritytaskofTCBcontrolblock,andrestoretheCPU,thenthetaskprocesscreatedbytheuserstarttocontroltheprocess.
OSCtxSw()isfortaskswitching,Whenthecurrentta