Touch screen smart massage chair solution development
With the continuous improvement of living standards, people pay more and more attention to their own health, and massage chairs, as the main equipment of family health care, are 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 its intelligence and multi-functionality.
In view of the deficiencies of traditional massage chairs in terms of human-computer interaction interface, intelligence and entertainment functions, combined with the needs of actual fitness, this paper applies embedded technology to the massage chair control system, realizing the intelligent and digitalization of the massage chair control system And beautiful and humanized human-computer interaction interface.
1. Intelligent massage chair control system
The intelligent massage chair control system has two operating modes: manual and automatic. Manual operation can control the speed and mode of the massage chair, while automatic operation can realize various program-controlled exercise modes for different groups of people. The human-computer interaction system has two types: touch screen control and infrared control. When the touch control is realized, it is accompanied by voice prompts, which can monitor the operation status of the massage chair in real time. The system can also realize the MP3 playback function.
The control system chooses STM32 as the microprocessor. The controller is embedded with a wealth of 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 functions. It is inconvenient to use when human-computer interaction is required. In this case, using a touch screen is a good choice. For the safety protection of the massage chair, the output signal of the sensor is sent to the controller for adjustment and control.
2. Hardware design of intelligent massage chair
The hardware architecture of the intelligent massage chair control system is shown in Figure 1, mainly man-machine 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 various actions of the massage chair through the standard RS232 communication interface, and realizes functions such as parameter setting, modification, and display, and can understand the stages of the massage chair control system more conveniently and intuitively. Establish a serial port connection 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 drive mode motor and speed motor of the drive system to perform related actions. The touch screen, STM32 and ISD1760 voice chip constitute the voice prompt module. By setting the parameters of the massage chair on the touch screen, the operation status of the massage chair can be monitored in real time. When the upper and lower limit positions are reached, an alarm will be issued to ensure the safety of the massage chair. run.
(2) Infrared control: Infrared communication is to modulate and demodulate binary numbers, and use infrared channels for transmission, and its interface is a modem for infrared channels. The infrared receiving sensor HS0038 used in this system, in which REMOTE_IN is connected to the second pin of P2, but not directly connected to the I/O port of the MCU, the purpose is to prevent the I/O port from being interfered by infrared signals when using other functions .
The sending part of the system adopts STM32 timer, the carrier frequency is 38 kHz, the bit time is 1.125 ms, and the clock frequency is set to 11.0592 MHZ. Before carrying out infrared communication, the communication parties must first formulate a specific protocol according to the functional requirements of the system, and then write the program. One side of the infrared communication in this system is the infrared remote controller, and the other side is the microprocessor STM32. The massage part, massage time and massage speed can be changed through the computer program, so that the user can adjust the massage chair according to his own condition.
2.2 Lower computer control system
The lower computer control system is mainly composed of an embedded microprocessor board, which undertakes the real-time calculation work of the control system operation. The main control chip of the processing board adopts STM32F103RBT6 of STM32 series based on ARM Cortex-M3 core, which is very suitable for application in the control field. The microprocessor board has: 3 serial ports, the serial peripheral device interface can be used in the touch screen control module and the infrared control module; 2 SPIs, the SPI communication can be used in the voice prompt module and the MP3 player module; An accurate PWM signal, which is convenient for the control of the stepper motor and the carrier frequency sent in the infrared control; two 12-bit ADCs (16 channels), which can be used to collect the output analog signals of the pressure sensor and the heart rate sensor, to ensure the signal Real-time and accurate collection; 51 available I/O pins. The microprocessor is embedded with rich peripheral function modules. Compared with other chips in the ARM series, the STM32 chip runs faster and has a lower price.
In addition, the lower computer performs speed feedback according to the position detection device. The lower computer also has an MP3 player module, which forms an MP3 with touch function through the touch screen, STM32 and MP3 module, which can be used to select the next and previous song, and can also be used to pause/play. So that people can listen to music during the massage process and enjoy themselves physically and mentally.
2.3 Pressure sensor
The pressure sensor uses a small-range load cell, the elastic body is a three-piece beam, and a composite cantilever structure, mainly considering its service life. Since the output distance is relatively short, the output signal is selected as a voltage signal, so that subsequent processing is easier. This design adopts the full-bridge measurement principle, which makes the error generated by the system smaller and the output data more accurate. The operational amplifier circuit is to amplify the weak analog signal output by the sensor by a certain multiple to meet the requirements of the A/D converter for various conversion processing of the input signal level. STM32 has two ADCs with a conversion time of 1 μs. Use ADC1 channel 0 of STM32 to sample the output voltage value, read the sampled value through EFPROM, and feed 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.
2.4 Heart rate monitoring module
The heart rate sensor detects the ECG signal generated by the heartbeat by means of bioelectricity detection on the human body surface, and outputs a pulse signal synchronized with the heartbeat through the signal conditioning circuit, A/D, digital signal processing, and comparison circuit, which effectively solves the problem in dynamic situations. Check the effectiveness and accuracy of heart rate detection. Moreover, the handshake detection signal is added to detect whether the hand is holding the electrode while outputting the pulse signal synchronized with the heartbeat. The output of high and low levels indicates whether it 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 program according to the user's heart rate.
3. Massage chair control program design
The lower computer control system designed for the intelligent massage chair control system adopts an object-oriented method to design software, and designs voice prompts, communication, sensor detection, and MP3 playback as independent program modules that are separated from each other, and each module is independently written in the form of a function And encapsulation, the interaction between the modules is realized through the input and output standards between the modules, and the microprocessor control program is used to manage and arrange the calling of each sub-module. After adopting the modular design, subsequent developers can do follow-up development work on any module, so as to ensure the readability, scalability and maintainability of the software for continuous development.
Summarize
This article applies embedded technology to the control system of digital fitness equipment, and enriches the intelligence, safety and entertainment of the massage chair through the control of the speed and position of the drive motor, the beautiful and humanized communication interface and the application of various intelligent sensors. It is conducive to the positioning of massage chairs as high-end products, reduces the disadvantages of relatively independent massage chairs, boring working process, and lack of interactivity, and brings users a brand new massage experience.
The above is the design example of the intelligent massage chair control system based on STM32 and touch screen introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. If you have a need for massage chair solution development, you can rest assured to entrust it to us. We represent a variety of single-chip microcomputers, voice chips, dual-mode Bluetooth ICs, and wifi chips. Brands include Songhan MCU, Yingguang MCU, Jerry Bluetooth, Ankai Bluetooth, Allwinner, and Realtek. Our technical services include: PCB design, MCU development, Bluetooth solution, software and hardware custom development, APP development, small program development, WeChat official account development, etc. It can also undertake the design of intelligent electronic products, the development of living appliances, the research and development of beauty equipment, the application of Internet of things platform, the smart home control system, the development of TWS earphones, Bluetooth earphone speakers, the development of children's educational toys, the design of electronic education products, etc.
Proposal recommendation
- TOP