Friday, December 13, 2019

Ultrasonic Speed Measurement Free Essays

string(76) " directly dependent on the performance of the transmitter and the receiver\." â€Å"ULTRA SONIC SPEED MEASUREMENT DEVICE† A PROJECT REPORT Submitted in partial fulfillment Of requirements for award of the degree Of BACHELOR OF TECHNOLOGY In ELECTRONICS COMMUNICATION ENGINEERING By: Nimisha Sharma Nishant Tyagi Gaurav Sharma [pic] Department of Electronics communication engineering Radha Govind Engineering College Meerut, U. P 2009-2010 ULTRA SONIC SPEED MEASUREMENT DEVICE By: Nimisha sharma Nishant tyagi Gaurav sharma [pic] Department of Electronics communication engineering Radha govind Engineering College Meerut, U. P 2009-2010 ACKNOWLEDGEMENT Before we get in to thick of things we would like to add a few heartfelt words for the people who were the part of the project in numerous ways. We will write a custom essay sample on Ultrasonic Speed Measurement or any similar topic only for you Order Now People who gave unending support right from the stage the idea were conceived. In particular, we wish to thank Mr. P. K Singh Head of the Department, Electronics Communication and Mr. Abhishek Singh lecturer, Electronics Communication Department for providing this opportunity to us. After doing this project we can confidently say that this experience would not only enriched us with technical knowledge but also has unparsed the maturity of thought and vision . he attributes required being a successful professional. Gaurav Sharma Nimisha Sharma Nishant Tyagi CANDIDATE’S DECLARATION We, here by certify that the work which is being presented in the project report entitled Ultra sonic speed measurement device in partial fulfillment of the requirement for the award of degree of BACHELOR OF TECHNOLOGY in Electronics Communication Engineering submitted in the department of Electronics Communication Engineering of the Institute, is an authentic record of our own work carried out d uring final year of B. tech degree under the supervision of Mr. P. K Singh Head of the Department, Electronics Communication and Mr. Abhishek Singh lecturer, Department Electronics Communication Project group:- Gaurav Sharma (0606931023) Nimisha Sharma (0606931045) Nishant Tyagi (0606931047) This is to certify that the above statement made by the above candidates is correct to the best of my knowledge. Mr. P. K Singh Mr. Abhishek Singh (H. O. D) (Lecturer) Dept. of Electronics Comm. Dept. of Electronics Comm. R. G. E. C R. G. E. C Meerut, U. P Meerut, U. P Date†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦. Date†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦. Place†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ Place†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ TABLE OF CONTENTS 1. INTRODUCTION†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ a. MEANING OF THE WORD PROJECT†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ . ABSTRACT †¦ †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ c. PARTS OF SPEED MEASUREMENT DEVICE†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚ ¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦. 2. GENERAL DISCRIPTION AND FEATURES OF MICRO CONTROLLER †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦. 3. HARDWARE DISCRIPTION†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ a. VOLTAGE REGULATOR LM 7805†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦. b. COMPONENTS †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦. 4. PCB LAYOUT †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ a. STEPS FOR MAKING PCB †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦.. †¦ b. CIRCUIT LAY OUT †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦.. 5. SOFTWARE PROGRAM †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦.. 6. TESTING†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦.. 7. TROUBLESHOOTING †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦.. 8. CONCLUSION†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ 9. REFERENCES†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ 10. APPENDIX†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦.. INTRODUCTION MEANING OF PROJECT The project gives the significance of the following field of engineering – P-signifies the phenomenon of planning which deals with symbolic nation and proper arrangement of sense and suggestion receptivity accordingly to the needs R-it is associate with the word resources wh ich guides to promote planning . OJ-this letter signifies the overhead expenses in unestimated expenses that may occur in the manufacture design or layout of the project. E- signifies the word engineering. C- signifies the convey about phenomenon of construction low cost. T-the word T stands for technique. unless there is a technique; it is impossible to complete the project . The conclusion thus arrived is that project is a systematic consideration discussed and proposal in a particular subject . we can say that project includes complete requirement of mechanism , tools , application and needs. It considers the circuit diagram and various operational performances in sequence and data about the instrument and in the last we can say about the project profit loss. CERTIFICATE This is to certify that Mr. GAURAV SHARMA, student of B. Tech (Electronics communication Engineering) Final year from Radha Govind Engineering College has successfully completed his project â€Å"ULTRA SPEED MEASUREMENT DEVICE†. During the project period he was working under the guidance of Mr. Abhishek Singh (lecturer, Electronics Communication Engineering Department). His performance during the project has been Excellent. We wish him all the best for his future. Mr. P. K Singh Mr. Abhishek Singh (H. O. D) (Lecturer) Electronics Comm. Dept. Electronics Comm. Dept. R. G. E. C R. G. E. C Meerut, (U. P) Meerut, (U. P) CERTIFICATE This is to certify that Ms. NIMISHA SHARMA, student of B. Tech (Electronics communication Engineering) Final year from Radha Govind Engineering College has successfully completed her project â€Å"ULTRA SPEED MEASUREMENT DEVICE†. During the project period she was working under the guidance of Mr. Abhishek Singh (lecturer, Electronics Communication Engineering Department). Her performance during the project has been Excellent. We wish her all the best for her future. Mr. P. K Singh Mr. Abhishek Singh (H. O. D) (Lecturer) Electronics Comm. Dept. Electronics Comm. Dept. R. G. E. C R. G. E. C Meerut, (U. P) Meerut, (U. P) CERTIFICATE This is to certify that Mr. NISHANT TYAGI, student of B. Tech (Electronics communication Engineering) Final year from Radha Govind Engineering College has successfully completed his project â€Å"ULTRA SPEED MEASUREMENT DEVICE†. During the project period he was working under the guidance of Mr. Abhishek Singh (lecturer, Electronics Communication Engineering Department). His performance during the project has been Excellent. We wish him all the best for his future. Mr. P. K Singh Mr. Abhishek Singh (H. O. D) (Lecturer) Electronics Comm. Dept. Electronics Comm. Dept. R. G. E. C R. G. E. C Meerut, (U. P) Meerut, (U. P) CHAPTER 1 ABOUT OUR PROJECT Our project the ultrasonic speed measurement device is used to measure speed of a vehicle moving in front of it using ultrasonic waves. The concept of using ultrasonic waves instead of any other communicating tools as infrared and RF is its high preciseness and very less interference by the surrounding. There can various methods that can be opted to design this instrument such as Doppler Effect etc. but we have used the concept of distance measurement at a regular interval. The pulse is being transmitted at a regular interval and the corresponding distance is measured of the two pulses. The difference in the distances is observed and is then divided by the time duration between the two pulses. As result the corresponding speed is obtained. The range of this device is directly dependent on the performance of the transmitter and the receiver. You read "Ultrasonic Speed Measurement" in category "Papers" Higher the transmitting and receiving frequency better will be its range. Mathematical analysis(hypothetical) The duration of pulse is 5 milliseconds. The distance for the signal1 be say 3 cm. The distance for the signal2 be say 2. 95 cm. Difference of distances is (3-2. 95) = . 05 cm. Speed = distance/ time Speed = . 05/5 = 10 meters/sec ADVANTAGE AND DISADVANTAGE The major advantages of our project are One of the major advantages our project is its multi utility. It can be used as 1 Speed measurement 2 Distance measurement 3 Car parking controller The other advantage of this project is its cost. Its cost is less than 1000 INR. The precise result is one more advantage of our project. Limitation of our project. The major disadvantage of our project is its range. Due to the use of low frequency transmitter and receiver. High frequency transmitter and receiver give higher range of upto 10 to 15 mtrs Block diagram [pic] Circuit diagram Working In our project Ultrasonic Speed Measurement Device we are going to measure the speed of a moving vehicle. For this we are using the Ultrasonic Sensors. We first generate a 40 KHz signal by taking the time period of 25 microseconds. Then we actually generate the pulse burst with a delay of 5 milliseconds. For this we programmed the microcontroller. We send the pulse by pressing the switch that is connected to the pin no. 1 of the microcontroller. At this moment the distance of the object from the device is measured and is stored in the microcontroller. Then after the delay of 5 milliseconds the second pulse hits the moving object. Again the distance of the object is measured and is stored in the microcontroller. Then we can easily find out the difference in the distance by simply subtracting these two distances. Now we have the distance and also the time. Therefore by the formula speed = distance / time we can find out the speed of the moving object. In the transmitter part we have LM311which is a voltage comparator and is used here as the precision squarer whose pin no. 2 is connected to the pin no. 2 of the microcontroller. Then at pin no. 7 and pin no. 8 the ultrasonic transmitter is placed. In the receiver part we have LM833 for amplification and 74HC14N as the Hex inverting Schmitt trigger. The pin no. 1 of 74HC14N is connected to the pin no. of LM833. The ultrasonic receiver is connected between pin no. 6 of LM833 and ground. These ultrasonic transmitter and receiver are placed close to each other so that there will be minimum noise. Why ultrasonic signal ? ‘ULTRA’-sonic is a sound wave with a frequency above the normal range of human hearing. Most humans can hear up to 16 ,000 Hertz. Young people can hear almost to 20,000 Hertz. Bats and mice and other small critters can hear much higher and use those sounds to ‘see’ the world around them. An ultrasonic imaging device sends a signal into a medium and then listens for the reflected waves. The more receiving transducers you use to pick up the sound the better you can tell what you are ‘looking’ at. Reflected waves will reach one receiver before the next based on where the reflecting object is located. Electronics are fast enough to determine the direction and distance to the reflected objects. Also the higher the frequency you broadcast the better resolution you will see. A computer is interfaced with an array of receiving tranceducers and it calculates the direction and distance that the many echos must represent and then it plots the picture of the results. The Image can be displayed or printed. In ultrasonic non destructive testing, high-frequency sound vibrations are transmitted into material by an ultrasonic transducer. The test instrument then analyzes the ultrasonic signals which are received using either a pulse-echo or through-transmission method. In the pulse-echo mode, the transmitting transducer also serves as the ultrasonic receiver and analyzes the reflected signal with respect to amplitude and time. In the through-transmission mode, the ultrasonic signal is received by a separate transducer which analyzes the amplitude loss of signal. These ultrasonic NDT methods will indicate material defects such as longitudinal and transverse cracks, inclusions and others as well as ID/OD dimensions and dimensional changes such as thickness and ovality. Components Component required 1. Ultrasonic Transmitter and Receiver 2. Resistor 3. Capacitor 4. Crystal 5. Preset 6. Switch 7. LCD 8. Power Supply 9. IC’s †¢ LM833 †¢ LM311 †¢ 74HC14N †¢ 7805 10. Micro controller †¢ AT89S52 11. Wires 12. Burst Strip 13. IC Base Specification ULTRASONIC SENSORS [pic] Selection and use of ultrasonic ceramic transducers : The purpose of this application note is to aid the user in the selection and application of the Ultrasonic ceramic transducers. The general transducer design features a piezo ceramic disc bender that is resonant at a nominal frequency of 20 – 60 KHz and radiates or receives ultrasonic energy. They are distinguished from the piezo ceramic audio transducer in that they produce sound waves above 20 KHz that are inaudible to humans and the ultrasonic energy is radiated or received in a relatively narrow beam. The â€Å"open† type ultrasonic transducer design exposes the piezo bender bonded with a metal conical cone behind a protective screen. The â€Å"enclosed† type transducer design has the piezo bender mounted directly on the underside of the top of the case which is then machined to resonant at the desired frequency. The â€Å"PT and EP† type transducer has more internal damper for minimizing â€Å"ringing†, which usually operates as a transceiver – oscillating in a short period and then switching to receiving mode. Comparative characteristics : When compared to the enclosed transducer, the open type receiver will develop more electrical output at a given sound pressure level (high sensitivity) and exhibit less reduction in output as the operating frequency deviates from normal resonant frequency (greater bandwidth). The open type transmitter will produce more output for a specific drive level (more efficient). The enclosed type transducer is designed for very dusty or outdoor applications. The face of the transducer must be kept clean and free of damage to prevent losses. The transmitter is designed to have low impedance at the resonant frequency to obtain high mechanical efficiency. The receiver is constructed to maximize the impedance at the specified anti-resonant frequency to provide high electrical efficiency. Sound propagation : In order to properly select a transducer for a given application, it is important to be aware of the principles of sound propagation. Since sound is a wave phenomenon, its propagation and directivity are related to its wavelength (? ). A typical radiation power pattern for either a generator or receiver of waves is shown in Figure 1. Due to the reciprocity of transmission and reception, the graph portrays both power radiated along a given direction (in case of wave production), and the sensitivity along a given direction (in case of wave reception). As an example of a typical situation, a transducer of 400ET250 has an effective diameter of 23 mm (1mm wall thickness) will produce a main beam (-6dB) with full width of 30 ° at a frequency of 40 KHz. For open type transducers, the beam is decided by the angular and diameter of conical cone attached on the bender inside of housing and the opening diameter so it can not be simply calculated by the diameter of the housing. The intensity of sound waves decrease with the distance from the sound source, as might be expected for any wave phenomenon. This decrease is principal a combination of two effects. The first is the inverse square law or spherical divergence in which the intensity drop 6dB per distance doubled. This rate is common to all wave phenomena regardless of frequency. The second effect causing the intensity to decrease is the absorption of the wave by the air (see figure 2). Absorption effects vary with humidity and dust content of the air and most importantly, they vary with frequency of the wave. Absorption at 20 KHz is about 0. 02dB/30 cm. It is clear that lower frequencies are better suited for long range propagation. Of course, the selection of a lower frequency will result in less directivity (for a given diameter of source of receiver). [pic] How far the transducer could reach? One of the most frequently asked questions is â€Å"How far the transducer could reach? †. This question can be answered by a simple calculation that is based on the published specifications in the Ultrasonic Ceramic Transducer Data Sheets. The basic procedure is to first determine the minimum sound pressure level developed at the front end of the receiver for a specific transmitter driving voltage and distance between the transmitter and receiver (transceiver has double distance between reflect target). This SPL must then be converted â€Å"Pa† (Pascal) or â€Å"? bar† (microbar) units. The sensitivity of the receiver must then be converted from a dB reference to an absolute mV/Pa or ? bar level resent to obtain the final output. Assume a 400ST160 transmitter is driven at a level of 20Vrms and a 400SR160 receiver is located 5 meters from the ransmitter and loaded with a 3. K Ohm resistor (loaded resistor value varies receiver sensitivity, please see â€Å"Acoustic Performance† of transducer data sheet). The analysis is necessary to the fundamental understanding of the principals of sound wave propagation and detection but it is tedious. The figure 10 below is a graphical representation of previous analysis which may be used once in the SPL at the receiver is determined. Enter the graph from the SPL axis and proceed upward to an intersection with –dB sensitivity level of the receiver using the 1V/? bar referenced data. Follow a horizontal line to the â€Å"Y† axis to obtain the receiver output in V. At Receiver Ultrasonic echo ranging : Ultrasonic ranging systems are used to determine the distance to an object by measuring the time required for an ultrasonic wave to travel to the object and return to the source. This technique is frequently referred to as â€Å"echo ranging†. The distance to the object may be related to the time it will take for an ultrasonic pulse to propagate the distance to the object and return to the source by dividing the total distance by the speed of sound which is 344 meters/second or 13. 54 inches/millisecond. IC’s [pic] BASIC OF LM833 Low noise dual operational amplifier It is a monolithic dual operational amplifier particularly well suited for audio applications. It Offers low voltage noise (4. 5nV/vHz) and high frequency performances (15MHz Gain Bandwidth Product, 7V/? s slew rate). In addition the LM833 has also a very low distortion (0. 002%) and excellent phase/gain margins. [pic] TOP VIEW AND PIN SET [pic] Features of LM833 †¢ LOW VOLTAGE NOISE: 4. 5nV/vHz †¢ HIGH GAIN BANDWIDTH PRODUCT: †¢ 15MHz †¢ HIGH SLEW RATE: 7V/? s †¢ LOW DISTORTION: 0. 002% †¢ EXCELLENT FREQUENCY STABILITY †¢ ESD PROTECTION 2kV Basic of LM311 The LM111 series are voltage comparators that have input currents approximately a hundred times lower than devices like the mA710. They are designed to operate over a wider range of supply voltages; from standard  ±15 V op amp supplies down to a single 3 V supply. Their output is compatible with RTL, DTL, and TTL as well as MOS circuits. Further, they can drive lamps or relays, switching voltages up to 50 V at currents as high as 50mA. Both the inputs and the outputs of the LM111 series can be isolated from system ground, and the output can drive loads referred to ground, the positive supply, or the negative supply. Offset balancing and strobe capability are provided and outputs can be wire-ORed. Although slower than the mA710 (200 ns response time versus 40 ns), the devices are also much less prone to spurious oscillations. [pic] TOP VIEW AND PIN SET [pic] features FEATURES †¢ Operates from single 3 V supply (LM311B) †¢ Maximum input bias current: 150 nA (LM311: 250 nA) †¢ Maximum offset current: 20 nA (LM311: 50 nA) †¢ Differential input voltage range:  ±30 V †¢ Power consumption: 135 mW at  ±15 V †¢ High sensitivity: 200 V/mV †¢ Zero crossing detector 7805 The 7805 series of three-terminal positive regulator are available in the TO-220/D-PAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents. [pic] 1 2 3 [pic] Internal diagram [pic] Features †¢ Output Current up to 1A Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V †¢ Thermal Overload Protection †¢ Short Circuit Protection †¢ Output Transistor Safe Operating Area Protection 74HC14N HEX SCHMITT TRIGGER INVERTER Basic of 7414 Each circuit functions as an inverter, but because of the Schmitt action, it has different input threshold levels for positive (VT+) and for negative going(Vt-) signals. These circuit are temperature compensated and can be triggered from the slowest Micro controller AT89S52 Basic of AT89S52 The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry- standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset. [pic] Features of AT89S52 †¢ Compatible with MCS-51 ® Products †¢ 8K Bytes of In-System Programmable (ISP) Flash Memory – Endurance: 1000 Write/Erase Cycles †¢ 4. 0V to 5. 5V Operating Range †¢ Fully Static Operation: 0 Hz to 33 MHz †¢ Three-level Program Memory Lock †¢ 256 x 8-bit Internal RAM †¢ 32 Programmable I/O Lines †¢ Three 16-bit Timer/Counters †¢ Eight Interrupt Sources †¢ Full Duplex UART Serial Channel †¢ Low-power Idle and Power-down Modes †¢ Interrupt Recovery from Power-down Mode Watchdog Timer †¢ Dual Data Pointer †¢ Power-off Flag †¢ Fast Programming Time †¢ Flexible ISP Programming (Byte and Page Mode) Coding ; line 1 ; #include CLINE0 ; end of line 0 ; line 1 ; /* CLINE1 ; end of line 1 ; line 2 ; SFR31. H CLINE2 ; end of line 2 ; line 3 ; Copyright 1995 SPJ Systems, Pune CLINE3 ; end of line 3 ; line 4 ; CLINE4 ; end of line 4 ; line 5 ; This header file contains SFR declarations for the CPU 8031 CLINE5 ; end of line 5 ; line 6 ; Please note that you will have to include SFR31. H in your program, if you CLINE6 ; end of line 6 ; line 7 ; wish to access the SFRs from your C program. CLINE7 ; end of line 7 line 8 ; */ CLINE8 ; end of line 8 ; line 9 ; CLINE9 ; end of line 9 ; line 10 ; SFRACC0xe0 CLINE10 ACCequ0e0h ; end of line 10 ; line 11 ; SFRREG_B0xf0 CLINE11 REG_Bequ0f0h ; end of line 11 ; line 12 ; SFRPSW0xd0 CLINE12 PSWequ0d0h ; end of line 12 ; line 13 ; SFRSP0x81 CLINE13 SPequ081h ; end of line 13 ; line 14 ; SFRDPL0x82 CLINE14 DPLequ082h ; end of line 14 ; line 15 ; SFRDPH0x83 CLINE15 DPHequ083h ; end of line 15 ; line 16 ; SFRP00x80 CLINE16 P0equ080h ; end of line 16 ; line 17 ; SFRP10x90 CLINE17 P1equ090h ; end of line 17 ; line 18 ; SFRP20xa0 CLINE18 P2equ0a0h ; end of line 18 ; line 19 ; SFRP30x b0 CLINE19 P3equ0b0h end of line 19 ; line 20 ; SFRIP0xb8 CLINE20 IPequ0b8h ; end of line 20 ; line 21 ; SFRIE0xa8 CLINE21 IEequ0a8h ; end of line 21 ; line 22 ; SFRTMOD0x89 CLINE22 TMODequ089h ; end of line 22 ; line 23 ; SFRTCON0x88 CLINE23 TCONequ088h ; end of line 23 ; line 24 ; SFRTH00x8c CLINE24 TH0equ08ch ; end of line 24 ; line 25 ; SFRTL00x8a CLINE25 TL0equ08ah ; end of line 25 ; line 26 ; SFRTH10x8d CLINE26 TH1equ08dh ; end of line 26 ; line 27 ; SFRTL10x8b CLINE27 TL1equ08bh ; end of line 27 ; line 28 ; SFRSCON0x98 CLINE28 SCONequ098h ; end of line 28 ; line 29 ; SFRSBUF0x99 CLINE29 SBUFequ099h ; end of line 29 ; line 30 ; SFRPCON0x87 CLINE30 PCONequ087h ; end of line 30 ; line 31 ; CLINE31 ; end of line 31 ; line 2 CLINE0 ; end of line 0 ; line 1 ; /*float. h CLINE1 ; end of line 1 ; line 2 ; CLINE2 ; end of line 2 ; line 3 ; Copyright (c) SPJ Systems 1998 CLINE3 ; end of line 3 ; line 4 ; All Rights Reserved. CLINE4 ; end of line 4 ; line 5 ; */ CLINE5 ; end of line 5 ; line 6 ; CLINE6 ; end of line 6 ; line 7 ; #define FLT_RADIX2 CLINE7 ; end of line 7 ; line 8 ; #define FLT_DIG6 CLINE8 ; end of line 8 ; line 9 ; CLINE9 ; end of line 9 ; line 10 ; #define FLT_MANT_DIG24 CLINE10 ; end of line 10 ; line 11 ; #define FLT_MAX_EXP+128 CLINE11 ; end of line 11 ; line 12 #define FLT_MIN_EXP-125 CLINE12 ; end of line 12 ; line 13 ; CLINE13 ; end of line 13 ; line 3 CLINE0 ; end of line 0 ; line 1 ; #definestart_timer0()asmsetbtcon. 4 CLINE1 ; end of line 1 ; line 2 ; #definestop_timer0()asmclrtcon. 4 CLINE2 ; end of line 2 ; line 3 ; #definestart_timer1()asmsetbtcon. 6 CLINE3 ; end of line 3 ; line 4 ; #definestop_timer1()asmc lrtcon. 6 CLINE4 ; end of line 4 ; line 5 ; #defineex0_edge()asmsetbtcon. 0 CLINE5 ; end of line 5 ; line 6 ; #defineex0_level()asmclrtcon. 0 CLINE6 ; end of line 6 ; line 7 ; #defineex1_edge()asmsetbtcon. 2 CLINE7 ; end of line 7 ; line 8 ; #defineex1_level()asmclrtcon. 2 CLINE8 ; end of line 8 ; line 9 ; #defineenable_rx()asmsetbscon. 4 CLINE9 ; end of line 9 ; line 10 ; #definedisable_rx()asmclrscon. 4 CLINE10 ; end of line 10 ; line 11 ; #defineclr_ti()asmclrscon. 1 CLINE11 ; end of line 11 ; line 12 ; #defineclr_ri()asmclrscon. 0 CLINE12 ; end of line 12 ; line 13 ; #defineenable_ex0()asmorlie,#81h CLINE13 ; end of line 13 ; line 14 ; #defineenable_t0()asmorlie,#82h CLINE14 ; end of line 14 ; line 15 ; #defineenable_ex1()asmorlie,#84h CLINE15 ; end of line 15 ; line 16 ; #defineenable_t1()asmorlie,#88h CLINE16 ; end of line 16 ; line 17 ; #defineenable_ser()asmorlie,#90h CLINE17 ; end of line 17 line 18 ; #defineenable_t2()asmorlie,#0a0h CLINE18 ; end of line 18 ; line 19 ; #defineenable_all()asmmovie,#0bfh CLINE19 ; end of line 19 ; line 20 ; #defineenable()asmsetbie. 7 ; sets only the MSB CLINE20 ; end of line 20 ; line 21 ; #definedisable_ex0()asmanlie,#0feh CLINE21 ; end of line 21 ; line 22 ; #definedisable_t0()asmanlie,#0fdh CLINE22 ; end of line 22 ; line 23 ; #definedisable_ex1()asmanlie,#0fbh CLINE23 ; end of line 23 ; line 24 ; #definedisable_t1()asmanlie,#0f7h CLINE24 ; end of line 24 ; line 25 ; #definedisable_ser()asmanlie,#0efh CLINE25 ; end of line 25 ; line 26 ; #definedisable_t2()asmanlie,#0dfh CLINE26 end of line 26 ; line 27 ; #definedisable_all()asmmovie,#0 CLINE27 ; end of line 27 ; line 28 ; #definedisable()asmclrie. 7 ; clears only the MSB CLINE28 ; end of line 28 ; line 29 ; #defineset_hi_ex0()asmorlip,#1h CLINE29 ; end of line 29 ; line 30 ; #defineset_hi_t0()asmorlip,#2h CLINE30 ; end of line 30 ; line 31 ; #defineset_hi_ex1()asmorlip,#4h CLINE31 ; end of line 31 ; line 32 ; #defineset_hi_t1()asmorlip,#8h CLINE32 ; end of line 32 ; line 33 ; #defineset_hi_ser()asmorlip,#10h CLINE33 ; end of line 33 ; line 34 ; #defineset_hi_t2()asmorlip,#20h CLINE34 ; end of line 34 ; line 35 ; #defineset_lo_ex0()asmanlip,#0feh CLINE35 ; end of line 35 ; line 36 ; #defineset_lo_t0()asmanlip,#0fdh CLINE36 ; end of line 36 ; line 37 ; #defineset_lo_ex1()asmanlip,#0fbh CLINE37 ; end of line 37 ; line 38 ; #defineset_lo_t1()asmanlip,#0f7h CLINE38 ; end of line 38 ; line 39 ; #defineset_lo_ser()asmanlip,#0efh CLINE39 ; end of line 39 ; line 40 ; #defineset_lo_t2()asmanlip,#0dfh CLINE40 ; end of line 40 ; line 41 ; #defineset_double_baud()asmorlpcon,#80h CLINE41 ; end of line 41 ; line 42 ; #defineclr_double_baud()asmanlpcon,#7fh CLINE42 ; end of line 42 ; line 43 ; #definepowerdown()asmorlpcon,#2 CLINE43 ; end of line 43 ; line 44 ; #definego_idle()asmorlpcon,#1 CLINE44 ; end of line 44 ; line 45 ; #defineset_t0_mode(gate,c_t,mode)asmorltmod,#((gate * 8) + (c_t * 4) + mode) CLINE45 ; end of line 45 ; line 46 ; #defineset_t1_mode(gate,c_t,mode)asmorltmod,#(((gate * 8) + (c_t * 4) + mode) * 16) CLINE46 ; end of line 46 ; line 47 ; #defineset_com_mode(mode,sm2,ren)asmmovscon,#((mode * 64) + (sm2 * 32) + (ren * 16)) CLINE47 ; end of line 47 ; line 48 ; CLINE48 ; end of line 48 line 4 CLINE0 ; end of line 0 ; line 1 CLINE1 ; end of line 1 ; line 2 ; CLINE2 ; end of line 2 ; line 3 ; Copyright (c) SPJ Systems 1998 CLINE3 ; end of line 3 ; line 4 ; All Rights Reserved. CLINE4 ; end of line 4 line 5 ; */ CLINE5 ; end of line 5 ; line 6 ; CLINE6 ; end of line 6 ; line 7 ; unsigned char inportb (unsigned int portid) ; CLINE7 ; end of line 7 ; line 8 ; void outportb (unsigned int portid, unsigned int value) ; CLINE8 ; end of line 8 ; line 9 ; unsigned char peekb (unsigned int addr) ; CLINE9 ; end of line 9 ; line 10 ; void pokeb (unsigned int addr, uns igned int value) ; CLINE10 ; end of line 10 ; line 11 ; void set_tcnt (int tnum, unsigned int count) ; CLINE11 ; end of line 11 ; line 12 ; void delay (int count) ; CLINE12 ; end of line 12 ; line 13 ; void delay_ms (int count) ; CLINE13 ; end of line 13 ; line 14 unsigned char lo_nibb (unsigned char ch) ; CLINE14 ; end of line 14 ; line 15 ; unsigned char hi_nibb (unsigned char ch) ; CLINE15 ; end of line 15 ; line 16 ; int getbyte () ; CLINE16 ; end of line 16 ; line 17 ; void sendbyte (unsigned char ch) ; CLINE17 ; end of line 17 ; line 18 ; int ser_rdy () ; CLINE18 ; end of line 18 ; line 19 ; void init_ser () ; CLINE19 ; end of line 19 ; line 20 ; CLINE20 ; end of line 20 ; line 21 ; #defineINT_EXT01 CLINE21 ; end of line 21 ; line 22 ; #defineINT_TMR02 CLINE22 ; end of line 22 ; line 23 ; #defineINT_EXT13 CLINE23 ; end of line 23 ; line 24 ; #defineINT_TMR14 CLINE24 ; end of line 24 line 25 ; #defineINT_SER5 CLINE25 ; end of line 25 ; line 26 ; #defineINT_TMR26 CLINE26 ; end o f line 26 ; line 27 ; CLINE27 ; end of line 27 ; line 5 CLINE0 ; end of line 0 ; line 1 ; /*math. h CLINE1 ; end of line 1 ; line 2 ; CLINE2 ; end of line 2 ; line 3 ; Copyright (c) SPJ Systems 1998 CLINE3 ; end of line 3 ; line 4 ; All Rights Reserved. CLINE4 ; end of line 4 ; line 5 ; */ CLINE5 ; end of line 5 ; line 6 ; CLINE6 ; end of line 6 ; line 7 ; #definepye3. 14285714285714 CLINE7 ; end of line 7 ; line 8 ; #definepyex26. 28571428571429 CLINE8 ; end of line 8 ; line 9 ; #definepye_2 1. 57142857142857 CLINE9 ; end of line 9 line 10 ; #definepyex3_2 4. 71428571428571 CLINE10 ; end of line 10 ; line 11 ; #defineLOG20. 30102999566 CLINE11 ; end of line 11 ; line 12 ; #defineNLOG20. 69314718056 CLINE12 ; end of line 12 ; line 13 ; #defineCONST_M0. 43429 CLINE13 ; end of line 13 ; line 14 ; CLINE14 ; end of line 14 ; line 15 ; float sin (float x) ; CLINE15 ; end of line 15 ; line 16 ; float cos (float x) ; CLINE16 ; end of line 16 ; line 17 ; float tan (float x) ; CLINE17 ; end of line 17 ; line 18 ; float asin(float x) ; CLINE18 ; end of line 18 ; line 19 ; float acos (float x) ; CLINE19 ; end of line 19 ; line 20 ; float sinh (float x) ; CLINE20 ; end of line 20 ; line 21 ; float cosh (float x) ; CLINE21 ; end of line 21 ; line 22 ; float tanh (float x) ; CLINE22 ; end of line 22 ; line 23 ; float exp (float x_flval); CLINE23 ; end of line 23 ; line 24 ; float log (float value) ; CLINE24 ; end of line 24 ; line 25 ; float log10 (float value) ; CLINE25 ; end of line 25 ; line 26 ; float pow (float x, float y) ; CLINE26 ; end of line 26 ; line 27 ; float sqrt (float x) ; CLINE27 ; end of line 27 ; line 28 ; float ceil (float x) ; CLINE28 ; end of line 28 ; line 29 ; float floor (float x) ; CLINE29 ; end of line 29 ; line 30 ; float fabs (float x) ; CLINE30 end of line 30 ; line 31 ; float ldexp (float number, int power) ; CLINE31 ; end of line 31 ; line 32 ; float frexp (float number, int *power) ; CLINE32 ; end of line 32 ; line 33 ; float modf (float x, float *ipart) ; CLINE33 ; end of line 33 ; line 34 ; float fmod (float n1, float n2) ; CLINE34 ; end of line 34 ; line 35 ; CLINE35 ; end of line 35 ; line 6 CLINE0 ; end of line 0 ; line 1 ; /*stdlib. h CLINE1 ; end of line 1 ; line 2 ; CLINE2 ; end of line 2 ; line 3 ; Copyright (c) SPJ Systems 1998 CLINE3 ; end of line 3 ; line 4 ; All Rights Reserved. CLINE4 ; end of line 4 ; line 5 ; */ CLINE5 ; end of line 5 line 6 ; CLINE6 ; end of line 6 ; line 7 ; float atof (char *s) ; CLINE7 ; end of line 7 ; line 8 ; int atoi (char *s) ; CLINE8 ; end of line 8 ; line 9 ; long int atol (char *s) ; CLINE9 ; end of line 9 ; line 10 ; int abs (int n) ; CLINE10 ; end of line 10 ; line 11 ; long int labs (long int n) ; CLINE11 ; end of line 11 ; line 12 ; CLINE12 ; end of line 12 ; line 13 ; void int2bcd (int value, char *dest, int ndigits) ; CLINE13 ; end of line 13 ; line 14 ; void itoa_c31 (int value, char *dest, int ndigits) ; CLINE14 ; end of line 14 ; line 15 ; void ui2a_c31 (unsigned int value, char *dest, int ndigits) ; CLINE15 end of line 15 ; line 16 ; void ui2bcd (unsigned int value, char *dest, int ndigits) ; CLINE16 ; end of line 16 ; line 17 ; CLINE17 ; end of line 17 ; line 18 ; void long2bcd (long int val, char *dest, int cnt) ; CLINE18 ; end of line 18 ; line 19 ; void ltoa_c31 (long int val, char *dest, int cnt) ; CLINE19 ; end of line 19 ; line 20 ; CLINE20 ; end of line 20 ; line 7 ; #include CLINE0 ; end of line 0 ; line 1 ; /*etc. h CLINE1 ; end of line 1 ; line 2 ; CLINE2 ; end of line 2 ; line 3 ; Copyright (c) SPJ Systems 1998 CLINE3 ; end of line 3 ; line 4 ; All Rights Reserved. CLINE4 ; end of line 4 ; line 5 ; */ CLINE5 end of line 5 ; line 6 ; CLINE6 ; end of line 6 ; line 7 ; int bcd2int (char *str, int ndigits) ; CLINE7 ; end of line 7 ; line 8 ; void flot2str (float value, char *dest) ; CLINE8 ; end of line 8 ; line 9 ; CLINE9 ; end of line 9 ; line 8 ; #include CLINE0 ; end of line 0 ; line 1 ; /*string. h CLINE1 ; end of line 1 ; line 2 ; CLINE2 ; end of line 2 ; line 3 ; Copyright (c) SPJ Systems 1998 CLINE3 ; end of line 3 ; line 4 ; All Rights Reserved. CLINE4 ; end of line 4 ; line 5 ; */ CLINE5 ; end of line 5 ; line 6 ; CLINE6 ; end of line 6 ; line 7 ; char * strcpy (char *dest, char *src) ; CLINE7 ; end of line 7 ; line 8 char * strncpy (char *dest, char *src, int maxlen) ; CLINE8 ; end of line 8 ; line 9 ; char * strcat (char *dest, char *src) ; CLINE9 ; end of line 9 ; line 10 ; int strcmp (char *s1, char *s2) ; CLINE10 ; end of line 10 ; line 11 ; unsigned int strlen (char *src) ; CLINE11 ; end of line 11 ; line 12 ; char * strlwr (char *s) ; CLINE12 ; end of line 12 ; line 13 ; char * strupr (char *s) ; CLINE13 ; end of line 13 ; line 14 ; CLINE14 ; end of line 14 ; line 15 ; void * memset (void *s, int c, int n) ; CLINE15 ; end of line 15 ; line 16 ; CLINE16 ; end of line 16 ; line 9 ; CLINE9 ; end of line 9 ; line 10 ; CLINE10 end of line 10 ; line 11 CLINE11 ; end of line 11 ; line 12 CLINE12 ; end of line 12 ; line 13 CLINE13 ; end of line 13 ; line 14 CLINE14 ; end of line 14 ; line 15 ; CLINE15 ; end of line 15 ; line 16 CLINE16 ; end of line 16 ; line 17 CLI NE17 ; end of line 17 ; line 18 ; float f1,f2,s1,s2; CLINE18 ; end of line 18 ; line 19 ; CLINE19 ; end of line 19 ; line 20 ; /*************************************************** CLINE20 ; end of line 20 ; line 21 ; * Prototype(s) * CLINE21 ; end of line 21 ; line 22 ; ***************************************************/ CLINE22 ; end of line 22 line 23 ; CLINE23 ; end of line 23 ; line 24 CLINE24 ; end of line 24 ; line 25 CLINE25 ; end of line 25 ; line 26 CLINE26 ; end of line 26 ; line 27 CLINE27 ; end of line 27 ; line 28 CLINE28 ; end of line 28 ; line 29 ; void LCD_init(); CLINE29 ; end of line 29 ; line 30 ; CLINE30 ; end of line 30 ; line 31 ; /*************************************************** CLINE31 ; end of line 31 ; line 32 ; * Sources * CLINE32 ; end of line 32 ; line 33 ; ***************************************************/ CLINE33 ; end of line 33 ; line 34 CLINE34 ; line 35 ; { CLINE35 _LCD_delay: end of line 35 ; line 36 ; unsigned char n; CLINE36 ; end of line 36 ; line 37 ; unsigned char i; CLINE37 ; end of line 37 ; line 38 CLINE38 pushbp movbp,sp incsp incsp for0: movr1,bp incr1 incr1 mov@r1,#0 for_in0: mova,bp adda,#0fdh movr1,a movmyacc,@r1 movr0,#myacc movr1,bp incr1 incr1 mova,@r1 clrc subba,@r0 clra movacc. 0,c mov@r0,a mova,myacc jnzfor_ok0 ljmpfor_out0 for_ok0: ; line 39 ; { CLINE39 ; line 40 CLINE40 for1: movr1,bp incr1 mov@r1,#0 for_in1: movr1,bp incr1 movr0,#myacc mova,@r1 clrc subba,#100 clra movacc. 0,c mov@r0,a mova,myacc jnzfor_ok1 ljmpfor_out1 for_ok1: ; line 41 ; { CLINE41 ; line 42 asm nop CLINE42 nop ; line 43 ; } CLINE43 for_inc1: movr1,bp incr1 inc@r1 ljmpfor_in1 for_out1: ; line 44 ; } CLINE44 for_inc0: movr1,bp incr1 incr1 inc@r1 ljmpfor_in0 for_out0: ; end of line 44 ; line 45 ; CLINE45 ; end of line 45 ; line 46 ; } CLINE46 movsp,bp popbp ret ; end of line 46 ; line 47 ; CLINE47 ; end of line 47 ; line 48 ; CLINE48 ; end of line 48 ; line 49CLINE49 ; line 50 ; { CLINE50 _LCD_command: ; end of line 50 ; line 51 CLINE51 pushbp movbp,sp mova,bp adda,#0fdh movr1,a mov160,@r1 ; end of line 51 ; line 52 CLINE52 clr P3. 2 ; end of line 52 ; line 53 CLINE53 clr p3. 1 ; end of line 53 line 54 CLINE54 setb P3. 0 ; end of line 54 ; line 55 CLINE55 clr P3. 0 ; end of line 55 ; line 56 CLINE56 mova,#01h pushacc lcall_LCD_delay decsp ; end of line 56 ; line 57 ; } CLINE57 movsp,bp popbp ret ; end of line 57 ; line 58 ; CLINE58 ; end of line 58 ; line 59 CLINE59 ; line 60 ; { CLINE60 _LCD_putc: ; end of line 60 ; line 61 ; P2 = ascii; CLINE61 pushbp movbp,sp mova,bp adda,#0fdh movr1,a mov160,@r1 ; end of line 61 ; line 62 CLINE62 setb P3. 2 ; end of line 62 ; line 63 ; asm clr p3. 1 CLINE63 clr p3. 1 ; end of line 63 ; line 64 CLINE64 setb P3. 0 ; end of line 64 ; line 65 ; asm clr P3. 0 CLINE65 How to cite Ultrasonic Speed Measurement, Papers

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.