Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/10/05 14:11
Read: times


 
Msg Score: +1
 +1 Good Question
#94617 - Ultrasonic Signal Processing
Hello:

This is the ultrasonic signal. Received singal will be preamp, and feed to ADC (TLC548). MPU is ATMEL89S52 or 89C2051. This is the amplified signal:


I'm trying Ultrasonic ranging. I don't mean to calculate exactly the distance in "cm" or "m". I just want to have a number from 0 to 255, represents a range that I design, for example, 255 = 2m, 0 = 0m.

I can sucessfully convert the echo into a number between 0 and 255. But my question is, when the object is near, the signal is usually significant but when the the object is far away from the sensor the signal is very weak, which means that there is no absolute level of "signal higher then 'this' is the echo signal". How to write a program to detect the greatest echo within the "2 meter time", beside using a comparator?

I've written a program like this:
Transmitt the ultrasonic pulses, and start a timer which INC a variable every 70uS.
The MPU keeps comparing the incoming signal from the ADC with the previous result. If the new one is greater then the previous one, I keep the new one as the "greatest" and save the copy of the "variable INCing by the timer", until the end of "2 meter time".

After the "2m time", the "variable" should be containing the time of which the largest echo comes.

But the program doesn't work well. LED keeps flashing as if the distance is changing frequently.

For these "time dependent" program I don't know how to debug...

How would you work out the time between "Transmit" and "Echo @ 2m"? I mean the "program flow"? "the Logic"

Sorry, after resize the notes becomes barely visible... and for my poor english which I can't use it well to express my meaning.

Just ask my questions if it is not clear, please.
Thanks~

Stanley

