Abstract: This paper addresses the needs of multimedia color screen elevator display, and uses 485/CAN bus transmission technology, Linux application programming, Qt5 user interface programming, and hardware support under the hardware support of ARM core Raspberry Pi platform and MCU interface board dual processor architecture. A two-processor architecture elevator color display system is realized. Compared with the traditional display system, the color display system has a more beautiful interface, more functions, and low cost and high stability. The actual test results show that the color screen display system design of this elevator is feasible and effective.
This article refers to the address: http://
introduction
In recent years, as the number of high-rise buildings has increased, the demand for elevators has also increased. At present, the elevators we use extensively are based on LED dot array display systems. The display status information is relatively simple and the display mode is relatively monotonous. In addition, some of the advertising machines in the elevators have improved the riding environment in the elevator car, and the good advertising effect has brought a lot of economic benefits to the merchants. However, this display device is not integrated with the elevator control system, but is simply a video playback.
In order to integrate the display with the elevator control system to create a comfortable riding environment, a dual-core processing method is implemented for the existing elevator system, which is adapted by different microcontrollers and uniformly displayed by ARM/X86. In this method, the ARM/X86 processor focuses on unified common format elevator state information decoding, floor picture switching or video playback, thereby improving the real-time and reliability of the entire system. For the elevator communication protocol of different manufacturers, only the codec of the MCU needs to be changed to make the whole system work again.
Raspberry Pi (Chinese name "Raspberry Pi") is a card-based computer developed by the British Raspberry Pi Foundation to provide computer programming education for students with low-cost hardware and free software. It is equipped with a 700 MHz Broadcom ARM architecture BCM2835 processor, 256 MB memory (type B has been upgraded to 512 MB memory) micro-computer motherboard. Raspberry Pi uses SD card as the memory hard disk. There are two USB ports and one network port around the motherboard. It can connect keyboard, mouse and network cable. It also has TV output interface with video analog signal and HDMI high-definition video output interface. All of the above components are integrated into a motherboard that is only slightly larger than a credit card, and has the basic functions of all PCs. Its operating system uses open source Linux systems, such as Debian, Arch Linux, its own Iceweasel, KOffice and other software to meet the basic needs of web browsing, word processing and computer learning.
Qt is a cross-platform C++ graphical user interface application development framework developed by Trolltech in 1991. Qt has excellent cross-platform features, Qt supports the following operating systems: Microsoft Windows 95/98, Microsoft Windows NT, Linux, Solaris, SunOS, HP-UX, Digital UNIX (OSF/1, Tru64), FreeBSD, BSD/OS, SCO, AIX, OS390, QNX, etc.
1 system overall design
1.1 System Framework
The hardware part of the system is mainly composed of interface adapter board and display board. The system block diagram is shown in Figure 1.
1.2 Subsystem function introduction
1.2.1 Interface adapter board
Receiving the elevator communication protocol on the RS-485/CAN bus and completing the protocol analysis; carrying the temperature sensing device and the clock circuit hanging on the I2C bus for the display panel to read the temperature and time information, and completing the detection of the user button and coding.
1.2.2 Display Board
Receiving elevator data decoded by the interface adapter board; reading temperature and time information; implementing an interface application.
2 interface adapter board subsystem design
Interface adapter board subsystem hardware mainly includes ATmega8 microcontroller, DS18B20 temperature sensor, PCF8563 clock chip, MAX485 chip and so on. The block diagram of the interface adapter board is shown in Figure 2.
There are many communication protocols for elevators. This paper uses the NICE3000 communication protocol as an example to implement the system.
2.1 Communication Settings of NICE3000 Communication Protocol
Communication method: RS-485 standard, asynchronous, half duplex.
Data format: 1 start bit, 8 data bits, 1 stop bit, no parity.
Communication baud rate: 9 600 bps.
Communication address definition: the broadcast address is 0, the external node address is 1~31 (determined by the external board dial switch), the address also indicates the floor where the external call is located; the display board only receives the display, and the address is set to 0 (dial code) No need to reply to the communication.
Data verification: A two-way XOR check is used.
Data frame classification: There are two forms, in which the broadcast frame is used for externally displaying the information of the content, and there is no need to return the frame, and another type is a normal frame, which mainly completes the control information exchange between the main control board and the external move.
2.2 Frame format
The data frame adopts a fixed length, 5 bytes, and is structured as a frame header, user data, and a frame tail.
Frame header: includes 1 byte address, that is, the identifier sent by the main control board to the external mover. The slave (external mover) judges whether the machine responds to the current communication according to the frame header. If the address is a broadcast address, the slave receives the message but does not return.
User data includes: 2 bytes of data, defining different user data according to the sending direction (master to slave or slave to master) and frame form.
End of frame: Includes 2 bytes of parity data, first low and then high.
The data frame received by the elevator system cannot be directly displayed. It is necessary to verify the data according to the data frame format, then parse it, and finally extract useful data for display by the display system. The operation of this system is as follows:
3 display board subsystem design
For the color screen elevator display system, the influence of the display effect of the LCD screen on the customer is crucial. Therefore, application development at the application layer is quite important. Considering the richness and beauty of graphical interface controls and the continuous upgrade of open source free, the QTE/Qt5 graphics development platform was chosen. The architecture of the dashboard subsystem is shown in Figure 3.
3.1 Qt transplantation
3.1.1 Qt transplant conditions
Qt for Embedded Linux is the leading application architecture for devices supported by embedded Linux. Qt runs on any platform that supports Linux, creating efficient, memory-efficient devices and applications with a unique user experience. The transplantation of Qt needs to meet the following basic conditions:
1 Development environment: Linux kernel 2.4 or higher; GCC version 3.3 or higher; for MIPS, its GCC version 3.4 or higher.
2 occupied storage space: storage space depends on the configuration, compressed to 1.7 ~ 4.1 MB; uncompressed to 3.6 - 9.0MB.
3 hardware platform: easy to load any processor that supports C++ compiler and frame buffer driver Linux driver; support ARM, x86, MIPS, PowerPC.
4Raspberry Pi (Type B) meets the above conditions, so Qt5 can be transplanted.
3.1.2 Preparation of Qt5 transplantation
Before doing the Qt5 migration, first make the following migration preparations:
1 Create a folder /home/opt to store the source code and files needed for compilation.
2 Download the Raspbian Wheezy image, this article uses 2012-07-15-wheezy-raspbian.img.
3 download toolchain, this article uses gcc-4.7-linaro-rpi-gnueabihf.
4 Download the cross-compiler tool, this article uses cross-compile-tools.
5 Download Qt5 source code.
6 Download the application patch for the qtjsbackend library.
Then create the folder mnt/rasp-pi-rootfs, mount the Raspbian Wheezy image to this folder, and enter the Qt5 source folder to execute the initialization code init-reposi tory.
3.1.3 Compilation of Qt5
First enter the cross-compile-tools folder and execute a script fixQualifiedLibraryPaths to modify the link and library paths.
Then compile qtbase, the configuration is as follows:
After compiling all the modules in the image, copy them to the SDcard.
3.1.4 Installing Qt Creator
Download the Qt Crcator installation package from the website http://qt-project.org/wiki/Crcate#QtonPi_App_SDK and install it under Linux. Since Qt5 requires Qtcreator 2.6.0 or higher as a support, this article uses version 2.6.1.
3.2 peripheral component reading program
The system obtains time information by reading a real-time clock chip hanging on the I2C bus, and obtains temperature information through a temperature sensing device. This article takes the data of the real-time clock chip as an example. The operation is as follows:
The operation of these devices is implemented in C code and then compiled into a dynamic link library for the interface application to call.
3.3 Interface application implementation
Graphic interface development is a key point of Qt/Embedded development. The interface structure of this system includes floor information area, running direction area, picture display area, temperature time display area, status display area, the system involves the view jump, data Delivery, control usage, layout and event handling, and more. The program flow is shown in Figure 4.
The entire display interface is implemented by the MainWindow class, which inherits from QmainWindow, and each display area is implemented by inheriting the QWidget class. As shown in Figure 3, the timer function checkLiftStstus() of Main-Window is called every 30 ms by timer 1 to obtain the serial port data parsed by the C function open_uart485 (int data[]).
Connect(timer,SIGNAL(timeout()),this,SLOT(checkLiftStatus()));//Get elevator information
The parsed information is transmitted to the floor information area, the running direction area, and the status display area is displayed separately.
indicatorDirection(data[0]); //direction information
indicatorState(data[1]); //Status information
liftCurrentFloorNum(data[2]);//floor information
The image video display area is implemented in the class ShowController. When the system needs to display the image, the object calling the ImageView class is responsible for the image display; when the system needs to display the video, the class calls the object of the PlayerWidget class to handle the video playback. The ImageView class and the PlayerWidget class are also inherited from Qwidget. The ImageView class is responsible for obtaining an image instance on the SD card, displaying it in the correct location, and switching the image through Timer 2. The PlayerWidget class is responsible for launching MPlayer and controlling the video display to the correct location.
The temperature time display area is implemented in the TimeView class and the temperatureView class. The member function getCurrentTime() of the TimeView class reads the clock information of the clock chip hanging on the I2C bus by calling the C function getpcf8563Time(pcf8563_time*pTime) of the dynamic link library, and displays it on the correct area.
The temperatureView class is mainly used to display temperature data, and the process of actually obtaining temperature data is implemented in the TemperatureHandler class. Open a new thread, read the temperature sensor data by calling the C function hotm_dsl8b20(long*date) of the dynamic link library in the slot function readData() every 500 ms.
temperatureThread=new QThread(this); //Open a new thread
Connect(temptimer, SIGNAL(timeout()), this, SLOT(readData())); //Read temperature
4 system debugging results
According to the simulated NICE3000 communication protocol, the operation of peripheral components and the graphical interface programming of Qt5, the elevator color display system is realized. The hardware device diagram and debugging result are shown in Figure 5 and Figure 6.
Conclusion
This paper describes the elevator color display system based on Raspberry Pi and using Qt5 programming. First introduced the architecture of the whole system; then introduced and parsed the NICE3000 communication protocol in the interface adapter board subsystem; then introduced the operation of the peripheral components in the display panel subsystem to read the data of the real-time clock chip as In the end, according to the parsed and read data, the elevator color screen display system is realized by Qt5 programming. This paper provides an effective improvement method for the traditional LED dot array elevator display system, changing its monotonous display mode, low cost and more commercial value.
Kids sleep headphones, specially designed for children, made of soft fabric, built-in speaker, cover your eyes while sleeping, fixed with Velcro.It connects the phone, playing music, and let you relax, help to sleep.The shape can be customized, it can be a unicorn, crocodile, chicken, duck, cow, etc., cute shape, loved by children.
Advantages:
1. Soft and comfortable sleep headphones with ultra-thin speakers.These headphones are a good choice for kids, and students who hate earbuds or bulky headphones.Lightweight, comfortable, washable headband, adjustable, earphones and headband fit perfectly.
2. Easy to carry, unique design makes it easy to track and find.
3. The headband is soft and washable. The ultra-thin headphones are almost unobtrusive and can be used while riding, without disturbing the car seat headrest.
4. Universal device, equipped with 3.5mm stereo plug or Bluetooth, can be used with all your favorite devices.
Sleep Mask With Earphones,Kids Headphones,Kids Headband Headphones,Kids Sleep Headsets
Shenzhen Linx Technology Co., Ltd. , http://www.linxheadphone.com