Patent Description:
An electronic atomizer may control a linear motor through output of a driving chip to achieve a better motor vibration effect. The driving chip has two control modes: a real-time transport protocol (RTP) mode and a random access memory (RAM) mode. In the RTP mode, any form of vibration waveforms may be outputted. In the current market, the RTP mode is used in almost all electronic products with linear motors. More hardware resources are generally required in the RTP mode. However, due to limited hardware resources of electronic atomizer products, most driving chips of electronic atomizers can only use the RAM mode to drive linear motors. However, in the RAM mode, only simple waveforms instead of rich vibration waveforms can be generated, causing vibration feedback of the electronic atomizer products to be in a relatively simple form.

During the implementation, the inventor finds that the conventional art has at least the following problems. The existing electronic atomizer uses the RAM mode to drive the linear motor to vibrate, leading to problems of a single vibration form and impossible generation of rich vibration waveforms.

Related technologies are known from <CIT>, <CIT>, <CIT>, <CIT> and <CIT>.

Based on the above, there is a need to provide a method, device and system for controlling a linear motor of an electronic atomizer, and an electronic atomizer with respect to the above technical problems.

In a first aspect, a method for controlling a linear motor of an electronic atomizer is provided. The method includes:.

In one embodiment, prior to sending the play instruction to the driving module of the electronic atomizer, the method includes: resetting, by the controller, the driving module, and if a size of the vibration waveform data is larger than a storage space of a static random access memory (SRAM) of the driving module, segmenting and packaging the vibration waveform data sequentially to obtain a number of vibration waveform data packets each with a size smaller than the storage space of the SRAM.

In one embodiment, the method further includes: outputting a vibration stop instruction if the interrupt signal is received after all the vibration waveform data packets are sent to the driving module, the vibration stop instruction being used for instructing the driving module to control the linear motor to stop vibrating.

In one embodiment, the vibration waveform data is RTP mode vibration waveform data. The step of sending the play instruction to the driving module of the electronic atomizer includes: sending the play instruction to the driving module by I2C-DMA when a vibration event of the electronic atomizer occurs currently.

In a further embodiment, playing, by the driving module, in a case where the play instruction is received, the vibration waveform data packet to drive the linear motor of the electronic atomizer to vibrate; and clearing, by the driving module, the vibration waveform data packet if the vibration waveform data packet is played out, and feeding the interrupt signal back to the controller, the interrupt signal being used for instructing the controller to send the play instruction comprising the next vibration waveform data packet.

In a second aspect, a controller device for controlling a linear motor of an electronic atomizer is further provided. The device includes: a direct memory access (DMA) unit configured to control the driving module through a real-time transport protocol (RTP) mode a first output module configured to send a play instruction to a driving module of the electronic atomizer, the play instruction including a current vibration waveform data packet, the play instruction being used for instructing the driving module to play the vibration waveform data packet to drive the linear motor of the electronic atomizer to vibrate, the vibration waveform data packet including a vibration waveform of vibration waveform data matching a current vibration mode; and a second output module configured to send, if an interrupt signal fed back by the driving module is received, a play instruction including a next vibration waveform data packet to the driving module.

In a third aspect, a system for controlling a linear motor of an electronic atomizer is further provided. The system includes: a driving module, a linear motor, and a controller device including a DMA unit. The driving module is connected to the controller and the linear motor respectively. The controller is configured to perform the method according to the first aspect, and/or the driving module is configured to perform the method according to the second aspect.

In one embodiment, the system further includes an RST rest driving chip and an Inter-integrated Circuit (I2C) bus. The RST rest driving chip is connected to the controller and the driving module respectively. The controller is connected to the driving module through the I2C bus. The linear motor is connected to an HDP pin of the driving module and an HDN pin of the driving module respectively. The controller is a single-chip microcomputer with a DMA function.

In a fourth aspect, an electronic atomizer is further provided. The electronic atomizer includes the system according to the third aspect.

In a fifth aspect, a computer-readable storage medium is further provided. The computer-readable storage medium stores a computer program. The computer program, when executed by a processor, causes the processor to implement steps of the method described above.

One of the above technical solutions has at least the following advantages and beneficial effects.

