Development and design of touch screen intelligent massage chair
Development and design of touch screen intelligent massage chair
With the continuous improvement of living standards, people pay more and more attention to their own health. Massage chair, as the main equipment of family health care, is more and more popular. Massage chair is a typical mechatronics product, which is developing towards intelligence. When people use massage chairs, they also put forward higher requirements for their intelligence and versatility.
In view of the shortcomings of traditional massage chair in human-computer interaction interface, intelligence and entertainment function, and combined with the needs of practical fitness, this paper applies embedded technology to massage chair control system to realize the intelligent, digital and beautiful human-computer interaction interface of massage chair control system.
1、 Intelligent massage chair control system
The intelligent massage chair control system has two operation modes: manual and automatic. Manual operation can control the speed and mode of the massage chair, and automatic operation can realize various program-controlled exercise modes for different people. The human-computer interaction system includes touch screen control and infrared control. When realizing touch control, it is accompanied by voice prompt, which can monitor the running state of massage chair in real time. The system can also play MP3.
The control system selects STM32 as the microprocessor. The controller is embedded with rich peripheral function modules. Considering the operation speed, stability and economy, it is selected as the controller of the system, but it does not have friendly human-computer interaction function. It is inconvenient to use when there are many control parameters and human-computer interaction is required. In this case, using the touch screen is a good choice. For the safety protection of massage chair, the output signal of the sensor is sent to the controller to adjust the control.
2、 Hardware design of intelligent massage chair
The hardware architecture of intelligent massage chair control system is shown in Figure 1, mainly including human-computer interaction system, lower computer control system, detection system, motor drive system, execution and power supply system, etc. These hardware structures have the advantages of high integration, strong independence and good scalability.
2.1 human computer interaction system
(1) Touch screen control: the touch screen controls the actions of the massage chair through the standard RS232 communication interface, realizes the functions of parameter setting, modification and display, and can more conveniently and intuitively understand the stage of the massage chair control system. A serial port connection is established between the touch screen and the lower computer control system of the massage chair. The lower computer of the intelligent massage chair receives the instructions and data from the touch screen and controls the driving mode motor and speed motor of the driving system to perform relevant actions. The touch screen, STM32 and isd1760 voice chip constitute a voice prompt module. By setting the parameters of the massage chair on the touch screen, the operation state of the massage chair is monitored in real time. When the upper and lower limit positions are reached, an alarm prompt will be sent to ensure the safe operation of the massage chair.
(2) Infrared control: infrared communication is to modulate and demodulate binary digital and use infrared channel for transmission. Its interface is a modem for infrared channel. The infrared receiving sensor HS0038 is selected for the system, including remote_ In is connected to the second pin of P2, but not directly connected to the I / O port of MCU, in order to prevent the I / O port from being disturbed by infrared signals when using other functions.
The transmission part of the system adopts STM32 timer, with carrier frequency of 38 kHz, bit time of 1.125 MS and clock frequency of 11.0592 MHz. Before infrared communication, the communication parties should first formulate a specific protocol according to the system functional requirements, and then write a program. In this system, one side of infrared communication is infrared remote controller, and the other side is microprocessor STM32. Through the computer program, the massage position, massage time and massage speed can be changed, so that users can adjust the massage chair according to their own conditions.
2.2 lower computer control system
The lower computer control system is mainly composed of embedded microprocessor board, which undertakes the real-time calculation of the operation of the control system. The main control chip of the processing board adopts STM32 series stm32f103rbt6 based on arm Cortex-M3 core, which is very suitable for application in the control field. The microprocessor board has three serial ports, and the serial peripheral interface can be used in touch screen control module and infrared control module; 2 SPI, SPI communication can be used for voice prompt module and MP3 player module; 7 tims, up to 28 accurate PWM signals can be generated, which is convenient for the carrier frequency transmitted in stepper motor control and infrared control; Two 12 bit ADCs (16 channels) can be used to collect analog signals output by pressure sensor and heart rate sensor to ensure real-time and accuracy of signal acquisition; 51 available I / O pins. The microprocessor is embedded with rich peripheral function modules. Compared with other chips of arm series, STM32 chip runs faster and at a lower price.
In addition, the lower computer performs speed feedback according to the position detection device. The lower computer also has an MP3 playing module. An MP3 with touch function is composed of touch screen, STM32 and MP3 module, which can be used to select the next song and the previous song, and can also be used to pause / play. So that people can listen to music and enjoy their body and mind in the process of massage.
2.3 pressure sensor
The pressure sensor adopts a small range force measuring sensor. The elastomer is a three piece beam and a composite cantilever structure, mainly considering its service life. Because the output distance is close, the output signal is selected as voltage signal, so the subsequent processing is easier. This design adopts the principle of full bridge measurement, which makes the error generated by the system smaller and the output data more accurate. The operational amplifier circuit amplifies the weak analog signal output by the sensor to a certain multiple, so as to meet the requirements of a / D converter for various conversion processing of input signal level. STM32 has two ADCs with conversion time of 1 μ s. Use ADC1 channel 0 of STM32 to sample the output voltage value, read the sampling value through efprom and feed it back to STM32. If the stepping motor reaches the upper and lower limit positions, the massage chair will automatically adjust its position to ensure the safe and normal operation of the massage chair. The pressure sensor control system block diagram of massage chair is shown in Figure 2.
2.4 heart rate monitoring module
The heart rate sensor detects the ECG signal generated by the heart beat by the bioelectricity detection of the human body surface, and outputs the pulse signal synchronized with the heart beat through the signal conditioning circuit, a / D, digital signal processing and comparison circuit, which effectively solves the problem of the effectiveness and accuracy of detecting the heart rate under dynamic conditions. In addition, the detection handshake signal is added to detect whether the hand holds the electrode while outputting the pulse signal synchronized with the heart beat. The output of high and low levels indicates that the hand has been held or not, and the user's heart rate during the massage process is detected. The control system will automatically give a scientific exercise plan according to the user's heart rate. The heart rate control system block diagram of massage chair is shown in Figure 3.
3、 Massage chair control program design
The lower computer control system of the intelligent massage chair control system adopts the object-oriented method to design the software. The voice prompt, communication, sensor detection and MP3 player are designed into independent program modules separated from each other. Each module is independently written and sealed in the form of function. The interaction between modules is realized through the input and output standards between modules, The microprocessor control program is used to manage and arrange the calls to each sub module. After adopting modular design, subsequent developers can do subsequent development work on any module, so as to ensure the readability, scalability and maintainability of the software for sustainable development. The lower computer control program module is shown in Figure 4.
summary
In this paper, the embedded technology is applied to the digital fitness equipment control system. Through the control of the speed and position of the driving motor, the beautiful and humanized communication interface and the application of various intelligent sensors, the intelligence, safety and entertainment of the massage chair are enriched, which is conducive to the positioning of the massage chair to high-end products and reduce the relatively independent and boring working process of the massage chair Lack of interactivity and other shortcomings bring users a new massage experience.