KABEL PRÜFER

Download Report

Transcript KABEL PRÜFER

Implementation of an Economical
Web Server for Home Automation
System Based on IR, Bluetooth and
Ethernet Technology
Dr.-Ing. Chao-Huang Wei
Department of Electrical Engineering
Southern Taiwan University
Outline
1. Foreword
2. Hardware Tools
3. Software Tools
4. Experiment Results
5. Conclusions and Future Works
Trend of Home Network
• There is a growing need to add network connectivity
to more home devices.
• The Forrester Research reports, by year 2010, up to
95% of the devices used to access the Internet are
non-PC devices. By year 2020, the global thing-tothing Internet (IOT) will be developed into a trillionUS-Dollar industry.
• The network connectivity of machine-to-machine
(M2M) communication will be a primary market
demand for embedded networking systems.
Requirements of Home Networks
•Noise Rejection
Network has to allow for reliable communication.
Requires preservation of data and synchronization of data lines.
•Bandwidth
Home networks can contain many sensors and actuators.
Sensor data can be generated at different rates.
•Connectivity
Sensors have to be connected to processing units.
•Integration
Network structures have to be integrated into buildings.
•Privacy and Security
Home networks will transfer private and sensitive data.
Installation & Maintenance of Home
Network & Networked Home Appliances
• Installation (Plug & Play)
Allows devices to describe themselves.
Allows remote inquiry of devices.
Individual home/room identification.
• Maintenance (Supported application code)
Build-in basic function of device.
External downloaded program.
User altered control program.
Emergency Handling
• Cutoff power supply when malfunction.
• The front door must not be locked when emergency
condition in house occurs.
• The fire alarm must turn off all gas and electricity.
Types of Home Networking
• Wired
1.
2.
3.
Phone Line Networking (HomePNA)
Power Line Networking (X10, CEBus, HomePlug, LonWorks)
Other wires (Ethernet, USB, IEEE1394 Firewire, I2C)
• Wireless
1.
2.
3.
4.
WiFi
ZigBee
Bluetooth
Infrared
System Architecture
Web Controller
• Considerations:
1. Easy hardware and software developments.
2. High to medium CPU performance, but low-cost.
3. Enough I/O ports & interface supporting.
• Solution:
1. Single-chip Microcontroller with TCP/IP, 10/100M Fast
Ethernet MAC/PHY, and flash memory.
2. The ASIX company (Taiwan) provides software libraries
(incl. I2C, UART, Timer, TCP/IP Stack) and develop
tolls for their AX110xx family.
3. RTOS support.
AX11005 Development Board
Functional Block Diagram of
Embedded Ethernet Microcontroller
Application Examples of AX110xx
Peripherals to Web Controller
Bluetooth Module
UART Interface
Humidity/Temperature Sensor Module
I2C Interface
Contact Sensor Module
Infrared Remote Connection
Infrared Signal from/to GPIO Ports
Software Modules of AX110xx
The AX110xx software modules include CPU, Ethernet,
S/W DMA, MS Timer, Local Bus, I2C, SPI, 1-Wire,
CAN, UART2, PCA and two TCP/IP stacks (i.e. uIP and
Lightweight IP).
TCP/IP Module
Application Modules
TCPIP Module
// general interface
TCPIP_Init(…), TCPIP_Bind(…), TCPIP_SetPppoeMode(…), TCPIP_GetIPAddr(),
TCPIP_GetSubnetMask(), TCPIP_GetGateway(), TCPIP_SetIPAddr(…), TCPIP_SetSubnetMask(…),
TCPIP_SetGateway(…), TCPIP_SetMacAddr(…) , TCPIP_PeriodicCheck(…),
TCPIP_AssignLowlayerXmitFunc(…), TCPIP_AssignPingRespFunc(…), TCPIP_DontFragment(…) ,
TCPIP_Receive(…)
// tcp interface
TCPIP_TcpListen(…), TCPIP_TcpNew(…), TCPIP_TcpConnect(…), TCPIP_TcpKeepAlive(…),
TCPIP_TcpClose(…), TCPIP_QueryTcpLocalPort(…), TCPIP_TcpSend(…)
// uip interface
uip_arp_ipin(), uip_arp_arpin(), uip_arp_out(), htons(…) TCPIP_GetRcvBuffer(),
TCPIP_GetXmitBuffer(), TCPIP_SetRcvLength(…), TCPIP_GetXmitLength(),
TCPIP_GetPayloadBuffer(), TCPIP_GetGwMacAddrFlag(), TCPIP_SetGwMacAddrFlag()
Adapter Module
HTTP Protocol
HTTP Protocol
HTTP Protocol Sub-module
void HTTP_Init()
U8_T HTTP_NewConn(U32_T XDATA* pip,
U16_T remotePort, U8_T socket)
void HTTP_Event (U8_T id, U8_T event)
void HTTP_Receive (U8_T XDATA* pData,
U16_T length, U8_T conn_id)
U8_T http_UserPost (U8_T XDATA* pData,
U16_T length, U8_T fileId)
void http_DivideHtmlFile
(HTTP_SERVER_CONN XDATA* pHttpConn,
U8_T id)
U8_T http_NewConfig(void)
Web page Sub-module
void FSYS_Init()
void fsys_InitPostRecord()
U8_T FSYS_FindFile (U8_T XDATA*
pFName)
void (*fun_tbl[]) (void *pWebData)
Webpage Conversion to C
Language
Web Page & Experiment Examples
IR Receiver 2
(for Lamp)
IR Receiver 1
(for DVD)
Bluetooth
Web
Server
Conclusions and Future Works
• An economical web controller for home networks has been
developed in spite of hardware and software limitations.
• The user can control legacy home appliances and to receive sensor
data to monitoring home status via infrared signal.
• The web controller provides webpage to the user for Internet access
via Ethernet.
• The web controller communicates to smart phone for easy control
in house via Bluetooth.
• Applications for home networks will toward to Home Automation,
Home Security, Home Healthcare and Home Entertainment, but
also suitable for office.
Thanks for your attention!