In the present application, a play instruction including a current vibration waveform data packet may be sent to the driving module of the electronic atomizer, the play instruction is used for instructing the driving module to play the vibration waveform data packet while receiving the vibration waveform data packet, so as to drive the linear motor of the electronic atomizer to vibrate according to a vibration waveform of vibration waveform data included in the vibration waveform data packet and matching a current vibration mode, and if an interrupt signal fed back by the driving module is received, a play instruction including a next vibration waveform data packet is sent to the driving module, so that the driving module continues to play, in real time, the remaining vibration waveforms in the vibration waveform data matching the current vibration mode. Thus, according to the present application, in the case of fewer hardware resources of the electronic atomizer, the vibration waveform data matching the current vibration mode is sent to the driving module through the controller including a DMA unit, so as to drive the linear motor of the electronic atomizer to vibrate in manner of writing simultaneously with vibrating, thereby providing rich vibration waveforms for different vibration modes, achieving a rich vibration effect, saving resources, and greatly improved practicability.

In order to more clearly illustrate the technical solutions in embodiments of the present application or the conventional art, the accompanying drawings used in the description of the embodiments or the conventional art will be briefly introduced below. It is apparent that, the accompanying drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those of ordinary skill in the art from the provided drawings without creative efforts.

For easy understanding of the present application, a more comprehensive description of the present application is given below with reference to the accompanying drawings. Preferred implementations of the present application are given in the accompanying drawings. However, the present application may be implemented in many different forms and is not limited to the implementations described herein. On the contrary, these embodiments are provided to understand the disclosed content of the present application more thoroughly and comprehensively.

Unless defined otherwise, all technical and scientific terms used herein have the same meanings as would generally understood by those skilled in the technical field of the present application. The terms used herein in the specification of the present application are for the purpose of describing specific embodiments only, and are not intended to limit the present application.

It may be understood that the terms such as "first" and "second" used in the present application may be used herein to describe various elements, but the elements are not limited by the terms. The terms are intended only to distinguish one element from another element.

It is to be noted that when an element is referred to as being "connected to" another element, the element may be directly connected to the another element or connected to the another element via an intermediate element. In addition, "connection" in the following embodiments should be understood as "electrical connection", "communication connection", etc., if electrical signals or data are transmitted between connected objects.

As described in the background, the electronic atomizer in the prior art uses the RAM mode to drive the motor to vibrate, which has the problems of impossible generation of rich vibration waveforms and poor practicability. Through the inventor's research, it is found that any form of rich vibration waveforms can be outputted in the RTP mode. However, due to fewer hardware resources of the electronic atomizer and a single-task operation nature of the controller thereof, other operations cannot be performed at the same time when the controller writes data into the driving module.

Based on the above reasons, the present invention provides a solution of using a DMA function of the controller to control the driving module through the RTP mode.

In one embodiment, as shown in <FIG>, a method for controlling a linear motor of an electronic atomizer is provided. The method is applied to a controller including a DMA unit, and may include the following steps.

In step <NUM>, a play instruction is sent to a driving module of the electronic atomizer, the play instruction including a current vibration waveform data packet, the play instruction being used for instructing the driving module to play the vibration waveform data packet to drive the linear motor of the electronic atomizer to vibrate, the vibration waveform data packet including a vibration waveform of vibration waveform data matching a current vibration mode.

In step <NUM>, if an interrupt signal fed back by the driving module is received, a play instruction including a next vibration waveform data packet is sent to the driving module.

The driving module may be a driving chip. Hardware configuration of the driving chip may be implemented by an I2C (inter-integrated circuit) bus, which is a two-line serial bus. The controller may be a single-chip microcomputer including a DMA unit.

During daily use of the electronic atomizer, the electronic atomizer may be operated correspondingly to trigger vibration feedback of the electronic atomizer, so that people can more intuitively grasp use feedback of the electronic atomizer during the use. Tactile (vibration) feedback is a new feedback mode which is different from auditory feedback and visual feedback. The vibration feedback not only enables the product to communicate with users flexibly in noisy and light-limited environments, but also improves monotonous operation experience caused by a current flat-touch-based operation manner. That is, the vibration feedback of the electronic atomizer not only conveys information to the users, but also enhances user experience.

