压力传感器水位检测.docx

上传人:b****6 文档编号:12382374 上传时间:2023-06-05 格式:DOCX 页数:13 大小:69.73KB
下载 相关 举报
压力传感器水位检测.docx_第1页
第1页 / 共13页
压力传感器水位检测.docx_第2页
第2页 / 共13页
压力传感器水位检测.docx_第3页
第3页 / 共13页
压力传感器水位检测.docx_第4页
第4页 / 共13页
压力传感器水位检测.docx_第5页
第5页 / 共13页
压力传感器水位检测.docx_第6页
第6页 / 共13页
压力传感器水位检测.docx_第7页
第7页 / 共13页
压力传感器水位检测.docx_第8页
第8页 / 共13页
压力传感器水位检测.docx_第9页
第9页 / 共13页
压力传感器水位检测.docx_第10页
第10页 / 共13页
压力传感器水位检测.docx_第11页
第11页 / 共13页
压力传感器水位检测.docx_第12页
第12页 / 共13页
压力传感器水位检测.docx_第13页
第13页 / 共13页
亲,该文档总共13页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

压力传感器水位检测.docx

《压力传感器水位检测.docx》由会员分享,可在线阅读,更多相关《压力传感器水位检测.docx(13页珍藏版)》请在冰点文库上搜索。

压力传感器水位检测.docx

压力传感器水位检测

压力传感器水位检测

院别:

xxxx

课程名称:

xxxx

实验名称:

液位自动检测与控制系统

实验教室:

xxx

指导教师:

xxx

实验日期:

xx年x月x日

spacingof100mm.C,linelinelinenearby.D,sparewireunifiedterminalstripTerminal(terminalstripatthetopofthevertical,horizontalterminalstripfromtheharnesstoTerminalPaiendatthebeginning),lengthtoensureasfarasTerminalandsetaside.Aftere,formawireharness,cable,line.Whenthelineshouldbeinthecorewireforbetteridentificationandmarkingonthecardswillbepreparedinadvance,alternatecorecorecontentforthecablenumbering.F,finishline,accordingtothecorrespondingterminallocations,wireonebyonefromthebunchout,pullingline,shouldbekeptparalleltoeachotherandmore.Coredarkaspossible,determinedinaccordancewithspecificconditions,itisrequiredthat:

neat,beautiful,shapely,pleasingtotheeye.7.6.2wiringtechnology,outofthecorewireaccordingtoTerminalposition,cutofftheexcess,withwirestrippingpliersorelectricianknifestrippedofinsulation,sothatconnection.Strippingshouldnotdamagethecoppercore.B,corewireontheoxideandchip-insulatedelectriciansknifescrape.C,coreprocessinghasbeencompleted,threadroundlongnosepliersinaclockwisedirection.Circlewiththescrewinthedirectionofspininthesamedirection,circleshouldbeappropriate,itisbesttoslightlylargerthanthescrews,bentroundthecircleandthelengthofrootandappropriatesosetscrewisscrewedontight.D,whenonthecrimp-typeterminalswhenwiring,threadsdonothavetobend.InsulatingpartshouldbecarefulnottopressitintoaTerminal,andmaketheloopdoesn'tmakesenseandtopreventbadheadcrimping,felldown,causinganopencircuit.Afterwiring,maybetried.E,crimpingTerminalcrimping,wireandTerminalcontactisgood,solid,notsubjecttomechanicalstrain,andensuretheinsulationlevel.F,cables,suchaswhenthereisabarecoppergroundwire,barecopperwirewithaplasticpipeshouldbeset.G,whenwiringwiringmustbeinradians.H,terminalscrews

一、设计要求

1.基本要求

本方案设计一个自动检测液体液位的检测仪器系统。

然后通过1602液晶显示器把

测得的参数显示出来。

二、实验设备与软件

计算机、KeilC51编程器、STC下载器、Altiumdesigner软件、数字万用表、陶

瓷压力传感器

三、方案分析

根据系统的设计要求,得出以下两种方案:

方案一:

红外光电传感器

红外光电传感器是由红外发射二极管和敏感三极管组成,红外发射二极管发出的红外光的波长和敏感三极管的受光波长相同或相近。

当发射管和接受管之间没有障碍物时,敏感三极管由于收到红外光信号而导通,电路输出电平为低电平;当发射管和接受管之间有障碍物挡住时,敏感三极管由于收不到红外光信号而截止,电路输出电平为高电平。

该系统中,对量筒中的液体表面的检测基本上是利用散射原理,在玻璃量筒中液体表面处的液体会发生外延现象或吸附现象而形成一个环形曲面,这个曲面正好供我们检测用。

