基于嵌入式 web 服务器的数据监控系统毕业论文

 2021-04-15 12:04

摘 要

随着物联网的发展,嵌入式和互联网的联系越来越紧密,“智能家庭”便是以冰箱、空调、电脑为嵌入式硬件,通过互联网结合起来,实现对家用电器的智能控制系统,人们的生活也变得更加便捷。从“智能家庭”中抽象出简化模型来对其进行研究也是当前的热门方向。本文以STM32单片机为控制器,以ENC28J60以太网模块为接受发送端口,结合由UIP协议搭建出的无操作系统的嵌入式web服务器,实现用PC网页来监测和控制连接在单片机上的LED和对连接在单片机上的水位传感器信息的采集。

测试之后我们观察到通过点击google网页上的控制按钮,能够控制LED灯的亮灭,并且可以实时显示LED灯的亮灭状态,还成功地在网页上显示了实时的水位,实现了web服务器与浏览器的信息交互,完成了课题的设计要求。这说明了将STM32之类的控制芯片,与嵌入式协议栈相结合,可以实现嵌入式设备访问以太网的功能,能够简易、高效地搭建出嵌入式web服务器。

关键词:STM32;web服务器;UIP;数据监控

Data monitoring system based on Embedded Web server

ABSTRACT

With the development of Internet of Things, the connection between embedded system and Internet is more and more close. Intelligent family is based on refrigerator, air conditioner and computer as embedded hardware. It combines them through Internet to realize intelligent control of household appliances, and people's life becomes more convenient. It is also very important to abstract the model from "smart family" to study it. In this paper, STM32 MCU is used as the controller, ENC28J60 as the Ethernet module, and the Internet transmission protocol UIP protocol is used to build an embedded web server without operating system, which can monitor and control the LED connected to the MCU and collect the water level sensor information connected to the MCU.

After testing, we found that by clicking on the control button on the browser's web page, we can control the LED lights, and can synchronize the status of the LED lights, and successfully display the real-time water level on the web page, realize the information interaction between the Web server and the browser, and complete the design requirements of the subject. The results show that the combination of STM32 series control chips and embedded protocol stacks such as UIP protocol stack can realize the function of embedded devices accessing Internet network. It is a feasible and inexpensive scheme for Embedded Web server.

Key Words:STM32;Web Server;UIP;Data Monitoring

目录

1绪论

1.1课题研究背景及意义 1

1.2国内外研究现状 2

1.3本文主要内容 3

2基于嵌入式web服务器的数据监控系统硬件设计

2.1 stm32控制芯片 4

2.2 ENC28J60以太网模块设计 6

2.3 LED模块设计 7

2.4 ADC模块和水位传感器硬件设计 7

2.5 SPI串口通信 9

2.6 本章小结 9

3基于嵌入式web服务器的数据监控系统软件设计

3.1 搭建web server 11

3.1.1 UIP协议栈 11

3.1.2 UIP移植 13

3.1.3 web服务器的搭建 14

3.2 编写网页 15

3.3 应用程序的实现 16

4功能实现与调试

4.1功能介绍 19

4.2调试 19

结论 23

致谢 25

参考文献 26

1 绪论

1.1课题研究背景及意义

嵌入式设备因其便于携带、安全可靠、经济实惠等特点,在当今社会被广泛使用。我们可以从电器、工业、通信等领域中找到它们的身影。但是传统的嵌入式系统也存在他的弊端,例如,有一些嵌入式系统离用户很远,在这个时候对系统数据的采集、性能的检查和一些应用软件的更新会存在许多的问题,可能需要耗费很多的时间和精力来实现。所以,如果用户能远程观察嵌入式系统的状态、获取和发送数据,将会带来很大的益处[1]。随着嵌入式设备的大量使用,不同的设备之间的通讯成本越来越高,使得用户对设备的管理存在极大的问题。因此,我们需要为这些具有不同功能的嵌入式设备提供一个廉价并且唯一的中间通讯方式。

当今世界,嵌入式技术得到飞速进步,互联网也普及到千家万户,嵌入式Web Server能够使用的地方也变得多了起来。Web Server的优势在于它作为人机交互的一种手段,显得十分的便捷,用户只需在客户端通过web浏览器输入嵌入式设备的IP地址就可以对它进行远程访问,方便了用户对嵌入式设备的管理控制和监视。基本原理为Web服务器通过互联网协议与浏览器进行通信,Web服务器在收到浏览器的ask后,根据请求调用嵌入式设备中的接口函数,实现对设备内资源的利用,同时返回设备内资源的状态,在网页中显示。

传统的嵌入式系统想与其他的设备进行通讯可以通过GPRS等方式来实现,但通过各方面的比较不难看出TCP/IP通信是对嵌入式系统来说最为廉价,最为方便的[2]。很多嵌入式系统使用TCP/IP协议,它们具有以下优点:可以以最低的成本利用Internet网络基础设施来进行多点之间的长途通信;由于TCP/IP协议在全球范围内大量应用,可以被所有的嵌入式系统所认可,这样设备间通讯就会特别的方便,不必再去单独为了哪两个设备再去写个协议;可以使用web浏览器接入互联网中与任何地方的任何用户进行通讯。所以,将TCP/IP协议植入嵌入式设备,以此来接入 Internet,一方面有利于设备的通信和操作,另一方面嵌入式设备也可以更为便利的利用互联网上丰富的资源。如此,用户可以更便捷地更新应用软件。

您需要先支付 80元 才能查看全部内容!立即支付

课题毕业论文、开题报告、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找,优先添加企业微信。