A vibration mode may be divided into short vibration, fade-in vibration or fade-out vibration according to usage scenarios. Different vibration waveforms may bring different tactile effects to the users (such as Click, Pulse, Bump, Ramp up, Ramp down and other tactile effects, among which the Click vibration effect may have different vibration intensity such as strong, medium, weak, etc., a Click vibration duration may be short, long, longer, or other different time periods, and the different effects depend on different driving voltages and driving time). Different vibration modes in different scenarios can improve the users' comfort of use. For example, when a cartridge of the electronic atomizer is inserted and removed, the electronic atomizer may give a short vibration feedback, or when the users smoke the electronic atomizer, the vibration of the electronic atomizer may fade in until the users stop smoking the electronic atomizer. Rich vibration feedback enables the users to more intuitively obtain current usage feedback of the electronic atomizer, improving the users' comfort of use and practicability.

Specifically, a play instruction including a current vibration waveform data packet is sent to the driving module of the electronic atomizer, the vibration waveform data packet includes a vibration waveform of vibration waveform data matching a current vibration mode, and the vibration waveform data in different vibration modes may vary. The play instruction may instruct the driving module to play, in real time, the vibration waveform in the vibration waveform data packet received, so as to drive the linear motor of the electronic atomizer to vibrate correspondingly according to the vibration waveform matching the current vibration mode, so that the users can intuitively feel the vibration feedback under different usage scenarios. Thus, according to the present application, the driving module is instructed to immediately drive the linear motor to perform vibration of the vibration waveform of the vibration waveform data matching the current vibration mode in the case of receiving the play instruction while the play instruction including the current vibration waveform data packet is sent to the driving module.

Moreover, if an interrupt signal (INPT signal) fed back by the driving module is received, indicating that the driving module has played out the vibration waveform of the vibration waveform data matching the current vibration mode in the current vibration waveform data packet, a play instruction including a next vibration waveform data packet is sent to the driving module, so as to instruct the driving module to immediately play, in real time in the case of receiving the next vibration waveform data packet, a vibration waveform of vibration waveform data matching the current vibration mode in the next vibration waveform data packet to control the linear motor to continue the play until the vibration waveform data matching the current vibration mode is played out.

According to the present application, vibration waveform data matching the current vibration mode can be provided, and different vibration modes correspond to different vibration waveform data, so that the electronic atomizer can output rich vibration waveforms in a manner of writing data simultaneously with vibrating in the case of fewer hardware resources. In this way, the vibration waveform data requires a large storage space. Therefore, in the present application, vibration waveforms in the vibration waveform data are successively sent to the driving module of the electronic atomizer in the form of data packets. That is, in the present application, the controller including the DMA unit sends a play instruction including a current vibration waveform data packet to the driving module, so as to instruct the driving module to play the vibration waveform data packet to drive the linear motor of the electronic atomizer to vibrate correspondingly according to the vibration waveform data matching the current vibration mode, and in the case of receiving the interrupt signal fed back by the driving module, a play instruction including a next vibration waveform data packet is sent to the driving module to control the linear motor to continue the play, so as to output rich vibration waveforms in a manner of writing data simultaneously with vibrating in the case of fewer hardware resources, so that the linear motor brings a richer vibration effect, and practicability and user experience are greatly improved.

In one embodiment, the vibration waveform data is RTP mode vibration waveform data.

The step <NUM> where the play instruction is sent to the driving module of the electronic atomizer may include: sending the play instruction to the driving module by I2C-DMA when a vibration event of the electronic atomizer occurs currently.

The vibration event of the electronic atomizer is an event that requires feedback vibration of the electronic atomizer, such as insertion and removal of the cartridge of the electronic atomizer or a user's smoking of the electronic atomizer. Under different usage scenarios, different vibration events of the electronic atomizer may be triggered, which correspond to different vibration modes.

The RTP mode vibration waveform data in the present application may include any form of vibration waveforms, which may include vibration waveforms such as a harmonic vibration waveform, a periodic vibration waveform, a composite vibration waveform, a damped vibration waveform, a sinusoidal scanning waveform, a narrow-band random waveform, and a broadband random waveform, and may also include a waveform superimposed by various forms of vibration waveforms. Since data is written into the driving module in the RTP mode, a size (more than hundreds of k bytes) of the vibration waveform data in the RTP mode is generally much larger than a storage space of the SRAM of the driving module. Therefore, the RTP mode vibration waveform data can be written into the driving module in blocks.

Specifically, when the vibration event of the electronic atomizer occurs currently, the play instruction including the current vibration waveform data packet may be sent to the driving module of the electronic atomizer by I2C-DMA. The vibration waveform data packet includes a vibration waveform of the RTP mode vibration waveform data matching the current vibration mode. That is, the vibration waveform included in the current vibration waveform data packet sent to the driving module matches the current vibration mode. Vibration waveforms of the RTP mode vibration waveform data under different vibration modes may vary, so as to intuitively feel vibration feedback under different usage scenarios when the vibration event of the electronic atomizer occurs. The play instruction is used for instructing the driving module to immediately play the vibration waveform data packet in the case of receiving the play instruction including the current vibration waveform data packet, so as to drive the linear motor of the electronic atomizer to vibrate according to the vibration waveform matching the current vibration mode. Thus, in the present application, when the vibration event of the electronic atomizer occurs currently, the linear motor immediately performs the corresponding vibration while the vibration waveform data packet including the vibration waveform of the RTP mode vibration waveform data matching the current vibration mode is sent to the driving module, which realizes a control process of writing data simultaneously with vibrating, and the RTP mode vibration waveform data can provide rich vibration waveforms corresponding to the current vibration mode.

If the interrupt signal (INPT signal) fed back by the driving module is received, it indicates that the driving module has played out the vibration waveform of the RTP mode vibration waveform data in the vibration waveform data packet. Therefore, a play instruction including a next vibration waveform data packet may be sent to the driving module by I2C-DMA, so as to instruct the driving module to play the next vibration waveform data packet to control the linear motor to continue vibrating.

In the present application, when the vibration event of the electronic atomizer occurs currently, the play instruction including the current vibration waveform data packet is sent to the driving module of the electronic atomizer by I2C-DMA, so as to instruct the driving module to play the vibration waveform data packet to drive the linear motor of the electronic atomizer to vibrate correspondingly. The vibration waveform data packet includes a vibration waveform of RTP mode vibration waveform data matching the current vibration mode. Under different vibration modes, the present application may also provide corresponding different RTP mode vibration waveform data. Thus, in the present application, rich vibration waveforms can be outputted in the RTP mode of writing data simultaneously with vibrating in the case of fewer hardware resources of the electronic atomizer, which greatly improves practicability and user experience.

In one embodiment, prior to the step <NUM> where the play instruction is sent to the driving module of the electronic atomizer, the method may include: resetting the driving module, and if a size of the vibration waveform data is larger than a storage space of an SRAM of the driving module, segmenting and packaging the vibration waveform data sequentially to obtain a number of vibration waveform data packets each with a size smaller than the storage space of the SRAM.

The SRAM of the driving module is configured to store the RTP mode vibration waveform data.

In a specific example, prior to the step of resetting the driving module, the method may include: initializing I2C-DMA configuration.

Specifically, prior to the vibration event of the electronic atomizer, I2C-DMA configuration may be initialized and interruption may be configured. The interruption is configured to define ports of the driving module for data input and output. The I2C-DMA configuration is initialized to ensure normal operation of a subsequent data processing process. When the vibration event of the electronic atomizer occurs currently, the driving module can be reset. The storage space of the SRAM of the driving module is generally <NUM> bytes, while the RTP mode vibration waveform data is generally more than hundreds of k bytes, which is much larger than the storage space of the SRAM. Therefore, a vibration waveform of the RTP mode vibration waveform data is required to be written into the driving module in blocks. That is, if a size of the RTP mode vibration waveform data matching the current vibration mode is larger than the storage space of the SRAM of the driving module, the RTP mode vibration waveform data matching the current vibration mode is segmented and packaged sequentially to obtain a number of vibration waveform data packets. Each vibration waveform data packet includes a corresponding partial vibration waveform of the RTP mode vibration waveform data, and a size of each vibration waveform data packet is smaller than the storage space of the SRAM. Thus, after the driving module plays out part of the vibration waveform in the RTP mode vibration waveform data in the current vibration waveform data packet, a play instruction including a next vibration waveform data packet is sent to the driving module to instruct the driving module to the following partial vibration waveform in the RTP mode vibration waveform data in the next vibration waveform data packet in order. Since a speed at which data is written into the driving module is much higher than a speed at which the driving module plays the vibration waveform, the linear motor can continue the corresponding vibration according to the vibration waveform of the RTP mode vibration waveform data matching the current vibration mode.