它是由一对红外光电对管组成的,在玻璃量筒中液体表面处的液体会发生外延现象或吸附现象而形成一个环形曲面,由于散射作用,接收管接收不到发射管的红外光信号而截止,电路输出电平为高电平。

因此,可以利用其输出电平的高低来检测液面的位置,其输出信号再通过电缆输出到单片机接口电路和显示驱动电路进行处理。

为了适应本系统的特殊要求,我们将红外发射、接受管分别装在U形板的两边,两管距离大于玻璃量筒的直径。

为了减少外来自然光的干扰,在两管的发射、接受头安装有一定深度的导光孔槽,它一方面减少了外来光的干扰,另一方面可以限制光束直径,以利于提高检测分辨率。

方案二:

压力传感器

该系统中,利用不同水位是对压力传感器压力大小不同,从而有不同的电压输出,然后由仪表放大器放大一定倍数,输入比较器一端与单片机通过按键设定的电压值比较从而决定是进水还是放水。

四、方案选择

经过分析和实验要求,传统的设计方案主要靠软件实现,且操不方便,精度不高,不容易实现。

所以我们选择方案二,直接将压力传感器输出的电压与单片机的设计电压进行比较,从而决定是输入水,还是放出水。

实现水位的检查与控制。

而且方案二通过单片机输出电压控制信号,由比较器输出高低信号来控制水电泵或者电磁阀的开关,来获得实际所需的水位。

spacingof100mm.C,linelinelinenearby.D,sparewireunifiedterminalstripTerminal(terminalstripatthetopofthevertical,horizontalterminalstripfromtheharnesstoTerminalPaiendatthebeginning),lengthtoensureasfarasTerminalandsetaside.Aftere,formawireharness,cable,line.Whenthelineshouldbeinthecorewireforbetteridentificationandmarkingonthecardswillbepreparedinadvance,alternatecorecorecontentforthecablenumbering.F,finishline,accordingtothecorrespondingterminallocations,wireonebyonefromthebunchout,pullingline,shouldbekeptparalleltoeachotherandmore.Coredarkaspossible,determinedinaccordancewithspecificconditions,itisrequiredthat:

neat,beautiful,shapely,pleasingtotheeye.7.6.2wiringtechnology,outofthecorewireaccordingtoTerminalposition,cutofftheexcess,withwirestrippingpliersorelectricianknifestrippedofinsulation,sothatconnection.Strippingshouldnotdamagethecoppercore.B,corewireontheoxideandchip-insulatedelectriciansknifescrape.C,coreprocessinghasbeencompleted,threadroundlongnosepliersinaclockwisedirection.Circlewiththescrewinthedirectionofspininthesamedirection,circleshouldbeappropriate,itisbesttoslightlylargerthanthescrews,bentroundthecircleandthelengthofrootandappropriatesosetscrewisscrewedontight.D,whenonthecrimp-typeterminalswhenwiring,threadsdonothavetobend.InsulatingpartshouldbecarefulnottopressitintoaTerminal,andmaketheloopdoesn'tmakesenseandtopreventbadheadcrimping,felldown,causinganopencircuit.Afterwiring,maybetried.E,crimpingTerminalcrimping,wireandTerminalcontactisgood,solid,notsubjecttomechanicalstrain,andensuretheinsulationlevel.F,cables,suchaswhenthereisabarecoppergroundwire,barecopperwirewithaplasticpipeshouldbeset.G,whenwiringwiringmustbeinradians.H,terminalscrews

通过选择合适的DA我们可以设置不同的电压值,可以很好的提高控制精度和实现更加方便和节约成本,实现了整个设计。

五、系统具体设计方案

液位自动检测与控制系统由软、硬件共同组成。

考虑到工作速度和可靠性、题目精度要求等因素,合理地分配了硬件和软件资源,在进行设计时,充分考虑了件

和软件的特点,协调其功能。

电子负载系统的硬件部分包括以下部分:

(1)单片机的选择与I/O的分配

(2)液晶显示模块

(3)A/D转换电压电流采样模块

(4)电源电路模块

液位自动检测与控制系统的控制程序,包括以下部分:

(l)人一机联系程序。

包括液晶显示输出程序等。

(2)数据采集和处理程序。

主要A/D转换程序、电压电流采样程序。

六、系统电路设计

原理图

PCB图

