Em78p153 constitutes a multifunctional vibration controller

1、 Overview:We are composed of a single chip microcomputer em78p153. A circuit with 10 LED indicators, 4 keys and one pulse vibration output can be used for physiotherapy products such as small massag

1、 Overview:

We are composed of a single chip microcomputer em78p153. A circuit with 10 LED indicators, 4 keys and one pulse vibration output can be used for physiotherapy products such as small massagers. Two keys can set a variety of massage vibration modes, and the other two keys can control the vibration intensity output. Five LEDs indicate the output intensity and the other five LEDs indicate the vibration mode. Although em78p153 has only 12 I / O ports and 512 bytes, But it has such powerful functions, and the chip is cheap. It is a scheme with high performance price ratio.

The right figure is the control function diagram.

We use any five I / O ports (except p63, which can only be used as input) of the single chip microcomputer to connect to the common negative pole of the LED. One group (5) of the positive poles are connected together for vibration intensity indication, and the other group (5) are connected together for vibration mode indication. Because time-sharing dynamic scanning is used, each LED lights up for a short time. In order to improve its brightness, it is necessary to increase the current, So we connected two triodes at the positive pole as switches. Turn on when it B is very low. Turn on this group of LEDs. On the contrary, when its B is extremely high, the LED goes out. Because the scanning frequency will be greater than 60Hz, the naked eye appears to be continuously lit, and the brightness also meets the requirements.Multifunctional vibration controller | em78p153 | development of Shenzhen single chip microcomputer
Because the I / O port of em78p153 is limited, we also need four I / O ports as key input. We use the method of sharing with LED negative pole. In the program, we use it as input and output ports, and select I / O as input or output mode respectively, which is very easy to realize in the program. We can make the two states of lighting LED and identification key into two subroutines respectively, and call them respectively in the main program.

The motor output uses a separate I / O port, because the eccentric wheel is installed on the motor, which will produce vibration when it rotates. The intensity of output vibration can be realized by controlling the pulse duty cycle of the motor. A variety of modes of vibration can be realized by controlling the time interval between rotation and stop, and the combination of multiple pulses such as from weak to strong or from strong to weak.

The up and down keys are strength control keys. When the strength is the minimum, press "down" to enter the shutdown state. All functions stop, all LEDs turn off, and the single chip microcomputer enters the sleep state. At this time, the power consumption of the single chip microcomputer is very low, and the current is only a few UA. To delay battery life. When in the shutdown state, press "up" to start up and enter the working mode.

Em78p153 uses an internal clock and the reset circuit is also integrated in the chip, so the peripheral circuit is very simple and the work is more reliable and stable. This is good for product design, production and cost reduction.

产品外观图

The picture on the right shows the appearance of the product.

During program design, we can divide different function modes into several blocks, and only cycle the function in each block. In order to make the program concise and easy to read, and to make the program not too large (because the ROM capacity of single chip microcomputer is only 512-1kb bytes, too heavy programs may show that ROM can not hold all programs), all program segments used many times are made into subroutines, Just call them at the corresponding position in the main program.