In the present application, the RTP mode vibration waveform data is segmented and packaged to obtain a number of vibration waveform data packets, the RTP mode vibration waveform data is written into the driving module in blocks, and the driving module is instructed to control the linear motor to vibrate correspondingly while the data is written into the driving module. Moreover, when the current vibration waveform data packet is played out, the driving module may be further instructed according to the play instruction including the next vibration waveform data packet to continue to play a vibration waveform in the next vibration waveform data packet, so that the linear motor continues to vibrate, and rich vibration waveforms can still be outputted in the case of limited hardware resources of the electronic atomizer, thereby improving practicability and users' comfort of use.

In one embodiment, the electronic atomizer linear motor control method may further include: outputting a vibration stop instruction if the interrupt signal is received after all the vibration waveform data packets are sent to the driving module, the vibration stop instruction being used for instructing the driving module to control the linear motor to stop vibrating.

Specifically, after the vibration waveform data packets obtained by segmenting and packaging the RTP mode vibration waveform data are sent to the driving module, if an interrupt signal fed back by the driving module is received, it indicates that the SRAM of the driving module has played out the vibration waveform of the RTP mode vibration waveform data matching the current vibration mode included in the vibration waveform data packets. That is, the driving module has played out the vibration waveform of the RTP mode vibration waveform data, and a vibration stop instruction can be outputted to the driving module to cause the linear motor to stop vibrating. That is, the linear motor has completed the corresponding vibration in the current vibration mode. For example, in the case of insertion and removal of the cartridge of the electronic atomizer, the linear motor feeds back a short vibration, and stop vibrating when the vibration waveform of the RTP mode vibration waveform data matching the current vibration mode is played out. When the electronic atomizer is smoked, the linear motor may feed back a vibration with fade-in vibration intensity, and stop vibrating when the smoking of the electronic atomizer is stopped. The matched RTP mode vibration waveform data may vary in different vibration modes, and the linear motor may also vibrate in different manners, so as to provide rich vibration feedback for the electronic atomizer and improve practicability and comfort of use.

In a specific example, if the size of the RTP mode vibration waveform data packet is smaller than the storage space of the SRAM of the driving module, the RTP mode vibration waveform data may not be segmented, and the RTP mode vibration waveform data may be directly sent to the SRAM of the driving module as a vibration data packet. Moreover, when an interrupt signal fed back by the driving module is received, a vibration stop instruction is outputted to instruct the driving module to control the linear motor to stop vibrating.

Based on the above, in the present application, when a vibration event of the electronic atomizer occurs currently, the RTP mode vibration waveform data in the storage space of the SRAM is segmented and packaged sequentially to obtain a number of vibration waveform data packets, and the play instruction including a current vibration waveform data packet is sent to the driving module by I2C-DMA. The play instruction is used for instructing the driving module to play the vibration waveform data packet to drive the linear motor to vibrate correspondingly. Moreover, when an interrupt fed back by the driving module is received, a play instruction including a next vibration waveform data packet is sent to the driving module by I2C-DMA, so that the remaining vibration waveform of the RTP mode vibration waveform data can be successively and continuously played in order, achieving continued vibration of the linear motor and a driving process of writing data simultaneously with vibrating in the RTP mode. In the present application, rich vibration waveforms can be outputted in the RTP mode in the case of fewer hardware resources of the electronic atomizer. The present application has high practicability and can greatly improve the users' comfort of use.

In one embodiment, as shown in <FIG>, a method for controlling a linear motor of an electronic atomizer applied to a driving module of an electronic atomizer is provided. The method may include the following steps.

In step <NUM>, in a case where a play instruction including a current vibration waveform data packet and sent by a controller of the electronic atomizer including a DMA unit is received, the vibration waveform data packet is played to drive the linear motor of the electronic atomizer to vibrate, the vibration waveform data packet including a vibration waveform of vibration waveform data matching a current vibration mode.

In step <NUM>, the vibration waveform data packet is cleared if the vibration waveform data packet is played out, and an interrupt signal is fed back to the controller, the interrupt signal being used for instructing the controller to send a play instruction including a next vibration waveform data packet.

