CN115120065A - Swing control method and system, electronic device, and medium - Google Patents

Swing control method and system, electronic device, and medium Download PDF

Info

Publication number
CN115120065A
CN115120065A CN202110325385.9A CN202110325385A CN115120065A CN 115120065 A CN115120065 A CN 115120065A CN 202110325385 A CN202110325385 A CN 202110325385A CN 115120065 A CN115120065 A CN 115120065A
Authority
CN
China
Prior art keywords
swing
amplitude
angle
motor
rocking
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110325385.9A
Other languages
Chinese (zh)
Inventor
楊振松
何子健
S·威尔斯
陳佩強
邓明辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kids2 Inc
Original Assignee
Kids Il Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kids Il Inc filed Critical Kids Il Inc
Priority to CN202110325385.9A priority Critical patent/CN115120065A/en
Publication of CN115120065A publication Critical patent/CN115120065A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47DFURNITURE SPECIALLY ADAPTED FOR CHILDREN
    • A47D9/00Cradles ; Bassinets
    • A47D9/02Cradles ; Bassinets with rocking mechanisms
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47DFURNITURE SPECIALLY ADAPTED FOR CHILDREN
    • A47D13/00Other nursery furniture
    • A47D13/10Rocking-chairs; Indoor Swings ; Baby bouncers
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47DFURNITURE SPECIALLY ADAPTED FOR CHILDREN
    • A47D15/00Accessories for children's furniture, e.g. safety belts or baby-bottle holders

