Categories
Uncategorized

Intelligent Control and gateway system implementation (project)

Date: June 2019

Stage: junior next semester

Background: Things Gateway development technology & network engineering design class-based Design and Implementation

Name: Intelligent Control and gateway system implementation

Summary

GEC 6818 Guangdong embedded board as the board gateway system, which is a central data system. Start serial port transceiver, ZigBee coordinator may receive network data transmitted through the serial port; lCD screen programming, real-time display of data sensor network; MySQL database to establish a connection, and the temperature and humidity sensor networks door state information may be saved to a remote database server; to establish a TCP server, the communication can be achieved with the application of the upper layer; connected through the serial port NB-IOT module, data forwarding for external traffic.

Things of perception layer using a ZigBee network, a plurality of terminal nodes to achieve the sensor data acquisition, the control device of the plurality of terminal nodes, the unified management data by the coordinator; the network layer 6818 is embedded Guangdong development board, integrate multiple protocols, to achieve data forwarding process; WEB application end has an end-side data display and lamp control handset.

Keywords: NB-IOT; IOT gateway; database; TCP / IP; MQTT

Outline

1.1 Description topic

Compared to the age of the Internet, networking communication protocols more diverse, fragmented matter is very serious, thus highlighting the importance of the gateway will – Things Gateway able to integrate different information was collected, and it transmission to the next level, and thus are unable to transmit information between the various parts. Things aware network gateway may be implemented with a communication network, and a protocol conversion between different types of network-aware; both wide area network, a local area network can also be implemented.

Things gateway, as a new term in the coming era of things will play a very important role, it will be perceived link between the network and traditional communication network. Further Gateway also need to have things device management capabilities, operators can manage things by each gateway node underlying perception, understanding of the relevant information of each node, and remote control.

1.2 target system

Things of perception layer using a ZigBee network, a plurality of terminal nodes to achieve the sensor data acquisition, the control device of the plurality of terminal nodes, the unified management data by the coordinator; the network layer 6818 is embedded Guangdong development board, integrate multiple protocols, to achieve data forwarding process; WEB application end has an end-side data display and lamp control handset.

1.3 Environment

a) Operating System:

Windows10 Education Edition 64

               Linux

b) software:

Android Development: Android Studio2.0

Web developers: Adobe Dreamweaver CC 2017

Database: MySql

Document write: Microsoft Word 2016

Serial command line login: putty.exe

Tftp server: tftpd32

c) the development of language:

Java language

PHP language

C language

System design and detailed design

2.1 System Design

FIG. 2.1 System Design FIG.

 

2.2 Gateway board design:

Things Gateway development board using the 6818 Guangdong embedded development board, GEC6818 development platform, core board 10 laminate process design, to ensure stable and reliable, can be used for batch tablet PCs, car machines, machine learning, POS machines, game consoles , monitoring industry and other fields. The platform is equipped with Samsung’s Cortex-A53 series of high-performance eight-core processor S5P6818, the highest frequency up to 1.4GHz, it can be used in embedded Linux and Android-driven, application and development of the operating system. Development board left a wealth of peripherals, support for Gigabit Ethernet, onboard LVDS interface, MIPI interface, USB interface.

GEC6818 development platform supports the three major operating systems, with full teaching resources and teaching content, including: ARM microprocessor system-driven experiments, embedded real-time operating system Linux development, embedded systems development Android, Android embedded application development, embedded content combat systems project development.

GEC6818 development board using the embedded Linux system, running inside the TCP server, the client may wait for TCP connection to receive control commands and data submitted; internal database clients running, the sensor data can be stored aware layer reported to the database server; 800 * 480 integrated with the board screen, the display module can be achieved by the sensor data and the status display screen; board by two serial ports, respectively aware layer ZigBee network coordinator, NB-IOT module traffic. Integrated, multi-protocol data transmission and reception, the process forwards.

GEC6818 development board is the central data system.

FIG board design Gateway 2.2

2.3 ZigBee network aware layer:

Level sensing system using a ZigBee network data transmission network, which has a coordinator and two end sections. And sensing node implements a control terminal, which includes sensing portions are temperature and humidity sensors, Hall gate sensor; controlling part is distributed on the three-color LED lights in each terminal.

FIG. 2.3 ZigBee network aware layer

2.4 display control platform and data storage:

The display control panel platform is based on a gateway for users to develop, it would require the data gateway after the process returns to the user by a simple way of viewing and other graphics operations, the use of fast data. Gateway 6818 is connected with the LCD display panel, the display state of the door switch to achieve, two upper and lower end of the display modules, real-time display of temperature and humidity. TCP display console, is achieved by a gateway connecting plate TCP server, by acquiring the transmitted data gateway plate, the display state analyzing module, door status, temperature and humidity data can also be achieved under control commands is triggered by a button hair. Data will be stored gateway receives the sensor data is saved to the database in real time, the data show a database query will show through the website. Data receiving and transmitting the control command through the mobile phone terminal MQTT protocol, the protocol gateway plate MQTT achieved by NB-IOT module.

Figure 2.4 shows the control and data storage platform

2.5 NB-IOT module implements:

Receiving sensor data associated with the light transmission control instruction a communication gateway, an application protocol NB communication module, to realize the application layer and the application layer MQTT phone through the serial port module NB. MQTT server is set up on Tencent cloud host.

BC26 features:

Full Netcom

AT command support

Support OpenCPU, eliminating the need for external MCU

Mobile support high-speed (80km / h ~ 120km / h)

Use MediaTek’s MT2625 chip

OpenCPU

1. OpenCPU scheme is based on the secondary development Quectel module, the user can develop applied directly integrated in the module, thus eliminating the external master MCU. OpenCPU has been widely used in M2M fields, such as the field of smart home, smart cities, asset tracking, automotive and energy.

2. OpenCPU comparison with the conventional scheme shown below. In the conventional scheme, it requires an MCU as a main controller for controlling hardware peripherals, such as control of lights on or off, then the MCU standard UART interface with the communication module AT command, report the current status lights, or receive from a remote server the lamp command switch. And OpenCPU embodiment, the module can be written directly in the program control lights, save hardware costs and speed up application development.

3. OpenCPU core system of hardware and software modules NB-IoT binding. It is built ARM Cortex-M4 processor FreeRTOS built on top of an operating system, having a micro-kernel real-time, multi-tasking and other characteristics.

 

FIG. 2.5 NB-IOT module implements

test

3.1 Intelligent Control and gateway system hardware overall:

Figure 3.1 intelligent control and overall system hardware gateway

3.2 Guangdong embedded development board Gateway 6818 display interface:

FIG Guangdong 3.2 gateway boards fitted display interface 6818

3.3 two terminal nodes

3.3 Set two end nodes of FIG.

3.4 NB-IOT module coordinator

FIG collector 3.4 with the coordinator module NB-IOT

3.5 gateway on the display panel module 1 offline

Figure 3.5 gateway module on the display panel 1 offline

3.6 TCP client display control platform

Figure 3.6 TCP client display control platform

 

3.7 web client data platform

Figure 3.7 internet web client data

3.8 achieved by mobile switching modules communicate with other NB-IOT

Figure 3.8 achieved by mobile switching the communications module NB-IOT

Curriculum design summary or conclusion

1 gateway importance of things:

Compared to the age of the Internet, networking communication protocols more diverse, fragmented matter is very serious, thus highlighting the importance of the gateway will – Things Gateway able to integrate different information was collected, and it transmission to the next level, and thus are unable to transmit information between the various parts. Things aware network gateway may be implemented with a communication network, and a protocol conversion between different types of network-aware; both wide area network, a local area network can also be implemented.

 

2 JPEG images fixed display problems:

6818 Gateway panel has an LCD screen 800 * 480, how to display images on the board, you can use the jpeg library. Its effect is to show the need for real-time sensing layer data, if you want to achieve good results is not directly replace the whole picture, which will involve replacing fixed images, to achieve the replacement of the background image and display real-time data.

Alternatively the whole picture of the original reference function modification function is void jpeg_show (int xx, int yy, char * fullfilename), a function of carrying X and Y axes and the offset address of the picture, the pixels by writing function lcd_draw_point (cinfo.output_scanline + yy, i + xx, color); write achieve site plus the offset image, the display effect designated replacement.

 

3 OpenCPU association:

Three years of experience with the development board can be considered a lot of it, ESP8266, ESP32, NB-IOT AT commands are supported by the development and OPenCPU class, why have OpenCPU it, and move away before the technician on the phone he gave me the reason is explained BC26 support OpenCPU is aimed at those who are reluctant to buy an external MCU used generally are applied using an external aT MCU development. Haha, a little here access is not on words.

According to personal development experience, AT commands easy to test, OPenCPU class easy to develop. If you have a built-IO port of the microcontroller is to achieve some specific function or simply forward data, but also data analysis carried out in strict accordance with the format of AT commands, it would be a difficult and their own perception of things.

As things engineering students, in the face of system development should be the proper use and development of AT OpenCPU class.

Leave a Reply