基于单片机的水位控制系统外文翻译
基于单片机的水位控制系统
基于单片机的水位控制系统————————————————————————————————作者:————————————————————————————————日期:1 绪论单片机应用发展迅速而广泛.在过程控制中,单片机既可作为主计算机,又可作为分布式计算机控制系统中的前端机,完成模拟量的采集和开关量的输入、处理和控制计算,然后输出控制信号。
单片机广泛用于仪器仪表中,与不同类型的传感器相结合,实现诸如电压、功率、频率、湿度、流量、速度、厚度、压力、温度等物理量的测量;在家用电器设备中,单片机已广泛用于电视机、录音机、电冰箱、电饭锅、微波炉、洗衣、高级电子玩具、家用防盗报警等各种家电设备中。
在计算机网络和通信、医用设备、工商、金融、科研、教育、国防、航空航天等领域都有着十分广泛的应用。
随着科技的发展,液位测量技术趋于智能化、微型化、可视化。
本设计思想是用单片机做下位机,PC机做上位机,单片机和PC机相结合对水箱液位进行测量和监控。
该设计要求具有一定的智能化,可操作性和稳定性好。
1.1 课题背景与研究意义在工农业生产中,常常需要测量液体液位。
随着国家工业的迅速发展,液位测量技术被广泛应用到石油、化工、医药、食品等各行各业中。
低温液体(液氧、液氮、液氩、液化天然气及液体二氧化碳等)得到广泛的应用,作为贮存低温液体的容器要保证能承受其载荷;在发电厂、炼钢厂中,保持正常的锅炉汽包水位、除氧器水位、汽轮机凝气器水位、高、低压加热器水位等,是设备安全运行的保证;在教学与科学研究中,也经常碰到需要进行液位控制的实验装置.1.2 国内外研究现状及发展液位测量的方法比较多,依据测量方式的不同可分为接触式与非接触式两种类型。
●接触式测量法接触式测量法是指测量用传感器直接与容器内存储液体相接触,从而获得测量参数的方法。
本方法所使用的电容通常由两块圆柱形极板或一个探极与罐壁构成.当液位不同时,电容器的介电常数就不同,故电容量也不同.在此基础上可以把电容量转化为电压、相移、频率、脉宽等物理量,再进行测量.电容式液位测量装置通常结构简单、灵敏度高、稳定性好、动态响应快,适合于恶劣的工作环境,生产成本也不高;但电容液位测量器需要考虑温度补偿,且介质的成分、水分、温度、密度等不确定变化因素直接影响测量结果的准确性,另外检测电路比较复杂,尤其是检测微小电容量的变化。
基于单片机液位控制器设计的外文文献
Structure and function of the MCS-51 series one-chip computerMCS-51 is a name of a piece of one-chip computer series which Intel Company produces. This company introduced 8 top-grade one-chip computers of MCS-51 series in 1980 after introducing 8 one-chip computers of MCS-48 series in 1976. It belong to a lot of kinds this line of one-chip computer the chips have,such as 8051, 8031, 8751, 80C51BH, 80C31BH,etc., their basic composition, basic performance and instruction system are all the same. 8051 daily representatives- 51 serial one-chip computersAn one-chip computer system is made up of several following parts: (1) One microprocessor of 8 (CPU). (2) At slice data memory RAM (128B/256B),it use not depositting not can reading /data that write,such as result not middle of operation, final result and data wanted to show,etc.. (3) Procedure memory ROM/EPROM (4KB/8KB ), is used to preserve the procedure , some initial data and form in slice. But does not take ROM/EPROM within some one-chip computers, such as 8031 , 8032, 80C ,etc..(4)Four 8 run side by side I/O interface P0 four P3, each mouth can use as introduction , may use as exporting too. (5) Two timer / counter, each timer / counter may set up and count in the way, used to count to the external incident, can set up into a timing way too, and can according to count or result of timing realize the control of the computer. (6) Five cut off cutting off the control system of the source . (7) One all duplexing serial I/O mouth of UART (universal asynchronous receiver/transmitter (UART) ), is it realize one-chip computer or one-chip computer and serial communication of computer to use for. (8) Stretch oscillator and clock produce circuit, quartz crystal finely tune electric capacity need outer. Allow oscillation frequency as 12 megahertzs now at most. Every the above-mentioned part was joined through the inside data bus .Among them, CPU is a core of the one-chip computer, it is the control of the computer and command centre, made up of such parts as arithmetic unit and controller ,etc.. The arithmetic unit can carry on 8 persons of arithmetic operation and unit ALU of logic operation while including one, the 1 storing device temporarilies of 8, storing device 2 temporarily, 8's accumulation device ACC, register B and procedure state register PSW,etc.. Person who accumulate ACC count by 2 input ends entered of checking etc. temporarily as one operation often, come from person who store 1 operation is it is it make operation to go on to counttemporarily , operation result and loopback ACC with another one. In addition, ACC is often regarded as the transfer station of data transmission on 8051 inside . The same as general microprocessor, it is the busiest register. Help remembering that agreeing with A expresses in the order. The controller includes the procedure counter , the order is deposited, the order decipher, the oscillator and timing circuit,etc.. The procedure counter is made up of counter of 8 for two, amounts to 16. It is a byte address counter of the procedure in fact, the content is the next IA that will carried out in PC. The content which changes it can change the direction that the procedure carries out . Shake the circuit in 8051 one-chip computers, only need outer quartz crystal and frequency to finely tune the electric capacity , its frequency range is its 12MHZ of 1.2MHZ. This pulse signal, as 8051 basic beats of working, namely the minimum unit of time. 8051 is the same as other computers, the work in harmony under the control of the basic beat , just like an orchestra according to the beat play that is commanded.There are ROM (procedure memory , can only read ) and RAM in 8051 slices (data memory, can is it can write ) two to read, they have each independent memory address space, dispose way to be the same with general memory of computer. Procedure 8051 memory and 8751 slice procedure memory capacity 4KB, address begin from 0000H, used for preserving the procedure and form constant. Data 8051- 8751 8031 of memory data memory 128B, address false 00FH, use for middle result to deposit operation, the data are stored temporarily and the data are buffered etc.. In RAM of this 128B, there is unit of 32 bytes that can be appointed as the job register, this and general microprocessor is different, 8051 slice RAM and job register rank one formation the same to arrange the location. It is not very the same that the memory of MCS-51 series one-chip computer and general computer disposes the way in addition. General computer for first address space, ROM and RAM can arrange in different space within the range of this address at will , namely the addresses of ROM and RAM, with distributing different address space in a formation. While visiting the memory, corresponding and only an address Memory unit,can ROM, it can be RAM too, and by visiting the order similarly. This kind of memory structure is called the structure of Princeton. 8051 memories are divided into procedure memory space and data memory space on the physics structure, there are four memory spaces in all: The procedure stores in one and data memory space outside data memory and one in procedure memory space and one outside one, the structureforms of this kind of procedure device and data memory separated form data memory, called Harvard structure. But use the angle from users, 8051 memory address space is divided into three kinds: ( 1) In the slice , arrange blocks of FFFFH , 0000H of location , in unison outside the slice (use 16 addresses). ( 2) The data memory address space outside one of 64KB, the address is arranged from 0000H 64KB FFFFH (with 16 addresses ) too to the location. ( 3) Data memory address space of 256B (use 8 addresses). Three above-mentioned memory space addresses overlap, for distinguishing and designing the order symbol of different data transmission in the instruction system of 8051: CPU visit slice, ROM order spend MOVC , visit block RAM order uses MOVX outside the slice, RAM order uses MOV to visit in slice. 8051 one-chip computer have four 8 walk abreast I/O port , call P0, P1, P2 and P3. Each port is 8 accurate two-way mouths, accounts for 32 pins altogether. Every one I/O line can be used as introduction and exported independently. Each port includes a latch (namely special function register ), one exports the driver and a introduction buffer . Make data can latch when outputting , data can buffer when making introduction , but four function of passway these self-same. Expand among the system of memory outside having slice, four port these may serve as accurate two-way mouth of I/O in common use. Expand among the system of memory outside having slice, P2 mouth see high 8 address off; P0 mouth is a two-way bus , send the introduction of 8 low addresses and data / export in timesharingThe circuit of 8051 one-chip computers and four I/O ports is very ingenious in design. Familiar with I/O port logical circuit, not only help to use ports correctly and rationally , and will inspire to designing the peripheral logical circuit of one-chip computer to some extent . Load ability and interface of port have certain requirement, because output grade, P0 of mouth and P1 end output, P3 of mouth grade different at structure, so, the load ability and interface of its door demand to have nothing in common with each other. P0 mouth is different from other mouths, its output grade draws the resistance supremly . When using it as the mouth in common use to use , output grade is it leak circuit to turn on , is it is it urge NMOS draw the resistance on taking to be outer with it while inputting to go out to fail. When being used as introduction , should write " 1 " to a latch first . Every one with P0 mouth can drive 8 Model LS TTL load to export. P1 mouth is an accurate two-way mouth too, used as I/O in common use . Different from P0 mouth output of circuit its, draw load resistance linkwith power on inside have. In fact, the resistance is that two effects are in charge of FET and together: One FET is in charge of load, its resistance is regular. Another one can is it lead to work with close at two state , make its President resistance value change approximate 0 or group value heavy two situation very. When it is 0 that the resistance is approximate , can draw the pin to the high level fast ; When resistance value is very large, P1 mouth, in order to hinder the introduction state high. Output as P1 mouth high electricity at ordinary times , can is it draw electric current load to offer outwards , draw the resistance on needn't answer and thenning. Here When the port is used as introduction , must write into 1 to the corresponding latch first too, make FET end . Relatively about 20,000 ohms because of the load resistance in scene and because 40,000 ohms, will not exert an influence on the data that are input . The structure of P2 some mouth is similar to P0 mouth, there are MUX switches. Is it similar to mouth partly to urge, but mouth large a conversion controls some than P1. P3 mouth one multi-functional port, mouth getting many than P1 it have " and " 3 door and 4 buffer". Two part these, make her besides accurate two-way function with P1 mouth just, can also use the second function of every pin . " and " door 3 function one switch in fact, it determines to be to output data of latch to output second signal of function. Act as W =At 1 o'clock, output Q end signal; Act as Q =At 1 o'clock, can output W line signal . At the time of programming, it is that the first function is still the second function but needn't have software that set up P3 mouth in advance . It hardware not inside is the automatic to have two function outputted when CPU carries on SFR and seeks the location (the location or the byte ) to visit to P3 mouth /at not lasting lining, there are inside hardware latch Qs =1.The operation principle of P3 mouth is similar to P1 mouth.Output grade , P3 of mouth , P1 of P1 , connect with inside have load resistance of drawing , every one of they can drive 4 Model LS TTL load to output. As while inputting the mouth, any TTL or NMOS circuit can drive P1 of 8051 one-chip computers as P3 mouth in a normal way . Because draw resistance on output grade of them have, can open a way collector too or drain-source resistance is it urge to open a way, do not need to have the resistance of drawing outerly . Mouths are all accurate two-way mouths too. When the conduct is input, must write the corresponding port latch with 1 first . As to 80C51 one-chip computer, port can only offer milliampere of output electric currents, is it output mouth go when urging oneordinary basing of transistor to regard as, should contact a resistance among the port and transistor base , in order to the electricity while restraining the high level from exporting P1~P3 Being restored to the throne is the operation of initializing of an one-chip computer. Its main function is to turn PC into 0000H initially , make the one-chip computer begin to hold the conduct procedure from unit 0000H. Except that the ones that enter the system are initialized normally,as because procedure operate it make mistakes or operate there aren't mistake, in order to extricate oneself from a predicament , need to be pressed and restored to the throne the key restarting too. It is an input end which is restored to the throne the signal in 8051 China RST pin. Restore to the throne signal high level effective , should sustain 24 shake cycle (namely 2 machine cycles ) the above its effective times. If 6 of frequency of utilization brilliant to shake, restore to the throne signal duration should exceed 4 delicate to finish restoring to the throne and operating. Produce the logic picture of circuit which is restored to the throne the signal:Restore to the throne the circuit and include two parts outside in the chip entirely. Outside that circuit produce to restore to the throne signal (RST ) hand over to Schmitt's trigger, restore to the throne circuit sample to output , Schmitt of trigger constantly in each S5P2 , machine of cycle in having one more , then just got and restored to the throne and operated the necessary signal insidly. Restore to the throne resistance of circuit generally, electric capacity parameter suitable for 6 brilliant to shake, can is it restore to the throne signal high level duration greater than 2 machine cycles to guarantee. Being restored to the throne in the circuit is simple, its function is very important. Pieces of one-chip computer system could normal running,should first check it can restore to the throne not succeeding. Checking and can pop one's head and monitor the pin with the oscillograph tentatively, push and is restored to the throne the key, the wave form that observes and has enough range is exported (instantaneous), can also through is it restore to the throne circuit group holding value carry on the experiment to change.MCS-51系列单片机的结构及功能MCS-51是Intel公司生产的一个单片机系列的名称。
单片机毕业设计—水文站的水位自动监测系统设计(论文+外文翻译+电路图+程序)
水文站的水位自动监测系统设计摘要本文是为了实现对大坝水位进行多点水位采集,然后通过远距离传输,并且有数据显示和越限报警功能,单片机作为下位机,负责大坝现场各水位点的选通和采集,作为上位机的PC机,则负责大坝水位的集中显示和管理记录,而PC机与单片机之间的通讯方式主要采用RS-485总线技术。
本文阐述了通过超声波液位传感器等对大坝水位进行自动监测系统,主要由硬件部分和软件部分组成。
硬件部分主要是传感器主要是超声波传感器,数据采集部分采用多路开关方式进行,利用超声波传感器进行模拟数据采集,为了满足生产中多通道的要求,设计了8个模拟数据采集通道。
传感器将非电量信号变为电信号,经放大器放大后送入8位串行模数转换器TLC0838,数据处理部分采用AT89S52单片机为核心控制器件,当AT89S52单片机接到控制软件发出的通道采集指令,采集的信号通过串行接口送入单片机,由显示芯片HD7279八驱动LED数码管进行现场显示,再通过RS-485通信总线上传至上位机,由上位机进行显示。
软件部分主要采用汇编语言编程进行了数据采集处理、数据显示、报警等程序的设计。
针对电磁干扰对系统的干扰,本文提出了去藕电容的配置等三点抗干扰措施,以增加系统的稳定性。
关键词:超声波传感器;AT89S52单片机;数据采集通信;上位机Design of Automatic Monitoring System of the Water Levelin Hydrological StationAbstractThe paper mainly describes the method of the ultrasonic liquid level through the dam of water level sensors for automatic monitoring system, which is consist of the hardware part and software part. In this paper, uses the host who and the monolithic integrated circuit is composed by PC machine from the type many machine networking system, the monolithic integrated circuit took the lower position machine, is responsible for the dam scene various gauging stations the selection and gathering, in the achievement position machine PC machine, then is responsible for the dam water level the centralism demonstrate and manage the record, but PC machine and between the monolithic integrated circuit communication way mainly use the RS-485 main line technology.Here uses the sensor mainly is the ultrasonic sensor, the data-acquisition works in frame of multi-channel switch. Carries on analog data gathering using the ultrasonic sensor, It designs eight analog-data acquisition system .The sensor changes the non-electronic signals into electronic signals and sends them to eight TLC0838 tandem modu1us transfers after being amplified. Data-acquisition takes AT89S52 single chip microcomputer as the key controller element, when the AT89S52 receives the channel acquisition order from the controlling software, the collected signals will be sent to the single chip microcomputer through tandem interface, and will be shown alive as the showing chips HD7279A drives the LED, and sent to the PC through RS-485 the main communication wire, also it will be shown.It designs much program like data-acquisition treatment, data-display and data-communication Etc, using complied languages. As to the interference from the electromagnetism to the system, the thesis proposes three measures to resist the interference like capacitance dispose, to steady the system.Key word: Ultrasonic sensor; Single Chip Microcomputer of AT89S52; Data-acquisition and communication System; PC目录第一章绪论 (1)1.1国内外的发展概况 (1)1.2目的和意义 (1)1.3主要内容 (2)第二章数据采集的硬件设计 (3)2.1单片机数据采集系统 (3)2.1.1基本组成 (3)2.1.2采集方式 (3)2.1.3硬件组成 (4)第三章硬件电路设计 (5)3.1水位传感器的选择 (5)3.1.1浮子式水位传感器 (5)3.1.2压力式水位传感器 (5)3.1.3气泡式水位传感器 (6)3.1.4超声波水位传感器 (6)3.2传感器检测电路 (8)3.2.1超声波发射电路 (9)3.2.2超声波接收电路 (10)3.3 A/D转换电路设计 (10)3.3.1 A/D转换器工作过程 (10)3.3.2 A/D转换单元电路设计 (11)3.4单片机最小系统 (13)3.5 LED显示电路 (14)3.6 报警电路 (16)3.7串行通信电路设计 (16)3.7.1 RS-485通信总线 (17)3.7.2串行通信电路设计 (18)3.8 电源电路设计 (19)第四章软件设计 (20)4.1数据处理程序设计 (20)4.2数据采集处理................................................................... 错误!未定义书签。
单片机外文翻译----AT89C51单片机控制的恒温水域温控系统
中文2528字AT89C51 single-chip temperature-controlled watertemperature control systemEarly contact thermometers for chemical water temperature thermostat shortcomings, this paper introduces an approach based on AT89C51 single-chip microcomputer-based controller, combined with integrated temperature sensor AD590J composed of constant temperature water temperature control system.Chemical, chemical experiments and research on water temperature requirements of high performance and accuracy, the current market face chemistry, chemical experiments and study the high price of heated water systems. In this paper, the design of single-chip component AT89C51 from the temperature control system for people with low-cost, high precision, intelligent control, etc.The water temperature of the performance indicators are: Temperature range: 0 ~ 1O0 ℃; temperature range: 0 ~ 99.9 ℃; temperature: 0.4 ℃; heating power: 1000W.Part of the hardware circuitAT89C51 selected as the system CPU, it is a low-power, high performance, 4kB flash chip programmable / erasable read-only memory 8-bit microcontroller COMS.Block diagram of the system AT89C51 single-chip by chip, IO expansion port 8255 chip, 8032 chip digital-to-analog conversion, analog-to-digital conversion chip 0809, keyboard control, status indication circuit, sampling circuit temperature thermostat control circuit, driver circuit and display circuit, such as group into.1.1 temperature sampling circuitTemperature sampling circuit using AD590 current-mode temperature-sensitive device of its stability and linearity are better. When in AD590 for the current 273.2uA, temperature increase 1℃, the current increase in 1uA. The current is converted to voltage signal by analog-to-digital converter ADC0809, AT89C51 single-chip temperature monitoring and conversion. One resistor R measurement using a low temperature coefficient of resistance, temperature coefficient of 10 x l0_6 / ℃. When monitoring the temperature of lO0 ℃when generated in the resistor voltage 18.66V about, when the temperature is 0 ℃when generated in the resistance of about 13.66V voltage, that is, at a temperature of 0 ~ 1O0 ℃in resistance on pressure drop resulting from bad to 5v. However, when the temperature is 0 ℃demodulation IC2 potential output allows for OV, the time when 1O0 ℃for IC2 output 5v, in the constant temperature water tank 3 installed AD590, which are located under the sink in the various parts, using its monitoring of temperature changes in the market tank in order to control the stirring motor to ensure uniform temperature sink.1.2 thermostat control circuitConstant temperature control circuit from heating thermostat temperature setting and the composition of the two parts of the circuit. The thermostat circuit settings temperature to provide the working conditions of the heating circuit, the circuit set by the keyboard combination of software programming to achieve common. In addition to each button and set the IO port connected to 8255, but also through a door with the AT89C51 and T0 timer connected so that when the button is depressed immediately after the interruption to the application AT89C51, 8255 inquiry, and at the same time the functions of the corresponding control . One set is the key type from the set and the AT89C51, D / A converter analog voltage measurement is the AD590, after the detection signal AT89C51, D / A converter provides analog, IC3 constitute a comparison amplifier, IC4 ratio amplifier , BG1, BG2, T constitutes a thyristor conduction angle control circuit, a single bipolar transistor oscillator circuit the lower the frequency, SCR's on-the shorter the time the smaller the heating power, on the contrary higher. Single-junction transistors and the oscillation frequency by the ratio of amplifier output voltage control, AT89C51 single-chip temperature settings through the sample and the temperature difference after the value, after amplification by comparison with the temperature change to mediate voltage thyristor the conduction angle in order to achieve the adjustment of heating power to meet the temperature requirements of the waters of the thermostat.1.3 Drive CircuitWhen the 8255 high output corresponding IO port, the drive transistor turn-on 9013, so that the relay action, in order to drive the work of the relevant circuit. Significant choice for a show so that the display to choose between the "settings" and "measurement".1.4 Keyboard control and status indication circuitWith the 8255 connected to the IO port 8 and 9 LED button to complete thecommon waters of the control thermostat and the instructions state. In addition to each button with the 8255 connected to the IO port, but also with AT89C51 it connected the timer so that when the button is depressed immediately after the interruption of AT89C51 applications, and query the status of 8255 in order to carry out the functions of the corresponding control. 1.5 shows the circuit Display circuit using a half the number of table 4 show the temperature head waters of the measurement of temperature and set temperature.2 Software designSkeleton of the software, contains initialization, configuration subroutine, subroutines to deal with temperature, showing subroutine. Completion of system initialization after power-on reset 8255 and software initialization and pre-heated water for the water to wait for work, and open the inlet solenoid valve, when the corresponding button press interrupted when AT89C51, read 8255 the status of the population to determine the function keys in order to call the corresponding subroutine. Subroutine completed one set of the set temperature function. Initialization settings for the "0o.0o", when the choice set and to identify key addition and subtraction operations for each click on the Settings button software settings for the corresponding temperature of the addition and subtraction operation count, and the value storage and display. Subroutine to deal with the role of temperature is the temperature set values and the difference to the SCR trigger circuit heating thermostat control.2.1 The use of Pro / E to establish mold standard parts library FamilyPro/E is part of the family table (or assembly, or the characteristics of) a collection of these parts (or assembly or characteristics) are broadly similar, but in 12 some small differences, for example, fastening screws Hexagon many kinds of specifications, but they seem to be like and to implement the same function, so in the Pro / E in them as a part family is a very useful table in the family the same as a table-driven components parts to be identified. In Pro / E use group table has the following advantages:1) simple and compact to create and store a large number of objects.2) For the generation of standard parts to save a great deal of time and work.3) parts from a series of documents to generate change, do not have to re-create and generate for each part.4) In the parts to create tiny changes in the relationship do not have to use to changethe model.Table feature allows three-dimensional mold standard parts library and standard library mold the development and use of things become very easy. The following guide to commonly used as an example to create a lead-chu-chu series of standard parts. First, Pro / E in the completion of the three-dimensional modeling guide column, and the need to change the size parameters defined as symbols. To mark the size of symbol table for the family members did not indicate the size of the features of a non-changing, dependent on the existence of other features.Family Table is essentially constituted by the rows and columns of the table to start, you can use the Pro / TABLE to create and modify. Here contains examples and their appropriate values, the use of specific projects were listed. Generic model is not in the group table of the project be included in each instance will be automatically generated in accordance with design intent, Family Table, regardless of the merits of another to create a new table or modify an existing table, you can add to the table project. The use of the above-mentioned methods. Enterprises can die design in accordance with the need to build their own three-dimensional mold standard parts library.2.2 The use of Pro / E to establish the standard mold base libraryIn the use of Pro / E to establish the mold standard parts library, in order to further improve the efficiency of die design, quality and standardization, it is necessary to consider the establishment of standard mold base library, the following discussion of how to use Pro / E to establish the standard mold base. The establishment of standard mold base the first thing to consider is the business of processing capacity punching equipment, punching equipment to the processing capacity as well as equipment based on the work table to consider the standard form of mold, practicality and versatility will be higher. In the three-dimensional mold standard parts library has been established under the premise of the establishment of standards mold-base much to the convenience and quick. First of all, to enter the Pro / ASSMBLY equipped) mode, with the establishment of similar communities standard parts, the specific path for the operation: ASSMBLY (components) -- Family Tab (Family Table add-item (additional items)) -- Component (component), and then choose to change to take place in the assembly of parts or components as the assembly of the project group table, and in the assembly do not need to change family (such as fasteners) you do not need to select. instances in the assembly of the assemblyaccording to the agreed relationship between the automatically generated . other aircraft such as the bending modulus, tensile modulus planes.Taking full account of this, pressing equipment and typical performance parameters under the premise of stamping parts, you can use the same solution to create a standard mold base.3 ConclusionAt present, some colleges and universities as a result of provincial funding in the strained devices, laboratory equipment, more backward, in chemistry and chemical engineering laboratories still use a contact thermometer to control water temperature. In order to overcome the factors that a lot of inconvenience to the original based on the old thermostat has been designed transformation of waters. Proved by the use of the design,to meet the current chemistry, chemical engineering and research needs of the experimental results.AT89C51单片机控制的恒温水域温控系统针对化工早期接点温度计恒温水域控温存在的缺点,本文介绍了一种基于AT89C51单片机为主控制器,结合AD590J集成温度传感器等组成的恒温水域温控系统。
基于单片机的水位控制系统外文翻译
译文:水位检测设计中国水之源总量居世界第六位,人均占有水资源量仅为世界人均占有量旳四分之一,并且在地区上分布很不平衡,长江以北旳广大地区,尤其是北方大、中都市大部分地区处在缺水状态,水资源短缺已成为制约我国经济发展旳一种重要原因。
合理旳运用水资源已成为我国目前面临旳一种重要问题。
为了到达水资源旳合理运用,除了要在兴修水利工程和提高全民节水意识等方面努力提高。
而更重要旳是应用新旳技术信息,实时精确旳理解和掌握多种水情信息,以此根据做出对旳旳水资源调度和管理,做到防患于未然,尽量减少水资源旳挥霍。
再加上长期以来水情水位测量一直是水文、水利部门旳重要课题。
为及时发现事故苗头,防患于未来,经济实用、可靠旳水位无线监测系统将会发挥巨大旳作用。
水位是水库大坝安全、水利排灌调度、蓄水、泄洪旳重要参数之一。
水位旳自动化监测、传播和处理为水库现代化建设提供了良好旳基础资料。
在工农业生产旳许多领域都需要对水位进行监控。
在现场也许无法靠近或无需人力来监控时,我们就可以通过远程监控,坐在监控室里对着有关旳仪器就能对现场进行监控,既以便又节省人力。
为了保证水利发电站旳安全生产,提高发电效率,水电站生产过程需要对水库水位、拦污栅压差和尾水位进行监测。
不过,由于不一样电站有着不一样旳实际状况,因此就有着不一样旳技术规定,并且水位参数旳测量措施和测量位置不一样,对监测设备旳规定亦有所不一样。
这样往往导致监测系统设备专用化程度高,品种多,互换性差,不利于设备维护,亦增长了设备设计、生产、安装旳复杂性。
因此,在综合研究水电站水位监测旳实际状况以及特点旳基础上,运用现代电子技术,尤其是单片机技术和不挥发存储器技术,设计开发一种通用性好,可靠性高,维护以便,可合用于多种监测环境旳多模式水位自动监测系统具有重要旳实际意义。
本课题根据水库旳水位测量需要,设计远程单片机水位监测系统,系统具有水位旳自动检测、定期处理、数据GPRS远程上传等功能。
电气工程及其自动化基于单片机的水位控制系统设计
单片机原理及系统课程设计专业:电气工程及其自动化班级:电气1002班*名:***学号:*********指导教师:***兰州交通大学自动化与电气工程学院2013年3月15日基于单片机的水位控制系统设计摘要:本设计是基于单片机的水位控制系统。
该系统由AT89C52单片机、电机开馆电路、LED 灯示警电路、水位探测电路和稳压电路等部分组成,能够实现水位检测、电机故障检测、报警和处理,实现超高、中、低水位显示,高、低警戒水位处理等功能,并在Proteus软件环境下实现仿真。
关键字:SCM;AT89C52;水位检测;水位控制Abstract: The design aim to realize water lever control what is based on the selected SCM. The system is made up of AT89C52,electric machine switching circuit, LED warning circuit, water level detection circuit and voltage stabilizing circuit.It can realize the water level detection, fault detection, alarm and hand functions, achieve high middle and low water level show, high and low warning level handle, and so on. The system is successful realization of the software simulation with Proteus. Key words: SCM, AT89C52, Water level detection, Water lever control1 引言目前,无论是城镇住宅小区还是农村家庭住宅的供水系统很多都还保留着人工操作的办法,即用完水了才知道需要抽水了,水满了没能及时发现并及时关断电源造成溢出,这很大程度上影响了人们日常的正常用水以及造成了水资源浪费。
基于单片机的水位监测报警系统毕业设计
P0口是一组8位漏极开路型双向I/O口,也即地址/数据总线复用口。作为输出口用时,每位能吸收电流的方式驱动8个TTL逻辑门电路,对端口P0写“1”时,可作为高阻抗输入端用。在访问外部数据存储器或程序存储器时,这组口线分时转换地址(低8位)和数据总线复用,在访问期间激活内部上拉电阻。在Flash编程时,P0口接收指令字节,而在程序校验时,输出指令字节,校验时,要求外接上拉电阻。
P1口:
P1口是一个带内部上拉电阻的8位双向I/O口,P1的输出缓冲级可驱动(吸收或输出电流)4个TTL逻辑门电路。对端口写“1”,通过内部的上拉电阻把端口拉到高电平,此时可作输入口。作输口使用时,因为内部存在上拉电阻,某个引脚被外部信号拉低时会输出一个电流(IIL)。与AT89C51不同之处是,P1.0和P1.1还可分别作为定时/计数器2的外部计数输入(P1.0/T2)和输入(P1.1/T2EX)
2.2.2
AT89系列单片机在我国得到了极其广泛的应用。由于AT89C52具有强大的功能,可以使我的设计更方便也更人性化。而且它很好的兼容MCS-51系列单片机的指令系统和引脚功能。它片内还含有Flash Memory,Flash Memory是一种电擦除和电写入的闪速存储器(记为FPEROM),在系统开发过程中可以很容易地进行程序修改,使开发和调试更为简单。
然而,高塔水位控制系统是我国住宅小区广泛应用的供水系统,随着生活质量的不断提高,许多农村甚至城市兴建的许多的房子现在都要实现自来水供水,所以现在很多家庭的楼顶都砌了高塔用来存储用水,然后对整个房子的用水进行共给。
目前大多数的住宅小区都是采用人工加水的办法,即当水用完的时候,就人工开启水泵进行加水,十分不方便。以至于水用完之前不知道水已经很少了,等到用完了才知道没水了,如果是急需用水的情况下,那就十分麻烦,要等到加水之后才有水用;加水过程当中,还需要人时时刻刻检查水位情况,以防止水位超过最高的水位;这以上一系列的问题,都在期待一种简单、经济的高塔水位控制系统的诞生。
(完整word版)基于单片机的水位控制系统设计
基于单片机的水位控制系统设计摘要随着微电子工业的迅速发展,单片机控制的智能型控制器广泛应用于电子产品中,为了使学生对单片机控制的智能型控制器有较深的了解。
经过综合分析选择了由单片机控制的智能型液位控制器作为研究项目,通过训练充分激发学生分析问题、解决问题和综合应用所学知识的潜能。
设计一种基于单片机水塔水位检测控制系统。
该系统能实现水位检测、电机故障检测、处理和报警等功能,实现超高、低警戒水位报警,超高警戒水位处理。
介绍电路接口原理图,给出相应的软件设计流程图和汇编程序,并用Proteus软件仿真。
关键字:电子;水位控制;单片机;ProteusAbstractWith the rapid development of microelectronics industry, intelligent MCU is widely used in electronic products, in order to enable students to have a deeper understanding of the intelligent controller controlled by single chip microcomputer. After a comprehensive analysis of selected by the intelligent liquid level controller MCU control as the research project, through training to fully stimulate students to analyze problems, to solve problems and the comprehensive application of knowledge potential. Based on the design of a single-chip microcomputer control system of water tower water level detection. This system can realize the water level detection, motor fault detection, processing and alarm functions, and realize the high, low water level warning alarm, high warning level processing. The interface circuit schematic diagram, the corresponding software design flow chart and assembler, and simulation with Proteus software.Keywords:electronic; water level control; MCU; Proteus1引言水塔供水的主要问题是塔内水位应始终保持在一定范围,避免“空塔”、“溢塔”现象发生。
基于单片机的水位控制系统
摘要:本设计是利用STC89C52单片机设计一种水位控制系统.主要是基于单片机的硬件设计以及程序设计.该系统实现了水位监测,水位控制,水位显示,故障报警功能.在设计中主要采用了传感技术、单片机技术、弱电控制强电技术、C语言编程等技术.本文还讲述了水位控制系统工作的基本原理,介绍了电路接口原理图,给出了相应了设计流程图和C语言程序.本文主要是为了更多得了解单片机,掌握单片机的组成部分和控制原理,最终达到设计出“单片机水位控制系统的”的目的.实验证明,单片机控制的水位控制系统的硬件电路简单,软件功能完善,控制系统可靠,充分发挥了单片机的性能,可以大大的提高单片机的开发效率.关键词:单片机,水位,控制,ABSTRACTThis design is STC89C52 SCM design using a water level control system. Mainly based on single chip microcomputer hardware design and programming. This system realizes the water level, water level control, monitoring the alarming function, according to water. In design mainly adopts sensing technology and single-chip microcomputer technology, low &high technology, control technology such as the C programminglanguage. This paper also tells the water level control system, this paper introduces the basic principle of schematic interface circuit and presents the corresponding the design flow chart and C language program.This paper is mainly to more understanding of single chip microcontroller, grasps achieve finally designed "one-chip computer water level control system" purposes. Experiments show that single chip microcomputer control water level control system hardware circuit is simple, software function consummation, the control system is reliable, give full play to the performance of the single-chip microcontroller, can greatly improve the efficiency of the development.Keywords:SCM Level Control1.绪论 (3)2. STC89C52单片机介绍 (5)2.1 STC89C52介绍 (5)3 硬件的设计 (11)3.1水位传感方式的选择 (11)3.1.1简单的控制方式 (11)3.1.2红外线发射接收装置 (11)3.2.1系统工作原理 (13)3.2.2稳压电路 (15)3.2.4电机控制电路 (17)3.2.5电机工作指示灯电路 (18)3.2.6振荡电路和复位电路 (19)3.2.6水位控制系统的整体电路仿真图 (20)3.2.7实物图 (21)4. 软件程序设计以及仿真 (22)4.1 程序流程图 (22)4.1.1加水时程序流程图: (22)4.1.2水位降低时程序流程图: (23)4.2水位对应的传感器信号 (24)4.3水位对应的亮灯情况 (25)4.4 C语言程序设计 (26)5.结论 (36)参考文献 (37)答谢 (38)1.绪论当今社会,科技以迅雷不及掩耳之势的速度发展着,人民生活水平也在不断的提高.自动水位控制将给人们生活带来巨大的方便.由于单片机有极高的可靠性,微型性和智能性,单片机已经广泛应用于我们生活和学习中,我们可以在许多领域见到单片机的身影,,小到玩具家电行业,大到车载、舰船电子系统,遍及计量测试、工业过程控制、机械电子、办公自动化、工业机器人、军事和航空航天等领域都可以见到单片机的身影.单片机是一种集成电路芯片,是采用超大规模集成电路技术把具有数据处理能力的中央处理器CPU随即存储器RAM,只读存储器ROM、多种I/O口和中断系统、定时器、计时器等功能(可能还包括显示驱动电路、脉宽调制电路、模拟多路转换器、A/D转换器等电路)集成到一块硅片上构成的一个小而完善的计算机系统.中央处理器CPU是单片微型计算机指挥、执行中心,由它读程序并执行指令.CPU功能,是以不同方式来执行各种指令.有的指令涉及到各个寄存器之间的关系;有的指令涉及到单片机核心电路内部各功能部件的关系;有的则与外部器件发生关系.总的来说CPU是通过复杂的时序电路来完成不同的指令功能的.对于本设计单片机结构简单实用性强,功能齐全,技术先进,使实现这设计不难实现.同时,C语言是单片机的重要“组成”,如果能掌握好C语言编程,这将很大程度上提高了开发效率.在设计过程中我们采用了软硬件双结合的方式,软件设计的方法简化了硬件的要求,为设计创造了条件.单片机采用的STC89C52的单片机.2. STC89C52单片机介绍2.1 STC89C52介绍STC89C52是51单片机,它采用的是DIP40封装. 主要特性有:与MCS-51 兼容8K字节可编程闪烁存储器寿命:1000写/擦循环数据保留时间:10年全静态工作:0Hz-24Hz三级程序存储器锁定512内部RAM32可编程I/O线两个16位定时器/计数器5个中断源可编程串行通道低功耗的闲置和掉电模式片内振荡器和时钟电路单片机管脚图说明图如下:图1.1单片机引脚图管脚说明:VCC:供电电压.GND:接地.P0口:P0口为一个8位漏级开路双向I/O口,每脚可吸收8TTL 门电流.当P1口的管脚第一次写1时,被定义为高阻输入.P0能够用于外部程序数据存储器,它可以被定义为数据/地址的第八位.在FIASH编程时,P0 口作为原码输入口,当FIASH进行校验时,P0输出原码,此时P0外部必须被拉高.P1口:P1口是一个内部提供上拉电阻的8位双向I/O口,P1口缓冲器能接收输出4TTL门电流.P1口管脚写入1后,被内部上拉为高,可用作输入,P1口被外部下拉为低电平时,将输出电流,这是由于内部上拉的缘故.在FLASH编程和校验时,P1口作为第八位地址接收.P2口:P2口为一个内部上拉电阻的8位双向I/O口,P2口缓冲器可接收,输出4个TTL门电流,当P2口被写“1”时,其管脚被内部上拉电阻拉高,且作为输入.并因此作为输入时,P2口的管脚被外部拉低,将输出电流.这是由于内部上拉的缘故.P2口当用于外部程序存储器或16位地址外部数据存储器进行存取时,P2口输出地址的高八位.在给出地址“1”时,它利用内部上拉优势,当对外部八位地址数据存储器进行读写时,P2口输出其特殊功能寄存器的内容.P2口在FLASH编程和校验时接收高八位地址信号和控制信号.4个TTL门电流.当P3口写入“1”后,它们被内部上拉为高电平,并用作输入.作为输入,由于外部下拉为低电平,P3口将输出电流(ILL)这是由于上拉的缘故.P3口也可作为单片机的一些特殊功能口,如下表所示:口管脚备选功能P3.0 RXD(串行输入口)P3.1 TXD(串行输出口)P3.2 /INT0(外部中断0)P3.3 /INT1(外部中断1)P3.4 T0(记时器0外部输入)P3.5 T1(记时器1外部输入)P3.6 /WR(外部数据存储器写选通)P3.7 /RD(外部数据存储器读选通)P3口同时为闪烁编程和编程校验接收一些控制信号.RST:复位输入.当振荡器复位器件时,要保持RST脚两个机器周期的高电平时间.ALE/PROG:当访问外部存储器时,地址锁存允许的输出电平用于锁存地址的地位字节.在FLASH编程期间,此引脚用于输入编程脉冲.在平时,ALE端以不变的频率周期输出正脉冲信号,此频率为振荡器频率的1/6.因此它可用作对外部输出的脉冲或用于定时目的.然而要注意的是:每当用作外部数据存储器时,将跳过一个ALE脉冲.如想禁止ALE的输出可在SFR8EH地址上置0.此时,ALE只有在执行MOVX,MOVC指令是ALE才起作用.另外,该引脚被略微拉高.如果微处理器在外部执行状态ALE禁止,置位无效./PSEN:外部程序存储器的选通信号.在由外部程序存储器取指期间,每个机器周期两次/PSEN有效.但在访问外部数据存储器时,这两次有效的/PSEN信号将不出现./EA/VPP:当/EA保持低电平时,则在此期间外部程序存储器(0000H-FFFFH),不管是否有内部程序存储器.注意加密方式1时,/EA将内部锁定为RESET;当/EA端保持高电平时,此间内部程序存储器.在FLASH编程期间,此引脚也用于施加12V编程电源(VPP). XTAL1:反向振荡放大器的输入及内部时钟工作电路的输入.XTAL2:来自反向振荡器的输出.振荡器特性:XTAL1和XTAL2分别为反向放大器的输入和输出.该反向放大器可以配置为片内振荡器.石晶振荡和陶瓷振荡均可采用.如采用外部时钟源驱动器件,XTAL2应不接.有余输入至内部时钟信号要通过一个二分频触发器,因此对外部时钟信号的脉宽无任何要求,但必须保证脉冲的高低电平要求的宽度.STC89C52是一种8K字节闪烁可编程可擦除只读存储器的低电压,高性能COMOS8的单片机.该器件采用ATMEL搞密度非易失存储器制造技术制造,与工业标准的MCS-51指令集和输出管脚相兼容.它的工作电压3V/5V,操作频率0~33MHZ.4个8位I/O口,含3个高电流P1口,可直接驱动LED;3个16位定时器/计数器;可编程看门狗定时器(WDT);低EMI方式; 兼容TTL和COMS逻辑电平;掉电检测和低功率模式等.STC89C52内部有一个用于构成振荡器的高增益反相放大器,引脚RXD和TXD分别是此放大器的输入端和输出端.时钟可以由内部方式产生或外部方式产生.内部方式的时钟电路如图1.1所示,在RXD 和TXD引脚上外接定时元件,内部振荡器就产生自激振荡.外部方式的时钟电路如图1.2所示,RXD接地,TXD接外部振荡器.对外部振荡信号无特殊要求,只要保证脉冲宽度.XTAL1XTAL2图2.1内部方式时钟电路图2.2外部方式时钟电路STC89C52单片机包含中央处理器、程序存储器(ROM )、数据存储器(RAM )、定时/计数器、并行接口、串行接口和中断系统等极大单元数据总线、地址总线和控制总线等三大总线.STC89系列单片机是MCS-51系列单片机的派生产品.他们的指令系统、硬件结构和片内资源上与标准8051单片机完全兼容,而且价格更实惠.其优点是可以在线下载,下载器也比较容易购买到,方便携带应用.STC89C52可以用于控制水位,在功能和性能上要比AT 系列单片机突出,因此,选择STC89C 系列单片机,作为水位控制器核心. XTAL1 XTAL2外部振荡器3 硬件的设计3.1水位传感方式的选择3.1.1简单的控制方式简单的控制方式有浮标式、电极式等,这些控制方式的优点是结构简单,成本低廉.但有很多问题存在,比如是精度不高,不能进行数值显示,另外很容易引起误查,且只能单独控制,与计算机进行通信连接比较难实现,很难快速准确传输信号,所以不利于水位信号的传送.3.1.2红外线发射接收装置因为光在水中的传播与空气中的光的传播是由不同的差异的,即光在不同的介质中其强弱度不同.可以根据此原理采集水中是否有水.脉冲调制式红外发射接收器工作原理:接收管与发射管放在水塔对立的两侧并且在一条直线上,在空气中接收管完全接收到发光管发送过来的信号,当发射接收两管之间有水时,水对于光有反射和折射特性减弱了光信号,使接收管在有水位时接受的信号时弱信号.由此可以判断出是否有水.但是,问题在于电路调试比较困难,难以实现,而且准确度不够.3.1.3水阻传感方式任何物质在电学里都有一定的阻值,实验证明,纯净水几乎不导电的,但人们日常使用的水都会含有一定的Mg+、Ca+等离子,他们的存在使水可以具有导电的性能,水的阻值大约为10K Ω左右.本控制装置就是利用水的导电性完成的.传感器结构图3.1:+5v蓄水位探针低水位探针中水位探针高水位探针电压输入探针P1.0P1.2P1.1P1.3图3.1传感器结构图高电平通过电压输入探针输入,水位在不同的水位的时候接通相应的水位探针将高电平穿送给稳压电路,通过稳压电路转置为低电平再输送给单片机,促使单片机控制电机电路和水位显示电路工作、停止.此水位探测传感方法比脉冲调制式红外发射接收器结构简单,方便.此电路的灵敏度可以达到本设计的要求,能够准确地分辨出水位信号.有此可知,这种设计方案方便实用,元件选用方便,费用低.此方案解决了第一种方案中调试繁琐,信号干扰的问题,信号传输的准确率高达95%以上.本设计选择第三种方案,作为水位传感器.3.2系统的组成水位控制系统由电源电路、水位探测传感电路、稳压电路、继电器控制电机加水电路、水位显示电路、单片机STC89C52组成.系统组成的方框图如下:3.2.1系统工作原理当水箱里的水位在蓄水位以下的时候电机开始工作.当水箱里水在蓄水位的时候,蓄水位、低水位、中水位、高水位四个传感器都没有和+5V电源导通.传感器传给稳压电路一个低电平,低电平通过稳压电路里的NPN三极管、电容、电阻转换成高电平.单片机收到高电平,表示水箱里没有水了需要系统开始运作,给水箱加水,这时单片机通知水泵开始加水,红灯亮.当达到低水位的时候,蓄水位传感器传送给单片机一个低电平,水泵继续工作,亮一黄灯.水位继续上升,当达到中水位时,蓄水位、低水位传感器传送给单片机低电平,水泵继续工作,亮一个绿灯亮.水位继续上升达到高水位时,蓄水位、低水位、中水位、高水位传感器同时传送给单片机一个低电平,两个绿灯亮.同理,水位从高水位开始下降,水位离开高水位线时,高水位传感器探头与电源断开,传感器输出高电平给单片机,绿灯熄灭一个,表示水位下降到中水位了.当水位下降到低水时,一黄灯亮,表示水位下降到低水位了.当水位下降到蓄水位时,红灯亮、黄灯熄灭,电机开始工作.3.2.2稳压电路图3.3稳压电路图本电路的主要作用是使从传感器输入的电平能够稳定的输入到单片机中,,是由三极管9013、两个电阻、和一个无极性电容组成.如果我们不使用此稳压电路也能实现我们的设计目的,但有时会产生水位误判和不稳定现象,所以我认为此电路是不可缺少的.3.2.3水位显示电路图3.4水位显示电路图本电路采用不不同颜色的LED作为显示装置,有单片机P2.0、P2.1、P2.3、P2.4、P2.7口控制进行水位显示.亮红灯代表水位在蓄水位以下.亮两黄灯代表水位在低水位以下,蓄水位以上.亮一黄灯表示在中水位以下,低水位以上.亮绿灯表示在高水位以下,中水位以上.亮两绿灯表示在高水位以上.此电路采用的是共阳极的,所以只有单片机给发光二极管为低电平的时候才能是发光二极管点亮.R2,R3,R4,R10,R11为上拉电阻起限压控流作用.LED(Light Emitting Diode),发光二极管,是一种固态的半导体器件,它可以直接把电转化为光.LED的心脏是一个半导体的晶片,晶片的一端附着LED灯株在一个支架上,一端是负极,另一端连接电源的正极,使整个晶片被环氧树脂封装起来.半导体晶片由两部分组成,一部分是P型半导体,在它里面空穴占主导地位,另一端是N型半导体,在这边主要是电子.但这两种半导体连接起来的时候,它们之间就形成一个“P-N结”.当电流通过导线作用于这个晶片的时候,电子就会被推向P区,在P区里电子跟空穴复合,然后就会以光子的形式发出能量,这就是LED发光的原理.而光的波长决定光的颜色,是由形成P-N结材料决定的.3.2.4电机控制电路图3.5电机控制电路图电机控制电路,由于实际电机额定电压比较高,而单片机的输出电压又比较低,不能直接驱动电机工作,所以采用了三级管放大和二极管正向导电的作用和电磁式继电器的吸合作用来控制电机(弱电控制强电).由单片机的P1.6口来控制的.电磁式继电器一般由铁芯、线圈、衔铁、触点簧片等组成的.只要在线圈两端加上一定的电压,线圈中就会流过一定的电流,从而产生电磁效应,衔铁就会在电磁力吸引的作用下克服返回弹簧的拉力吸向铁芯,从而带动衔铁的动触点与静触点(常开触点)吸合.当线圈断电后,电磁的吸力也随之消失,衔铁就会在弹簧的反作用力返回原来的位置,使动触点与原来的静触点(常闭触点)释放.这样吸合、释放,从而达到了在电路中的导通、切断的目的.3.2.5电机工作指示灯电路图3.6电机工作指示灯图本电路采用红色LED灯作为电机工作指示灯接在单片机P3.7口上,当电机开始工作的时候,指示灯就亮直到电机停止工作.3.2.6振荡电路和复位电路图3.7振荡电路和复位电路图振荡电路和复位电路是单片机不可缺少的部分,是单片机的重要组成,它们集成在单片机里,对于单片机稳定工作有至关重要的作用. 并且可以延长它的使用寿命.3.2.6水位控制系统的整体电路仿真图图3.8水位控制系统仿真图3.2.7实物图图3.9实物图4. 软件程序设计以及仿真4.1 程序流程图4.1.1加水时程序流程图:4.1.2水位降低时程序流程图:4.2水位对应的传感器信号表14.3水位对应的亮灯情况表24.4 C语言程序设计C语言程序如下:#include <reg52.h>#define uchar unsigned char #define uintunsiged intsbit xsw=P1^0;sbit dsw=P1^1;sbit zsw=P1^2;sbit gsw=P1^3;sbit LED_G1=P2^0;sbit LED_G2=P2^1;sbit LED_Y=P2^3;sbit LED_R1=P2^7;sbit LED_R2=P3^7;sbit DJ=P1^6;void main(void){char i=0;P1=0Xf1;DJ=0;while(1){while(DJ==0){if(xsw==0&&dsw==1&&zsw==1&&gsw==1) { LED_R1=0;LED_R2=0;DJ=0;}if(xsw==0&&dsw==0&&zsw==1&&gsw==1) {{LED_R1=1;LED_Y=0;LED_R2=0;DJ=0;}}if(xsw==0&&dsw==0&&zsw==0&&gsw==1) {{LED_Y=1;LED_R2=0;DJ=0;}}if(xsw==0&&dsw==0&&zsw==0&&gsw==0){LED_R2=1;LED_G1=0;LED_G2=0;DJ=1;break;}}while(DJ==1){if(xsw==1&&dsw==1&&zsw==1&&gsw==1) {LED_R1=1;LED_R2=0;break;}if(xsw==0&&dsw==1&&zsw==1&&gsw==1) {LED_R1=0;LED_R2=0;DJ=0;LED_Y=1;}if(xsw==0&&dsw==0&&zsw==1&&gsw==1) {{LED_G1=1;LED_R2=1;LED_R1=1;LED_Y=0;}}if(xsw==0&&dsw==0&&zsw==0&&gsw==1){{LED_G2=1;LED_R2=1;LED_Y=1;LED_G1=0;}}if(xsw==0&&dsw==0&&zsw==0&&gsw==0) {LED_R2=1;LED_G1=0;LED_G2=0;}}}}4.5 各种水位情况下的仿真图加水水到达在蓄水位时:电机运转,电机指示灯红灯亮,低水位警示灯红灯亮.仿真图如下所示:图4.1蓄水位仿真图加水水到达低水位时:电机运转,电机指示灯红灯亮,中水位警示灯黄灯亮.仿真图如下所示:图4.2水位上升时低水位仿真图加水水到达中水位时:电机运转,电机指示灯红灯亮,中水位警示灯绿灯亮.仿真图如下所示:图4.3水位上升时中水位仿真图加水水到达高水位时:电机停止,电机指示灯红灯灭,高水位警示灯两个绿灯都亮.仿真图如下所示:图4.4高水位仿真图水位减少到中水位时:中水位警示灯绿灯亮.仿真图如下所示:图4.5水位减少时中水位仿真图水位减少到低水位时:低水位警示灯黄灯亮.仿真图如下所示:图4.6水位减少时低水位仿真图5.结论经过这段边写论文边学习的时间后,我感触颇多,其中充满了酸楚和幸福.我初步把自己学到的东西用于了实践之中,也在实践中学到了很多东西.首先,我加深了自己的理论知识,使理论知识更好的用于实践之中,是理论与实践更好的结合.其次,锻炼了自己的动手能力,为自己以后的工作打下了一个基础,所以我们应该明白任何知识都源于实践,出自于实践,实践是检验真理的唯一标准.此设计中还存在许多不足之处,自己的理论知识也不够全面和扎实,不懂许多元件的使用方法,C语言还不能学以致用.通过此次毕业论文的设计我一定要加强自己的学习,不断的温故知新,不断的完善自己.参考文献(1)刘得营张志霞等《单片机原理及接口技术》中国水利水电出版社 2006.3-4(2)张肃文《高频电子线路》高等教育出版社(3)邱关源《电路》高等教育出版社(4)阎石《数字电子技术基础》高等教育出版社(5)童诗白华成英《模拟电子技术基础》高等教育出版社(6)刘刚《单片机原理及应用》中国林业出版社(7)杨路明《C语言程序设计教程》北京邮电大学出版社(8)许文《protues教程》北京大学出版社(9)刘成辉《单片机在水位控制系统中的应用》人民交通出版社(10)姚艳楠等主编《微型计算机原理》西安电子科技大学出版社答谢此毕业设计是在王书志老师精心指导、严格要求以及同学们的帮助下完成的.在此对王书志老师表示感谢,也对给予我论文提供帮助的同学表示感谢.光阴似箭,日月如梭,四年的大学时间在我们的人生中式那么短暂,但是就在这短暂的四年时间里我学会了很多,我学会了为人处世,自学能力得到了很大的提高.我还得感谢我的班主任李向群老师以及指导过我的许许多多的老师们,正是它们的辛勤工作和付出使我能完成我的大学学业.我真心的希望我的大学生涯画上一个圆满的句号,我的人生也能画上一个圆满的逗号.。
基于单片机的外文翻译、中英文翻译
英文原文DescriptionThe at89s52 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash Programmable and Erasable Read Only Memory (PEROM) and 128 bytes RAM. The device is manufactured using Atmel’s high density nonvolatile memory technology and is compatible with the industry standard MCS-51™ instruction set and pinout. The chip combines a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel at89s52 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications.Features:• Compatible with MCS-51™ Products• 4K Bytes of In-System Reprogrammable Flash Memory• Endurance: 1,000 Write/Erase Cycles• Fully Static Operation: 0 Hz to 24 MHz• Three-Level Program Memory Lock• 128 x 8-Bit Internal RAM• 32 Programmable I/O Lines• Two 16-Bit Timer/Counters• Six Interrupt Sources• Programmable Serial Channel• Low Power Idle and Power Down ModesThe at89s52 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition, the at89s52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power Down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset. Pin Description:VCC Supply voltage.GND Ground.Port 0Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink eight TTL inputs. When is are written to port 0 pins, the pins can be used as high impedance inputs.Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes during Flash programming, and outputs theduring accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming.In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory.If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.PSENProgram Store Enable is the read strobe to external program memory.When the at89s52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.EA/VPPExternal Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.EA should be strapped to VCC for internal program executions.This pin also receives the 12-volt programming enable voltage(VPP) during Flash programming, for parts that require 12-volt VPP.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through adivide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.Idle ModeIn idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset.It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access toport pin or to external memory.RDY/BSY output signal. P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is pulled high again when programming is done to indicate READY.Program Verify: If lock bits LB1 and LB2 have not been programmed, the programmed code data can be read back via the address and data lines for verification. The lock bits cannot be verified directly. Verification of the lock bits is achieved by observing that their features are enabled.Chip Erase: T he entire Flash Programmable and Erasable Read Only Memory array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all “1”s. The chip erase operation must be executed before the code memory can be re-programmed.Reading the Signature Bytes: The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H, and 032H, except thatP3.6 and P3.7 must be pulled to a logic low. The values returned are as follows.(030H) = 1EH indicates manufactured by Atmel(031H) = 51H indicates 89C51(032H) = FFH indicates 12V programming(032H) = 05H indicates 5V programmingProgramming InterfaceEvery code byte in the Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operation cycle is selftimed and once initiated, will automatically time itself to completion.中文翻译描述at89s52是美国ATMEL公司生产的低电压,高性能CMOS8位单片机,片内含4Kbytes的快速可擦写的只读程序存储器(PEROM)和128 bytes 的随机存取数据存储器(RAM),器件采用ATMEL公司的高密度、非易失性存储技术生产,兼容标准MCS-51产品指令系统,片内置通用8位中央处理器(CPU)和flish存储单元,功能强大at89s52单片机可为您提供许多高性价比的应用场合,可灵活应用于各种控制领域。
基于单片机的浴缸水位水温控制系统开题报告、综述、外文翻译
本科毕业设计(论文)选题审批表湖州师范学院毕业设计(论文)任务书指导教师(签名)**学生(签名)**开始执行任务日期2012年6月30毕业设计(论文)——外文翻译(原文)AN EMBEDDED SINGLE CHIPTEMPERATURECONTROLLER DESIGNJ. Jayapandian and Usha Rani RaviDesign Development & Services Section, Materials Science DivisionIndira Gandhi Centre for Atomic Research, Kalpa Kama – 603 102. Tamil Nadu. IndiaABSTRACTThis paper describes a single chip embedded temperature controller design programmed in a single Programmable System on Chip (PSoC);a mixed array logic consists of analog,digital and digital communication blocks within in it.The virtual instrument control program written in Labview ver.7.1,a graphical language,provides user friendly menu driven window based control panel,interacts with the single PSoC chip design for sensing and controlling the temperature.This simple cost effective embedded design finds potential application in laboratory as well as in industries.This deign can also be made as a standalone system without PC by programming LED/ LCD display and key pad attachment modules in same PSoC chip.1. INTRODUCTIONThe advent of intelligent programmable embedded silicon designs provides the ability to implement any required hardware programmatically for the design automation in industries and laboratories.Recent trend in laboratory as well as in industrial automation designs uses minimal hardware and maximum support of software.The programmable embedded components and application software available in the market enables the designer for user friendly cost effective design solution for any system automation.Temperature controllers are playing vital role in industries and laboratories.To accurately control process temperature without extensive operator involvement,a temperature control system relies upon a controller,which accepts a temperature sensor such as a thermocouple or RTD as input.It compares the actual temperature to the desired control temperature,or set point,and provides an output to a control element.The controller is one of the major parts of the entire control system,and the whole system should be analyzed in selecting the proper controller.This paper describes a novel single chip temperature controller design with Cypress Micro systems Programmable System on Chip (PSoC).Virtual instrument control program written in Lab VIEW ver.7.1 interacts with the embedded PSoC design and senses and controls the temperature of furnace / load.2. PROGRAMMABLE SYSTEM ON CHIP (P Soc)While Sand inexpensive interface to sensors,andmore.Cypress‟S ystem-Chip(PSoC)architecture offers a flexible,economical solution for a wide variety of applications.This paper describes the design of a temperature controller on a single CY8C27143,8 pin PSoC chip.Ass how n in fig.1,it features four main areas:PSoC core,digital system,analog system,and resources including in/out ports. This architecture allows the user to create customize Alpheratz configurations that match the requirements of each individual application.The UAR Tinter face, coupled with configurable analog and digital peripherals makes the CY8C27143 truly universal in its connections to the external world.The PSoC core includes:an M8C micro controller;32K Bytes of program flash memory;2Kbyte of data RAM;internal 24 oscillator;sleep and watchdog timer;general-purpose input/output pins (GPIO) allowing any pin to be used as digital input or output,and most pins to be used as analog inputs or outputs.Every pin can be used as a digital or analog interrupt.The digital system is made up of 8digital PSoC blocks.Each block is an 8-bit resource that can be used alone or combined with other blocks to form peripherals.Possible peripherals include:PWMs (8- to 32-bit);PWMs with dead band (8- to 24-bit);counters (8- to 32-bit);UART 8-bit with selectable parity;SPImaster and slave;cyclical redundancy checker/generator (8- to 32-bit);pseudo random sequence generators (8- to 32-bit).These digital blocks can be connected to any of the GPIO through a series of global buses.These buses also allow for signal multiplexing and performing logic operations.The analog system is made up of12configurable blocks,each comp rising an op amp circuit allowing the creation of complex analog signal flows.Analog peripheral sar every flexible and can be customized to support specific application requirements.Some of the more common PS0C analog functions are:filters (2 and 4 pole band-pass,low-pass,andnotch); amplifiers (up to 2,with selectable gain to 48x);instrumentation amplifiers (1with selectable gain to 93x); comparators (up to 2, with 16 selectable thresholds);DAC (up to 2, with 6 to 10-bit resolution); and SAR ADC (up to two,with 6-bit resolution).In combination with the digital blocks,additional functions can be created, including: incremental ADCs (up to 2, with 6- to 14-bit resolution); delta sigma ADC (1,with 8-bit resolution at62.5ksps).The additional system resources provide additional capability useful for the complete system design..Fig. 1 : Block diagram of Programmable System on Chip (PSoC) internal blocks3. VIRTUAL INSTRUMENT PROGRAMVirtual instrument (VI) is an application of general purpose digital PCs for the measurement and control of various physical variables.The VI program mimics the control processes,which are in a remote area,on the PC screen.On-going process control automation can be visualized by the experimentalist through PC screen.VI program provides inexpensive and yet a powerful platform for the control and data acquisition of process variables.These programs are easy to implement with graphic languages (G-l anguage).The “G” language implements the data flow technique.The usage of “G” language provides easy interfacing with PCs under the Windows environment [2]. The “G” language provides built-in function libraries for a variety of application requirements as graphic palettes, which in turn supports the required DLL s for the functions to run under windows ually the “G” language VI programs consist of two frames viz.,panel diagram and functional diagram.In the panel diagram,programmers can assign various controls and indicators (i.e., input and output variables).their requirements and in the functional diagram, the designers can implement the required.Fig. 2 : PSoC designer screen for single chip temperature controller Functions available as a function library in Lab.National Instruments version7.1 incorporates all the necessary functions as …icons‟ in its package.4. PSoC SINGLE CHIP TEMPERATURE CONTROLLER DESIGNFig.2 shows the PSoC designer screen for the embedded single chip temperature controller design project [1].Left side of the screen shows the settings of global resource and user module parameters along with pin connectivity.Middle portion of the screen shows the analog and digital blocks user module placement.Top portion of the screen shows the selected user modules for this project.Right side of the screen describes the pin connectivity configured in the design.In this novel single chip design,thermocouple (TC) signal has been amplified by a programmable gain amplifier (PGA) placed in the PSoC‟s analog block.The amplified TC signal has been fed in to a 12 bit Analog-to digital(ADC) user module programmed in the PSoC chip, which includes both analog and digital blocks for its functionality by PSoC designer programming.The converted digital data of the TC signal has been fed to the UART user module for serial communication with Personal Computer.The UART user module placed in the chip,automatically gets placed in two digital blocks of PSoC chip,transmitter (TxD) and receiver (RxD) for PCs serial communication.A pulse width modulator (PWM),placed in the PSoC digital block,sets a serial pulse width modulated TTL pulses in response to the PID control function for the deviation in set and measured temperature.This will in turn controls the optically coupled solid state relay (SSR) driving the AC line power connected to the load/furnace[3,4].The menu driven window based virtual instrument control program senses the temperature,via,thermocouple,TC amplifier,12-bit ADC and UART communication block of PSoC chip and evaluate the control functions like PID, linear heating, on-sweep and sets the pulse width of PWM in a PSoC chip via UART block in a serial communication.Fig. 3 : Single PSoC chip Temperature controller designFig.3.shows the connectivity of a single PSoC chip design with solid state relay (SSR)and USB port via,serial-to-USB converter cable for communication with PC.The SSR,acts as AC power controller for controlling the furnace power,has been activated by the PWM pulses from PSoC chip.The menu driven virtual instrument control program works in window environment interacts with the embedded design for sensing,controlling and acquiring the temperature data. On-line plotting of acquired temperature data also carried out by the VI program.5. CONCLUSIONA simple and cost effective embedded temperature controller has been designed,fabricated and tested successfully for its functionality.This compact designs permits the user to select any type of control function through its virtual instrument program,written in LabVIEW 7.1,and works under window environment.This design can be directly connected to PCs…com‟ port or USB port via USB-to-serial converter cable,the SSR power controller module can be connected on the furnace stand.The optically isolated power controller provides safe operation without damaging the interfacing intelligent controller. 6. REFERENCES1 J. Jayapandian.Current Science, Vol 90. No.6. 25th March 2006. p.765-770.2.National Instrument‟s LabVIEW user manual.3.J.Jayapandian.Design Briefs. Electronic Design Magazine. A Penton Publication.New Jersey,USA. ED Online ID #5687.September 15,2003.4.J. Jayapandian et.al.J. Instrum.Soc.India.33 (2) 75 – 80 (2003).出处:J.instrum.soc.india 38(1) 50-54.毕业设计(论文)——外文翻译(译文)嵌入式单片机温度控制器设计J. Jayapandian 和Usha Rani Ravi设计开发服务部材料科学部门英迪拉.甘地原子能研究中心卡尔帕卡姆-603102泰米尔纳德邦(印度)摘要本文介绍了一种在可编程系统芯片(PSOC)上的嵌入式单片机温度控制器,它由数字,模拟和通信功能模块组成,是一个混合的逻辑阵列。
基于单片机的太阳能水位及水温控制系统吴进霞
《工业控制计算机》2012年第25卷第12期基于单片机的太阳能水位及水温控制系统本文以单片机为核心的水箱水位及温度检测控制系统设计,实现水位及温度的检测、控制、报警和液晶显示等功能,该系统具有结构简单、外围元件少、稳定性高等优点。
1控制系统总体电路的设计基于单片机的太阳能水位及水温控制系统主要包括检测模块、报警模块、步进电机控制模块以及液晶显示模块,这些模块与系统的控制核心单片机相连接,其结构图如图1所示。
系统以单片机为控制核心,以超声波液位传感器构成水位信号采集电路,以数字温度传感器DS18B20构成水温信号采集电路,液晶显示器实时显示温度、水位,利用增量式PID算法控制步进电机以达到控制水温的目的。
2检测模块检测模块由水位检测模块和水温检测模块两个部分组成,主要完成太阳能水箱中水位及水温信号参数的采集工作。
2.1水位检测模块水位检测模块笔者选用的是超声波液位传感器。
这里选用超声波液位传感器的原因是超声波液位传感器不与太阳能水箱中的水直接接触,克服了水尤其是是热水对普通传感器的腐蚀,减小了由于水的腐蚀作用损害器件带来的误差,超声波液位传感器较其他液位传感器寿命长且安装使用方便。
超声波液位传感器是由超声波发射探头和超声波接受探头两个部分组成,其测量原理是由超声波发射探头发射超声波,超声波在空气中向前传播,当超声波遇到水面后被反射回来,后经超声波接收探头接收,从而完成测距过程。
其测距原理如图2所示,则有水位d为d=H-Ct/2,本式中H为太阳能水箱的直径,C为超声波在某温度下的传播速度,t为超声波在空气中的传播时间。
由于超声波的传播速度受温度的影响,在不同的温度下传播速度不同,又由于太阳能水箱中的温度是随着水温不断变化的,故需要对超声波的传播速度进行温度补偿。
超声波在常温时(15℃)的传播速度约为340m/s,而且每当空气温度上升10℃,超声波的传播速度就会上升6m/s,故超声波的传播速度与空气温度的关系为C=331.45+0.607T,其中T为某时刻空气的温度。
基于单片机的外文翻译
Presented in this paper is a design of pulse measuring instrument based on MCU, as the circuit module plays an important role in the system, such as heart rate acquisition circuit, display circuit and STC89C52 microcontroller through the serial port to realize the connection. This design with STC89C52 microcontroller as the central control unit, through ST188 as infrared photoelectric sensor to collect the pulse signal, after the lm358 for op amp; again through before and after filtering, magnifying, shaping, and get stable signal; functions to achieve the rapid detection of heart. You can also through the button to set the pulse value scope; buzzer driver module In the range beyond the scope of the alarm prompt, the measurement results in the liquid crystal display.Experimental results show that the test results of the design and practical requirements are basically the same, STC89C52 MCU strong anti-interference ability and LCD1602 display control the advantages of more convenient so that these features can be successfully completed. The production cost less than 100 yuan, with low price, easy manipulation, low power consumption, high reliability, very applicable to families and individuals.Heart rate) in professional terms is used to describe the human heart beat cycle. Pulse of modern Chinese will be interpreted as "heart beating frequency value; so the heart rate can also said in a unit of time, heart rhythm speed.Everyone's heart rate signals mostly contains rich physiological and psychological information. This is due to the health of internal organs of the body can reflect in the pulse information. This discovery has gradually attracted the attention of many clinicians. In our country, pulse diagnosis has been regarded as the essence of Chinese medicine; so far the clinical practice has about 2600 years. However due to the use of fingers often there will be some sweat glands refers to pulse diagnosis in the presence of errors can not be ignored; and leads to inaccurate measurement. Then perhaps you would say and the ear vein measurement, instead of the previous is often used. Although by measuring ear ripple come to pulse signal relatively comparison Clean, but because the ear pulse signal is weak, especially when the seasonal changes, the measurement signal is vulnerable to the influence of environmental temperature,resulting in inaccurate measurement values.With the development and progress of world science and technology and economy, cherish life, health care has become a common pursuit of mankind throughout the world. According to the Health Bureau statistics, every year because of cardiovascular and cerebrovascular diseases death of the highest number of human deaths first, not only the high cost of health care, back to the family, the government and the society caused great burden. In recent years, due to the accelerated pace of life, unreasonable eating habits and many junk food impact and other reasons, the incidence of cardiovascular and cerebrovascular is showing a trend of rising year by year. How to scientifically and harmless reduce cardiovascular disease morbidity and mortality, effectively reduce cardiovascular and cerebrovascular diseases and social Family burden, has become a very serious problem faced by human beings all over the world.World first lever type pulse scanner is Vierordt was founded in 1854. It is a lever and a pressure drum scanner uses the notation to record the pulse waveform, also is the human for the first time through non invasion of recording the human body pulse, then caused a great sensation. However the starting point for the development of domestic relatively is relatively low, in the early 50s of the 20th century Zhu Yancai will pulse instrument reference to objective study on the pulse diagnosis in traditional Chinese medicine. In recent years, non invasive vascular function detection gradually attracted the eyes of the medical professionals. Since about 1980, no trauma vascular function detection by using the small range, its principle is roughly Based on hemodynamic rheology theory and elastic chamber theory. Characterized in it by the module temperature, blood pressure cuff module, blood oxygen module of multi physiological signal acquisition module combination by of brachial artery blocking opening in the process of finger end temperature signal, oxygen saturation and pulse wave signal changes of the parameters of the, again according to the clinical trial data acquisition and through the method of signal processing and statistical analysis, establishment of vascular function quantitative evaluation formula and blood vessel function evaluation. It has noninvasive, simple operation, accurate, good repeatability and convenient for clinical application and automatically generates diagnosis ofcardiovascular function, health status analysis and gives related medical solution Release.Now pulse testing is no longer confined to the traditional manual testing or stethoscope test, only use electronic devices can be obtained more accurate data. In today's society, most of electronic measuring instruments has been directed towards the digitization, automation development direction. Pulse measuring instrument is not only good performance, simple structure, and has good value of application and popularization. In general, the pulse measurement instrument development is mainly the following trends: first, in the absence of human can automatically analyze the measurement of pulse value; the pulse of the traditional instrument need after experienced doctor pulse signal of the first initial analysis and then make a comprehensive analysis to final To confirm the results, this method of total said to not only waste a lot of manpower and by factitious error is relatively large. The second: the wide application of digital technology and other advanced technology; pulse measuring instrument integration to want to achieve a higher degree, and are more convenient to carry must rely on the rapid development of digital science and technology; at the same time digital signal processing application will enable interference becomes smaller measurement result is more accurate. The third: multi function of more and more obvious. The fourth: cheap, easy to carry and application and popularization value better, to the general public convenience.Has always been in the hospital for basis for clinical diagnosis and treatment of most source extracted from the human pulse wave in physiological and pathological information. In China, feeling the pulse is old doctor of traditional Chinese medicine is the most commonly used to diagnose disease, has been in use ever since. The pulse signal emitted by human body contains the velocity of heart rate, full waveform, period and amplitude, a full range of integrated information, in a large extent can reflect human body each part information (for example blood viscosity, blood velocity). Although these biological signals exist in the human body, the signal intensity relative to said is relatively weak; if in a noisy environment effect is more obvious.This graduation design principle is the use of single-chip microprocessorSTC89C52 as the center processor; pulse signal is collected by the sensor, through the microcontroller chip in the interior of the system timer to set the time; finally get the heart rate beat numerical by STC89C52 microcontroller to signal accumulation can be. Normal heartbeat is about 60-100 per minute times, circuit diagram of key module can through the button to set the scope of people's heart rate, above or below the setting range of possible heart there will be risks, buzzer driver module will drive buzzer alarm; the final measurement results Will be displayed on the LCD. The design can by viewing the IR indicates whether the lights and flashing, if sustained, stable flashing that test results are correct and error is small. With the assumption that the display results back and forth rock and numerical difference between the larger, there may exist error. Through the above steps, can roughly determine the body's own health, and is particularly suitable to be used to the individual or family, is also sometimes used in nursing homes and healthcare center.The design of the selection of SCM is STC89C52。
液位控制系统中英文对照外文翻译文献
中英文对照翻译The liquid level control system based ondde\matlab\simulinkProcess control is an important application field of automatic technology, it is to point to the level, temperature, flow control process variables, such as in metallurgy, machinery, chemical, electric power, etc can be widely used. Especially liquid level control technology in real life, played an important role in production, for example, the water supply, civil water tower if low water levels, can affect people's lives in water; Industrial enterprises with water, if the drainage water drainage or controlled properly or not, in relation to the workshop of condition; Boiler drum, if the control level boiler is too low, can make level boiler overheating, possible accident; Jing flow, liquid level control tower control accuracy and level of the craft can influence the quality of the products and the cost, etc. In these production field, are basically labor strength or the operation has certain risk nature of work, extremely prone to accidents caused by operating error, the losses, killing manufacturer. Visible, in actual production, liquid level control accuracy and control effects directly affect the factory production cost and economic benefit of safety coefficient. Even equipment So, in order to ensure safety, convenient operation, you have to research the development of a d v a n c e d l e v e l c o n t r o l m e t h o d s a n d s t r a t e g i e s.The graduation design topic is the liquid level control system based on dde\matlab\simulink\force control, Among them was controlled object for tank level, Communication mode for DDE communications , Matlab is mainly used in the simulation test ,And force control software used for modeling, This system mainly through combination of hardware and software device to achieve precise control of liquid level , In modern industry level control of important component, it influence upon production not allow to ignore, in order to ensure safety in production and the product quality and quantity, the level and perform effective control is very necessary, The following is a description of all aspects:一PID controllerA proportional–integral–derivative controller (PID controller) is a generic .control loop feedback mechanism widely used in industrial control systems.A PID controller attempts to correct the error between a measured process variable and a desired set point by calculating and then outputting a corrective action that can adjust the process accordingly.The PID controller calculation (algorithm) involves three separate parameters; the Proportional, the Integral and Derivative values. The Proportional value determines the reaction to the current error, the Integral determines the reaction based on the sum of recent errors and the Derivative determines the reaction to the rate at which the error has been changing. The weighted sum of these three actions is used to adjust the process via a control element such as the position of a control valve or the power supply of a heating element. By "tuning" the three constants in the PID controller algorithm the PID can provide control action designed for specific process requirements. The response of the controller can be described in terms of the responsiveness of the controller to an error, the degree to which the controller overshoots the set point and the degree of system oscillation. Note that the use of the PID algorithm for control does not guarantee optimal control of the system or system stability.Some applications may require using only one or two modes to provide the appropriate system control. This is achieved by setting the gain of undesired control outputs to zero. A PID controller will be called a PI, PD, P or I controller in the absence of the respective control actions. PI controllers are particularly common, since derivative action is very sensitive to measurement noise, and the absence of an integral value may prevent the system from reaching its target value due to the control action.1.Control loop basicsA familiar example of a control loop is the action taken to keep one's shower water at the ideal temperature, which typically involves the mixing of two process streams, cold and hot water. The person feels the water to estimate its temperature. Based on this measurement they perform a control action: use the cold water tap to adjust the process. The person would repeat this input-output control loop, adjusting the hot water flow until the process temperature stabilized at the desired value.Feeling the water temperature is taking a measurement of the process value or process variable (PV). The desired temperature is called the set point (SP). The output from the controller and input to the process (the tap position) is called the manipulated variable (MV). The difference between the measurement and the set point is the error (e), too hot or too cold and by how much. As a controller, one decides roughly how much to change the tap position (MV) after one determines the temperature (PV), and therefore the error. This first estimate is the equivalent of the proportional action of a PID controller. The integral action of a PID controller can be thought of as gradually adjusting the temperature when it is almost right. Derivative action can be thought of as noticing the water temperature is getting hotter or colder, and how fast, and taking that into account when deciding how to adjust the tap,Making a change that is too large when the error is small is equivalent to a high gain controller and will lead to overshoot. If the controller were to repeatedly make changes that were too large and repeatedly overshoot the target, this control loop would be termed unstable and the output would oscillate around the set point in either a constant, growing, or decaying sinusoid. A human would not do this because we are adaptive controllers, learning from the process history, but PID controllers do not have the ability to learn and must be set up correctly. Selecting the correct gains for effective control is known as tuning the controller.If a controller starts from a stable state at zero error (PV = SP), then further changes by the controller will be in response to changes in other measured or unmeasured inputs to the process that impact on the process, and hence on the PV. Variables that impact on the process other than the MV are known as disturbances and generally controllers are used to reject disturbances and/or implement set point changes. Changes in feed water temperature constitute a disturbance to the shower process.In theory, a controller can be used to control any process which has a measurable output (PV), a known ideal value for that output (SP) and an input to the process (MV) that will affect the relevant PV. Controllers are used in industry to regulate temperature, pressure, flow rate, chemical composition, speed and practically every other variable for which a measurement exists. Automobile cruise control is an example of a process which utilizes automated control.Due to their long history, simplicity, well grounded theory and simple setup and maintenance requirements, PID controllers are the controllers of choice for many ofthese applications.2.PID controller theoryNote: This section describes the ideal parallel or non-interacting form of the PID controller. For other forms please see the Section "Alternative notation and PID forms".The PID control scheme is named after its three correcting terms, whose sum constitutes the manipulated variable (MV). Hence:where Pout, Iout, and Dout are the contributions to the output from the PID controller from each of the three terms, as defined below.2.1. Proportional termThe proportional term makes a change to the output that is proportional to the current error value. The proportional response can be adjusted by multiplying the error by a constant Kp, called the proportional gain.The proportional term is given by:WherePout: Proportional outputKp: Proportional Gain, a tuning parametere: Error = SP − PVt: Time or instantaneous time (the present)Change of response for varying KpA high proportional gain results in a large change in the output for a given change in the error. If the proportional gain is too high, the system can become unstable (See the section on Loop Tuning). In contrast, a small gain results in a small output response to a large input error, and a less responsive (or sensitive) controller. If the proportional gain is too low, the control action may be too small when responding to system disturbances.In the absence of disturbances, pure proportional control will not settle at its target value, but will retain a steady state error that is a function of the proportional gain and the process gain. Despite the steady-state offset, both tuning theory and industrial practice indicate that it is the proportional term that should contribute the bulk of the output change.2.2.Integral termThe contribution from the integral term is proportional to both the magnitude of the error and the duration of the error. Summing the instantaneous error over time (integrating the error) gives the accumulated offset that should have been corrected previously. The accumulated error is then multiplied by the integral gain and added to the controller output. The magnitude of the contribution of the integral term to the overall control action is determined by the integral gain, Ki.The integral term is given by:Iout: Integral outputKi: Integral Gain, a tuning parametere: Error = SP − PVτ: Time in the past contributing to the integral responseThe integral term (when added to the proportional term) accelerates the movement of the process towards set point and eliminates the residual steady-state error that occurs with a proportional only controller. However, since the integral term is responding to accumulated errors from the past, it can cause the present value to overshoot the set point value (cross over the set point and then create a deviation in the other direction). For further notes regarding integral gain tuning and controller stability, see the section on loop tuning.2.3 Derivative termThe rate of change of the process error is calculated by determining the slope of the error over time (i.e. its first derivative with respect to time) and multiplying this rate of change by the derivative gain Kd. The magnitude of the contribution of the derivative term to the overall control action is termed the derivative gain, Kd.The derivative term is given by:Dout: Derivative outputKd: Derivative Gain, a tuning parametere: Error = SP − PVt: Time or instantaneous time (the present)The derivative term slows the rate of change of the controller output and this effect is most noticeable close to the controller setpoint. Hence, derivative control isused to reduce the magnitude of the overshoot produced by the integral component and improve the combined controller-process stability. However, differentiation of a signal amplifies noise and thus this term in the controller is highly sensitive to noise in the error term, and can cause a process to become unstable if the noise and the derivative gain are sufficiently large.2.4 SummaryThe output from the three terms, the proportional, the integral and the derivative terms are summed to calculate the output of the PID controller. Defining u(t) as the controller output, the final form of the PID algorithm is:and the tuning parameters areKp: Proportional Gain - Larger Kp typically means faster response since thelarger the error, the larger the Proportional term compensation. An excessively large proportional gain will lead to process instability and oscillation.Ki: Integral Gain - Larger Ki implies steady state errors are eliminated quicker. The trade-off is larger overshoot: any negative error integrated during transient response must be integrated away by positive error before we reach steady state.Kd: Derivative Gain - Larger Kd decreases overshoot, but slows down transient response and may lead to instability due to signal noise amplification in the differentiation of the error.二Matlab IntroductionThe MATLAB® environment is well suited to rapid prototyping and application development. The interactive programming environment, built-in math functions, toolboxes, editing and debugging tools, and deployment options all contribute to reducing your overall development time.By using the built-in math functions and the many specialized functions contained within our toolboxes, MATLAB can significantly reduce the time it takes you to develop prototypes. In addition to integrated editing and debugging tools, MATLAB provides a performance profiler to help you further optimize your code when programming in MATLAB.Building applications around complex algorithms and graphics is easier than everwith the GUI builder, GUIDE. GUIDE was redesigned in MATLAB 6 to save you time. It offers all the drag and drop interface options you would expect, such as text boxes, radio buttons, check boxes, listboxes, sliders, pop-up menus, frames and more.When you're ready to deploy your application, the MathWorks offers a number of different options that allow you to either convert or interface your MATLAB application to other environments including C/C++ and the Web. MATLAB is the most productive development environment for creating scientific and engineering applications because it offers powerful tools for every step in the process to reduce your overall development time.MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. Typical uses include• Math and computation• Algorithm development• Data acquisition• Modeling, sim ulation, and prototyping• Data analysis, exploration, and visualization• Scientific and engineering graphics• Application development, including graphical user interface building三DDE IntroductionDynamic data exchange (DDE, Dynamic data exchange) is real-time exchange data between applications, it is the effective method between different applications to share data a agreement. DDE agreement is a kind of open, and language unrelated, based on protocol, it allows multiple applications to any human agreed format data exchange or command. It is application through Shared memory process of the communication between a form, also need not user intervention of good data exchange method.DDE applications can be divided into four types: client and server and client/server and the monitor. Conversation is a basic concept of DDE. DDE conversation happened in client applications and server application between. Customer is responsible for initializing and attendant session and control conversation flow, from the server application request data or services; The server applicationresponse client applications of data or service request. Client/server applications is both client applications and server application request, it can be and can provide information. Monitor application for debugging purposes. DDE applications can have multiple burst conversation, a service applications can also have multiple client applications, a client applications can to multiple requests data service applications, and an application can also act as client applications and services applications, when don't need the service application data or service, the customer will terminate session. DDE agreement must be synchronous control the news session, but in different application can switch between asynchronous session.DDE Application using the three layer identification system: Application name apply), theme name (from) and project name (Item). Application name (also called service name) is located at the top of the hierarchical structure, the service application registration for pointed out that particular DDE server application name, customer the application wants to establish session with the server application must be specified application name when this string marks; Name in every conversation topics is one and to identify logical data connection string, is the total classification, data it defines a server application conversation theme content, the server application can support one or more theme name; Project name identifies exchange unit of data string, furthermore confirm the conversation of detailed information, every theme name may have one or more project name. Example: for a database interface applications, will it supports database name as a theme name, and will all sorts of SQL commands as project name, because the server application can support one or more theme, and each theme name name may have one or more project name; So, when to change or reconstruct a conversation, just changing the subject name or project name can.四force control IntroductionForce control is Beijing SANWEI force control technology and "soft" control strategy software, real-time database and its management system, Web portal of tools and other products. These products are not isolated, and the force control is an application scale can free the system structure, the whole expansion force control system and its various products are made from some components procedures according to certain combinations and become. So this guide is not specifically targeted specific products separately describes the use of method, but the common use of all products introduced method. Force control configuration software is a can run on Windows 98/2000 / NT environment, and can run on Windows CE, DOSembedded environment control fu- nctions such as software modules. It USES function diagram way for users provide interface, possess and real-time database, graphical interface system and communication function.Force charged with monitoring configuration software is to the field production data acquisition and process control of specialized software, the biggest characteristic is to flexible "configuration mode" instead of programming approach to system integration, and it provides a good user interface and simple engineering development, as long as the realization method of software module of pre-settings simple "configuration", it can easily realization and complete monitoring layer each function, shorten the automation engineer system integration time, greatly improve the efficiency of integration.Force charged with monitoring configuration software is in the automatic control system monitoring layer level software platform, it can also and the domestic and foreign various industrial control network communication equipment manufacturer, it is ok with high reliable industrial controlling computer and network system integration, can achieve the purpose of the centralized management and monitoring, and can also be convenient to control layer and management for software and hardware to implement all the interface, with "third party" hardware and software systems for integration.The control strategy in the force control, an application in generator may have a lot of control strategy, but only one main strategy. The Lord, the Lord was first execution strategy calls. Other strategies strategy Strategy nested grade 4, namely for most 0 ~ 3 level, in this category 4, grade 3 0 level supreme, the lowest. Senior strategy can call low-level strategy, and low-level strategy can't call senior strategy. In addition to tier 3 most can have 127 strategy outside, other three grades maximum respectively are 255 strategy. Control strategy of by some basic function blocks, a function blocks represent an operation, algorithm or variables. Function blocks basic execution element is strategy, similar to an integrated circuit blocks, have several input and output, each input and output tube feet all have the only name.Force control control strategy is in control strategy, edited generated generators in automatic control strategy for strategies when inventory compiled, and check grammar mistakes, compile can also manually. Control strategy, and you can also call between if A strategy was B strategy calls, says A is B son strategy. A functional block can be repeated calls, each calls are automa- tically entitled to a name by. The executive order and function block in the position of screen on the upper left, position relevant function block, according to priority execution left after the first order under implementation.Force control control strategy of basic function blocks generator was divided into five categories: variable function blocks, mathematical operation function blocks, program control function blocks, logic function blocks function block and control algorithm.基于matlab\dde\simulink\力控的液位控制系统过程控制是自动技术的重要应用领域,它是指对液位、温度、流量等过程变量进行控制,在冶金、机械、化工、电力等方面得到了广泛应用。
基于单片机的水位控制系统设计毕业论文
基于单片机的水位控制系统设计毕业论文毕业论文(设计)题目:系部名称:专业班级:学生姓名:学号:指导教师:教师职称:20年月传统的水位控制在生产中一直占有主导地位,但随着生产线的更新,不仅要求有更直观、准确、稳定的位控制系统,同时还要求在降低生产设备的成本方面要求更新自动化程度和性价比高的水位控制系统。
单片机控制系统以其控制精度高、性能稳定可靠、设置操作方便、造价低等特点被应用到位系统的控制中。
本系统采用单片机AT89C51为控制核心来实现水位的基本控制功能。
系统由键盘、数码显示、A/D转换、传感器、电源和控制部分组成。
本文以单片机端口的输出电平控制继电器的动作,实现电机的启动或者停止,从而达到自动控制水位的目的。
另外,系统可根据需要设定水位控制的高度,同时具备超限报警和故障报警功能,并辅以发光二极管显示相应水位的状态。
AT89C51,A/DLevel control system based on microcomtrollerAbstractThe traditional water level control in production has been a dominantposition, but with production line, not only the update demanding more direct, precise and stable water level control system, at the same time also requires the cost in reducing production equipment requirements update automation degree and cost-effective of water level control system. Single-chip microcomputer control system with its high control accuracy, reliable performance, convenient operation, low cost set to be applied to the liquid level system characteristics of the control.This system uses the microcontroller AT89C51 as the water level control core to realize the basic control functions. System by the keyboard, digital display, A / D conversion, sensors, power and control components. In this paper, the output of microcontroller port level control relay operation, start or stop the motor, so as to achieve the purpose of automatic control of water level. In addition, the system may need to set the height of water level control, along with limit alarm and fault alarm function, supplemented by light-emitting diode displays the status of the corresponding level.Keywords:AT89C51 A / D conversion the water level control digital display sensor fault alarm目录1 引言 12 系统设计方案比较说明 33 水位控制系统的原理和设计方案4 3.1 水位控制系统组成 43.2 单片机系统组成及工作原理 4系统组成 4工作原理 53.3 控制方案的设计 5设计思路 5方案设计 64 硬件设计84.1 单片机84.2 时钟电路94.3 电源电路114.4 传感器114.5 串行通信124.6 键盘电路134.7 水位显示电路134.8 A/D转换电路14ADC0809的内部逻辑结构14ADC0809的引脚图14A/D转换电路原理图 164.9 电机控制184.10 看门狗电路 184.11 稳压电路204.12 报警电路215 软件设计225.1 程序设计流程图225.2 程序设计23键盘程序23A/D转换子程序24初始化程序24运行状态下的程序24结论26致谢27参考文献28附录1 29附录2 30[1]。
基于单片机的水位监控系统
基于单片机的水位监控系统朱昌富【摘要】According to the requirement of water level monitoring,a water level monitoring system based on STC89C52 MCU was designed.The paper provides the design thought about the hardware and software of this system;and the design of the water level monitoring,motor controlled display and sound-light alarm.%针对水位监控的要求,设计了一种以STC89C52单片机为核心硬件的水位控制系统.提供了系统软、硬件的设计思路及具体实现.设计了水位监测、声光报警、电机控制、数码管显示等外围电路.【期刊名称】《宁德师范学院学报(自然科学版)》【年(卷),期】2012(024)002【总页数】4页(P169-172)【关键词】水位监测;单片机;遥控;驱动电路【作者】朱昌富【作者单位】宁德师范学院物理与电气工程系,福建宁德352100【正文语种】中文【中图分类】TH822近年来随着大规模集成电路和计算机技术的发展,单片机的应用正在不断地走向深入.水位监测控制系统便是单片机的开发应用之一,其系统分别由监测电路、报警电路和自动给水三部分组成.通过金属探头,探测高低水位信号,将检测到的水位信号通过信号调理电路后,送给单片机进行处理.水位过高或过低,发生不同频率的报警时,自动给水功能开启.当水位过低时,水泵自动进水;过高时,自动抽水.如果处于最高水位和最低水位之间,用户可根据自己的需要,通过遥控器进水或抽水,并可根据需要调节水流的速度,显示在数码管上.该设计具有很高的使用价值,随着自动化技术的发展,自动化技术已深入到了各领域,为人们的生产生活带来了许多方便,大到可用于水库、湖泊、池塘水位的检测,小的可以用于鱼缸、锅炉水位的检测.系统的总体框图如图1所示.该设计以STC89C52单片机为控制核心,主要包含遥控控制模块、声光报警系统、电源模块、电机驱动模块、水位采集装置等装置.水位采集装置将采集到的水位电压值通过比较器模块得出高低电平信号,将采集到的信号值送回单片机,经处理后再由遥控控制系统通过电机驱动模块控制水泵的停止、运行及速度的变化.相应的LED灯、蜂鸣器发生警报,数码管显示水流速度.其具有实现对最高及最低水位的监测,当水位过高或过低时,可进行声光报警,并自动给水、抽水.当高于最高水位线时,自动放水;低于最低水位线时,自动给水.当水位介于最高与最低水位线之间时,可通过遥控器控制进水或抽水.实现遥控器调节进水、抽水的水流速度,数码显示水泵抽水速度.1.1 主控电路如图2为水位监测控制系统的主控电路图.图中遥控控制模块接的是单片机的外部中断口P3.3.单片机正常工作,必须连接基本电路,包括晶振电路和复位电路.采用STC89C52单片机构成的主控电路,控制操作简单,性价比高,通用性强大,运算能力强,其片内ROM采用FlashROM,8K字节程序存储空间,512字节数据存储空间,内带2K字节的EEPROM存储空间;运算能力强,自由度大,软件程序灵活,支持ISP下载,并可以通过串口下载,抗干扰能力强.1.2 显示电路如图3为水位监测控制系统显示电路,即数码管显示电路.基于它具有低电压、小电流、高频特性好、单色性好、亮度高等优越性,被广泛用作数字仪器仪表、数控装置和计算机的数显器件等其他领域.LED数码显示管有静态显示方式和动态显示方式,本系统采用串行输出的动态显示方式.利用两个锁存器74HC573将控制器输出的串行数据转换成并行数据输出,用驱动4位一体的LED数码显示管显示数据.1.3 遥控接收及电压比较电路如图4,左图为遥控接收端电路,图中红外接收管1838T的信号输出端连接单片机的P3.3端,电阻R7作为上拉电阻.工作时,红外接收管接收到由遥控器发送过来的电压信号,送至单片机处理.右图为电压比较电路,因采集水位时水具有一定的阻值.通电后,输出端电压为2.3V左右,得不到低电平,单片机无法判断.通过比较电路,将采集到的电压值与预定的电压进行比较,再通过比较器LM324得到单片机所能辨别的高低电平,从而做出相应的处理.1.4 电机驱动电路图5为H桥驱动电路.H桥使用高速光耦及L298N来实现;单片机提供高速的PWM波,用光耦隔离,然后由L298N提供电压给电机,及通过高速的通断来实现电压的变化,从而改变电机的转速.L298N含有两个H桥的大电流高电压驱动器,可用于驱动步进电机、直流电机.采用逻辑电平控制,控制端管角不受输入信号影响时,允许、禁止器件工作,有一个逻辑电源输入端,使内部逻辑电路部分工作在低电压;可接外接检测电阻,将参量变化量反馈给控制电路.2.1 系统软件总体设计在软件设计中,将系统分为五个功能模块程序,包括电机驱动程序、电机调速程序、遥控处理程序、中断处理(包括外部中断、定时器中断)程序、主程序.通过遥控按键进行电机速度的调节,每个功能都有对应的现象,由数码管、蜂鸣器、LED等进行显示或提示.系统的主流程如图6所示.2.2 遥控的处理该系统采用遥控对电机进行控制,当一个键按下后,接收端接收信号,送入单片机,单片机先读用户码和键盘码值,36ms后,遥控输出端启动输出,按键时间大于36ms,输出一帧码.当时间超过108ms时输出第二帧.引导码由9ms的载波信号和4.5ms的关断时间组成,作为随射码的引导.该水位控制系统能够正确处理码的接收,以及检测和控制之间的时序关系.采用脉冲位置调制方式进行编码.“0”和“1”数字量通过脉冲之间的时间间隔来区分.传送8位数据时,它的反码也被传送,减少数据传输系统的误码率.每一个键值控制着电机的一个速度,因此可以随意的控制水流的大小.对硬件的调试包括遥控信号是否能够正常接收、电源能否正常供电、水泵的正常运行与否、水位信号的采集、最小系统的良好运行以及所有模块组装后能否正常运行.水位信号采集信号误检测的原因在于水本身存在一定的阻值,金属探头采集到的电压值经水分压后不能被单片机识别,采用比较器对信号进行比较放大获得相应的高低电平,才能被单片机识别.水位监测控制系统经过多次测试试验,采用模块化的软硬件设计方法,工作十分稳定,技术性能指标良好,各项参数达到了期望值.【相关文献】[1]殷兴光.水位温度远程控制的研究[J].陕西国防工业职业技术学院学报,2008,18(1):35-37.[2]张迎新.单片机原理及应用[M].北京:电子工业出版社,2009.[3]黄智伟.全国大学生电子设计竞赛系统设计[M].北京:北京北京航空航天大学出版社,2006.[4]全国大学生电子设计竞赛组委会.全国大学生电子设计竞赛获奖作品选编[M].北京:北京理工大学出版社,2005.。
基于单片机的水位控制系统设计
基于单片机的水位控制系统设计唐灵军;唐杰;谌超;胡斌【摘要】Based on single chip MCU control the step motor water level control system,through the metal bar and water the conductivity of the water level signa collection,combining of the single chip computer output level control relay to control water pump of experiments,and realize the continuous control and track the water level,and with LCD real-time display water level.The scheme has a simple principle,and novel ideas,easy to be realized,high precision control system to improve the industrial automation level and improve life quality of water supply has the vital significance.%基于单片机控制步进电机的水位控制系统,通过金属棒和水的导电性采集水位信号,结合了单片机输出电平控制继电器来控制抽水机的实验,实现了连续控制和跟踪水位,并以液晶实时显示水位。
该方案具有原理简单、想法新颖、容易实现、精度高等特点,控制系统对于提高工业自动化水平和提高生活供水质量具有重要的意义。
【期刊名称】《电子设计工程》【年(卷),期】2012(020)008【总页数】3页(P62-64)【关键词】水位控制;单片机;步进电机;抽水机【作者】唐灵军;唐杰;谌超;胡斌【作者单位】邵阳学院电气工程系,湖南邵阳422000;邵阳学院电气工程系,湖南邵阳422000;邵阳学院电气工程系,湖南邵阳422000;邵阳学院电气工程系,湖南邵阳422000【正文语种】中文【中图分类】TP273.2在生产领域中,实现水位自动检测和控制是工业过程控制的一项关键技术,对于提高工业过程控制的自动化水平有着重要的意义。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
译文:水位检测设计中国水之源总量居世界第六位,人均占有水资源量仅为世界人均占有量的四分之一,并且在地域上分布很不平衡,长江以北的广大地区,特别是北方大、中城市大部分地区处于缺水状态,水资源短缺已成为制约我国经济发展的一个重要因素。
合理的利用水资源已成为我国现在面临的一个重要问题。
为了达到水资源的合理利用,除了要在兴修水利工程和提高全民节水意识等方面努力提高。
而更重要的是应用新的技术信息,实时准确的了解和掌握各种水情信息,以此根据做出正确的水资源调度和管理,做到防患于未然,尽可能减少水资源的浪费。
再加上长久以来水情水位测量一直是水文、水利部门的重要课题。
为及时发现事故苗头,防患于未来,经济实用、可靠的水位无线监测系统将会发挥巨大的作用。
水位是水库大坝安全、水利排灌调度、蓄水、泄洪的重要参数之一。
水位的自动化监测、传输和处理为水库现代化建设提供了良好的基础资料。
在工农业生产的许多领域都需要对水位进行监控。
在现场可能无法靠近或无需人力来监控时,我们就可以通过远程监控,坐在监控室里对着相关的仪器就能对现场进行监控,既方便又节省人力。
为了保证水利发电站的安全生产,提高发电效率,水电站生产过程需要对水库水位、拦污栅压差和尾水位进行监测。
但是,由于不同电站有着不同的实际情况,因此就有着不同的技术要求,而且水位参数的测量方法和测量位置不同,对监测设备的要求亦有所不同。
这样往往造成监测系统设备专用化程度高,品种多,互换性差,不利于设备维护,亦增加了设备设计、生产、安装的复杂性。
因此,在综合研究水电站水位监测的实际情况以及特点的基础上,利用现代电子技术,特别是单片机技术和不挥发存储器技术,设计开发一种通用性好,可靠性高,维护方便,可适用于多种监测环境的多模式水位自动监测系统具有重要的实际意义。
本课题根据水库的水位测量需要,设计远程单片机水位监测系统,系统具有水位的自动检测、定时处理、数据GPRS远程上传等功能。
该监控系统的设计将会大大节省了人力物力,能够低功耗的实现24小时连续监测和上传,实时控制水库水位,更好的适应现代水位测量的需求,为水库的大坝的安全、蓄水泄洪等提供依据。
单片机作为嵌入式微控制器在工业测控系统,智能仪器和家用电器中得到广泛应用。
在实时检测和自动控制的单片机应用系统中,单片机往往是作为一个核心部件来使用。
水塔基于单片机的水位控制系统的基本要求是能够在无人监控的情况下自动进行工作,在水塔中的水位到达水位下限时自动启动电机,给水塔供水;在水塔水位达到水位上限的时候自动关闭电机,停止供水。
并能在供水系统出现异常的时候能够发出警报,以及时排除故障,随时保证水塔的对外的正常供水作用。
水塔是在日常生活和工业应用中经常见到的蓄水装置,通过对其水位的控制对外供水以满足需要,其水位控制具有普遍性。
不论社会经济如何飞速,水在人们正常生活和生产中起着重要的作用。
一旦断了水,轻则给人民生活带来极大的不便,重则可能造成严重的生产事故及损失,从而对供水系统提出了更高的要求,满足及时、准确、安全充足的供水。
如果仍然使用人工方式,劳动强度大,工作效率低,安全性难以保障,由此必须进行自动化控制系统的改造。
从而实现提供足够的水量、平稳的水压、水塔水位的自动控制有设计低成本、高实用价值的控制器。
该设计采用分立的电路实现超高、低警戒水位处理,实现自动控制,而达到节能的目的,提高了供水系统的质量。
单片机是一种集成在电路芯片,是采用超大规模集成电路技术把具有数据处理能力的中央处理器CPU随机存储器RAM、只读存储器ROM、多种I/O口和中断系统、定时器/计时器等功能(可能还包括显示驱动电路、脉宽调制电路、模拟多路转换器、A/D转换器等电路)集成到一块硅片上构成的一个小而完善的计算机系统。
基本特点如下:芯片虽小,五脏俱全,是单片机主要特点之一。
其内部设有程序存储器、数据存储器、各种接口电路。
而大型的处理器运算速度较高,运算器位数较多,处理能力较强,但需要在外部配置接口电路;单片机主频一般在100MHZ以下,适合用于独立工作的小型产品之中,引脚数量从几个到百余个。
应用简单、灵活,可用汇编语言及C语言开发单片机产品。
单片机的工作过程:单片机自动完成赋予它的任务的过程,也就是单片机执行程序的过程,即一条条执行的指令的过程,所谓指令就是把要求单片机执行的各种操作用的命令的形式写下来,这是在设计人员赋予它的指令系统所决定的,一条指令对应着一种基本操作;单片机所能执行的全部指令,就是该单片机的指令系统,不同种类的单片机,其指令系统亦不同。
为使单片机能自动完成某一特定任务,必须把要解决的问题编成一系列指令(这些指令必须是选定单片机能识别和执行的指令),这一系列指令的集合就成为程序,程序需要预先存放在具有存储功能的部件——存储器中。
存储器由许多存储单元(最小的存储单位)组成,就像大楼房有许多房间组成一样,指令就存放在这些单元里,单元里的指令取出并执行就像大楼房的每个房间的被分配到了唯一一个房间号一样,每一个存储单元也必须被分配到唯一的地址号,该地址号称为存储单元的地址,这样只要知道了存储单元的地址,就可以找到这个存储单元,其中存储的指令就可以被取出,然后再被执行。
程序通常是顺序执行的,所以程序中的指令也是一条条顺序存放的,单片机在执行程序时要能把这些指令一条条取出并加以执行,必须有一个部件能追踪指令所在的地址,这一部件就是程序计数器PC(包含在CPU中),在开始执行程序时,给PC赋以程序中第一条指令所在的地址,然后取得每一条要执行的命令,PC在中的内容就会自动增加,增加量由本条指令长度决定,可能是1、2或3,以指向下一条指令的起始地址,保证指令顺序执行。
单片机高塔基于单片机的水位控制系统基本设计要求:在高塔的内部我们设计一个简易的水位探测传感器用来探测三个水位,即低水位,正常水位,高水位。
低水位时送给单片机一个高电平,驱动水泵加水,红灯亮;正常范围的水位时,水泵加水,绿灯亮;高水位时,水泵不加水,黄灯亮。
本设计过程中主要采用了传感技术、单片机技术、光报警技术以及弱电控制强电的技术。
技术参数和设计任务:1、利用单片机实现对高塔进行水位的控制;2、把水位探测传感器探得高塔中的水位送给单片机以实现对水泵加水系统和显示系统的控制;3、光报警显示统电路4、水泵加水电路由继电器进行控制;5、分析工作原理绘出系统结构图及图1 系统结构图采用单片机作为我们的控制芯片,主要工作过程是当高塔中的水在低水位时,水位探测传感器送给单片机一个高电平,然后单片机驱动水泵加水和显示系统使红灯变亮;当水位在正常范围内时,水泵加水,绿灯亮,当水位在高水位时,单片机不能驱动水泵加水,黄灯亮。
光报警电路、继电器控制电路组成工作原理:当水位处于低水位的时候,传感器的低水位探测线没被+5V的电源导通进入稳压电路经过处理在稳压电路的输出端有一个高电平,送入单片机的P1.0口,另一个稳压电路输出的高电平进入单片机的P1.1口单片机经过分析,在P1.2口输出一低电平,驱动红灯亮,P1.5出来一个信号使光电耦合器GDOUHE导通,这样继电器闭合,使水泵加水;当水位处于正常范围内时,水泵加水,在P1.3引脚出来一个低电平,使绿灯亮;当水位在高水位区时,传感器的两根探测线均被导通,均被+5的电源导通,送入单片机,单片机经过分析,在P1.4引脚出来一个低电平,使黄灯亮,在P1.5端出来一个低电平不能使光电耦合器导通,这样继电器不能闭合,水泵不能加水;当三灯闪烁表示系统出现故障。
原文:The water level detector design原文来源:Water source total ranks sixth in the world, per capita water resources is only a quarter of the world per capita consumption, and geographical distribution is very uneven, the vast region north of the Yangtze River, northin most parts of the medium-sized cities in the dry state, water shortage has become an important factor restricting China's economic development. Reasonable use of water resources has become an important issue for China is now facing. In order to achieve the rational use of water resources, in addition to in beefing water conservancy projects and enhance the people's awareness of water conservation efforts to improve. But more important is the application of new technical information, real-time to accurately understand and master a variety of hydrological information in order to make the right water scheduling and management, so that preventive measures to minimize water wastage . Coupled with long-standing water level measurement of water level has been an important issue in hydrology, water resources department. For the timely detection of the signs of the accident, precautionary measures in the future, economical and practical, reliable water level wireless monitoring systems will play a major role. The water level of dam safety, one of the important parameters for water drainage and irrigation scheduling, water storage, flood discharge.Provides a good foundation for the automation of monitoring, transmission and processing of the water level reservoir modernization. Need to monitor the water level in many areas of industrial and agricultural production. The site may not be able to close without the manpower to monitor, we can RMON, sitting in the control room facing the instrument can be monitored on-site, convenient and save manpower. In order to ensure the safe production of hydroelectric power station to improve power generation efficiency, Hydropower production process need to monitor the water level in the reservoir, trash rack, pressure drop and the tail water level. However, due to the different power plants with a different factual situations, have different technical requirements, and the measurement methods and location of the water level parameters and also the requirements of the monitoring equipment. This often results in the monitoring system equipment of a high degree of variety, interchangeability is not conducive to the maintenance of equipment will increase the equipment design, production, installation complexity. Therefore, on the basis of the actual situation and characteristics of the comprehensive study of hydropower water level monitoring, the use of modern electronic technology, especially single-chip technology and non-volatile memory technology, designed to develop a versatile, high reliability, easy maintenance, the applicable a variety of monitoring the environment, multi-mode automatic water level monitoring system has important practical significance. The subject according to the reservoir water level measurement needs, design a remote microcontroller water level monitoring system, the system automatically detects the water level, time processing, Data GPRS remote upload function. The design of the monitoring system will be significant savings in manpower and resources, low-power 24 hours of continuous monitoring and upload real-time control reservoir water level, to better adapt to the needs of the modern water level measurement, the safety of the dam reservoir, impoundment spillway to provide a basis.Microcontroller embedded microcontrollers are widely used in industrial measurement and control systems, intelligent instruments and household appliances. In real-time detection and automatic control of microcomputer application system, themicrocontroller is often as a core component to use. The basic requirements of the water tower water level control system in the case of unattended automatic limit automatically start the motor to reach the water level in the water level in the water tower to the water tower water supply; water tower water level reached the water level upper limit is automatically off the motor to stop water supply. And unusual time to sound the alarm and troubleshooting in the water supply system at any time to ensure that the towers of the external normal water supply role. The water tower is often seen in daily life and industrial applications, water storage devices, external water supply through the control of its water level to meet the needs of its water level control is universal. Regardless of socio-economic rapid water plays an important role in people's normal life and production. Once off the water, ranging from great inconvenience to the people's living standards, weight is likely to cause serious accidents and losses, and thus a higher demand of water supply system to meet the timely, accurate, safe and adequate water supply. If you still use the artificial way, the labor-intensive, low efficiency, safety is hard to guarantee the transformation of the automated control system, which must be carried out. In order to achieve sufficient amount of water, smooth water pressure, water towers, water level automatic control design low-cost, high practical value of the controller. The design uses a separate circuit to achieve high and low warning level processing, and automatic control, save energy, improve the quality of the water supply system.SCM is an integrated circuit chip, VLSI technology with data processing capability of the central processing unit CPU random access memory RAM, read only memory ROM, and a variety of I / O port and interrupt system, timers / timer other functions (which may also include a display driver circuit, pulse width modulation circuit, analog multi-channel converter, A / D converter and other circuit) integrated into a silicon constitute a small computer system. The basic features are as follows: the chip is small, but complete, SCM is one of the main features. Its internal program memory, data memory, a variety of interface circuit. Large processor speed is higher, the median more of the arithmetic unit, processing ability, but need to be configured in the externalinterface circuit; microcontroller clocked generally 100MHZ less suitable for small products for independent work, cited pin number from a few hundred. The application is simple, flexible, and free assembly language and C language development of SCM products. The working process of the microcontroller: microcontroller automatically complete the tasks entrusted to it, that is, single-chip implementation of the procedure for a section of the instruction execution process, the so-called directive requirements for single-chip implementation of the various operations used in the form of the command is to write down , which corresponds to a basic operation of designers assigned to it by the instruction set, an instruction; Full instructions can be executed by the microcontroller, the microcontroller instruction set, the different types of single-chip, and its instruction set is also different. So that the microcontroller can automatically complete a specific task, the problem to be solved must be compiled into a series of instructions (these instructions must be selected microcontroller to the identification and implementation of the Directive), a collection of this series of instructions to become the program, the program need to pre- stored in the components - memory storage capabilities. Memory is composed by a number of storage units (the smallest unit of storage), like a large building has many rooms composed of the same, the instructions stored in these units, the instruction fetch unit and perform like the rooms of large buildings, each assigned to only a room number, each memory cell must be assigned to a unique address number, the address is known as the address of the storage unit, so as long as you know the address of the storage unit, you can find the storage unit that stores instructions can be removed, and then be executed. Programs are usually executed in the order, instruction program is a sequential storage, single-chip in the implementation of the program to be able to a section of these instructions out and be implemented, there must be a component to track the address of instruction where this part the program counter PC (included in the CPU), the start of program execution, endowed the address where the first instruction of the program to the PC, and then made for each command to be executed, the PC in the content will automatically increase, increase The amount is determined by the instructionlength of this article may be 2 or 3, to point to the starting address of the next instruction to ensure the implementation of the instruction sequence.Microcontroller tower water level control system is the basic design requirements: inside the tower, we have designed a simple water level detection sensor used to detect the three water level, the low water level, the normal water level, water level. Low water to give a high single-chip, driven pumps and water, the red light; water level in the normal range, the pump add water, the green light; high water when the pump without water, the yellow light. The design process using the sensor technology, microcomputer technology, and light alarm technology and weak control the strong power of technology. Technical parameters and design tasks: 1, the use of the MCU to control the water level on the tower;, the water level in the water level detection sensor probe was the tower to give the microcontroller in order to achieve the water pump and water system and display system control; 3, the light alarm display system circuit, pumps and hydropower route relay control;, analysis is drawn on the working principle of the system structure and a system block diagram using the microcontroller as a control chip, the main work process when the water in the tower low water level, water level detection sensor gave a high microcontroller, microcontroller-driven pump to add water and display system so that the red light lit; pump add water when the water level within the normal range, the green light, when the water level in the high-water mark, The microcontroller can not drive the water pump to add water, the yellow light. Light alarm circuit, the relay control circuit it works: When the water level in the low water, low water level detection sensor line is not +5 V power supply guide pass into the regulator circuit is treated in the output of the voltage regulator circuit has a high level, into the P1.0 port of the microcontroller, another high voltage circuit output of the microcontroller P1.1 port SCM After analysis, the P1.2 port outputs a low red light, drive, P1. 5 out a signal so that the optocoupler GDOUHE guide through so that the relay is closed, so that the water pump to add water; when the water level in the normal range, water pump plus P1.3 pin to a low level, so that the green light; when the water level in the high-water zone, the sensor of the two detection lines are conduction, are +5 power conduction into the SCM, SCM Afteranalysis, the P1.4 pin out of a low yellow light, The optocoupler guide a low out of the P1.5-side can not pass, so that the relay can not be closed, the pump can not add water; failure when three flashing light indicates the system.。