Industry News

Weida main product booster cables , battery clip, tow rope,ratchet tie down.

« Advantech DLOG launch ultra-rugged vehicle terminal type MTC6Chinese-made electric car by turning the Copenhagen Climate Conference »

NIOS Ⅱ processor-based Intelligent Home Control System


    In the modern home environment, with the lighting, intelligent appliances, security and other growing equipment, electrical installation, control lines are becoming increasingly complex. At the same time meet the requirements of multi-function, easy installation,booster cables good scalability and low operating costs, as technological development of modern smart home system a necessary requirement.
    As computer networks become more powerful and universal application of a variety of intelligent people increasingly strong demand for products, home intelligence, networking, battery clip remote and systematic design of its safe, comfortable, convenient service by consumers. Therefore, the intelligent home control systems have great potential for development.

    The same level with the other CPU, such as ARM, MIPS, and POWER-PC processor and other processors NIOS Ⅱ design has its obvious advantages; to the needs of designers with the freedom of customization, tow rope and SoPC technology processor, memory, I / O port features such as system design needs are integrated in a PLD device, ratchet tie dowm constructed a programmable system on chip design with a flexible approach, scalable, extensible, scalable, and good use of IP Reuse , development tools included in the SoPCBuilder NIOS Ⅱ processor and other common peripheral IP blocks, can easily be processors, memory and other peripheral modules connected together to form a complete system, has great application flexibility and for the system upgrade is also quite convenient.

    This smart home control system design based on NIOS Ⅱ of SoPC technology, combined with soft-core processor NIOS Ⅱ and Cyclone Ⅱ development kit to achieve. The hardware system consists of the core FPGA chip, the external expansion of SDRAM, FLASH, various input / output circuit and LAN91C111 SMSC's Ethernet interface chip.

    2 system.

    For a smart home control systems, need to meet the lighting lighting control, intelligent home appliances, household appliances local or remote power control and security control, monitoring requirements, the system will FPGA, NIOS Ⅱ processor, Ethernet, and expansion of the external circuit for environment, remote control home appliances.

    Design first FPGA architecture to build on the major, and then build the system in the expansion of the external FPGA circuit, including SDRAM, FLASH Ethernet interface circuit, followed by the desktop control software written using VisualBasic to control the system via Ethernet, to achieve the system circuit remote control. Meanwhile, the input button through the remote client to send information through the desktop software to receive information and show the message to achieve both ends of the communication. As the system uses Ethernet for data transmission and processing, intelligent home control system and the current function of increasingly powerful computers and the extensive use of the Internet closer together, more powerful functionality and ease of use.

    3 system hardware design.

    Altera's NIOS Ⅱ processor design highlight the advantages of expression in his flexibility and upper cut, the system provides a wealth of IP, designers can choose any of the IP Jin Xing, Also, users as needed Dingzhi own the IP, to achieve their Suo need to function.

    In this system, the main use of the following AlteraIP, and gain the appropriate settings:

    (1) Nios Ⅱ Processor: The IP is the system processor module, is used as the core operation control processing;

    (2) FLASHMemory (CFI): The IP is the external FLASH memory control interface module, complete FLASH timing control;

    (3) DDRSDRAMController: The IP is the external memory interface control module DDRSDRAM, complete DDRSDRAM timing control;

    (4) JTAGUART: the completion of the IP system in the host PC and SoPCBuilder streaming between the characters to carry out the program to download, and debug hardware and software online;

    (5) LAN91C111Interface: The IP is an external Ethernet chip interface module, complete the NIOS Ⅱ system LAN91C111 card chip to external control, so as to realize Ethernet data transmission system;

    (6) CharacterLCD: The IP is the external LCD interface control module, complete control of an external liquid crystal display module;

    (7) PIO: The IP is a universal I / O control module, used to control external input and output;

    (8) Intervaltimer: The IP is the system timer module, the processing time to complete the system.

    IP needs in selected system resources, you can very quickly the FPGA through SoPCBuilder build an embedded system. First of all, custom soft-core processor, set the standard for the standard NIOS Ⅱ CPU, 4kB instruction buffer to support JTAG download debugging; 16MFLASH used to store user data and programs; 16MDDRSDRAM used to run programs as a system of storage space; custom Avalon 3 state bus architecture, the LAN91C111 set to Avalon bus from the device through the Avalon bus is connected with the NIOS Ⅱ system, and customize LAN91C111 the drive module, to achieve the control system for the chip.

    Build complete system module, you need to set the interrupt number for each module, so that CPU during operation to check various internal and external interrupt priority, in which the system timer interrupt the highest priority, then each module interrupt priority the order of the JTAG module, an external button input, EPCS configuration chip, LAN91C111 chip. FLASH memory also need to set the base address of 0x000000, so that every time the system started from the FLASH of instruction. Thus, the components used SoPCBuilder editor users connect peripherals and systems, you can run SoPCBuilder generated hardware description language files, preparation of related VerilogHDL module, the system modules and external devices connected, then Quartus Ⅱ Compile the FPGA software design projects.

    4 System Software Design.

    In the intelligent home control systems, need to complete the network data transmission and control of control, and therefore in the software design, the need to complete two areas: network services, and establishing the client and the network connection between the systems; response Ethernet message data, corresponding to the circuit control.

    Used in the design LwIP (LightweightTCP / IPStack) network components to achieve system control functions, also need to transplant the use of operating system support LwIP components in the system, select the transplant μC/OS- Ⅱ operating system, add in the software design the RTOS and LwIP the two components can easily achieve the system's network data transmission and control.

    In the Nios Ⅱ IDE create a new project, the first in the "SystemLibraryProperties" (system library property) to the operating system of choice RTOSOptions parameter. In μC/OS- Ⅱ in addition to user-created tasks, the system also comes with two essential tasks, namely statistical tasks and idle task, used for system management, so consider the convenience of future system upgrades in the system set the maximum number of tasks, the maximum number of tasks set to 10. While the lowest priority set to 20, where the higher the number, the lower priority tasks on behalf of, the parameters are not limited to the system brought the number of tasks. Then, in the system library properties to choose SoftwareComponents LwIP network protocol stack of the parameter settings in the system used in UDP and TCP protocol agreement, and use the DHCP services, the system can 分配 IP Wan Cheng function of other parameters saved as the default. ΜC/OS- Ⅱ and LwIP on After the completion of the relevant function is the task of preparing the system.

    In the system design of the four major custom tasks, namely:

    (1) system initialization management tasks: data structures used to initialize the operating system and create other tasks. The task is automatically deleted after the completion of the initialization.

    (2) network DHCP service management tasks: mainly used to check the DHCP service is successful, the system is successfully assigned to the IP. After the completion of the task automatically deleted. Task flow chart shown in Figure 2:

    (3) Remote control and management tasks: mainly used in server and client Socket connections between the server side to receive from a client sends to the control command, and determine the appropriate action to carry out these commands. Task flow chart shown in Figure 3:

    (4) The server-side interrupt management tasks: the main server-side processing in a variety of user-generated interrupts, and then the client sends the appropriate commands to the implementation of response operations.

    5 Remote Terminal Desktop software design.

    The system hardware and software design are completed, in order to further improve the system functions, and improve ease of use, the client needs to write a special interface software to replace the command line client operation, remote user interface is to use VisualBasic6. 0 to complete the development. Windows operating system for the Internet to provide WindowsSockets (or Winsock) and other standard interface, while the VB ActiveX control is used Winsock for the Internet to provide standard interfaces, so using VB's Winsock control to complete the software development is very convenient

    Can be seen from the software interface in the system through the use of "Start Connection" button to create the local computer and intelligent home control network connections between systems. In the "information received" dialog box can receive and display from the intelligent home control system sends the message over, in the "order sent" column can choose different service through intelligent home control system to respond to the corresponding operation.

    6, system performance analysis and functional verification.

    Using Quartus Ⅱ software system designed for integrated analysis can know, by Cyclone Ⅱ EP2C35F672C6 models of FPGA design system is using the FPGA's resources are relatively small, using 3658 logic cells, the total resources of 11%, using the 52224b memory cell , 10% of the total amount of storage, showing the power of FPGA, using the remaining resources to follow-up advanced features can be extended.

    Functional verification in the system, the design of two groups the external circuit to verify system functionality. External light-emitting diode LED circuit design verification, "lights an" button to simulate the lighting control system to function; design external IR signal transmitter and receiver circuit (including one pair of infrared light-emitting diodes and infrared receiver diode circuit) certification "on home appliances 1 "button to simulate the control system, the role of the infrared appliances. In the actual test, the circuit works well, using FPGA pin as an external circuit output voltage 3.3V power supply. When the desktop software, through the establishment of local local computer systems and intelligent home control network connection, you can use the software on the remote control buttons conveniently infrared LED circuit and the transmitting and receiving circuits, and intelligent home control system can use the input button to The client sends a message, and displays the client software, to achieve mutual communication ends.

    7 Conclusion.

    This paper presents a processor based on NIOS Ⅱ Intelligent Home Control system design, hardware in the FPGA architecture to build on and expand the system outside the circuit and test circuit, using components and μC/OS- Ⅱ LwIP operating system on the network to achieve control processing of data, and finally through the desktop software designed to successfully achieve the system's remote control and external circuit connection between the server and messaging. SoPC technology systems to the microprocessor, the external memory control interface, the network chip control interface, button and LCD integrated input and output interfaces such as a chip design. SoPCBuilder both in hardware and software designers to provide better support, NIOS Ⅱ IDE integrated development environment provides an integrated network protocol stack and operating system migration, making software development more convenient.

Post comment:

◎welcome to give out your point。




iande Weida Electrical Appliance Tools Co.Ltd. professionally manufacture booster cables , battery clip, tow rope,ratchet tie down.