List of 187 messages in thread
TopicAuthorDate
Ultrasonic Signal Processing            01/01/70 00:00      
   Time dependant gain            01/01/70 00:00      
      Further attenuation...            01/01/70 00:00      
   Signal recovery.            01/01/70 00:00      
      AGC?            01/01/70 00:00      
   AGC as Steve said//            01/01/70 00:00      
   My Algorithm was:            01/01/70 00:00      
      My Algorithm was:            01/01/70 00:00      
   Ultrasonic Ranging            01/01/70 00:00      
   Matched filter on the rescue            01/01/70 00:00      
   matched filters            01/01/70 00:00      
      Phase locked amplifier            01/01/70 00:00      
         Its a different thing            01/01/70 00:00      
            Ah            01/01/70 00:00      
               Thats the one....            01/01/70 00:00      
                  Clever woman            01/01/70 00:00      
      Just an idea            01/01/70 00:00      
   The scope plot tells it all!            01/01/70 00:00      
   Largest signal            01/01/70 00:00      
      'Greatest' echo is the wrong criterion!            01/01/70 00:00      
                     01/01/70 00:00      
         somehow I remember...            01/01/70 00:00      
            No, no...            01/01/70 00:00      
               Oops~ forgot...            01/01/70 00:00      
   the product            01/01/70 00:00      
      Power of transmission pulse            01/01/70 00:00      
   Preamp circuit Here            01/01/70 00:00      
      Add caps to remove base line noise            01/01/70 00:00      
      Another potential problem...            01/01/70 00:00      
   Problem with ADC?            01/01/70 00:00      
   possible solution to the ADC problem            01/01/70 00:00      
      Ok~            01/01/70 00:00      
   Debug Result            01/01/70 00:00      
      ADC Sampling and code debugging            01/01/70 00:00      
         sampling time            01/01/70 00:00      
   Adc for Ultrasonic?            01/01/70 00:00      
   Next, comes to "average"            01/01/70 00:00      
      Why use the adc?            01/01/70 00:00      
         Forgot to tell...            01/01/70 00:00      
   Circle in RED            01/01/70 00:00      
   Asking for help again - Filter            01/01/70 00:00      
      Notch            01/01/70 00:00      
         I don't know            01/01/70 00:00      
            DSP            01/01/70 00:00      
               Nah            01/01/70 00:00      
                  for the sake of learning            01/01/70 00:00      
                     so            01/01/70 00:00      
                        I agree            01/01/70 00:00      
         Amplitude            01/01/70 00:00      
            Op amps            01/01/70 00:00      
               100pF            01/01/70 00:00      
                  bypass ??            01/01/70 00:00      
                     Yes            01/01/70 00:00      
                        No sort of bypass            01/01/70 00:00      
                           BTE054 BTE054USS2            01/01/70 00:00      
                              Better noise control            01/01/70 00:00      
                              re: BTE054            01/01/70 00:00      
                                 Replace LMV6032 with LM324            01/01/70 00:00      
                                    re:low sensitivity            01/01/70 00:00      
                              re:no filtering            01/01/70 00:00      
                                 Note            01/01/70 00:00      
                                 Notch filter?            01/01/70 00:00      
                                    No,            01/01/70 00:00      
      Bandpass            01/01/70 00:00      
         NOT a criticism            01/01/70 00:00      
            Update...            01/01/70 00:00      
               Umm... Nowadays?            01/01/70 00:00      
                  Op amp parameters            01/01/70 00:00      
                     "Filters for Dummy"            01/01/70 00:00      
                        Have you tried it with .....            01/01/70 00:00      
                           Yes, I've tried it and it works well            01/01/70 00:00      
                              Basic electronics            01/01/70 00:00      
                                 0.002uF -> 3300uF            01/01/70 00:00      
                                    re:noise            01/01/70 00:00      
                                       Exactly the same            01/01/70 00:00      
                                          test of signal            01/01/70 00:00      
                                             It's over 1.2m            01/01/70 00:00      
                                    TWO bypass caps.            01/01/70 00:00      
                                 Two were found            01/01/70 00:00      
                                    Usenet            01/01/70 00:00      
                              Why using a PLL, when a bandpass can ...            01/01/70 00:00      
                                 which is why ,,,,            01/01/70 00:00      
                                    Not sure what you meant..            01/01/70 00:00      
                                 Already            01/01/70 00:00      
                                    But it MUST work properly!!            01/01/70 00:00      
                                       Circuit here            01/01/70 00:00      
                                       Op-amp to replace LM324            01/01/70 00:00      
         Non-inverting Input Voltage Divider            01/01/70 00:00      
   LM567            01/01/70 00:00      
   re:LM324            01/01/70 00:00      
      re:wrong link            01/01/70 00:00      
      No AGC            01/01/70 00:00      
         AGC            01/01/70 00:00      
            Yes            01/01/70 00:00      
         re: no AGC            01/01/70 00:00      
      LMC6032 is much more linear than LM324            01/01/70 00:00      
         re:            01/01/70 00:00      
         re:attenuation of signal            01/01/70 00:00      
            Good ones and bad ones            01/01/70 00:00      
         another article of interest            01/01/70 00:00      
   tramsmit & receive            01/01/70 00:00      
      how to measure the distance perfectly?            01/01/70 00:00      
         Fatal Error!            01/01/70 00:00      
            How about this one....            01/01/70 00:00      
               Ultrasonic Detection Code!            01/01/70 00:00      
                  is that right?            01/01/70 00:00      
                     Not right,,,,,            01/01/70 00:00      
                        Thanks!            01/01/70 00:00      
                  another missing!            01/01/70 00:00      
                  i'll try it..            01/01/70 00:00      
   Some Applications of ultrasonic            01/01/70 00:00      
   "Op amps for everyone"            01/01/70 00:00      
   woo... tiring trip            01/01/70 00:00      
      Check this one            01/01/70 00:00      
         Thanks            01/01/70 00:00      
            is it not fundamentally wrong            01/01/70 00:00      
               Both            01/01/70 00:00      
               I knew that...            01/01/70 00:00      
                  Synthetic grounds            01/01/70 00:00      
                  no, Kai            01/01/70 00:00      
                     Steve, Erik            01/01/70 00:00      
         The circuit works, but...            01/01/70 00:00      
            Moral            01/01/70 00:00      
               Puh, what antennas...            01/01/70 00:00      
                  Which means I can't use breadboard            01/01/70 00:00      
                     In one word.            01/01/70 00:00      
            Using the LM318            01/01/70 00:00      
               Missing 10K            01/01/70 00:00      
                  More caps            01/01/70 00:00      
                  Where?            01/01/70 00:00      
                     Parallel            01/01/70 00:00      
                     Does it work now?            01/01/70 00:00      
                        Yes, it works fine            01/01/70 00:00      
               Theoretical work missed            01/01/70 00:00      
   Fatal Error!            01/01/70 00:00      
      Another article to peruse            01/01/70 00:00      
         Another one...            01/01/70 00:00      
            same application            01/01/70 00:00      
               Sorry            01/01/70 00:00      
                  Why sorry?            01/01/70 00:00      
            That's exactly what I want to do            01/01/70 00:00      
            which one is the best way?            01/01/70 00:00      
               Capacitors            01/01/70 00:00      
                  i've got it            01/01/70 00:00      
   not the best solution            01/01/70 00:00      
      Laser ranging            01/01/70 00:00      
         how much            01/01/70 00:00      
      I've withdrawn from the competition            01/01/70 00:00      
         NOT finance            01/01/70 00:00      
            Re: money is not everything            01/01/70 00:00      
               Good Luck            01/01/70 00:00      
               good luck            01/01/70 00:00      
                  Good luck            01/01/70 00:00      
                     Thanks!            01/01/70 00:00      
                        The noise again            01/01/70 00:00      
                           re:link            01/01/70 00:00      
                           Link            01/01/70 00:00      
                              this is the link            01/01/70 00:00      
                                 re:noise            01/01/70 00:00      
                                    5-14 Khz            01/01/70 00:00      
                                       re:5-14kHz            01/01/70 00:00      
                                          The Noise Amplitude            01/01/70 00:00      
                                 gain            01/01/70 00:00      
                                    the problem is gain            01/01/70 00:00      
                                 Schematic            01/01/70 00:00      
                                    Thank You but...            01/01/70 00:00      
                                    Thank You but...            01/01/70 00:00      
                                       1/4Watt is enough            01/01/70 00:00      
                                          Simulation result            01/01/70 00:00      
                                             Strange plots...            01/01/70 00:00      
                                                How about Compensation?            01/01/70 00:00      
                                                   Not needed            01/01/70 00:00      
                                                      Bigger Pulse            01/01/70 00:00      
                                                         Bridge configuration can help            01/01/70 00:00      
                                                            The same circuit but...            01/01/70 00:00      
                                                               ...but much stronger            01/01/70 00:00      
                                                                  I have tried            01/01/70 00:00      
                                                                     What do you mean by ripple?            01/01/70 00:00      
                                                                        The ripple            01/01/70 00:00      
                                                                           No, it is not. The output from a logic            01/01/70 00:00      
                                                                           Answer            01/01/70 00:00      
                                                                              Yup Kai            01/01/70 00:00      
                                                                                 It's to adjust oscillating frequency            01/01/70 00:00      
                                                                                    Finished            01/01/70 00:00      
                        Exams VS academic            01/01/70 00:00      
                           "Plan B"            01/01/70 00:00      
                              Universities in HongKong            01/01/70 00:00      

Back to Subject List