ncemeasurementconsistsoftwophases:acoarsemeasurementand.afinemeasurement:Step1:Transmissionofonepulsetraintoproduceasimpleultrasonicwave.Step2:ordingtoequati-on,untiltheechoisdetected.Step3:Detectionoftheamplitudesandzero-crossingtimesofbothechoes.Step4:Settingthegainsofbothechoamplifierstonormalizetheoutputat,say3volts.ordingtothe:periodofechoes.ordingtothedataofstep2.Step5:Sendingtwopulsetrainstoproduceaninterferedwave.Testingthezero-crossingtimesandamplitudesoftheechoes.ursintheecho,ootherwisecalculatetobyinterpolationusingtheamplitudesnearthetrough.Derivetsubm1andtsubm2.Step6:Calculationofthedistanceyusingequation.4.TheultrasonicrangingsystemsoftwaredesignSoftwareisdividedintotwoparts,pletionoftheworkofthemainprogramisinitialized,eachsequenceofultrasonictransmittingandreceivingcontrol.