1、 xx 大学学士学位论文 - I - 基于单片机的智能传感器设计 摘要 随着自动化技术的发展和 微电子技术的进步,以及现场总线技术的日益成熟,数控技术在生产过程中的应用越来越广泛,对现场信号的采集、传输和数据处理提出更高的要求。 本 论文阐述了现场信号通信的发展概况和智能变送器的现状,分析了智能变送器的作用和工作原理,针对应用中使用的不同的传感器输出不同幅值的弱直流电信号的要求,设计了智能变送器系统。它实现了弱直流电信号放大,并能根据信号的幅值大小来自动改变放大系数,提高测量灵敏度,对采样数据处理后,既能输出 4 20mA DC 标准电流信号,又能通过 RS 485 总线与其他上位机或同位机进
2、行数字通信。系统根 据传感器输出的信号范围通过编程设定由集成测量放大器 AD623 和非易失性数控电位器 X9241 组成的放大环节的增益,将弱信号放大到 0 5V DC,通过多通道 12 位串行 A/D 转换器 TLC2543 进行A/D 转换,将采集到的数据送给单片机 80C52,由单片机进行滤波、标度变换等数据处理后,通过 8 位并行 D/A 转换器 DAC0832 将数据转换成 4 20mA DC信号输出,或通过隔离后的 RS 485 总线将数据传送给上位机。系统设计有独立的看门狗电路和 EEPROM 存储器电路,提高了系统可靠性。系统软件采用MCS 51 单片机汇编 语言,模块化程序
3、设计方法,设计了仪表监控主程序、放大器增益设定程序、 ADC 转换和处理子程序、 DAC 转换等子模块,并设计了相应的通信协议。 关键词 智能变送器 ; 通信;单片机;现场总线;测量信号 xx 大学学士学位论文 - II - Intelligent sensor based on single-chip design Abstract With the development of Automation and the progress of the micro electronics technology, and the mature of Field Bus, digital contr
4、ol technology is widely used in production process, so collection, transition and treatment of signal should meet higher requirements. This thesis is about general development of field signal communication and status of intelligent transducer, analyzes function and operation principle of intelligent
5、 transducer. The transducer is designed chiefly for different weak output signal of non-standard sensors. It can amplify the weak signal, alter the amplification factor according to the size of the weak signal and improve system sensitivity. After sample data processed, it not only can output 4 20mA
6、 standard direct current, but also can communicate with other computers and single chip by mean of RS485 bus. According to the output signal range of the sensor, the system sets the gain of amplification link which is composed of AD623 and X9241 by way of program, amplifies the weak signal to DC 0 5
7、V, then makes A/D transition through, multipassages and 12bit TLC2543, brings the sampled data to single chip 89C52, filtering the data, and transferring surveyor etc ,then transits the data to 4 20mA DC signal by DAC0832,or sends the data to other computers through isolated RS485 bus. The design of
8、 the system has its own separate watchdog and EEPROM memory circuit; Therefore it can improve system reliability. Software of the system designs main program, amplifier gain setting program, ADC transition program, DAC transition program and processing subprogram by adopting assemble language of MCS51 single chip and modularization program design method, and also designs corresponding communication protocol. Keywords Intelligent; Transducer; Communication; Single-chip; Field-bus; Measuring signal