




已阅读5页,还剩18页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
课程设计 基于单片机的医用点滴余液液位监测报警系统 I 课程设计说明书课程设计说明书 目目 录录 1 1 前言前言1 1 2 2 总体方案设计总体方案设计2 2 2.12.1 方案论证方案论证2 2.22.2 方案选择方案选择.3 3 3 单元模块设计单元模块设计 4 4 3.13.1 监测模块监测模块4 3.23.2 单片机模块单片机模块.4 3.33.3 LEDLED 信息显示模块信息显示模块.6 3.43.4 控制输入模块控制输入模块7 3.53.5 报警模块报警模块.7 4 4 软件设计软件设计9 9 5 5 系统调试系统调试1010 6 6 结论结论 1111 7 7 总结和体会总结和体会 1212 8 8 参考文献参考文献 1313 附录附录 1 1:附图:附图 1414 1.11.1 原理图原理图1414 1.21.2 电路电路 PCBPCB 板图板图1515 1.31.3 软件代码软件代码1616 附录附录 2 2:相关设计软件:相关设计软件 1818 1 1 1 前言前言 随着社会的发展,随着科技的进步。运来越多的地方需要用到一些高科技 设备来为人们服务。 目前医院普遍使用的是人工监控点滴输液装置器,将液体容器挂在一定高 度,利用势差将液体输入病人体内,用软管夹对软管夹紧和放松控制滴速, 药物的有无将威胁病人的生命安全,为此 医护人员要不定时的观察药物的情 况,本设计根据需要设定液位控制高度,同时具备报警、高度显示等功能, 使用了红外对射传感器,使其具有与液面不接触的特点,可用于有毒、腐蚀 性液体液位的控制,简单、方便、安全、具有较高的使用价值。如何使这种 手工操作走向自动化或半自动化,让护理人员监控病人打点滴的进程时间得到 充分利用,这就要求医疗器械加速自动化与半自动化进程,提高医护质量。 本文介绍了一种操作方便、显示直观、可集中控制、具有报警功能的智 能型液体点滴速度监控系统。该系统可让医护人员在控制室 监控不同受液者 的输液状况,也可以直接到输液室直接改变输液状态,了解病人的输液进程, 及时通知处理将快完成的输液。 2 2 2 总体方案设计总体方案设计 本次设计思想主要是想借助单片机,对 医疗点滴输液加以半自动化的控 制。首先通过液位传感器检测信号,然后将检测到的信号送给单片机进行处理, 通过数码管和报警装置,将床位信息显示在监控室,然后由护理人员对具体情 况进行处理。 2.12.1 方案论证方案论证 设计中采用了两个方案,具体的方案见方案一和方案二。 方案一 :如图 2.1 所示系统上电工作后,用户首先通过键盘设定温度 的初值,单片机系统将用户设置的 “警戒值”保存地址空间中。安装于被 监测对象上的超声液位传感器,将实时监测数据经A/D 转换,送入单片机 连接 I/O 口。单片机进入主程序后,开始以查询的方式检测转换的数据,并 将相应的数值通过数码管显示输出。当检测的液位小于设置的初值时,单片 机将控制报警系统响起,以提醒医护人员。 3 超超声声波波传传感感器器 A/D转转换换 报报警警装装置置 单单片片机机控控 制制系系统统 LED显示 键盘输入 LED显显示示 键键盘盘输输入入 图 2.1 液位监测报警系统方案一框图 方案二:如图 2.2 所示系统结构框图, 本方案仍以微型单片机为控制 核心,由检测模块、信息处理模块 、LED 信息显示模块、控制输入模块 和 报警模块五大部分组成。整个系统工作 前,先将传感器装于点滴瓶 “警戒” 液位水平处。 单片机启动 ,开始监测工作。当液位低于警戒液位时,传感 器将输出一低电平,送入 P1.0 口(一张床位对应一个口,本设计只取一张 床位模拟) ,然后由单片机内部的程序,对信息进行处理,将病床号显示到 LED 上,同时报警启动,提醒医护人员。当由控制输入后,表示医护人员已 经去对事件进行处理。系统将复位,等待其他的床位监测信息。 红红外外对对射射型型传传感感器器 报报警警装装置置 单单片片机机处处 理理系系统统 LED显示 键盘输入 LED显显示示 控控制制输输入入 图 2.2 液位监测报警系统方案二框图 4 2.22.2 方案方案选择选择 方案一与方案二有很多相似之处,两个设计都运用到了单片机,用到了传 感器,运用了 LED 显示管,而且在功能方面都很相似。但综合分析:超声波 传感器较红外传感器要贵得多,而且方案一还需要 A/D 转换,成本就更高。 而且应用对象为点滴瓶,采用方案一,安装不方便,而且超声波传感器在这种 应用下存在盲区,且对不同的大小的点滴瓶都要重新设定参数。对于方案二而 言,成本低,最重要的是安装上方便,医护人员可根据点滴瓶的大小,在安装 时进行调整。因此,从设计和经济的角度讲,我们组采用了方案二。 5 3 3 单元模块设计单元模块设计 本课程设计主要 由监测模块、信息处理模块(单片机模块) 、LED 信息 显示模块、控制输入模块和报警模块五大部分组成。其中最核心部分的部分 是信息处理模块和检测模块。 3.13.1 监测模块监测模块 本模块采用的是红外对射型余液液位传感器。发光二极管和光敏二极 管分别安装于 “警戒”液位(由医护人员根据实际情况设定)两侧,处 于对射状态。在高位警戒液位时, LM339 的反向输入端即 3 端口输入高 电平,此时 5 端口输出高电平,即送入单片机的P1.0 口。当低于警戒 液位时,光敏二极管导通, 3 端则输入低电平, 5 端随之也取反,然后 送入单片机处理,已发出报警。其原理图如图3.1: 6 图 3.1 红外对射型液位传感器原理图 3.23.2 单片机模块单片机模块 3.2.13.2.1 AT89C52AT89C52 概述概述 AT89C52 是美国 ATMEL 公司生产的低电压,高性能CMOS 8 位单片机, 片内含 8kbytes 的可反复擦写的 只读程序存储器(PEROM )和 256 bytes 的随机取数据存储器(RAM ),器件采用 ATMEL 公司的高密度、非易失性 存储技术生产,与标准 MCS 一 51 指令系统及 8052 产品引脚兼容,片内置 通用 8 位中央处理器(CPU)和 Flash 存储单元,功能强大 AT89C52 单片机适应于许多高性价比的应用场合。 7 图 3.3 AT89C52 引脚 3.2.23.2.2 AT89C52AT89C52 主要性能参数主要性能参数 与 Mcs 一 51 产品指令系统和引脚完全兼容 8k 字节可重擦写 Flash 闪速存储器 1000 次擦写周期 全静态操作:OHz 一 24MHz 三级加密程序存储器 128X8 字节内部 RAM 32 个可编程 I / O 口线 3 个 16 位定时计数器 8 个中断源 可编程串行 UART 通道 低功耗空闲和掉电模式 8 3.2.33.2.3 AT89C52AT89C52 功能特性概述功能特性概述 AT89C52 提供以下标准功能:8k 字节 Flash 闪速存储器,256 字节内部 RAM ,32 个 I / O 口线,3 个 16 位定时计数器,一个 6 向量两级中 断结构,一个全双工串行通信口,片内振荡器及时钟电路。同时, AT89C52 可降至 OHz 的静态逻辑操作,并支持两种软件可选的节电工作 模式。空闲方式停止 CPU 的工作,但允许 RAM ,定时计数器,串行 通信口及中断系统继续工作。掉电方式保存 RAM 中的内容,但振荡器停 止工作并禁止其它所有部件工作直到下一个硬件复位。 3.33.3 LEDLED 信息显示信息显示模块模块 本设计选用 4 位共阳极数码管作为显示模块。数码管的 A、B、C、D、E、F、G 和 DP 分别与单片机的 P2.0P2.7 相连。而 四位数码管的位则通过 74HC138 译码器来选通。 74HC138 是一个 3-8 译码器。 74HC138 的 A、B、C 与单片机的 P1.5、P1.6、P1.7 相连通, 我们可以通过程序控制 P1.5、P1.6、P1.7 的输出进而控制 3-8 译码 器的输出,从而达到选位的目的。本次课程设计中的四位数码管与单 片机的连接电路如图 3.3,其选通情况如表 33: 9 图 3.2 LED 信息显示模块电路图 表 33:数码管选位情况表 P1.7 P1.6 P1.5C B A 选位情况 0 0 00 0 0 Y0 输出高电平即第 1 位被选中 0 0 10 0 1 Y1 输出高电平即第 2 位被选中 0 1 00 1 0 Y2 输出高电平即第 3 位被选中 0 1 10 1 1 Y3 输出高电平即第 4 位被选中 3.43.4 控制输入控制输入模块模块 本模块有 2 个独立按键,一个是复位按键,另一个为解除报警按键, 接在 P3.0 口。具体接线图如图 3.4: 10 图 3.4 按键与单片机硬件接口电路 3.53.5 报警模块报警模块 此次课程设计中为了达到低于 “设定”液位后报警且显示对应床号的目 的。我们的主要思想是:当 1 号床位的点滴低于“设定”液位,由红外液位 传感器输出的低电平,送入单片机的 P1.0 口(四张床位的检测信号分别对应 P1.0、 P1.1 、P1.2、 P1.3) ,然后由单片机的内部加以处理,由 P2 口、 P1 口的高三位、74LS138 译码器等作用,在 LED 上显示出对应的床位。同时 在 P3.7 口的作用下,报警器响起。如果按下 P3.0 口外接的按钮,则报警停 止,显示也熄灭,表示已有医护人员对信息进行处理。其报警电路如图 3.6。 11 图 3.4 报警电路 4 4 软件设计软件设计 软件设计主要分为初始化程序、存储单元和中断设置初始化,主程序(内 嵌报警程序) 、报警中断子程序、中断服务子程序(显示程序)、延迟子程序。 12 先对要用到的存储单元, I/O 口,寄存器进行相应的设置,然后主程序对四个 端口 P1.0、P1.1、P1.2、P1.3 进行循环检测,当检测到有效信号时,则对相 应存储单元赋值,然后继续其他端口检测,定时时间到时,对四个存储单元内 的数据进行输出显示,报警也响起;当主程序检测到 P3.0 为高电平时,则终 止报警,同时存储单元再次初始化,继续循环检测,重复相同 “动作” 。程序 流程图如图 4.1。 程程序序、存存储储单单 元元、中中断断设设置置初初 始始化化 主主程程序序(包包含含报报 警警程程序序) 中中断断服服务务子子程程序序 (显显示示程程序序) 延延迟迟子子程程序序 结结束束 报报警警中中断断子子程程序序 图 4.1 程序流程图 5 5 系统调试系统调试 本次设计在系统硬件调试方面,初期在老师的指导下,没遇到什么 困难。困难主要出现在后期,与软件合成后调试时,发现传感器信号输出方面 13 无变北京:国防工业出版社, 1998. 14 附录附录 1 1:附图:附图 1.11.1 原理图原理图 注明:注明:1、四位数码管分别对应四张床位 2、原理图左边四个按钮用来模拟四个液位传感器 15 1.21.2 电路电路 PCBPCB 板图板图 16 1.3 软件代码软件代码 ORG 0000H AJMP START ORG 000BH ;INT0 LJMP TIMER ORG 0030H START: MOV SP, #75H MOV R1, #6CH MOV R3, #8FH MOV P2, #0FFH MOV DPTR, #LEDTAB MOV P3, #0 MOV TMOD,#01H MOV TL0, #0F0H MOV TH0, #0EFH SETB EA SETB ET0 SETB TR0 MOV 6CH, #5 MOV 6DH, #5 MOV 6EH, #5 MOV 6FH, #5 ;= MAIN: JB P0.0, BED2 SETB P3.7 MOV 6CH, #1 BED2: JB P0.2, BED3 SETB P3.7 MOV 6DH, #2 BED3: JB P0.4, BED4 SETB P3.7 MOV 6EH, #3 BED4: JB P0.6, HERE SETB P3.7 MOV 6FH, #4 ;= HERE: JNB P3.7, NEXT CPL P3.7 JB P3.0, STOP CPL P3.7 NEXT: SJMP MAIN ;= 17 STOP: CLR P3.7 CLR P3.7 CLR P3.7 CLR P3.7 MOV 6CH, #5 MOV 6DH, #5 MOV 6EH, #5 MOV 6FH, #5 JMP MAIN ;= TIMER:MOV TL0, #0F0H MOV TH0, #0EFH MOV A, R1 MOVC A, A+DPTR MOV P1, R3 MOV P2, A MOV A, R3 ADD A, #20H MOV R3, A INC R1 CJNE R1, #70H, OUT MOV R3, #8FH MOV R1, #6CH OUT: RETI ;= DELAY2:MOV R7, #200 L2: DJNZ R7, L2 RET LEDTAB: DB 0C0H, 0F9H, 0A4H, 0B0H, 99H, 0FFH END 18 附录附录 2 2:相关设计软件相关设计软件 1. Keil uVision2 程序编辑软件 2. ISIS 7 Professional 仿真软件 3. Protel 99 SE 电路原理图设计,印制电路板设计软件 19 为你提供优秀的毕业论文参考资料,请您删除以下内容,为你提供优秀的毕业论文参考资料,请您删除以下内容,O(_)O 谢谢!谢谢!2 Many people have the same mixed feelings when planning a trip during Golden Week. With heaps of time, the seven-day Chinese 为你提供优秀的毕业论文设计参考资料,请您删除一下内容,为你提供优秀的毕业论文设计参考资料,请您删除一下内容, O(_)O 谢谢!谢谢!National Day holiday could be the best occasion to enjoy a destination. However, it can also be the easiest way to ruin how you feel about a place and you may become more fatigued after the holiday, due to battling the large crowds. During peak season, a dream about a place can turn to nightmare without careful planning, especially if you travel with children and older people. As most Chinese people will take the holiday to visit domestic tourist destinations, crowds and busy traffic are inevitable at most places. Also to be expected are increasing transport and accommodation prices, with the possibility that there will be no rooms available. It is also common that you ll wait in the line for one hour to get a ticket, and another two hours at the site, to only see a tiny bit of the place due to the crowds. Last year, 428 million tourists traveled in China over the week-long holiday in October. Traveling during this period is a matter that needs thorough preparation. If you are short on time to plan the upcoming “Golden Week“ it may not be a bad idea to avoid some of the most crowded places for now. There is always a place so fascinating that everyone yearns for. Arxan is a place like this. The beauty of Arxan is everlasting regardless of the changing of four seasons. Bestowed by nature, its spectacular seasonal landscape and mountains are just beyond word. Arxan is a crucial destination for the recommended travelling route, “China Inner Mongolia Arxan Hailar Manzhouli“. It is also the joint of the four prairies across the Sino-Mongolian border, where people gravitate towards the exotic atmosphere mixed with Chinese, Russian, and Mongolia elements. As a historic site for the Yitian Battle, Arxan still embodies the spirit of Genghis Khan. Walking into Arxan, you will be amazed by a kaleidoscope of gorgeous colors all the year round - the Spring azaleas blooming red in the snow, the Summer sea wavering blue in the breeze, the Autumn leaves painted in yellow covering volcanic traces, and the Winter woods shining white on the vast alpine snowscape. Hinggan League Arxan city is situated in the far eastern area of Inner Mongolia Autonomous Region. Its full name “Haren Arxan“ means “hot holy water“ in the Mongolian language. Arxan is a tourism city in the northern frontier with a blend of large forest, grand prairies, vast snowfield, heaven lake cluster, thermium, as well as volcanic cluster. It is a rare and unique ecotourism base filled with healthy sunshine, clean air and unspoiled green. Nestled close to the countrys largest virgin forest, and known for its spring and ecological environment, Arxan is marveled at by many tourists as the purest land on earth. You cannot miss out the Autumn of Arxan. It is definitely the best with brightly-colored scenery full of emotions. Autumn in the northern part of the country comes earlier than the South. A September rain followed by the footprints of Autumn brings more colors to the once emerald green mountain and blooming grassland. Shutterbugs flock to see for themselves the marvel of splendid colors around the mountains and waters, many of whom have travel a long distance and even camp here only to capture a moment of the nature wonder. The silver birch turns golden, while the larch is still proudly green. You will find yourself drowned in the intoxicating red of the wild fruits as well as the glamour of flowers in full blown. And your heart will be lingering on the woods as its time for the wild fruits to ripe. The picturesque Arxan in Autumn is indeed a fairyland only exists in a dream that satisfies all your fantasies. If it rains heavily on 20 Saturday night, some elderly Chinese will say it is because Zhinu, or the Weaving Maid, is crying on the day she met her husband Niulang, or the Cowherd, on the Milky Way. Most Chinese remember being told this romantic tragedy when they were children on Qixi, or the Seventh Night Festival, which falls on the seventh day of the seventh lunar month, which is usually in early August. This year it falls on Saturday, August 2. Folklore Story As the story goes, once there was a cowherd, Niulang, who lived with his elder brother and sister-in-law. But she disliked and abused him, and the boy was forced to leave home with only an old cow for company. The cow, however, was a former god who had violated imperial rules and was sent to earth in bovine form. One day the cow led Niulang to a lake where fairies took a bath on earth. Among them was Zhinu, the most beautiful fairy and a skilled seamstress. The two fell in love at first sight and were soon married. They had a son and daughter and their happy life was held up as an example for hundreds of years in China. Yet in the eyes of the Jade Emperor, the Supreme Deity in Taoism, marriage between a mortal and fairy was strictly forbidden. He ordered the heaven troop to catch Zhinu back. Niulang grew desperate when he discovered Zhinu had been taken back to heaven. Driven by Niulangs misery, the cow told him to turn its hide into a pair of shoes after it died. The magic shoes whisked Niulang, who carried his two children in baskets strung from a shoulder pole, off on a chase after the empress. The pursuit enraged the empress, who took her hairpin and slashed it across the sky creating the Milky Way which separated husband from wife. But all was not lost as magpies, moved by their love and devotion, formed a bridge across the Milky Way to reunite the family. Even the Jade Emperor was touched, and allowed Niulang and Zhinu to meet once a year on the seventh night of the seventh month. This is how Qixi came to be. The festival can be traced back to the Han Dynasty (206 BC-AD 220). Traditionally, people would look up at the sky and find a bright star in the constellation Aquila as well as the star Vega, which are identified as Niulang and Zhinu. The two stars shine on opposite sides of the Milky Way. Customs In bygone days, Qixi was not only a special day for lovers, but also for girls. It is also known as the “Begging for Skills Festival“ or “Daughters Festival.“ In this day, girls will throw a sewing needle into a bowl full of water on the night of Qixi as a test of embroidery skills. If the needle floats on top of the water instead of sinking, it proves the girl is a skilled embroiders. Single women also pray for finding a good husband in the future. And the newly married women pray to become pregnant quickly. Tradition transformed The love story of Niulang and Zhinu, and the Qixi Festival have been handed down for generations. Yet these ancient traditions and customs are slowly dying out. Many modern Chinese, particularly youngsters, seem to know more about St Valentines Day on February 14, characterized by bouquets of roses, chocolates and romantic candlelight dinners, than they do about their home-grown day for lovers. Even Qixi is nowadays referred to as the “Chinese Valentines Day.“ More and more young Chinese people begin to celebrate this day in a very similar way as that in western countries. Fewer people than ever will gaze at the heavens on Saturday to pick out the two stars shining bright on either side of the Milky Way, that is, if people even know on which day Qixi falls. There are ready reminders dotted about, in the form of big ads saying “Sales on Chinese Valentines Day!“ in shops, hotels and restaurants. But few young women will mark the festival with their boyfriends, or take part in traditional activities to pray for cleverness. A large-scale of exhibition on the Silk Road opened to the public in the National Museum on 21 Thursday. The exhibition displays more than 400 treasures from Shaanxi province, Gansu province and 14 other regions. It is largest scale exhibition that shows the history of the Silk Road in recent years. As APEC is going on in Beijing, the exhibit aims to show the world this brilliant section of history. The Silk Road is a series of trade and cultural transmission routes that were central to cultural interaction through regions of the Asian continent. It connected the West and East by linking traders, merchants, pilgrims, monks, soldiers, nomads, and urban dwellers from China and India to the Mediterranean Sea during various periods of time. I met my dear hubby in 2009 the second year I was in my school and it was the first year when he came here. We became colleagues. And there was nothing special happening during that year. He was just a kind and humble brother graduated from the same college as me. But we did not know each other till he became my colleague and his office desk was just in front of me. There was only a glass between us. So actually we could see each other when we both look up. But it is not the main reason that really draws us close. How we become close to each other was something seems quite natural. We went out to play badminton with other colleagues and we sometimes chatted for a while. He is a man of few words but somehow sometimes will say something really humorous. Then one day, to my great surprise, I found a pot of beautiful flower on my desk. It was just the flower I had talked about with my colleague the other day, and I thought it was her who put the flower there. But the truth is not. It was the humble guy sitting in front of me. He just simply said ,”well, I caught sight of this flower and thought that its beautiful and you may like it”. I wonder why I was moved because of these simple words and present. Maybe it is the sincerity and the true self that impress me. I thanked him and some colleagues walked past my desk would appreciate the beautiful flower and they noticed that something romance happened there. Then later on, there were some little surprises once in a while. Once, there was something wrong with my drawer and I had complained about it unconsciously. And he fixed it for me. Then the other day, he placed several pink diamond roses beside the flower with a piece of paper saying” I love you more than I can say! Diamond stands for marriage, rose stand for love. I hope you are mine, become my wife. You are the only girl who I really want to spend the rest of my life to stand by.” Although there were some grammar errors but I got what he meant. He meant so clear and so direct. And actually, I accepted him some days earlier. I was just waiting for him to break the ice. So finally, the common interests and the common understanding brought us together. Some people say the relationship and the feeling will change after getting hitched. You will find that love is no longer strong and there is always lack of passion and whats worse you may find out many bad habits of your partner, which never appear when you are first in love before the marriage. It seems that many faults turn up after you truly living together and see each others
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 场地扩建打桩方案(3篇)
- DB23-T3028-2021-鲜食甜玉米机械化栽培技术规程-黑龙江省
- DB23-T2928-2021-基于水生态功能分区的流域水环境监测方法指南-黑龙江省
- DB23-T2839-2021-政务信息资源目录第1部分:编码规则-黑龙江省
- 农业基地现场管理制度
- 公司接待厨房管理制度
- 岗位定员设置管理制度
- 工程现场质量管理制度
- 文明施工措施方案(3篇)
- 建筑围挡招标方案(3篇)
- 2025年继续教育公需科目网络考试试题及答案
- 2025高考终极押题范文6篇与题目
- DB32/T 4220-2022消防设施物联网系统技术规范
- 车位转让合同协议书
- 合伙经营货车辆协议书
- 2025年农村个人果园承包合同
- 上海上海市普陀区融媒体中心专业技术人员招聘笔试历年参考题库附带答案详解
- 湖北省武汉市2025届高三年级五月模拟训练试题数学试题及答案(武汉五调)
- 企业管理流程数字化转型计划
- 机械通气患者护理
- 2025年数控技术专业毕业考试试题及答案
评论
0/150
提交评论