Landscapes

  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Pediatric Medicine (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The embodiment of the application provides a swing control method and system, electronic equipment and a medium. The swing control system includes: a controller configured to perform control of a swing motion of the swing apparatus; sensing means configured to sense a light pulse of a photo interrupter coupled to the swing apparatus such that the controller determines a motion condition of the swing apparatus from the light pulse sensed by the sensing means; and a motor configured to provide a drive for swinging the swing apparatus.

Description

Swing control method and system, electronic device, and medium
Technical Field
The present application relates to the field of intelligent control technologies, and in particular, to a swing control method and system, an electronic device, and a medium.
Background
Although the current children products, especially children swing devices such as a cradle, a rocking chair and the like are common in the market, the swing control aspect is not intelligent enough, and the user experience is not good enough.
Disclosure of Invention
Embodiments of the present application provide a method and a system for controlling swing, an electronic device, and a medium, so as to solve or alleviate one or more technical problems in the prior art.
As an aspect of an embodiment of the present application, an embodiment of the present application provides a swing control system, including:
a controller configured to perform control of a swing motion of the swing apparatus;
sensing means configured to sense a light pulse of a photo interrupter coupled to the swing apparatus such that the controller determines a motion condition of the swing apparatus from the light pulse sensed by the sensing means; and
a motor configured to provide a driving of the swing apparatus.
As an aspect of an embodiment of the present application, an embodiment of the present application provides a swing control method, including: detecting a light pulse from a photo interrupter coupled to the rocking device in response to rocking of the rocking device;
determining whether the swing device reaches a set swing angle and/or amplitude based on the detected light pulses; and
in response to determining that the swing apparatus has not reached the set swing angle and/or amplitude, increasing a driving force of a motor for driving the swing apparatus to swing.
As an aspect of an embodiment of the present application, an embodiment of the present application provides an electronic device, including:
at least one processor; and
a memory;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform one of the methods described above.
As an aspect of the embodiments of the present application, a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform one of the above methods is provided.
As an aspect of the embodiments of the present application, a computer program product is provided in the embodiments of the present application, which includes a computer program that, when executed by a processor, implements one of the methods described above.
By adopting one of the technical schemes, the swing of the swing equipment can be intelligently controlled, and better user experience is provided.
The foregoing summary is provided for the purpose of description only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present application will be readily apparent by reference to the drawings and following detailed description.
Drawings
In the drawings, like reference characters designate like or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily to scale. It is appreciated that these drawings depict only some embodiments in accordance with the disclosure and are therefore not to be considered limiting of its scope.
FIG. 1 illustrates an exemplary block diagram of a swing control system according to an embodiment of the present application.
FIG. 2 illustrates an exemplary coupling of some components according to an embodiment of the present application.
Fig. 3 shows a schematic diagram of a detected light pulse.
Fig. 4 shows a schematic diagram of the rocking cycle and rocking angle.
Fig. 5 illustrates an exemplary flowchart of a swing control method according to an embodiment of the present application.
Fig. 6 shows an exemplary flowchart of a part of steps in a swing control method according to another embodiment of the present application.
Fig. 7 shows an exemplary flowchart of steps in a swing control method according to another embodiment of the present application.
FIG. 8 illustrates a general exemplary flow chart of an exemplary sway control method in accordance with another embodiment of the present application.
FIG. 9 illustrates an exemplary flow chart of an exemplary swing control method according to another embodiment of the present application.
Fig. 10 illustrates an exemplary flowchart of control of a clockwise swing cycle in an exemplary swing control method according to an embodiment of the present application.
Fig. 11 illustrates an exemplary flowchart of the control of a clockwise swing cycle in an exemplary swing control method according to an embodiment of the present application.
Fig. 12 shows a schematic block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following, only certain exemplary embodiments are briefly described. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present application. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.
As described above, the embodiments of the present application provide a swing control system for overcoming the deficiency of the swing control function of a swing device in terms of intelligence.
Fig. 1 shows a block diagram of a swing control system according to an embodiment of the present application. As shown in fig. 1, the control system may include: a controller 100, a power supply 101, a human-machine interface 102, a sensing device 103, a motor 104, and a multimedia output device 105.
Among other things, the controller 100 may be configured to perform control of a rocking motion of a rocking device, such as a cradle, a rocking chair, or the like. For example, a single chip controller (such as an 8051 single chip controller) or a processor may be employed.
The processor may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like. The processor may also be a Central Processing Unit (CPU). It is noted that the processor may also be an advanced reduced instruction set machine (ARM) architecture supported processor.
The power supply 101 may be configured to power the controller. It is noted that the power supply 101 is not necessarily required to implement the swing control system of the present application.
The human-machine-interaction interface 102 may be configured to provide interaction with a user, facilitating the user to perform input through the interface 102, such that the controller 100 implements control of the swing device, and in particular the swing of the swing device, based on the user's input. Here, the human-computer interaction interface 102 may include a control panel such as a touch panel (touch panel) or an operation panel. Devices such as a mouse, keyboard, display, various keys and/or buttons may also be included. It is worth noting that the human-machine-interaction interface 102 is not necessarily required. The user input may also be received not through the man-machine interaction interface but through other means (e.g., various possible means such as wireless communication, data communication, network communication, etc.).
FIG. 2 illustrates an exemplary coupling of some components according to embodiments of the present application. Those skilled in the art will appreciate that the coupling illustrated in fig. 2 is exemplary only, and the present application is not limited to only this exemplary manner.
The sensing means 103 may for example be a light sensor, such as an infrared sensor, which may be configured to sense a light pulse of a photo-interrupter (as shown in fig. 2) coupled to the swing apparatus, such that the controller 100 determines the motion condition of the swing apparatus from the light pulse sensed by the sensing means 103.
According to the embodiment of the application, in order to know the motion condition of the swing device, the photo interrupter can be engaged with the motor 104 mounted on the swing device, and the light pulse of the photo interrupter is sensed by the sensing device 103 to determine the swing condition of the swing device.
Alternatively, it is also possible to engage a wheel-like arrangement, for example on the rear side of the motor 104, wherein the wheel-like arrangement has a gap (hole). The clearance may be, for example, a gear gap (gear gap) described later by way of example, wherein the gear is one example of the wheel-like device. Optionally, a photo-interrupter (one emitting at one end and one receiving at one end, and when there is a blockage, no light is received) may be coupled to the wheel-like arrangement for reflecting the rocking condition of the rocking device by light pulses transmitted through the photo-interrupter.
Wherein the light pulse of the photo-interrupter is related to the movement of the gap of the wheel-like arrangement.
Alternatively, the light pulse that detects the photo-interrupter may be, for example, the width (duration of the pulse) of the pulse that is detected to be transmitted through the photo-interrupter.
The motor 104 may be configured to provide a drive for the rocking of the rocking device. For example, a motor may be used to drive the rocking device bi-directionally. Further, the driving force for driving the swing apparatus may be controlled by, for example, pulse width modulation (pulse width modulation). Of course, other ways of controlling such driving force may be used.
The multimedia output device 105 may be configured to output a multimedia effect, such as at least one of audio, image, video, text. For example, music (music), music (melody), song (song), animated special effects (which may include, for example, sounds and/or pictures, such as sound effects SFX), and the like may be output.
Through the control system according to the embodiment of the application, the intelligent control of the swing equipment can be realized, and the user experience is improved.
In addition, the swing control system according to the embodiment of the present application may also provide a timed swing function, i.e., the swing device may be controlled to swing during a timed time set by a user. The timing time set by the user may be input through an input device or selected through a human-computer interaction interface, which is not limited in this application.
Alternatively, the swing angle (swing angle) of the swing device during stable swing may be configured or set through the human-machine interaction interface 102, and may be referred to as "set swing angle" herein. On the premise that the driving force of the motor is sufficient, it may refer to, for example, the maximum angle that can be reached when the swing apparatus is in a stable swing state, i.e., a position at which the swing apparatus returns once it reaches the angle.
For example, one of the N swing angles may be selected through the human-machine interaction interface 102, or a desired current maximum swing angle may be directly input through an input device as the human-machine interaction interface 102. Here, the current maximum rocking angle may be in the range of (0 degrees, 90 degrees). The number N of selectable rocking angles described above may be, for example, an integer value in [2,20], such as 6, but of course, other values are also possible. If the user inputs the swing angle through the input device of the man-machine interaction interface, one of a plurality of specific numerical values may be input, and any suitable swing angle without being limited to one of the plurality of specific numerical values may be input as the current maximum swing angle.
Alternatively, the initial driving force to be provided to the rocking device by the motor may be determined by, for example, the controller by determining the weight of a user of the rocking device (such as an infant aged 3 months to 2 years) after the user selects or sets the rocking angle of the rocking device.
In addition, optionally, before the controller controls the swing device to start swinging, a mechanical error (mechanical error) of the swing device, which includes a mechanical tolerance (mechanical tolerance), may be checked to reduce an angle error of the swing device by removing (a negative effect of) the mechanical error in the swing control, so that the swing control is more accurate, thereby providing a more comfortable user experience.
Alternatively, after the swing apparatus starts to swing, whether the swing angle of the swing apparatus reaches the above-set swing angle may be monitored by the sensing means.
Alternatively, if the controller determines that the swing angle of the swing apparatus has not reached the set swing angle after a period of time, the swing speed of the swing apparatus may be adjusted (increased) by the motor, and/or the set swing angle of the swing apparatus may be adjusted (e.g., reset) by the human-machine interaction interface.
Alternatively, adjusting the swing of the swing apparatus by the motor to achieve the above-set swing angle may include increasing the driving force of the motor. For example, the driving force of the motor may be increased on a rocking cycle (which term will be explained later) by rocking cycle to make the rocking apparatus quickly reach the above-set rocking angle. The driving force of the motor may be increased at intervals to stably achieve the set rocking angle.
The driving force increase range of the motor may be set according to the situation, for example, may be increased by a fixed step each time, the value of the step (which may be increased by a percentage of the current driving force of the motor) may be set according to the situation, for example, may be increased by 12.5% each time, or may be increased by 10% each time, or the step may be adjusted in the increasing process, for example, in the case of a large difference from the set swing angle, the step may be increased by a large step, and in the case of a small swing angle, the step may be increased by a small step so as to gradually approach the set swing angle, and the swing angle is prevented from being exceeded as much as possible.
In addition, by checking whether the set rocking angle is reached, it is possible to prevent the driving force of the motor from being reversed with respect to the rocking motion of the rocking device. Once the driving force of the motor is reversed from the rocking motion of the rocking device, the rocking angle may be decreased (e.g. rapidly decreased) instead of increased.
Alternatively, after the driving force of the motor is increased until the swing of the swing apparatus reaches the above-set swing angle, the driving force of the motor may be maintained so that the swing apparatus stably continues to swing, thereby providing a comfortable and stable user experience.
Alternatively, it may be determined whether the swing apparatus reaches the above-set swing angle by detecting whether the pulse received from the photo interrupter by the sensing means is the widest pulse.
Fig. 3 shows a schematic diagram of a detected light pulse. As can be seen from fig. 3, the light pulses received from the photo-interrupter may have different widths, which implies different rocking angles, wherein the maximum pulse width may represent the maximum rocking angle of the rocking device. In one wobble cycle, there may be two widest pulses (i.e., the largest pulse width). One rocking cycle may be, for example, a rocking process from a rocking maximum point on one side to a rocking maximum point on the other side, as shown in fig. 4. In addition, fig. 4 also gives an illustration of the rocking angle for the understanding of the person skilled in the art.
Here, the detection of whether the received pulse is the widest pulse may be performed by the sensing device or the controller, and the present application does not limit this.
The above description has been given by taking the rocking angle as an example, and actually, the technical effects according to the above embodiments of the present application can be achieved by the rocking amplitude (swing amplitude) as well, so that the embodiments of the present application can protect the technical solutions of the rocking angle and/or the rocking amplitude.
Therefore, by the swing control system according to the above embodiment of the present application, a more intelligent swing device can be realized, thereby providing a more comfortable user experience.
According to an embodiment of the present application, there is provided a swing control method for controlling a swing of a swing apparatus.
As shown in fig. 5, the above-described swing control method may include the following steps.
S510, in response to the swing of the swing device, a light pulse from a photo interrupter coupled to the swing device is detected.
And S520, determining whether the swing equipment reaches a set swing angle or not based on the detected light pulse.
S530, in response to determining that the swing apparatus has not reached the set swing angle, increasing a driving force of a motor for driving the swing apparatus to swing.
Optionally, as shown in fig. 6, according to an embodiment of the present application, the above-mentioned swing control method may further include the following steps.
In response to the activation of the swing apparatus, the swing apparatus is controlled by, for example, the controller to start swinging S502.
Optionally, as shown in fig. 6, according to an embodiment of the present application, the above-mentioned swing control method may further include the following steps.
And S501, before controlling the swing equipment to start swinging, determining the setting parameters required by the swinging.
The setting parameters required by the swing may include the swing angle and/or amplitude set as described above.
Optionally, as shown in fig. 6, according to an embodiment of the present application, the above-mentioned swing control method may further include the following steps.
S503, before or after the swing apparatus starts swinging, checking the mechanical error of the swing apparatus. Wherein the mechanical error comprises a mechanical error. Through examining mechanical error earlier, can avoid or reduce mechanical error to the influence that the precision brought sways to promote and sway the precision, provide more stable and comfortable user experience.
Optionally, as shown in fig. 7, according to an embodiment of the present application, the above-mentioned swing control method may further include the following steps.
And S531, in response to the swing angle and/or amplitude of the swing device being greater than the set swing angle and/or amplitude, reducing the driving force of the motor for driving the swing device to swing.
In some cases, for example, due to inertia of the motion, the swing angle and/or amplitude of the swing apparatus may be larger than the set swing angle and/or amplitude, and then measures may be taken to reduce the swing angle and/or amplitude of the swing apparatus, and thus, this may be achieved by reducing the driving force of the motor for driving the swing apparatus to swing.
Alternatively, after the driving force of the motor is increased or decreased until the swing of the swing apparatus reaches the above-set swing angle, the driving force of the motor may be maintained so that the swing apparatus stably continues to swing, thereby providing a comfortable and stable user experience.
Optionally, the aforementioned setting parameters required for the swing may also include swing timing, such as 1 hour, 20 minutes, and the like.
In addition, optionally, the setting parameters required for the swing may further include parameters for an output effect of the multimedia output device, such as a volume level and the like.
Alternatively, the determining of the setting parameters required for the swing in S501 may include using default setting parameters or using the setting parameters configured by the user after the swing device is started. If the user performs parameter configuration after the swing apparatus is started, the user-configured setting parameters may be preferentially used.
The user may configure the setting parameters through a human-computer interaction interface, such as a touch pad, or through corresponding function buttons or keys, such as a "speed key" for setting a swing speed, a "volume key" for setting a volume, a "timing key" for setting a swing timing time, and so on.
As shown in fig. 8, the "speed key" may include seven settings of off, 1, 2, 3, 4, 5, 6, for example; the "volume key" may include four settings such as mute, volume 1, volume 2, volume 3, etc.; "timing key" may include, for example, 1 hour, 45 minutes, 30 minutes, 15 minutes, and the like. It should be noted that the arrangement shown here is merely an example, and the present application is not limited thereto.
In addition, before the swinging equipment starts to swing, the speed key and/or the timing key can be waken, and at the moment, the swinging equipment swings according to default setting parameters. And, after reaching the set swing angle and/or amplitude in the default setting parameters, detecting whether a 'speed key' is pressed, if so, configuring the corresponding speed through the 'speed key'. Similarly, it may be detected whether a "timing key" is pressed after reaching the set swing angle and/or amplitude in the default setting parameters, and if so, a corresponding swing timing time may be configured through the "timing key".
According to the embodiment of the application, "music key" may also be similarly set to set music to be played or to set desired sound effects. Similarly, it can be detected whether the "volume key" is pressed after reaching the set rocking angle and/or amplitude in the default setting parameters, as described above, and if so, the corresponding playback volume can be configured through the "volume key".
FIG. 8 illustrates a general exemplary flow chart of an exemplary swing control method according to another embodiment of the present application. FIG. 9 illustrates an exemplary flow chart of an exemplary swing control method according to another embodiment of the present application. Fig. 10 illustrates an exemplary flowchart of control of a clockwise swing cycle in an exemplary swing control method according to an embodiment of the present application. Fig. 11 illustrates an exemplary flowchart of the control of a clockwise swing cycle in an exemplary swing control method according to an embodiment of the present application.
Optionally, as shown in fig. 8, according to an embodiment of the present application, the above-mentioned swing control method may further include the following steps.
After power-on (start-up), the required initial values, such as the swing angle (e.g. selected from several swing angles, such as "3", i.e. selecting the 3 rd swing angle set, such as 45 degrees), the volume, the timing (i.e. the duration of the swing, such as 1 hour, 30 minutes, etc.) may be set.
In addition, related function keys, such as a "speed key", "timing key", "play key", "volume key", and the like, may also be fully or partially awakened. The device can be awakened after being started up, or can be awakened when needed.
The mechanical error may then be checked as described above. Further, after checking the mechanical error, the control of the swing may be started, that is, the swing may be started.
At the same time, monitoring for rocking may be started, e.g. the pulses (or pulse width, or number of pulses, etc.) of the photo-interrupter may be detected as described above.
Then, it is determined whether the set or selected rocking angle is reached. If so, the rate of rocking may be controlled to a desired or comfortable rocking rate. If not, the motor power may be increased or decreased to control the swing, and the specific manner of increasing or decreasing may be seen in the flow charts in fig. 10 and fig. 11, for example.
In addition, it may be determined whether the music/sound effect is expired (reaching a set time) and if so, the music/sound effect is stopped.
It is also possible to determine whether the time for the rocking has come and, if so, to stop the motor to stop the rocking accordingly, and to stop the sound effect/effect, etc. After the swing is stopped, the controller may enter, for example, a sleep state.
According to the embodiment of the present application, since the swinging motion has inertia, the inertia factor can be taken into consideration when the motor provides the driving force.
For example, the driving force provided may be stopped and/or reduced for a period of time and/or distance before the rocking device reaches a vertex or end point of a side, so that the rocking device accurately reaches the vertex or end point.
The distance (which may be referred to as "driving distance") from the vertex or end point on one side to the position before reaching the vertex or end point on the other side in the clockwise or counterclockwise direction at which the driving force is to be terminated or reduced in advance may be divided into segments, whereby the driving force supplied from the motor to the swing apparatus may be controlled segment by segment. For example, the clockwise driving distance of the swing device may be divided into L segments, where L may be an integer greater than or equal to 1, for example, L may be equal to 18, and in this case, the clockwise swing of the swing device may be divided into 18 segments. Similarly, the counterclockwise rocking of the rocking device may also be divided into L segments. In this way, the driving force provided to the swing apparatus can be controlled section by section to stably, accurately, and rapidly bring the swing apparatus to a set swing angle and/or amplitude.
Specific control methods can also be seen in fig. 9, 10, 11, and the like.
As shown in fig. 9, it is judged first whether or not the swing has been started, and if not, the number of gear gaps is determined first, and the weight of the occupant can also be determined, and then quickly swung to the target swing angle. After it is determined that the wobble has started, the number of gear gaps can be determined, and if the record of the number of gear gaps is empty, a default number of size gaps can be loaded. If it is not empty, then the number of gear lash determined when the wobble has not been initiated can be loaded, then the initial number of steps per wobble cycle (e.g., the 18 steps mentioned earlier) can be set, the initial motor power can also be set, and an initial value of the adjusted power step can also be set (e.g., the adjusted power step can be 1, where 1 means 1 step, where 1 step can represent a particular power value).
The above-described process steps set forth in fig. 9 are merely exemplary and do not represent a limitation of the present application.
Fig. 10 and fig. 11 respectively show the control of the clockwise swing period and the counterclockwise swing period, wherein the control of the counterclockwise swing period is similar to the control of the clockwise swing period, so that only the control of the clockwise swing period is described below, and the control of the counterclockwise swing period is not described again.
As shown in fig. 10, the initialization of the clockwise wobble is performed first, for example, the segment number of 0 may be set first or it may be set directly as a default value without setting.
In addition, the motor power may be set to an initial motor power.
Then, it is determined whether the swing of the current segment is up to time (or time out), and if so, the number of the current segment may be increased by 1 to indicate that the swing control of the next segment is entered. Then, it is judged whether or not the segment number exceeds a preset segment number (or referred to as "set segment number"), for example, the aforementioned 18 segments, and if not, the motor power is set to the current motor power plus the segment power adjustment amount (as a step increment of the motor power adjustment during each segment). The "segment power adjustment amount" may be different for each segment, and may be the same, and is used as a step increment for increasing or decreasing the motor power each time. If the preset segment number is exceeded, it is determined that the pulse detected by the sensor exceeds a set or selected target pulse level (e.g., pulse intensity is too high, pulse width is too high, number of pulses is too high, etc.). If yes, whether the segment power adjustment amount is 0 is judged, and if not, the first preset increment is subtracted from the segment power adjustment amount (for example, if the step size of the segment power adjustment amount is 1, the first preset increment may also be 1). If not, the motor power may be made to become the initial motor power minus a third preset increment, e.g., if the step size of the segment power adjustment is 1, at which time the third preset increment may be, for example, 5, or 2, and so on. In addition, the motor power may be changed to the current motor power minus a third preset increment.
If the pulses detected by the sensor are less than the set or selected target pulse level, it may be determined whether the segment power adjustment is greater than a first threshold (e.g., if the segment power adjustment (adjustment step size) is 1 unit, the first threshold may be, for example, 14). If so, the motor power may be made to become the initial motor power plus a second preset increment. The third preset increment may be the same as or different from the second preset increment. As mentioned above, for example, if the step size of the segment power adjustment amount is 1, the second preset increment may also be 5, or 2, etc. In addition, the motor power can be changed into the current motor power minus a second preset increment, and the like. If not, the segment power increment may be added to a first preset increment, for example, if the step size of the segment power adjustment amount is 1, the first preset increment may be 1.
As previously discussed, if it is determined that the swing of the current segment has not timed out (i.e., has not timed out), it may be determined whether the pulses detected by the sensor have reached a set or selected target pulse level, and if so, the motor power may be reduced by a particular amount, e.g., the motor power may be reduced by a first predetermined percentage, e.g., may be 12.5%. If the pulses detected by the sensor have not reached the set or selected target pulse level, the motor power may be made equal to the current motor power plus the segment power adjustment.
As mentioned above, FIG. 11 is a flowchart of the counterclockwise rocking cycle control similar to FIG. 10, and will not be described herein again for brevity.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
Fig. 12 shows a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 12, the electronic device includes a computing unit 801 that may be a processor, which may perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the electronic device are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, or the like; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, or the like; and a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The computing unit 801 may perform at least one of the methods and processes described above. For example, in some embodiments, any of the above-described swing control methods may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 800 via the ROM 802 and/or the communication unit 809. When loaded into RAM 803 and executed by the computing unit 801, a computer program may perform one or more steps of one of the methods described above. Alternatively, in other embodiments, the computing unit 801 may be configured to perform one of the above-described swing control methods by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input. These may all serve as the human-machine interaction interface described above.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (21)

1. A swing control system comprising:
a controller configured to perform control of a swing motion of the swing apparatus;
sensing means configured to sense a light pulse of a photo interrupter coupled to the swing apparatus such that the controller determines a motion condition of the swing apparatus from the light pulse sensed by the sensing means; and
a motor configured to provide a driving of the swing apparatus.
2. The swing control system according to claim 1, wherein the photo-interrupter is engaged with the motor mounted on the swing device to sense the light pulses of the photo-interrupter by the sensing means to determine the swing condition of the swing device.
3. The swing control system according to claim 1, wherein a wheel-like device is attached to a rear surface of the motor, and the photo-interrupter is attached to the wheel-like device for reflecting a swing condition of the swing device by detecting a width of the light pulse transmitted through the photo-interrupter.
4. The roll control system of claim 3 wherein the wheel-like device has a gap therein, the detection of the width of the light pulse transmitted through the photo-interrupter being related to movement of the gap of the wheel-like device.
5. The swing control system of claim 3, further comprising at least one of:
a human-machine interaction interface configured to provide interaction with a user, facilitating the user to perform input through the human-machine interaction interface, such that the controller implements control of the swing device based on the user's input;
a power supply configured to supply power to the controller; and
a multimedia output device configured to output a multimedia effect.
6. The swing control system according to claim 5, wherein the swing angle and/or amplitude of the swing device is configured through a human-machine interaction interface as the set swing angle and/or amplitude of the swing device.
7. The swing control system according to claim 5, wherein the initial driving force to be provided to the swing apparatus by the motor is determined by the controller by determining a weight of a user of the swing apparatus.
8. The swing control system according to claim 5, wherein a mechanical error of the swing device is checked before the controller controls the swing device to start swinging to remove an influence of the mechanical error in the swing control.
9. The sway control system of claim 6, wherein after the sway device begins to sway, monitoring by the sensing arrangement whether a sway angle and/or amplitude of the sway device has reached the set sway angle and/or amplitude.
10. The swing control system according to claim 9, wherein if the controller determines that the set swing angle and/or amplitude of the swing apparatus has not been reached after a period of time, the swing speed of the swing apparatus is adjusted by the motor, and/or the set swing angle and/or amplitude of the swing apparatus is adjusted by the human-machine interaction interface.
11. The swing control system according to claim 9 or 10, wherein it is determined whether the swing apparatus has reached the set swing angle and/or amplitude by detecting whether the pulse received by the sensing means from the photo-interrupter is the widest pulse.
12. A method of swing control, comprising:
detecting a light pulse from a photo interrupter coupled to the rocking device in response to rocking of the rocking device;
determining whether the swing device reaches a set swing angle and/or amplitude based on the detected light pulses; and
in response to determining that the swing apparatus has not reached the set swing angle and/or amplitude, increasing a driving force of a motor for driving the swing apparatus to swing.
13. The swing control method according to claim 12, further comprising:
checking the rocking device for mechanical errors before or after the rocking device starts rocking.
14. The swing control method according to claim 12 or 13, further comprising:
reducing a driving force of a motor for driving the swing apparatus to swing in response to the swing angle and/or amplitude of the swing apparatus being greater than the set swing angle and/or amplitude.
15. The swing control method according to claim 12 or 13, further comprising:
controlling the motor to stop and/or reduce the provided driving force for a period of time and/or distance before the swing of the swing apparatus reaches the apex or end of the side.
16. The swing control method according to claim 15, further comprising:
dividing a driving distance of the swing device into L sections to control driving force provided by the motor to the swing device section by section, wherein the driving distance is a distance from a vertex or an end point on one side of swing of the swing device to a position where the driving force is to be stopped or reduced in advance before the swing of the swing device reaches the vertex or the end point on the other side, and L is an integer greater than or equal to 1.
17. The swing control method according to claim 12, wherein the initial driving force to be provided to the swing apparatus by the motor is determined by determining a weight of a user of the swing apparatus.
18. The swing control method according to claim 12, wherein it is determined whether the swing device has reached the set swing angle and/or amplitude by detecting whether the light pulse from the photo interrupter is the widest pulse.
19. An electronic device, comprising:
at least one processor; and
a memory;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 12-18.
20. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 12-18.
21. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 12-18.
CN202110325385.9A 2021-03-26 2021-03-26 Swing control method and system, electronic device, and medium Pending CN115120065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110325385.9A CN115120065A (en) 2021-03-26 2021-03-26 Swing control method and system, electronic device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110325385.9A CN115120065A (en) 2021-03-26 2021-03-26 Swing control method and system, electronic device, and medium

Publications (1)

Publication Number Publication Date
CN115120065A true CN115120065A (en) 2022-09-30

Family

ID=83374804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110325385.9A Pending CN115120065A (en) 2021-03-26 2021-03-26 Swing control method and system, electronic device, and medium

Country Status (1)

Country Link
CN (1) CN115120065A (en)

Similar Documents

Publication Publication Date Title
US10101815B2 (en) Eccentric rotating mass actuator optimization for haptic effects
EP3945400B1 (en) Power throttle for network switches
WO2015062504A1 (en) Power consumption control method and terminal
EP3152642B1 (en) Adaptive touch panel synchronization
CN108564951B (en) Method for intelligently reducing false awakening probability of voice control equipment
US20170018275A1 (en) Voice Control User Interface with Progressive Command Engagement
JP3604962B2 (en) System activated by joystick movement
US20030051179A1 (en) Method and apparatus for power management of displays
CN107851050B (en) Device with watchdog timer and method for operating watchdog timer
US9367120B2 (en) Electronic device and method of detecting touches on a touch-sensitive display
US20030051182A1 (en) Method and apparatus for cognitive power management of video displays
US20200175827A1 (en) Systems and Methods for Controlling Actuator Drive Signals for Improving Transient Response Characteristics
US10694018B2 (en) Method and apparatus for controlling running status of wearable electronic device
CN111816178A (en) Voice equipment control method, device and equipment
EP3555735A1 (en) Termination of animation
KR20170112936A (en) Energy savings mode for silent haptics
US9781679B2 (en) Electronic systems and method of operating electronic systems
WO2019024720A1 (en) Mobile terminal and doze mode control method therefor, and readable storage medium
CN112445358A (en) Adjusting method, terminal and computer storage medium
CN115120065A (en) Swing control method and system, electronic device, and medium
CN107590401A (en) A kind of equipment shatter-resistant method and terminal device
US20140211597A1 (en) Electronic device and method of controlling alarm clock function
CN112524079B (en) Fan, fan control method and device and storage medium
KR20210145263A (en) Prompting method, terminal and storage medium
CN112445409B (en) Waterfall flow information display method and device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication