Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

Personal consumer electronics

Development and design of massager control panel


We designed an intelligent massager based on a single-chip microcomputer, and installed a running direction selection button on the control board, which can realize directional pushing and pulling of muscles by adjusting the forward/reverse direction of the motor. According to the theory of traditional Chinese medicine, massaging the muscles of the soles of the feet, cervical spine, head, waist and abdomen can stimulate acupuncture points, promote local blood circulation, accelerate cell metabolism, relax muscles, eliminate fatigue and prevent diseases, and play a role To a certain health, fitness and weight loss.


1. The overall design of the massager


The traditional electromagnetic massager is mainly composed of a vibrating spring, a massage head, an iron core and a coil. According to the principle of electromagnetic induction, when the coil on the iron core is connected to alternating current, a changing magnetic field will be generated. Under the action of magnetic field force and spring reaction force, the massage head vibrates repeatedly to produce massage effect. The vibration intensity can be changed by changing the frequency, current intensity or the size of the core gap. Traditional massage machines are bulky, powerful, and noisy, and are not suitable for home use. They are generally used in supermarkets or rehabilitation hospitals. With the development of electronic technology, smart products are becoming more and more popular. Due to the characteristics of high integration, fast operation speed, small size, flexible application, reliable operation and low price of single-chip microcomputer, it is a development trend to replace analog speed control with digital speed control of single-chip microcomputer on smart devices. The motor power of the stepping motor is too small and the speed is relatively low, so the DC motor is selected as the vibration source. The speed regulation of DC motor is simpler and easier to realize than the speed regulation of AC motor.


The overall design structure of the system is shown in Figure 1. The power supply module provides the working voltage of the single-chip microcomputer and the DC motor drive module. The single-chip microcomputer generates PWM pulse width modulation waveform according to the running direction and intensity of the button module to control the DC motor drive module; the average voltage is changed by changing the duty ratio of the voltage on the armature of the DC motor, thereby controlling the smooth speed of the motor; Rotation, reverse, acceleration and deceleration changes to generate massage effect; LED display is equipped to display the working condition information of the motor in real time.


2. Control system hardware design


2.1 Massager chip selection


(1) Main control chip AT89C52. AT89C52 is a CMOS 8-bit microcontroller produced by INTEL, which is compatible with MCS51 instruction system. It has the low power consumption of CHMOS and the high-speed and high-density technical characteristics of HMOS, and has the advantages of low voltage and high performance. It belongs to the 80C51 enhanced single-chip microcomputer. The chip contains 8kB rewritable (more than 1000 times) FlashROM memory and 256×8bits internal RAM, 32 bidirectional I/O ports, and the clock frequency is 0-24MHz. The chip is produced by ATMEL's high-density, non-volatile storage technology. It integrates clock output and up/down counter functions. It adopts low-power idle and power-down modes, and has software-set sleep and wake-up functions. AT89C52 microcontroller is widely used in the electronics industry.


(2) Motor driver chip. L298N is a product produced by SGS Company, which adopts single in-line type and has 15 pins in total. It contains 4-channel logic drive circuit, which can drive a two-phase stepping motor, a four-phase motor or two two-phase DC motors. L298N is a dual H-bridge motor driver chip, each H-bridge can provide 2A current, and the supply voltage range of the power part is 2.5~48V. It directly adjusts the output voltage through the power supply, and can also directly provide signals with the I/O port of the single-chip microcomputer. The circuit is simple and easy to use. L298N has 2 sets of input and output pins, which can drive 2 motors. The input pins IN1 and IN2 are connected to the P2.1 and P2.0 pins of the microcontroller, EA is connected to P3.0, the logic control pin VS is connected to the +5V power supply, the motor drive power VS pin is connected to the +12V power supply, and the output pins OUT1 and OUT2 is connected to the DC motor. The logic functions of L298N are shown in Table 1.


(3) Display module. The speed display circuit of this design is realized with 2-digit 7-segment LED digital tubes, the digital tubes are connected with common cathode, and a, b, c, d, e, f, g, dp of each 7-segment digital tube are controlled by 1 single-chip I/O port to drive.


2.2 Massager hardware design


(1) Reset circuit. The hardware of this system is composed of reset circuit, clock circuit, keyboard circuit and display circuit. The reset circuit is shown in Figure 2. In order to improve the reliability of the system, the reset circuit uses a power-on plus button to realize the reset function, and the reset signal is input from the ST pin, and the high level is effective.


图2 复位电路与时钟电路


(2) Clock circuit. The clock is the basis of timing. The clock circuit is composed of crystal oscillator, crystal shock control chip and capacitor. The core of the circuit is the oscillator. The system adopts the internal mode, the external quartz crystal is connected to XTAL1 and XTAL2 as timing components, and the internal inverting amplifier self-oscillates to generate the clock. The clock circuit is shown in Figure 3, in which the clock generator divides the frequency of the oscillation pulse by two, and the capacitance is 30pF.


(3) Keyboard input module. The keyboard input module occupies the P2 port of the system and the external interrupt int0 to adjust the input of the system.


(4) Display circuit. 2-digit 8-segment common-cathode LED is used, and the P0 port is used as the LED display code output port, the P3.0 and P3.1 ports are selected for wiring, and the P3.2 port is the "response button" port.


3. Software design and simulation of massager control system


The PLC software design process is shown in Figure 6. When the system is initialized, the LED displays 00, and the system is in the waiting state. When the acceleration or deceleration button is pressed, the system checks the speed status and then adjusts the speed. According to the needs of the system, the system initialization program, main program, key program, motor driver program, LED display program and alarm program are designed.


ProteusISIS is a commonly used EDA software, which runs on the Windows operating system and is used for digital circuit simulation such as single-chip microcomputers.


Summarize


The intelligent massager based on the single-chip microcomputer has short speed adjustment time, good stability, good control effect, small size, convenient portability and simple operation. It is a good product for home and travel, and has high practical value.


The above is the development example of the massager introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have massager program development needs, you can trust 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, microcontroller development, Bluetooth solutions, 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.

  • TOP