Magnetic levitation control method and related device
By acquiring Hall sensor signals in real time, accurately identifying the position of the magnetic float and adjusting the polarity of the electromagnet coil's magnetic field, the problems of response lag and decreased accuracy in traditional magnetic levitation control methods are solved, achieving faster and more precise magnetic levitation control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAMEN LINGSHANG YOUPIN CULTURE TECHNOLOGY CO LTD
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-09
AI Technical Summary
Traditional magnetic levitation control methods suffer from problems such as sluggish system response and reduced control accuracy because the core parameters and configurations are fixed during the circuit design stage.
By acquiring the voltage signal from the Hall sensor in real time, the spatial position of the magnetic float is accurately identified, and the magnetic field polarity of the electromagnet coil in the control circuit is adjusted in real time by generating control signals, thereby dynamically driving the magnetic float in the magnetic levitation control system.
It effectively improves the response speed and accuracy of the magnetic levitation system, and enables rapid adjustment of the levitation position of the magnetic float.
Smart Images

Figure CN122164092A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of magnetic levitation control technology, and in particular to a magnetic levitation control method and related equipment. Background Technology
[0002] Currently, magnetic levitation toys generally use traditional analog circuit designs, such as using potentiometer components for magnetic levitation control.
[0003] However, in practical applications, it has been found that traditional magnetic levitation control methods, because their core parameters and configurations are fixed in the circuit design stage and are controlled by hardware components such as potentiometers, suffer from problems such as system response lag and decreased control accuracy when the levitation conditions of the magnetic levitation product change.
[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention
[0005] This application provides a magnetic levitation control method and related equipment, which can effectively improve the system response speed and accuracy.
[0006] On one hand, embodiments of this application provide a magnetic levitation control method, the method comprising the following steps: The voltage signal collected by the Hall sensor is acquired in real time; the voltage signal is generated based on the spatial position of the magnetic float in the magnetic levitation control system. Based on the voltage signal, the spatial position data of the magnetic float is determined; Based on the spatial position data of the magnetic float, a control signal is generated and output to the control circuit in the magnetic levitation control system to drive and control the levitation state of the magnetic float in the magnetic levitation control system; wherein, the control signal is used to adjust the current direction in the control circuit, thereby controlling the magnetic field polarity of the electromagnet coil connected to the control circuit.
[0007] Optionally, the real-time acquisition of the voltage signal collected by the Hall sensor includes: Real-time acquisition of voltage signals collected by the first Hall sensor, the second Hall sensor, and the third Hall sensor; The first Hall sensor and the second Hall sensor are used to detect the spatial position of the magnetic float in the horizontal direction in the magnetic levitation control system and generate a corresponding voltage signal; the third Hall sensor is used to detect the spatial position of the magnetic float in the vertical direction in the magnetic levitation control system and generate a corresponding voltage signal.
[0008] Optionally, determining the spatial position data of the magnetic float based on the voltage signal includes: Based on the voltage signals collected by the first Hall sensor and the second Hall sensor, the spatial position of the magnetic float in the magnetic levitation control system is mapped to the X-axis and Y-axis on the three-axis coordinate system to obtain the X-axis coordinate and Y-axis coordinate of the magnetic float. Based on the voltage signal collected by the third Hall sensor, the spatial position of the magnetic float in the magnetic levitation control system is mapped to the Z-axis on the three-axis coordinate system to obtain the Z-axis coordinate of the magnetic float. The three-axis coordinate system is constructed with the pre-set target stopping position of the magnetic float in the magnetic levitation control system as the origin.
[0009] Optionally, the step of generating a control signal based on the spatial position data of the magnetic levitation float and outputting it to the control circuit in the magnetic levitation control system to drive and control the levitation state of the magnetic levitation float in the magnetic levitation control system includes: Based on the X-axis and Y-axis coordinates of the magnetic float, determine the quadrant information of the magnetic float; Based on the preset control strategy mapping rules and combined with the quadrant information of the magnetic float, a control signal matching the quadrant information is generated; The control signal is output to the control circuit in the magnetic levitation control system. By adjusting the on / off state of the switching transistor in the control circuit, the direction of the current in the control circuit is adjusted, the polarity of the magnetic field of the electromagnet coil connected to the control circuit is controlled, and the levitation state of the magnetic float in the magnetic levitation control system is driven and controlled.
[0010] Optionally, the control circuit is an H-bridge circuit or a full-bridge circuit.
[0011] Optionally, the method further includes: Determine the voltage data of the voltage signal acquired by the third Hall sensor; When the voltage data matches a preset threshold, the first Hall sensor, the second Hall sensor, and the control circuit are kept in a sleep state. If the voltage data does not match the preset threshold, the control circuit is activated to start acquiring the voltage signals of the first Hall sensor and the second Hall sensor in real time.
[0012] On the other hand, this application provides a magnetic levitation control system, which includes: a magnetic float, a Hall sensor, a microcontroller chip, and a control circuit; The Hall sensor is used to generate a voltage signal based on the spatial position of the magnetic float in the magnetic levitation control system. The microcontroller chip is used to acquire voltage signals collected by Hall sensors in real time, and determine the spatial position data of the magnetic float based on the voltage signals; it is also used to generate control signals based on the spatial position data of the magnetic float and output them to the control circuit in the magnetic levitation control system to drive and control the levitation state of the magnetic float in the magnetic levitation control system. The control circuit is used to receive the control signal and adjust the current direction according to the control signal, thereby controlling the magnetic field polarity of the electromagnet coil connected to the control circuit.
[0013] Optionally, the Hall sensor includes a first Hall sensor, a second Hall sensor, and a third Hall sensor; The first Hall sensor and the second Hall sensor are used to detect the spatial position of the magnetic float in the horizontal direction in the magnetic levitation control system and generate a corresponding voltage signal; the third Hall sensor is used to detect the spatial position of the magnetic float in the vertical direction in the magnetic levitation control system and generate a corresponding voltage signal.
[0014] On the other hand, embodiments of this application provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0015] On the other hand, embodiments of this application provide a magnetic levitation ornament product, including the aforementioned magnetic levitation control system or the aforementioned electronic device.
[0016] This application embodiment accurately identifies the spatial position of the magnetic float by acquiring the voltage signal of the Hall sensor in real time, and adjusts the magnetic field polarity of the electromagnet coil in the control circuit in real time by generating control signals, thereby dynamically driving and controlling the magnetic float in the magnetic levitation control system, effectively improving the system response speed and accuracy. Attached Figure Description
[0017] Figure 1 This is a schematic flowchart of a magnetic levitation control method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a control circuit provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a magnetic levitation control system provided in an embodiment of this application; Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0019] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0020] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0022] Currently, magnetic levitation toys generally use traditional analog circuit designs, such as using potentiometer components for magnetic levitation control.
[0023] However, in practical applications, it has been found that traditional magnetic levitation control methods, because their core parameters and configurations are fixed in the circuit design stage and are controlled by hardware components such as potentiometers, suffer from problems such as system response lag and decreased control accuracy when the levitation conditions of the magnetic levitation product change.
[0024] In view of this, this application provides a magnetic levitation control method and related equipment. By acquiring the voltage signal of the Hall sensor in real time, the spatial position of the magnetic float is accurately identified, and the magnetic field polarity of the electromagnet coil in the control circuit is adjusted in real time by generating control signals, thereby dynamically driving and controlling the magnetic float in the magnetic levitation control system, effectively improving the system response speed and accuracy.
[0025] The specific implementation methods of the embodiments of this application will be described in detail below with reference to the accompanying drawings. First, a magnetic levitation control method provided in the embodiments of this application will be described with reference to the accompanying drawings.
[0026] like Figure 1 As shown, Figure 1 This is a flowchart illustrating a magnetic levitation control method provided in an embodiment of this application, specifically including but not limited to steps 100 to 300.
[0027] Step 100: Acquire the voltage signal collected by the Hall sensor in real time; the voltage signal is generated based on the spatial position of the magnetic float in the magnetic levitation control system.
[0028] In this embodiment, the execution entity can be a microcontroller unit (MCU) chip installed in the magnetic levitation control system. The MCU chip acquires the voltage signal collected by the Hall sensor in real time. The Hall sensor, installed in the magnetic levitation control system, can measure the magnetic field strength or magnetic field change in real time, thereby generating a corresponding voltage signal based on the spatial position of the magnetic float. The magnetic float can be a suspended neodymium iron boron magnet.
[0029] In practical applications, the real-time acquisition of the voltage signal collected by the Hall sensor includes: Real-time acquisition of voltage signals collected by the first Hall sensor, the second Hall sensor, and the third Hall sensor; The first Hall sensor and the second Hall sensor are used to detect the spatial position of the magnetic float in the horizontal direction in the magnetic levitation control system and generate a corresponding voltage signal; the third Hall sensor is used to detect the spatial position of the magnetic float in the vertical direction in the magnetic levitation control system and generate a corresponding voltage signal.
[0030] In this embodiment, three Hall sensors can be installed in the magnetic levitation control system, specifically a first Hall sensor, a second Hall sensor, and a third Hall sensor. The first and second Hall sensors detect the spatial position of the magnetic float in the horizontal direction and generate corresponding voltage signals, i.e., they detect the spatial position on the two orthogonal axes X and Y in the horizontal direction. The third Hall sensor detects the spatial position of the magnetic float in the vertical direction and generates corresponding voltage signals, i.e., it detects the spatial position on the vertical Z-axis.
[0031] Therefore, the spatial position of the magnetic float in the magnetic levitation control system is sensed in real time by the first Hall sensor, the second Hall sensor and the third Hall sensor, and the corresponding voltage signal is generated according to the magnetic field strength or magnetic field change. The MCU chip is responsible for reading and identifying the signal so as to facilitate subsequent control and adjustment.
[0032] Step 200: Based on the voltage signal, determine the spatial position data information of the magnetic float.
[0033] In this embodiment, the MCU chip can determine the spatial position data of the magnetic float corresponding to each Hall sensor based on the voltage signals collected in real time by each Hall sensor and a preset matching rule.
[0034] For example, determining the spatial position data information of the magnetic float based on the voltage signal includes: Based on the voltage signals collected by the first Hall sensor and the second Hall sensor, the spatial position of the magnetic float in the magnetic levitation control system is mapped to the X-axis and Y-axis on the three-axis coordinate system to obtain the X-axis coordinate and Y-axis coordinate of the magnetic float. Based on the voltage signal collected by the third Hall sensor, the spatial position of the magnetic float in the magnetic levitation control system is mapped to the Z-axis on the three-axis coordinate system to obtain the Z-axis coordinate of the magnetic float. The three-axis coordinate system is constructed with the pre-set target stopping position of the magnetic float in the magnetic levitation control system as the origin.
[0035] In this embodiment, a three-axis coordinate system is constructed with the pre-set target stopping position of the magnetic float in the magnetic levitation control system as the central origin. Two orthogonal axes are provided in the horizontal direction, namely the X-axis and the Y-axis. The X-axis and the Y-axis correspond to two pairs of electromagnet coils, that is, two coils on each axis are diagonally distributed. The two coils on the same axis are connected in series. For example, there are coils A and B on the horizontal X-axis. Current flows in from the outer coil of coil A and flows out from the inner coil of coil A, and flows in from the inner coil of coil B and flows out from the outer coil of coil B. Furthermore, a Z-axis is provided in the vertical direction.
[0036] Furthermore, the spatial position of the magnetic float in the horizontal and vertical directions is sensed by the first Hall sensor, the second Hall sensor, and the third Hall sensor, and a voltage signal is generated by distance detection. The specific position of the magnetic float is determined by the magnitude of the voltage signal.
[0037] Furthermore, the MCU chip reads the voltage signals collected by the first Hall sensor, the second Hall sensor, and the third Hall sensor. Based on the preset voltage reference value of the magnetic float at the preset target stopping position, and according to the amplitude difference between the voltage data, it can map the spatial position of the magnetic float in the magnetic levitation control system to the X and Y axes on the three-axis coordinate system to obtain the X-axis and Y-axis coordinates of the magnetic float. It also maps the spatial position of the magnetic float in the magnetic levitation control system to the Z-axis on the three-axis coordinate system to obtain the Z-axis coordinate of the magnetic float. Then, by combining the three-axis coordinates, it can accurately identify and locate the spatial position data information of the magnetic float.
[0038] For example, taking Z-axis detection as an example, when the magnetic float is not in the magnetic levitation control system, the voltage data of the voltage signal detected by the third Hall sensor on the Z-axis is constant within a fixed range. When the user places the magnetic float close to the magnetic levitation base of the magnetic levitation control system, the Hall sensor on the Z-axis will output a voltage signal that varies proportionally according to the polarity, orientation and distance of the magnet. For example, it can be set to increase the voltage signal amplitude when the N pole of the magnetic float is close to the front of the third Hall sensor and decrease the voltage when it is close to the back of the third Hall sensor.
[0039] Therefore, by using a preset matching rule, the voltage signals collected by the first Hall sensor, the second Hall sensor, and the third Hall sensor can be mapped to the specific coordinates of the magnetic float on the X, Y, and Z axes in the three-axis coordinate system, thereby constructing the spatial position data information of the magnetic float.
[0040] In practical applications, the method further includes: Determine the voltage data of the voltage signal acquired by the third Hall sensor; When the voltage data matches a preset threshold, the first Hall sensor, the second Hall sensor, and the control circuit are kept in a sleep state. If the voltage data does not match the preset threshold, the control circuit is activated to start acquiring the voltage signals of the first Hall sensor and the second Hall sensor in real time.
[0041] In this embodiment of the application, the voltage signal collected by the third Hall sensor in real time can be used as the trigger signal for the working state of the magnetic levitation control system.
[0042] Specifically, when the magnetic float does not enter the magnetic levitation control system, the voltage data of the voltage signal detected by the third Hall sensor on the Z-axis is constant within a fixed range. The preset threshold can be set to this fixed value. If the voltage data of the voltage signal collected by the third Hall sensor matches the preset threshold, it can be determined that the magnetic float has not entered the magnetic levitation control system at this time. Therefore, the first Hall sensor, the second Hall sensor and the control circuit can be kept in a dormant state, reducing the power consumption of the overall system.
[0043] Furthermore, when a mismatch is detected between the voltage data and the preset threshold, it indicates that the magnetic float has entered the magnetic levitation control system, the control circuit is activated, the voltage signals fed back from the XY axis are received and processed, and control signals are output.
[0044] For example, when the magnetic float is not in the magnetic levitation control system, the voltage signal detected by the third Hall sensor on the Z-axis is a reference voltage of 2.5V. When a magnetic float is detected above the base, a voltage signal that varies proportionally according to the polarity, orientation and distance of the magnet is output, that is, higher or lower than the reference voltage of 2.5V.
[0045] In practical applications, the levitation height of the magnetic float can be determined by detecting the voltage change of the voltage signal collected by the third Hall sensor. Then, the MCU chip analyzes the load-bearing state, automatically adjusts the power output of the electromagnet coil, and adjusts the levitation height of the magnetic float by controlling the duty cycle of the PWM signal of the MOS transistor switch.
[0046] Step 300: Based on the spatial position data of the magnetic float, a control signal is generated and output to the control circuit in the magnetic levitation control system to drive and control the levitation state of the magnetic float in the magnetic levitation control system; wherein, the control signal is used to adjust the current direction in the control circuit, thereby controlling the magnetic field polarity of the electromagnet coil connected to the control circuit.
[0047] In this embodiment, the MCU chip generates a control signal based on the spatial position data of the magnetic float and outputs it to the control circuit in the magnetic levitation control system. By controlling the current direction of the control circuit, the polarity of the magnetic field of the electromagnet coil connected to the control circuit can change in real time according to the spatial position data of the magnetic float. The levitation state of the magnetic float in the magnetic levitation control system can be driven and controlled by the magnetic effect of like poles repelling and unlike poles attracting.
[0048] Therefore, this application uses an MCU chip as the execution subject to collect the voltage signal of the Hall sensor in real time, accurately identify the spatial position of the magnetic float, and adjust the magnetic field polarity of the electromagnet coil in the control circuit in real time by generating control signals, thereby dynamically driving and controlling the magnetic float in the magnetic levitation control system, effectively improving the system response speed and accuracy, and quickly adjusting the levitation position of the magnetic float.
[0049] Specifically, as an optional implementation, the step of generating a control signal based on the spatial position data of the magnetic levitation buoy and outputting it to the control circuit in the magnetic levitation control system to drive and control the levitation state of the magnetic levitation buoy in the magnetic levitation control system includes: Based on the X-axis and Y-axis coordinates of the magnetic float, determine the quadrant information of the magnetic float; Based on the preset control strategy mapping rules and combined with the quadrant information of the magnetic float, a control signal matching the quadrant information is generated; The control signal is output to the control circuit in the magnetic levitation control system. By adjusting the on / off state of the switching transistor in the control circuit, the direction of the current in the control circuit is adjusted, the polarity of the magnetic field of the electromagnet coil connected to the control circuit is controlled, and the levitation state of the magnetic float in the magnetic levitation control system is driven and controlled.
[0050] In this embodiment of the application, the spatial position of the magnetic float can be mapped to the X-axis and Y-axis of the constructed three-axis coordinate system based on the voltage signals of the first Hall sensor and the second Hall sensor. Thus, based on the X-axis coordinates and Y-axis coordinates of the magnetic float, the corresponding quadrant information can be determined. For example, the spatial position of the magnetic float is the positive half-axis of the X-axis and the positive half-axis of the Y-axis, thereby determining that the magnetic float is in the first quadrant.
[0051] Furthermore, based on the preset control strategy mapping rules and combined with the quadrant information of the magnetic float, a control signal matching the quadrant information is generated. Since two electromagnet coils are diagonally distributed on the X-axis and two diagonally distributed on the Y-axis, and these two sets of electromagnet coils are connected in series, the two electromagnet coils on the X-axis exhibit opposite magnetic polarities under the same current direction, corresponding to the positive and negative X-axis semi-axes respectively; similarly, the two electromagnet coils on the Y-axis also exhibit opposite magnetic polarities under the same current direction, corresponding to the positive and negative Y-axis semi-axes respectively.
[0052] Therefore, based on the quadrant information of the magnetic float, the current direction of the electromagnet coil in different quadrants can be preset. For example, when the magnetic float is located in the first quadrant, the electromagnet coil on the positive half-axis of the X-axis can be set to generate a magnetic field of the same polarity as the magnetic float, providing a repulsive force, and the electromagnet coil on the negative half-axis of the X-axis can be set to generate a magnetic field of opposite polarity to the magnetic float, providing an attractive force, thereby forming a restoring torque on the X-axis. Furthermore, the electromagnet coil on the positive half-axis of the Y-axis can also be set to generate a magnetic field of the same polarity as the magnetic float, providing a repulsive force, and the electromagnet coil on the negative half-axis of the Y-axis can be set to generate a magnetic field of opposite polarity to the magnetic float, providing an attractive force, thereby forming a restoring torque on the Y-axis.
[0053] Therefore, once the quadrant information of the magnetic float is determined, a control signal matching the quadrant information can be quickly generated according to the preset control strategy mapping rules. The control signal is then output to the control circuit in the magnetic levitation control system. By adjusting the on / off state of the switching transistors in the control circuit, the direction of the current in the circuit is adjusted, ultimately controlling the magnetic field polarity of the electromagnet coil connected to the control circuit and driving the levitation state of the magnetic float in the magnetic levitation control system.
[0054] For example, please refer to Figure 2 , Figure 2 This is a schematic diagram of a control circuit provided in an embodiment of this application, in which two electromagnet coils on the same axis are connected in series to the control circuit. The control circuit can be an H-bridge circuit or a full-bridge circuit.
[0055] Therefore, by supplying power to the control circuit through the positive and ground terminals of the power supply, and controlling the on / off state of the four switching transistors through the control signals of the MCU chip, the direction of the current in the electromagnet coil can be controlled.
[0056] In practical applications, the two electromagnet coils on the X-axis can be connected to the first control circuit, and the two electromagnet coils on the Y-axis can be connected to the second control circuit, thereby achieving independent control of the X-axis and Y-axis without interference.
[0057] Furthermore, when a set of diagonal switches is turned on, for example, when switches 1 and 4 are turned on, the current will flow from the positive terminal of the power supply through switch 1, the electromagnet coil, and switch 4 to the power supply ground, thereby switching one side of the electromagnet coil as the S pole and the other side as the N pole. When another set of diagonal switches is turned on, for example, when switches 2 and 3 are turned on, the current will flow from the positive terminal of the power supply through switch 2, the electromagnet coil, and switch 3 to the power supply ground, thereby switching one side of the electromagnet coil as the N pole and the other side as the S pole.
[0058] It is understandable that when the control circuit is in operation, only one set of diagonal switches is turned on, while the other set of switches will be turned off.
[0059] Therefore, by identifying the spatial position data of the magnetic float through the MCU chip and outputting the corresponding control signal to the control circuit according to the preset control strategy mapping rules, the forward and reverse flow of current can be realized, and finally the polarity switching control of the magnetic field of the electromagnet coil can be realized. This allows for rapid adjustment of the levitation state of the magnetic float in the magnetic levitation control system. Compared with the existing adjustment methods using hardware components such as potentiometers, this method can effectively improve the response speed and accuracy of the magnetic levitation system.
[0060] Please see Figure 3 , Figure 3 This is a schematic diagram of a magnetic levitation control system provided in an embodiment of this application. This application also provides a magnetic levitation control system that can implement the above-mentioned magnetic levitation control method. The system includes: Magnetic float, Hall sensor, microcontroller chip, control circuit; The Hall sensor is used to generate a voltage signal based on the spatial position of the magnetic float in the magnetic levitation control system. The microcontroller chip is used to acquire voltage signals collected by Hall sensors in real time, and determine the spatial position data of the magnetic float based on the voltage signals; it is also used to generate control signals based on the spatial position data of the magnetic float and output them to the control circuit in the magnetic levitation control system to drive and control the levitation state of the magnetic float in the magnetic levitation control system. The control circuit is used to receive the control signal and adjust the current direction according to the control signal, thereby controlling the magnetic field polarity of the electromagnet coil connected to the control circuit.
[0061] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0062] In practical applications, the Hall sensor includes a first Hall sensor, a second Hall sensor, and a third Hall sensor; The first Hall sensor and the second Hall sensor are used to detect the spatial position of the magnetic float in the horizontal direction in the magnetic levitation control system and generate a corresponding voltage signal; the third Hall sensor is used to detect the spatial position of the magnetic float in the vertical direction in the magnetic levitation control system and generate a corresponding voltage signal.
[0063] Furthermore, two orthogonal axes are provided in the horizontal direction, namely the X-axis and the Y-axis, and the X-axis and the Y-axis correspond to two pairs of electromagnet coils, that is, two coils on each axis are diagonally distributed. The two coils on the same axis are connected in series. For example, there are coils A and B on the horizontal X-axis. Current flows in from the outer coil of coil A and flows out from the inner coil of coil A, and flows in from the inner coil of coil B and flows out from the outer coil of coil B. The first Hall sensor is matched with the two diagonally distributed electromagnet coils on the X-axis, and the second Hall sensor is matched with the two diagonally distributed electromagnet coils on the Y-axis. Furthermore, a Z-axis is provided in the vertical direction.
[0064] Please see Figure 4 , Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device includes: The processor 401 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 402 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 402 and is called and executed by the processor 401 using the methods described in the embodiments of this application. Input / output interface 403 is used to implement information input and output; The communication interface 404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 405 transmits information between various components of the device (e.g., processor 401, memory 402, input / output interface 403, and communication interface 404); The processor 401, memory 402, input / output interface 403 and communication interface 404 are connected to each other within the device via bus 405.
[0065] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0066] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0067] This application also provides a magnetic levitation ornament product, which includes: the magnetic levitation control system described above, or the electronic device described above.
[0068] It is understood that the contents of the above-described magnetic levitation control system embodiments are all applicable to this embodiment. The specific functions implemented in this embodiment are the same as those in the above-described magnetic levitation control system embodiments, and the beneficial effects achieved are also the same as those achieved in the above-described magnetic levitation control system embodiments.
[0069] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0070] This application provides a magnetic levitation control method and related equipment, which accurately identifies the spatial position of the magnetic float by real-time acquisition of the voltage signal of the Hall sensor, and dynamically drives and controls the magnetic float in the magnetic levitation control system by generating control signals to adjust the magnetic field polarity of the electromagnet coil in the control circuit in real time, thereby effectively improving the system response speed and accuracy.
[0071] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0072] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0073] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0074] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0075] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0076] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0077] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0078] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0079] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0080] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0081] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A magnetic levitation control method, characterized in that, The method includes the following steps: The voltage signal collected by the Hall sensor is acquired in real time; the voltage signal is generated based on the spatial position of the magnetic float in the magnetic levitation control system. Based on the voltage signal, the spatial position data of the magnetic float is determined; Based on the spatial position data of the magnetic float, a control signal is generated and output to the control circuit in the magnetic levitation control system to drive and control the levitation state of the magnetic float in the magnetic levitation control system; wherein, the control signal is used to adjust the current direction in the control circuit, thereby controlling the magnetic field polarity of the electromagnet coil connected to the control circuit.
2. The method according to claim 1, characterized in that, The real-time acquisition of the voltage signal collected by the Hall sensor includes: Real-time acquisition of voltage signals collected by the first Hall sensor, the second Hall sensor, and the third Hall sensor; The first Hall sensor and the second Hall sensor are used to detect the spatial position of the magnetic float in the horizontal direction in the magnetic levitation control system and generate a corresponding voltage signal; the third Hall sensor is used to detect the spatial position of the magnetic float in the vertical direction in the magnetic levitation control system and generate a corresponding voltage signal.
3. The method according to claim 2, characterized in that, The determination of the spatial position data of the magnetic float based on the voltage signal includes: Based on the voltage signals collected by the first Hall sensor and the second Hall sensor, the spatial position of the magnetic float in the magnetic levitation control system is mapped to the X-axis and Y-axis on the three-axis coordinate system to obtain the X-axis coordinate and Y-axis coordinate of the magnetic float. Based on the voltage signal collected by the third Hall sensor, the spatial position of the magnetic float in the magnetic levitation control system is mapped to the Z-axis on the three-axis coordinate system to obtain the Z-axis coordinate of the magnetic float. The three-axis coordinate system is constructed with the pre-set target stopping position of the magnetic float in the magnetic levitation control system as the origin.
4. The method according to claim 2, characterized in that, The process of generating a control signal based on the spatial position data of the magnetic levitation float and outputting it to the control circuit in the magnetic levitation control system to drive and control the levitation state of the magnetic levitation float in the magnetic levitation control system includes: Based on the X-axis and Y-axis coordinates of the magnetic float, determine the quadrant information of the magnetic float; Based on the preset control strategy mapping rules and combined with the quadrant information of the magnetic float, a control signal matching the quadrant information is generated; The control signal is output to the control circuit in the magnetic levitation control system. By adjusting the on / off state of the switching transistor in the control circuit, the direction of the current in the control circuit is adjusted, the polarity of the magnetic field of the electromagnet coil connected to the control circuit is controlled, and the levitation state of the magnetic float in the magnetic levitation control system is driven and controlled.
5. The method according to claim 4, characterized in that, The control circuit is an H-bridge circuit or a full-bridge circuit.
6. The method according to claim 2, characterized in that, The method further includes: Determine the voltage data of the voltage signal acquired by the third Hall sensor; When the voltage data matches a preset threshold, the first Hall sensor, the second Hall sensor, and the control circuit are kept in a sleep state. If the voltage data does not match the preset threshold, the control circuit is activated to start acquiring the voltage signals of the first Hall sensor and the second Hall sensor in real time.
7. A magnetic levitation control system, characterized in that, The system includes: a magnetic float, a Hall sensor, a microcontroller chip, and a control circuit; The Hall sensor is used to generate a voltage signal based on the spatial position of the magnetic float in the magnetic levitation control system. The microcontroller chip is used to acquire voltage signals collected by Hall sensors in real time, and determine the spatial position data of the magnetic float based on the voltage signals; it is also used to generate control signals based on the spatial position data of the magnetic float and output them to the control circuit in the magnetic levitation control system to drive and control the levitation state of the magnetic float in the magnetic levitation control system. The control circuit is used to receive the control signal and adjust the current direction according to the control signal, thereby controlling the magnetic field polarity of the electromagnet coil connected to the control circuit.
8. The system according to claim 7, characterized in that, The Hall sensor includes a first Hall sensor, a second Hall sensor, and a third Hall sensor; The first Hall sensor and the second Hall sensor are used to detect the spatial position of the magnetic float in the horizontal direction in the magnetic levitation control system and generate a corresponding voltage signal; the third Hall sensor is used to detect the spatial position of the magnetic float in the vertical direction in the magnetic levitation control system and generate a corresponding voltage signal.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 6.
10. A magnetically levitated ornament product, characterized in that, The magnetic levitation ornament product includes: the magnetic levitation control system as described in claim 7 or 8, or the electronic device as described in claim 9.