超声波srf04参考书.pdf

上传人:李医生 文档编号:5699083 上传时间:2020-07-23 格式:PDF 页数:6 大小:758.01KB
返回 下载 相关 举报
超声波srf04参考书.pdf_第1页
第1页 / 共6页
超声波srf04参考书.pdf_第2页
第2页 / 共6页
超声波srf04参考书.pdf_第3页
第3页 / 共6页
超声波srf04参考书.pdf_第4页
第4页 / 共6页
超声波srf04参考书.pdf_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《超声波srf04参考书.pdf》由会员分享,可在线阅读,更多相关《超声波srf04参考书.pdf(6页珍藏版)》请在三一文库上搜索。

1、SRF04 - Ultra-Sonic Ranger Technical Specification This project started after I looked at the Polaroid Ultrasonic Ranging module. It has a number of disadvantages for use in small robots etc. 1. The maximum range of 10.7 metre is far more than is normally required, and as a result 2. The current con

2、sumption, at 2.5 Amps during the sonic burst is truly horrendous. 3. The 150mA quiescent current is also far too high. 4. The minimum range of 26cm is useless. 1-2cm is more like it. 5. The module is quite large to fit into small systems, and 6. Its EXPENSIVE. The SRF04 was designed to be just as ea

3、sy to use as the Polaroid sonar, requiring a short trigger pulse and providing an echo pulse. Your controller only has to time the length of this pulse to find the range. The connections to the SRF04 are shown below: The SRF04 Timing diagram is shown below. You only need to supply a short 10uS pulse

4、 to the trigger input to start the ranging. The SRF04 will send out an 8 cycle burst of ultrasound at 40khz and raise its echo line high. It then listens for an echo, and as soon as it detects one it lowers the echo line again. The echo line is therefore a pulse whose width is proportional to the di

5、stance to the object. By timing the pulse it is possible to calculate the range in inches/centimeters or anything else. If nothing is detected then the SRF04 will lower its echo line anyway after about 36mS. Here is the schematic, You can download a better quality pdf (161k) version srf1.pdf The cir

6、cuit is designed to be low cost. It uses a PIC12C508 to perform the control functions and standard 40khz piezo transducers. The drive to the transmitting transducer could be simplest driven directly from the PIC. The 5v drive can give a useful range for large objects, but can be problematic detectin

7、g smaller objects. The transducer can handle 20v of drive, so I decided to get up close to this level. A MAX232 IC, usually used for RS232 communication makes and ideal driver, providing about 16v of drive. The receiver is a classic two stage op-amp circuit. The input capacitor C8 blocks some residu

8、al DC which always seems to be present. Each gain stage is set to 24 for a total gain of 576-ish. This is close the 25 maximum gain available using the LM1458. The gain bandwidth product for the LM1458 is 1Mhz. The maximum gain at 40khz is 1000000/40000 = 25. The output of the amplifier is fed into

9、an LM311 comparator. A small amount of positive feedback provides some hysterisis to give a clean stable output. The problem of getting operation down to 1-2cm is that the receiver will pick up direct coupling from the transmitter, which is right next to it. To make matters worse the piezo transduce

10、r is a mechanical object that keeps resonating some time after the drive has been removed. Up to 1mS depending on when you decide it has stopped. It is much harder to tell the difference between this direct coupled ringing and a returning echo, which is why many designs, including the Polaroid modul

11、e, simply blank out this period. Looking at the returning echo on an oscilloscope shows that it is much larger in magnitude at close quarters than the cross-coupled signal. I therefore adjust the detection threshold during this time so that only the echo is detectable. The 100n capacitor C10 is char

12、ged to about 6v during the burst. This discharges quite quickly through the 10k resistor R6 to restore sensitivity for more distant echos. A convenient negative voltage for the op-amp and comparator is generated by the MAX232. Unfortunately, this also generates quite a bit of high frequency noise. I

13、 therefore shut it down whilst listening for the echo. The 10uF capacitor C9 holds the negative rail just long enough to do this. In operation, the processor waits for an active low trigger pulse to come in. It then generates just eight cycles of 40khz. The echo line is then raised to signal the hos

14、t processor to start timing. The raising of the echo line also shuts of the MAX232. After a while no more than 10-12mS normally, the returning echo will be detected and the PIC will lower the echo line. The width of this pulse represents the flight time of the sonic burst. If no echo is detected the

15、n it will automatically time out after about 30mS (Its two times the WDT period of the PIC). Because the MAX232 is shut down during echo detection, you must wait at least 10mS between measurement cycles for the +/- 10v to recharge. Performance of this design is, I think, quite good. It will reliably

16、 measure down to 3cm and will continue detecting down to 1cm or less but after 2-3cm the pulse width doesnt get any smaller. Maximum range is a little over 3m. As and example of the sensitivity of this design, it will detect a 1inch thick plastic broom handle at 2.4m. Average current consumption is

17、reasonable at less than 50mA and typically about 30mA. Download the source code and a ready assembled hex file. Calculating the Distance The SRF04 provides an echo pulse proportional to distance. If the width of the pulse is measured in uS, then dividing by 58 will give you the distance in cm, or di

18、viding by 148 will give the distance in inches. uS/58=cm or uS/148=inches. Changing beam pattern and beam width You cant! This is a question which crops up regularly, however there is no easy way to reduce or change the beam width that Im aware of. The beam pattern of the SRF04 is conical with the w

19、idth of the beam being a function of the surface area of the transducers and is fixed. The beam pattern of the transducers used on the SRF04, taken from the manufacturers data sheet, is shown below. There is more information in the sonar faq. Update - May 2003 Since the original design of the SRF04

20、was published, there have been incremental improvements to improve performance and manufacturing reliability. The op-amp is now an LMC6032 and the comparator is an LP311. The 10uF capacitor is now 22uF and a few resistor values have been tweaked. These changes have happened over a period of time. Al

21、l SRF04s manufactured after May 2003 have new software implementing an optional timing control input using the do not connect pin. This connection is the PICs Vpp line used to program the chip after assembly. After programming its just an unused input with a pull-up resistor. When left unconnected t

22、he SRF04 behaves exactly as it always has and is described above. When the do not connect pin is connected to ground (0v), the timing is changed slightly to allow the SRF04 to work with the slower controllers such as the Picaxe. The SRF04s do not connect pin now acts as a timing control. This pin is

23、 pulled high by default and when left unconnected, the timing remains exactly as before. With the timing pin pulled low (grounded) a 300uS delay is added between the end of the trigger pulse and transmitting the sonic burst. Since the echo output is not raised until the burst is completed, there is

24、no change to the range timing, but the 300uS delay gives the Picaxe time to sort out which pin to look at and start doing so. The new code has shipped in all SRF04s since the end of April 2003. The new code is also useful when connecting the SRF04 to the slower Stamps such as the BS2. Although the S

25、RF04 works with the BS2, the echo line needs to be connected to the lower numbered input pins. This is because the Stamps take progressively longer to look at the higher numbered pins and can miss the rising edge of the echo signal. In this case you can connect the do not connect pin to ground and give it an extra 300uS to get there.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1