Specifically, in a case where a play instruction sent by a controller of the electronic atomizer including a DMA unit is received, the current vibration waveform data packet included in the play instruction is played to drive the linear motor of the electronic atomizer to vibrate correspondingly according to a vibration waveform of RTP mode vibration waveform data matching the current vibration mode included in the vibration waveform data packet, which realizes a driving process of writing data simultaneously with vibrating in an RTP mode. In a case where the vibration waveform data packet is played out, the SRAM is cleared, that is, the vibration waveform data packet in the SRAM is cleared, and an interrupt signal is fed back to the controller. The interrupt signal is used for instructing the controller to send a play instruction including a next vibration waveform data packet, so as to ensure continued vibration of the linear motor.

Based on the above, in the present application, in a case where the play instruction including the current vibration waveform data packet is received, the vibration waveform of the RTP mode vibration waveform data matching the current vibration mode included in the vibration waveform data packet is immediately played to drive the linear motor to vibrate, which realizes a driving process of writing data simultaneously with vibrating in the RTP mode, and in a case where the vibration waveform data packet is played out, an interrupt signal is fed back to the controller to instruct the controller to send a play instruction including a next vibration waveform data packet, so as to drive the linear motor to continue to vibrate according to the vibration waveform of the RTP mode vibration waveform data matching the current vibration mode. In the present application, the RTP mode may be adopted to drive the linear motor to vibrate in the case of fewer hardware resources of the electronic atomizer, so as to generate rich vibration waveforms, thereby providing users of the electronic atomizer with rich vibration feedback in different usage scenarios, and greatly improving practicality and comfort of use.

It should be understood that, although the steps in the flowchart of <FIG> are shown in sequence as indicated by the arrows, the steps are not necessarily performed in the order indicated by the arrows. Unless otherwise clearly specified herein, the steps are performed without any strict sequence limitation, and may be performed in other orders. In addition, at least some steps in <FIG> may include a plurality of steps or a plurality of stages, and such steps or stages are not necessarily performed at a same moment, and may be performed at different moments. The steps or stages may be performed in turn or alternately with other steps or at least part of the steps or stages of other steps, rather than being necessarily performed sequentially.

In one embodiment, as shown in <FIG>, a device for controlling a linear motor of an electronic atomizer is provided, which may include a first output module <NUM> and a second output module <NUM>.

The first output module <NUM> is configured to send a play instruction to a driving module of the electronic atomizer, the play instruction including a current vibration waveform data packet, the play instruction being used for instructing the driving module to play the vibration waveform data packet to drive the linear motor of the electronic atomizer to vibrate, the vibration waveform data packet including a vibration waveform of vibration waveform data matching a current vibration mode.

The second output module <NUM> is configured to send, if an interrupt signal fed back by the driving module is received, a play instruction including a next vibration waveform data packet to the driving module.

In one embodiment, the electronic atomizer linear motor control apparatus may further include a reset module configured to reset the driving module, and if a size of the vibration waveform data is larger than a storage space of an SRAM of the driving module, segment and package the vibration waveform data sequentially to obtain a number of vibration waveform data packets each with a size smaller than the storage space of the SRAM.

In one embodiment, the electronic atomizer linear motor control apparatus may further include a third output module configured to output a vibration stop instruction if the interrupt signal is received after all the vibration waveform data packets are sent to the driving module, the vibration stop instruction being used for instructing the driving module to control the linear motor to stop vibrating.

In one embodiment, the vibration waveform data may be RTP mode vibration waveform data.

The first output module <NUM> is further configured to send the play instruction to the driving module by I2C-DMA when a vibration event of the electronic atomizer occurs currently.

In one embodiment, a device for controlling a linear motor of an electronic atomizer is provided, which may include a data receiving module and a signal feedback module.

The data receiving module is configured to play, in a case where a play instruction including a current vibration waveform data packet and sent by a controller of the electronic atomizer including a DMA unit is received, the vibration waveform data packet to drive the linear motor of the electronic atomizer to vibrate, the vibration waveform data packet including a vibration waveform of vibration waveform data matching a current vibration mode.