spacingof100mm.C,linelinelinenearby.D,sparewireunifiedterminalstripTerminal(terminalstripatthetopofthevertical,horizontalterminalstripfromtheharnesstoTerminalPaiendatthebeginning),lengthtoensureasfarasTerminalandsetaside.Aftere,formawireharness,cable,line.Whenthelineshouldbeinthecorewireforbetteridentificationandmarkingonthecardswillbepreparedinadvance,alternatecorecorecontentforthecablenumbering.F,finishline,accordingtothecorrespondingterminallocations,wireonebyonefromthebunchout,pullingline,shouldbekeptparalleltoeachotherandmore.Coredarkaspossible,determinedinaccordancewithspecificconditions,itisrequiredthat:

neat,beautiful,shapely,pleasingtotheeye.7.6.2wiringtechnology,outofthecorewireaccordingtoTerminalposition,cutofftheexcess,withwirestrippingpliersorelectricianknifestrippedofinsulation,sothatconnection.Strippingshouldnotdamagethecoppercore.B,corewireontheoxideandchip-insulatedelectriciansknifescrape.C,coreprocessinghasbeencompleted,threadroundlongnosepliersinaclockwisedirection.Circlewiththescrewinthedirectionofspininthesamedirection,circleshouldbeappropriate,itisbesttoslightlylargerthanthescrews,bentroundthecircleandthelengthofrootandappropriatesosetscrewisscrewedontight.D,whenonthecrimp-typeterminalswhenwiring,threadsdonothavetobend.InsulatingpartshouldbecarefulnottopressitintoaTerminal,andmaketheloopdoesn'tmakesenseandtopreventbadheadcrimping,felldown,causinganopencircuit.Afterwiring,maybetried.E,crimpingTerminalcrimping,wireandTerminalcontactisgood,solid,notsubjecttomechanicalstrain,andensuretheinsulationlevel.F,cables,suchaswhenthereisabarecoppergroundwire,barecopperwirewithaplasticpipeshouldbeset.G,whenwiringwiringmustbeinradians.H,terminalscrews

实物图

七、系统软件设计电压电流采样

子程序入口开始

初始化初始化A/D转系统初始化换通通

按键扫描处理程序启动A/D转换

N

D/A转换产生基准电压

Y电压电流采样A/D转化A/D转化是否完成

液晶显示程序N检测电源是否完成,

数据处理Y

软件主程序图电压采样图汉字数据显示子程序结束软件程序:

#include

返回#include"lcd1602.h"

sfrP1ASF=0x9D;

sfrADC_CONTR=0XBC;sfrAUXR1=0xA2;

sfrADC_RESL=0xBE;spacingof100mm.C,linelinelinenearby.D,sparewireunifiedterminalstripTerminal(terminalstripatthetopofthevertical,horizontalterminalstripfromtheharnesstoTerminalPaiendatthebeginning),lengthtoensureasfarasTerminalandsetaside.Aftere,formawireharness,cable,line.Whenthelineshouldbeinthecorewireforbetteridentificationandmarkingonthecardswillbepreparedinadvance,alternatecorecorecontentforthecablenumbering.F,finishline,accordingtothecorrespondingterminallocations,wireonebyonefromthebunchout,pullingline,shouldbekeptparalleltoeachotherandmore.Coredarkaspossible,determinedinaccordancewithspecificconditions,itisrequiredthat:

neat,beautiful,shapely,pleasingtotheeye.7.6.2wiringtechnology,outofthecorewireaccordingtoTerminalposition,cutofftheexcess,withwirestrippingpliersorelectricianknifestrippedofinsulation,sothatconnection.Strippingshouldnotdamagethecoppercore.B,corewireontheoxideandchip-insulatedelectriciansknifescrape.C,coreprocessinghasbeencompleted,threadroundlongnosepliersinaclockwisedirection.Circlewiththescrewinthedirectionofspininthesamedirection,circleshouldbeappropriate,itisbesttoslightlylargerthanthescrews,bentroundthecircleandthelengthofrootandappropriatesosetscrewisscrewedontight.D,whenonthecrimp-typeterminalswhenwiring,threadsdonothavetobend.InsulatingpartshouldbecarefulnottopressitintoaTerminal,andmaketheloopdoesn'tmakesenseandtopreventbadheadcrimping,felldown,causinganopencircuit.Afterwiring,maybetried.E,crimpingTerminalcrimping,wireandTerminalcontactisgood,solid,notsubjecttomechanicalstrain,andensuretheinsulationlevel.F,cables,suchaswhenthereisabarecoppergroundwire,barecopperwirewithaplasticpipeshouldbeset.G,whenwiringwiringmustbeinradians.H,terminalscrews

unsignedcharinit_ad(void)

{

unsignedchardat;

P1ASF=0x01;//p1.0电压输入

ADC_CONTR=0xe8;

AUXR1=0x04;

dat=ADC_RESL;

returndat;

}

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

当前位置:首页 > 工程科技 > 建筑土木

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2