METHOD, DEVICE AND SYSTEM FOR CONTROLLING A LINEAR MOTOR OF AN ELECTRONIC NUMBRELLA AND ELECTRONIC NUMBRELLA
Patent Information
- Application Number
- DE602022010763
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-10-11
- Filing Date
- 2022-10-06
- Publication Date
- 2025-02-19
- Estimated Expiration
- 2042-10-06
AI Technical Summary
Existing electronic atomizers using the RAM mode to drive linear motors can only generate simple vibration waveforms, limiting their vibration feedback to a single form and preventing the creation of rich vibration waveforms.
A method and system that utilize a controller with a DMA unit to control the driving module of an electronic atomizer through the RTP mode, allowing for the sending of vibration waveform data packets to drive the linear motor and generate rich vibration waveforms.
This approach enables the electronic atomizer to produce rich vibration waveforms even with limited hardware resources, enhancing the vibration effect and improving user experience and practicability.
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of signal processing, and in particular, to a method, device and system for controlling a linear motor of an electronic atomizer, and an electronic atomizer.BACKGROUND
[0002] 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.
[0003] 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.
[0004] Related technologies are known from WO 99 / 40504 A1, WO 2019 / 239217 A1, WO 2020 / 201266 A1, US 2019 / 339976 A1 and EP 1817121 B1.SUMMARY
[0005] 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.
[0006] In a first aspect, a method for controlling a linear motor of an electronic atomizer is provided. The method includes: sending, 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 sending, 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.
[0007] 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.
[0008] 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.
[0009] 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.
[0010] 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.
[0011] 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.
[0012] 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.
[0013] 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.
[0014] In a fourth aspect, an electronic atomizer is further provided. The electronic atomizer includes the system according to the third aspect.
[0015] 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.
[0016] One of the above technical solutions has at least the following advantages and beneficial effects.
[0017] 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.BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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. FIG. 1 is a schematic flowchart of a method for controlling a linear motor of an electronic atomizer applied to a controller including a DMA unit according to an embodiment. FIG. 2 is a schematic flowchart of a method for controlling a linear motor of an electronic atomizer applied to a driving module of an electronic atomizer according to an embodiment. FIG. 3 is a block diagram illustrating a configuration of a device for controlling a linear motor of an electronic atomizer according to an embodiment. FIG. 4 is a block diagram illustrating a configuration of a system for controlling a linear motor of an electronic atomizer according to an embodiment. FIG. 5 is a schematic workflow of a system for controlling a linear motor of an electronic atomizer according to an embodiment. FIG. 6 is a block diagram illustrating a configuration of a system for controlling a linear motor of an electronic atomizer according to another embodiment. FIG. 7 is a block diagram illustrating a configuration of an electronic atomizer according to an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0019] 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.
[0020] 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.
[0021] 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.
[0022] 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.
[0023] 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.
[0024] 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.
[0025] In one embodiment, as shown in FIG. 1, 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.
[0026] In step 202, 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.
[0027] In step 204, 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.
[0028] 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.
[0029] 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.
[0030] 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.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] In one embodiment, the vibration waveform data is RTP mode vibration waveform data.
[0035] The step 202 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.
[0036] 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.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] 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.
[0041] In one embodiment, prior to the step 202 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.
[0042] The SRAM of the driving module is configured to store the RTP mode vibration waveform data.
[0043] In a specific example, prior to the step of resetting the driving module, the method may include: initializing I2C-DMA configuration.
[0044] 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 3k 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.
[0045] 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.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] In one embodiment, as shown in FIG. 2, 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.
[0051] In step 302, 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.
[0052] In step 304, 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.
[0053] 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.
[0054] 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.
[0055] It should be understood that, although the steps in the flowchart of FIG. 1 to FIG. 2 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. 1 to FIG. 2 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.
[0056] In one embodiment, as shown in FIG. 3, a device for controlling a linear motor of an electronic atomizer is provided, which may include a first output module 110 and a second output module 120.
[0057] The first output module 110 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.
[0058] The second output module 120 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.
[0059] 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.
[0060] 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.
[0061] In one embodiment, the vibration waveform data may be RTP mode vibration waveform data.
[0062] The first output module 110 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.
[0063] 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.
[0064] 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.
[0065] 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.
[0066] 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. Details are not described herein. 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.
[0067] In one embodiment, as shown in FIG. 4, 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.
[0068] The driving module is connected to the controller and the linear motor respectively.
[0069] 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.
[0070] In one example, the controller may be a single-chip microcomputer with a DMA function.
[0071] The driving module may be a driving chip. Hardware configuration of the driving chip may be implemented by an I2C bus.
[0072] 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.
[0073] In one specific example, as shown in FIG. 5, 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.
[0074] In one embodiment, the electronic atomizer linear motor control system may further include an RST rest driving chip and an I2C bus.
[0075] The RST rest driving chip is connected to the controller and the driving module respectively.
[0076] The controller is connected to the driving module through the I2C bus.
[0077] The linear motor is connected to an HDP pin of the driving module and an HDN pin of the driving module respectively.
[0078] As shown in FIG. 6, the I2C bus may include an I2C-serial clock line (SCL) line and an I2C-serial data (SDA) line.
[0079] 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.
[0080] 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.
[0081] In one embodiment, as shown in FIG. 7, an electronic atomizer is provided, including the system for controlling the linear motor of the electronic atomizer described above.
[0082] 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.
[0083] 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.
[0084] 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).
[0085] 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.
[0086] The technical features in the above embodiments may be randomly combined. For concise description, not all possible combinations of the technical features in the above embodiments are described. However, all the combinations of the technical features are to be considered as falling within the scope described in this specification provided that they do not conflict with each other.
Claims
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.
2. The method according to claim 1, prior to sending the play instruction to the driving module of the electronic atomizer, comprising: 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.
3. The method according to claim 2, further comprising: outputting, by the controller, 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.
4. The method according to claim 1, wherein the vibration waveform data is real-time transport protocol, RTP, mode vibration waveform data; and wherein the sending the play instruction to the driving module of the electronic atomizer comprises: sending the play instruction to the driving module by I2C-DMA when a vibration event of the electronic atomizer occurs currently.
5. The method according to claim 1 further comprising: 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.
6. A controller device for controlling a linear motor of an electronic atomizer, the controller device comprising: a direct memory access, DMA, unit configured to control a driving module through a real-time transport protocol, RTP, mode; a first output module (110) configured to send a play instruction to the 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; and characterized in that the controller device further comprises: a second output module (120) configured to send, 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.
7. A system for controlling a linear motor of an electronic atomizer, the system comprising a driving module, a linear motor, and a controller device according to claim 6, wherein: the driving module is connected to the controller and the linear motor respectively; the controller is configured to perform the method according to any one of claims 1 to 4; and / or the driving module is configured to perform the method according to claim 5.
8. The system according to claim 7, further comprising an RST rest driving chip and an inter-integrated circuit, I2C, bus, wherein: 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; and the controller is a single-chip microcomputer with a DMA function.
9. An electronic atomizer, comprising the system according to claim 7 or 8.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, causes the processor to implement steps of the method according to any one of claims 1 to 5.