The signal feedback module is configured to clear the vibration waveform data packet if the vibration waveform data packet is played out, and feed an interrupt signal back to the controller, the interrupt signal being used for instructing the controller to send a play instruction including a next vibration waveform data packet.

Specific limitations on the electronic atomizer linear motor control apparatus may be obtained with reference to the limitations on the electronic atomizer linear motor control method hereinabove. The modules in the foregoing electronic atomizer linear motor control apparatus may be implemented entirely or partially by software, hardware, or a combination thereof. The above modules may be built in or independent of a processor of a computer device in a hardware form, or may be stored in a memory of the computer device in a software form, so that the processor invokes and performs operations corresponding to the above modules. It is to be noted that the division of the modules is merely schematic, which is merely a logical function division and may be another division in actual implementation.

In one embodiment, as shown in <FIG>, a system for controlling a linear motor of an electronic atomizer (also shown as electronic atomizer linear motor control system) is provided, which may include: a driving module, a linear motor, and a controller including a DMA unit.

The driving module is connected to the controller and the linear motor respectively.

The controller is configured to perform the method for controlling the linear motor of the electronic atomizer described above, and/or the driving module is configured to perform the method for controlling the linear motor of the electronic atomizer described above.

In one example, the controller may be a single-chip microcomputer with a DMA function.

The driving module may be a driving chip. Hardware configuration of the driving chip may be implemented by an I2C bus.

Specifically, when a microcontroller unit (MCU) of the single-chip microcomputer writes the RTP mode vibration waveform data into the driving chip through the RTP mode (by writing data simultaneously with vibrating), due to a single-task operation nature of the single-chip microcomputer, the MCU of the single-chip microcomputer cannot perform other operations at the same time. Thus, in the present application, the DMA unit of the single-chip microcomputer is used to write the RTP mode vibration waveform data into the SRAM of the driving chip by I2C-DMA, the RTP mode vibration waveform data is played in real time, and the play is stopped when the writing of the data is stopped. During the vibration of the linear motor, the MCU of the single-chip microcomputer may not be affected by the writing of data into the driving chip through the DMA, and may perform other operations at the same time, so as to generate rich vibration waveforms in the case of fewer hardware resources of the electronic atomizer.

In one specific example, as shown in <FIG>, after the electronic atomizer is powered on, I2C-DMA configuration is initialized. When a vibration event of the electronic atomizer occurs currently, for example, in the case of current insertion and removal of the cartridge of the electronic atomizer, the single-chip microcomputer may reset the driving chip, and configure interruption to define ports for data transmission. The single-chip microcomputer acquires the RTP mode vibration waveform data matching the current vibration mode. If the size of the RTP mode vibration waveform data is larger than the storage space of the SRAM of the driving chip, the single-chip microcomputer writes the RTP mode vibration waveform data into the SRAM in blocks. That is, the single-chip microcomputer segments and packages the RTP mode vibration waveform data sequentially to obtain a number of vibration waveform data packets, and send the play instruction including the current vibration waveform data packet to the driving chip by I2C-DMA. The driving chip, in the case of receiving the play instruction by I2C-DMA, immediately plays the vibration waveform data package, and controls the linear motor to vibrate correspondingly based on an RTP vibration waveform of the RTP mode vibration waveform data matching the current vibration mode included in the vibration waveform data packet. If the driving chip plays out the vibration waveform data packet, the vibration waveform data packet of the SRAM is cleared. An interrupt signal is fed back to the single-chip microcomputer in a case where the SRAM is cleared. When receiving the interrupt signal fed back by the driving chip, the single-chip microcomputer sends a play instruction including a next vibration waveform data packet to the driving chip by I2C-DMA. When receiving the play instruction including the next vibration waveform data packet, the driving chip drives the linear motor to continue to vibrate according to a vibration waveform in the next vibration waveform data packet, data writing simultaneously with vibrating are repeated until the single-chip microcomputer sends the vibration waveform data packets to the driving chip. The driving chip feeds an interrupt signal back to the single-chip microcomputer when playing out the final vibration waveform data packet, and the single-chip microcomputer outputs a vibration stop instruction to the driving chip when receiving the interrupt signal. The driving chip receives the vibration stop instruction and controls the linear motor to stop vibrating.

In one embodiment, the electronic atomizer linear motor control system may further include an RST rest driving chip and an I2C bus.

