前言
上一节我们已经大致浏览下目前销售的超声波测距模块同时设计了自己的分析电路,这次由于我买的电子元件都到了,所以就动手实验了下!至写该笔记时已经设计出超声波接收模块和超声波发射模块,同时存在超声波发射模块功率太小的问题,下面主要做该过程的总结!
一、尝试找出一个简单的超声波接收电路:
>_<" 首先根据我现有的电子元件,最终找到一个比较适合的简单设计方法:这里用一个芯片CX20106A也就是上一节我说的这种方案简单但是不利于理解超声波接收部分的具体细节!但是为了方便设计,我还是选择了用这个芯片,下面是我做时候用的电路图。其中1uF和3.3uF是电解电容。该电路最终实现当接收到40Khz的超声波时OUTPUT角输出低电平~
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAswAAAF9CAIAAACfzakAAAAeqElEQVR4nO3dUXLbSLYEUC5tlqb1vFXM53zOEriTeR/uVlMCCRTBCyCr6jhOdLhlWErcKoApShZv9/t/AQDK3S5PAAAMSckAAA6hZAAAh1AyAIBDvCwZt1tT/yg87PyPKH8XweTPPywz1STDTw4mfxeHHfoRPZMBABxCyQAADqFkAACHUDIAgEMoGQDAIZQMAOAQSgYAcAglAwA4hJIBABxCyQAADqFkAACHUDIAgEN4gTT504PJn39YZqpJhp8cTP4uDvMCaQBAf5QMAOAQSgYAcAglAwA4hJJxnq/b7dvjW34d8OrgV29ceVfLI9vfCAAf8rhykqfd4lXJ2Dz4VaVY+Vh/ft/y1wGghMeVM6w8hL8qHOsHrD/n0VJo2gMAwD4eVM6wWTJWnktoKRnrf/p4wKsvwayHBIAdPKicYf3xu6VhrPy+8cjdT3UAwD4eVM6w75mMV085PH2HSgYAaTyonGHH92S014j1P10vGb8qjp4BQCGPKCdpefJg/UmF40rG03cCAB96+YhyG+s1WhLyL58tWC8Zr45/fMtt9V19v/G2eLfLv3Vreyaj3/mHHxYbrOWwzFSTDD85mPxdHHboR/RpKwBwCCUDADiEkgEAHELJAAAOoWQAAIdQMgCAQygZAMAhlAwA4BBKBgBwCCUDADiEkgEAHMJrl9Tl/98NYABu/vJXHeaZjDK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skAAA6hZAAAh/ACafKnB5M//7DMVJMMPzmY/F0c5gXSAID+KBkAwCGUDADgEEoGAHAIJQMAOMT/A+8S83L9kHbKAAAAAElFTkSuQmCC" alt="" width="500" />
>_<" 由于设备简陋我这里用了个51单片机的插槽用来当面包板!把上面的电子元件搭了起来(如下图上:大的电路板是这个模块,小的是51单片机最小系统)。让OUTPUT连接单片机的P1.1,单片机不断检查该引脚的电平并将数值通过串口发送给电脑。(别看说的这么简单,就从上面到当前这一步是要用很长时间的,包括选择元件、设计电路图、学习CX20106A芯片....还有一不小心把电路连错,烧掉一个芯片....说多了都是泪!)
>_<" 当把上述电路连接好启动,并把买来的超声波模块启动(用来发送超声波,因为还没有做好发送模块,就先用买来的完整的试试,反正能产生40KHz的超声波),当最终在上位机无数的11中发现0的时候,心情无比激动,然后收拾一下回寝室!(哈哈,昨天是连续7天唯一一天没通宵的,但是也回去的不早呢~决定从今天开始恢复正常生活,所以把总结提前写了)
二、焊接接收部分电路板:
>_<" 这里就直接上图:(第一幅是半成品,后面的线路还没连接~,第二幅图是连接好的成品~由于我发现手上的静电什么的会影响测量的结果,在后面又把该模块用胶带包裹了一下!)
>_<" 最终用设计好的模块代替上面看到的乱糟糟的面包板上的电路也实现了接收超声波,下面是抓到的0.即低电平信号~表示接收到超声波了~
三、接收部分设计:
>_<" 参照上一节的知识,发现发送部分就是个简单的40KHz的方波发生器+功率放大电路+发送头~出于好奇我直接不用功率放大器直接把发送头接到52单片机上,用2个引脚并利用定时器产生相同的40KHz的方波,然后把其中一路的信号经过一个与非门改装的非门将信号反转,这样2路信号送的发送头就是2被原矩形波的矩形波了~这个思路是从下面的图的思路里学来的~再下面的代码是产生2路40Khz矩形波的52单片机代码。
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXUAAADzCAIAAAD2ARHuAAANdklEQVR4nO3c3ZajOg6GYe7/ppmDzGa5A+UYS7L18z5rDrp7V0DI5iuFVM1xAoCNY3cBANIiXwBYIV8AWCFfAFghXwBY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pYNT5hfoIFlww3zC5SwbHjC/AINLBtumF+ghGUDYIV8AWCFfAFghXwBYIV8AWCFfAFghXwBYIV8AWCFfAFghXwBYIV8AWCFfAFghXwBYIV8AWCFfAFghXwBYIV8AWCFfAFghXwBYIV8AWCFfAFghXwBYIV8AWCFfAFghXwBYOV/LxVuhNUAhhgAAAAASUVORK5CYII=" alt="" />
#include<reg52.h> //包含头文件,一般情况不需要改动,头文件包含特殊功能寄存器的定义 sbit Send0=P1^; //定义端口
sbit Send1=P1^; //定义端口 /*------------------------------------------------
定时器初始化子程序
------------------------------------------------*/
void Init_Timer0(void)
{
TMOD |= 0x01; //使用模式1,16位定时器,使用"|"符号可以在使用多个定时器时不受影响
TH0=0x1f; //给定初值
TL0=0xf4;
EA=; //总中断打开
ET0=; //定时器中断打开
TR0=; //定时器开关打开
}
/*------------------------------------------------
主程序
------------------------------------------------*/
main()
{
Init_Timer0();
Send0=;
Send1=;
while();
}
/*------------------------------------------------
定时器中断子程序
------------------------------------------------*/
void Timer0_isr(void) interrupt using
{
TH0=0x1f; //重新赋值
TL0=0xf4;
Send0=~Send0;
Send1=~Send1;
}
>_<" 然后我发现上述的发射功率很小,几乎只能在距离10cm之内才能收到信号,所以就再用一个CD4011BE四路或非门改造成四路非门(我忘了买四路非门的74HC04了,于是只能用CD4011BE改造了),然后照着上面的发送电路原理图的连接方式连接好:
>_<" 虽然加上了上面的放大模块,结果效果还是不理想,也只是才能测量距离10CM左右!很郁闷呢~先贴一下当前的全部图:目前正在查找大功率发射的解决方案,先给个我查到的链接:http://wenku.baidu.com/link?url=m90yWM1cX3h8IwvJs3uD7YqiHtcACQZE0K8UPfMemj99io_7I0FOJ6xNc8ypbqlsoF1gKzvcfxBhcx7qmVbHcyLSztRZf4Suwz-9UYyv1IW接下来的就明天再说吧~今天收获不小,总算把接收模块给搞定了,给自己鼓励下!
小结:
从昨天晚上在自制的面包板上把接收部分的电路搞通,调试正确,到上午把接收部分制作成模块,再到现在尝试发送模块,时间过得真快,虽然很想再通宵一下,但是既然决定恢复正常,就忍耐下吧...明天继续研究!
相关链接:
上一节链接:http://www.cnblogs.com/zjutlitao/p/4014855.html
74HC04四非门芯片资料:http://baike.baidu.com/view/3445995.htm?fr=aladdin
值得一看的超声波模块原理:http://www.360doc.com/content/13/0907/07/12109864_312762526.shtml