INP4电子实验报告PPT陈磊陈水广_第1页
INP4电子实验报告PPT陈磊陈水广_第2页
INP4电子实验报告PPT陈磊陈水广_第3页
INP4电子实验报告PPT陈磊陈水广_第4页
INP4电子实验报告PPT陈磊陈水广_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、INP4电子实验报告PPT陈磊陈磊 陈水广陈水广 2015.11.28 测量链 放大装置的电路图 首先按照电路图连接好放大装置,选择好电阻的阻值后,通过计算Vs和Vref以及Vcapt的关系,可以得出放大关系Ad=6.85。为了减小增大共模抑制比,须R2R3=R1R4,这里我们选4个电阻都为10K(精度1%).R=R=10k(精度1%) 放大装置的电路图分别在Rg在10k和1k时,得到数据,计算增益G,发现AdBP是个常数。而在实际操作中,Amc不可能为0,因为内部存在偏移电压,并且i+和i-都不为0 为此,我们比较了一下,决定选择OP07(代替TL081)然后,换了精度0.1%的电阻,发现误

2、差更小,更准确(精度越高,共模抑制比越大) 温度信号获取装置按下面电路图所示将Vcapt和Vref分别连接到上一张ppt电路图中对应的Vcapt和Vref接口。LM335和LM336是两个稳压二极管,它们的工作电压受温度影响。工作时将LM335插入待测液体中。测量范围为-23C ,+ 50C LM335:Vcapt=0.01*TR+2.73Vdif=Vcapt-Vref=0.01*TR+2.73-2.5LM336:Vref=2.5v 完整温度测量装置将上两个电路图放在一起即得到一个完整的温度测量装置(滤波部分的电路不用): VS=6.85*(0.01*T+2.73-2.5)通过示波器显示Vs即

3、可知道对应的温度T 数字温度显示 模数转换analogRead()DescriptionReads the value from the specified analog pin. The Arduino board contains a 6 channel (A0A5), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolut

4、ion between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit. 调用这个函数即可实现模数转换analogPin=0;analogPinVal = analogRead(analogPin); Vs Read the Input port A0 Calculating temperature in degrees Write the output ports Calculating the 3 numbers to display decoding the 7 segments and select

5、ion of digit 数字信号换算成温度 由电压与温度的关系式:VS=6.85*(0.01*T+2.73-2.5)和模数转换关系式:analogPinVal=Vs*1023/5得: T = (100.0 / 6.85) * (5.0 / 1023.0) * (analogPinVal) - 23.0;提取出温度的十位,个位和十分位 Read the Input port A0 Vs Calculating temperature in degrees Write the output ports Calculating the 3 numbers to display decoding t

6、he 7 segments and selection of digit BCD码/七段码逻辑功能表数字输入端(BCD码)输出端(七段码)b3b2b1b0abcdefg000001111110100010110000200101101101300111111001401000110011501011011011601101011111701111110000810001111111910011111011 Read the Input port A0 Vs Calculating temperature in degrees Write the output ports Calculating

7、 the 3 numbers to display decoding the 7 segments and selection of digit abcdefg卡诺图及其逻辑表达式10110111 11 a11111010 11 b11101111 11 c10110101 11 d201320*abbbbbb101023*bbbbbbb3210*cbbbb32102121020*dbbbbbbbbbbb Read the Input port A0 Vs Calculating temperature in degrees Write the output ports Calculating

8、 the 3 numbers to display decoding the 7 segments and selection of digit abcdefg卡诺图及其逻辑表达式10010001 10 e10001101 11 f00111101 11 g2010*ebbbb21020103*fbbbbbbbb3212110*gbbbbbbb Read the Input port A0 Vs Calculating temperature in degrees Write the output ports Calculating the 3 numbers to display decod

9、ing the 7 segments and selection of digit 十进制转化为二进制并显示 Read the Input port A0 Vs Calculating temperature in degrees Write the output ports Calculating the 3 numbers to display decoding the 7 segments and selection of digit 代码实现: ( scanTime=5 ) displayTemp(led1, 0, 1, 0, 0, 0); delay(scanTime); displ

10、ayTemp(led2, 0, 0, 1, 0, 0); delay(scanTime); displayTemp(led3, 1, 0, 0, 1, 0); delay(scanTime); displayTemp(led4, 0, 0, 0, 0, 1); delay(scanTime);动态扫描显示动态扫描显示即轮流向各位数码管送出字形码和相应的位选,利用LED发光管的余辉和人眼视觉暂留作用,使人的感觉好像各位数码管同时都在显示。程序优化温度值在百分位四舍五入,减小误差显示温度值取200组瞬时温度的平均值,使得显示的温度能稳定下来,便于读取。测量系统在重启时会全部数码管全亮3秒8.以检查数码管LED是否能正常工作。超过温度测量范围-23,50时,全部数码管以8.闪烁表明。当1,2和4(或3)数码管显示8.(或8)时,表明温度在该位上出错。温度为负值时,第1个数码管会显示-;反之则显示0。完整温度测量系统该系统能准确测量出室温和冰水混合物的温度,能达到预期的测量要求

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论