The RST rest driving chip is connected to the controller and the driving module respectively.

The controller is connected to the driving module through the I2C bus.

The linear motor is connected to an HDP pin of the driving module and an HDN pin of the driving module respectively.

As shown in <FIG>, the I2C bus may include an I2C-serial clock line (SCL) line and an I2C-serial data (SDA) line.

Specifically, the single-chip microcomputer may reset the driving chip through the RST reset driving chip, and send a play instruction including a current vibration waveform data packet to the driving chip through the I2C bus. The driving chip, when receiving the play instruction including the current vibration waveform data packet, plays the current vibration waveform data packet, and drives the linear motor of the electronic atomizer to vibrate through the HDP pin and the HDN pin. When the current vibration waveform data packet is played out, the driving chip feeds an INPT signal (interrupt signal) back to the single-chip microcomputer. The single-chip microcomputer, when receiving the INPT signal, sends a play instruction including a next vibration waveform data packet to the driving chip through the I2C bus, until the interrupt signal fed back by the driving chip is received after the single-chip microcomputer sends the vibration waveform data packets to the driving chip. Then, a vibration stop instruction is sent to the driving chip through the I2C bus. The driving chip, when receiving the vibration stop instruction, controls the linear motor to stop vibrating through the HDP pin and the HDN pin.

Based on the above, in the present application, the RTP mode vibration waveform data is written into the SRAM of the driving module by I2C-DMA through the controller including a DMA unit, so that the driving module plays the waveform in real time to drive the linear motor to vibrate correspondingly according to the written RTP mode vibration waveform data. During the vibration of the linear motor, the controller can continue other operations without being affected by the writing of data into the driving module through the DMA. In the case of fewer hardware resources of the electronic atomizer, rich vibration waveforms are outputted in the RTP mode, so as to provide rich vibration feedback for users in various scenarios of using electronic atomizer, and enable the users to intuitively feel a use state of the electronic atomizer, which greatly improves practicability and comfort of use.

In one embodiment, as shown in <FIG>, an electronic atomizer is provided, including the system for controlling the linear motor of the electronic atomizer described above.

The electronic atomizer in the present application can generate rich vibration waveforms in the RTP mode in the case of fewer hardware resources. For example, in the case of insertion and removal of the cartridge of the electronic atomizer or smoking of the electronic atomizer, different vibration feedback is triggered, so that the users can more intuitively understand the use of the electronic atomizer, and the practicality and comfort are greatly enhanced.

In one embodiment, a computer-readable storage medium storing a computer program is provided. The computer program, when executed by a processor, causes the processor to implement steps in the method embodiments described above.

Those of ordinary skill in the art may understand that some or all procedures in the methods in the foregoing embodiments may be implemented by a computer program instructing related hardware, the program may be stored in a non-volatile computer-readable storage medium, and when the program is executed, the procedures in the foregoing method embodiments may be implemented. Any reference to the memory, storage, database, or other media used in the embodiments provided in the present application may include at least one of a non-volatile memory and a volatile memory. The non-volatile memory may include a Read-Only Memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical memory, or the like. The volatile memory may include a Random Access Memory (RAM) or an external high-speed cache memory. By way of illustration instead of limitation, the RAM is available in a variety of forms, such as a static random access memory (SRAM) and a Dynamic Random Access Memory (DRAM).

In the description of the specification, reference terms such as "some embodiments", "other embodiments", and "ideal examples" mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In the specification, the schematic expressions to the above terms are not necessarily referring to the same embodiment or example.

Claim 1:
A method for controlling a linear motor of an electronic atomizer, the method comprising:
sending (S202), by a controller of an electronic atomizer, a play instruction to a driving module of the electronic atomizer, the play instruction comprising a current vibration waveform data packet, the play instruction being used for instructing the driving module to play the vibration waveform data packet to drive the linear motor of the electronic atomizer to vibrate, the vibration waveform data packet comprising a vibration waveform of vibration waveform data matching a current vibration mode, the controller comprising a direct memory access, DMA, unit configured to control the driving module through a real-time transport protocol, RTP, mode; and
The method characterized in that, it further comprises:
sending (S204), by the controller, if an interrupt signal fed back by the driving module is received, a play instruction comprising a next vibration waveform data packet to the driving module.