implementation of an economical web server for home automation system based on ir, bluetooth and...
TRANSCRIPT
Implementation of an Economical Implementation of an Economical Web Server for Home Automation Web Server for Home Automation System Based on IR, Bluetooth and System Based on IR, Bluetooth and
Ethernet TechnologyEthernet Technology
Dr.-Ing. Chao-Huang WeiDr.-Ing. Chao-Huang WeiDepartment of Electrical EngineeringDepartment of Electrical Engineering
Southern Taiwan UniversitySouthern Taiwan University
Outline
1. Foreword1. Foreword2. Hardware Tools 2. Hardware Tools 3. Software Tools3. Software Tools4. Experiment Results4. Experiment Results5. Conclusions and Future Works5. Conclusions and Future Works
• The network connectivity of machine-to-machine The network connectivity of machine-to-machine (M2M) communication will be a primary market (M2M) communication will be a primary market demand for embedded networking systems.demand for embedded networking systems.
Trend of Home Network
• There is a growing need to add network connectivity There is a growing need to add network connectivity to more home devices.to more home devices.
• The Forrester Research reports, by year 2010, up to The Forrester Research reports, by year 2010, up to 95% of the devices used to access the Internet are 95% of the devices used to access the Internet are non-PC devices. By year 2020, the global thing-to-non-PC devices. By year 2020, the global thing-to-thing Internet (IOT) will be developed into a trillion-thing Internet (IOT) will be developed into a trillion-US-Dollar industry.US-Dollar industry.
Requirements of Home Networks
•Noise RejectionNetwork has to allow for reliable communication.Requires preservation of data and synchronization of data lines.
•BandwidthHome networks can contain many sensors and actuators.Sensor data can be generated at different rates.
•ConnectivitySensors have to be connected to processing units.
•IntegrationNetwork structures have to be integrated into buildings.
•Privacy and SecurityHome networks will transfer private and sensitive data.
Installation & Maintenance of Home Installation & Maintenance of Home Network & Networked Home AppliancesNetwork & Networked Home Appliances
• Installation Installation (Plug & Play)(Plug & Play)
Allows devices to describe themselves.Allows devices to describe themselves.Allows remote inquiry of devices.Allows remote inquiry of devices.Individual home/room identification.Individual home/room identification.
• Maintenance Maintenance ((Supported application code)Supported application code) Build-in basic function of device.Build-in basic function of device.External downloaded program.External downloaded program.
User altered control programUser altered control program..
Emergency HandlingEmergency Handling
• Cutoff power supply when malfunction.Cutoff power supply when malfunction.
• The front door must not be locked when emergency The front door must not be locked when emergency
condition in house occurs.condition in house occurs.
• The fire alarm must turn off all gas and electricity. The fire alarm must turn off all gas and electricity.
Types of Home Networking
• Wired1. Phone Line Networking (HomePNA)
2. Power Line Networking (X10, CEBus, HomePlug, LonWorks)
3. Other wires (Ethernet, USB, IEEE1394 Firewire, I2C)
• Wireless 1. WiFi2. ZigBee3. Bluetooth 4.4. Infrared
System Architecture
Web ControllerWeb Controller
• 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.
• Considerations:1. Easy hardware and software developments. 2. High to medium CPU performance, but low-cost. High to medium CPU performance, but low-cost.3. Enough I/O ports & interface supporting.
AX11005 Development BoardAX11005 Development Board
Functional Block Diagram of Functional Block Diagram of Embedded Ethernet MicrocontrollerEmbedded Ethernet Microcontroller
Application Examples of AX110xxApplication Examples of AX110xx
Peripherals to Web ControllerPeripherals to Web ControllerBluetooth Module
UART Interface
Humidity/Temperature Sensor Module
I2C Interface
Contact Sensor Module
Infrared Remote Connection Infrared Signal from/to GPIO Ports
Software Modules of AX110xxSoftware 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 ModuleTCP/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 ProtocolHTTP 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 ExamplesWeb Page & Experiment Examples
IR Receiver 1(for DVD)
IR Receiver 2(for Lamp)
Web Server
Bluetooth
Conclusions and Future Conclusions and Future WorksWorks
• Applications for home networks will toward to Home Automation, Home Security, Home Healthcare and Home Entertainment, but also suitable for office.
• The web controller communicates to smart phone for easy control in house via Bluetooth.
• 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.
• An economical web controller for home networks has been developed in spite of hardware and software limitations.
Thanks for your attention!Thanks for your attention!