Stepping motor for painting robot

CN224733648UActive Publication Date: 2026-09-08MATATALAB CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202522143173.5
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2026-09-08
Estimated Expiration
2035-10-10

AI Technical Summary

Technical Problem

[0003]但是,该方案存在两大技术缺陷:(1)定位精度不足:传统方案依赖光栅与红外对管检测电机转速,通过MCU间接计算位移

Benefits of technology

[0016]综上,本实用新型适用于绘画机器人,不仅显著提升了步进电机的分辨率、平滑度和静音性能,而且实现了高精度、低成本的运动控制,还降低了步进电机的发热量。相比现有技术,本实用新型具有如下技术优势:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224733648U_ABST
    Figure CN224733648U_ABST
Patent Text Reader

Abstract

The utility model discloses a kind of stepper motor for drawing robot, including power supply circuit, MCU main control circuit, level conversion circuit, drive circuit, current sampling circuit and stepper motor;The MCU main control circuit is used to generate two-way PWM signal and output to level conversion circuit;The level conversion circuit includes level conversion circuit A and level conversion circuit B, for converting two-way PWM signal respectively into sine or cosine current waveform and output to drive circuit;The drive circuit includes two H bridge type topological structures, for controlling the two-phase winding of stepper motor according to two-way sine or cosine current waveform respectively;The current sampling circuit includes current sampling circuit A and current sampling circuit B, for detecting the actual current value of two-phase winding by ADC in real time, and feedback to MCU main control circuit, so that the output of two-way PWM signal is dynamically adjusted by MCU main control circuit, to improve the accurate positioning ability of stepper motor, reduce the cost of drive circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to a stepper motor, and more particularly to a stepper motor for a painting robot, belonging to the field of painting robot technology. Background Technology

[0002] With the popularization of the STEAM education concept, the market demand for drawing robots that combine entertainment and education functions continues to grow. Existing drawing robots generally adopt a scheme of using DC motors and optical encoders to achieve movement control. That is, gratings and infrared photodiodes are added to the position where the DC motor rotates to detect the motor speed, and the walking distance is calculated by the MCU receiving the motor speed.

[0003] However, this solution has two major technical defects: (1) Insufficient positioning accuracy: The traditional solution relies on grating and infrared photodiode to detect the motor speed and indirectly calculate the displacement through MCU. Due to factors such as mechanical assembly gaps, optical signal jitter and algorithm delay, the actual positioning error generally exceeds ±2mm, which cannot meet the requirements of Chinese character writing (requiring ±0.5mm accuracy) or fine line drawing. (2) Poor dynamic response: The optical encoder is easily affected by ambient light interference, which can easily lead to speed detection distortion, especially during the start-stop phase, which will generate accumulated errors and thus affect the stability of continuous trajectory control. (3) High cost of drive circuit: In order to realize the basic positioning function, Hall encoder, signal conditioning circuit and high-precision MCU need to be configured, which makes the cost of the drive module too high.

[0004] In summary, in order to improve the accuracy of the painting robot in writing and drawing, it is urgent to develop and design a new type of stepper motor. Summary of the Invention

[0005] To address the aforementioned technical problems, this utility model provides a stepper motor for a painting robot, aiming to improve the precise positioning capability of the stepper motor and reduce the cost of the drive circuit.

[0006] To achieve the above technical objectives, this utility model provides a stepper motor for a painting robot, including a power supply circuit, an MCU main control circuit and a drive circuit respectively connected to the power supply circuit, and a stepper motor connected to the drive circuit; furthermore, the MCU main control circuit is connected to the drive circuit via a level conversion circuit, and the drive circuit is connected to the MCU main control circuit via a current sampling circuit. The power supply circuit is used to convert the battery voltage into the operating voltage of the drive circuit and the operating voltage of the MCU main control circuit, respectively. The MCU main control circuit is used to generate two PWM signals and output them to the level conversion circuit; The level conversion circuit includes level conversion circuit A and level conversion circuit B, which are used to convert the two PWM signals into sine or cosine current waveforms respectively and output them to the drive circuit. The driving circuit includes two H-bridge topologies, which are respectively connected to two phase windings of the stepper motor, and are used to control the two phase windings of the stepper motor according to two sinusoidal or cosine current waveforms. The current sampling circuit includes a current sampling circuit A and a current sampling circuit B, which are used to detect the actual current value of the two-phase winding in real time through the ADC and feed it back to the MCU main control circuit, so that the MCU main control circuit can dynamically adjust the output of the two PWM signals.

[0007] Furthermore, the power supply circuit of this utility model includes a BOOST boost circuit and a BUCK buck circuit; The battery BAT is connected to the input of the BOOST boost circuit, and the output of the BOOST boost circuit is connected to the VCC_5V terminal to power the drive circuit. The VCC_5V terminal is connected to the input of the BUCK buck circuit, and the output of the BUCK buck circuit is connected to the VDD_3V3 terminal to power the MCU main control circuit.

[0008] Specifically, the MCU main control circuit of this utility model includes chip U4, whose model number is ESP32-D0WD-V3.

[0009] Furthermore, the level conversion circuit A of this utility model includes resistors R153, R154, and R151, and an NMOS transistor Q10. In the MCU main control circuit, the SMOTOR1_INA signal output terminal of chip U4 is connected to the SMOTOR1_INA signal input terminal; the SMOTOR1_INA signal input terminal is connected to one end of resistor R154 and the gate of NMOS transistor Q10 via resistor R153; the other end of resistor R154 is grounded to the source of NMOS transistor Q10; the drain of NMOS transistor Q10 is connected to the SMOTOR1_INAN signal output terminal and one end of resistor R151; the other end of resistor R151 is connected to the VDD_3V3 terminal of the BUCK step-down circuit.

[0010] Furthermore, the level conversion circuit B of this invention includes resistors R159, R160, and R155, and an NMOS transistor Q11. In the MCU main control circuit, the SMOTOR1_INB signal output terminal of chip U4 is connected to the SMOTOR1_INB signal input terminal; the SMOTOR1_INB signal terminal is connected to one end of resistor R160 and the gate of NMOS transistor Q11 via resistor R15; the other end of resistor R160 and the source of NMOS transistor Q11 are grounded; the drain of NMOS transistor Q11 is connected to the SMOTOR1_INBN signal output terminal and one end of resistor R155; the other end of resistor R155 is connected to the VDD_3V3 terminal of the BUCK buck circuit.

[0011] Specifically, the driving circuit of this utility model includes a chip U8, model number MP6508GR-Z.

[0012] Furthermore, in this invention, one of the H-bridge topologies of the driving circuit includes capacitor C55, capacitor C58, ferrite bead FB2, bipolar TVS diode D11, bidirectional trigger diode D16, capacitor C59, and ferrite bead FB3. Pin 16 of chip U8 is connected to one end of capacitor C55, one end of capacitor C58, and one end of ferrite bead FB2. The other end of ferrite bead FB2 is connected to one end of bipolar TVS diode D11, one end of bidirectional trigger diode D16, and pin 4 of stepper motor interface J2. Pin 2 of chip U8 is connected to one end of capacitor C59, the other end of capacitor C58, and one end of ferrite bead FB3. The other end of ferrite bead FB3 is connected to one end of bipolar TVS diode D11, one end of bidirectional trigger diode D15, and pin 3 of stepper motor interface J2. The other ends of capacitors C55, C59, D16, and D15 are all grounded.

[0013] Furthermore, in this invention, another H-bridge topology of the driving circuit includes capacitor C64, capacitor C65, ferrite bead FB4, bipolar TVS diode D12, bidirectional trigger diode D14, capacitor C66, and ferrite bead FB5. Specifically, pin 5 of chip U8 is connected to one end of capacitor C64, one end of capacitor C65, and one end of ferrite bead FB4; the other end of ferrite bead FB4 is connected to one end of bipolar TVS diode D12, one end of bidirectional trigger diode D14, and pin 2 of stepper motor interface J2; pin 3 of chip U8 is connected to one end of capacitor C66, the other end of capacitor C65, and one end of ferrite bead FB5; the other end of ferrite bead FB5 is connected to the other end of bipolar TVS diode D12, one end of bidirectional trigger diode D13, and pin 1 of stepper motor interface J2; the other ends of capacitors C64, C66, D13, and D14 are all grounded; pins 5 and 6 of stepper motor interface J2 are both grounded.

[0014] Furthermore, the current sampling circuit A of this utility model includes resistor R83, capacitor C71, resistor R80, resistor R81, resistor R79, resistor R84, capacitor C73, amplifier U9B, resistor R82, and capacitor C72. In the driving circuit, the SM1_SENA signal output terminal of chip U8 is connected to the SM1_SENA signal input terminal of the current sampling circuit; the SM1_SENA signal input terminal is connected to one end of resistor R83, one end of capacitor C71, and one end of resistor R80 respectively; the other end of resistor R80 is connected to the non-inverting input terminal of amplifier U9B, which is grounded through resistor R79; the inverting input terminal of amplifier U9B is connected to one end of resistor R81, and the other ends of resistor R83, capacitor C71, and resistor R81 are all grounded; the inverting input terminal of amplifier U9B is connected to resistor R... One end of resistor R84 and one end of capacitor C73, and the other ends of resistor R84 and capacitor C73 are respectively connected to the output of amplifier U9B; the output of amplifier U9B is connected to one end of resistor R82, and the other end of resistor R82 is respectively connected to the SMOTOR1_1A signal output terminal and one end of capacitor C72. The SMOTOR1_1A signal output terminal is connected to the SMOTOR1_1A signal input terminal of chip U4 in the MCU main control circuit, and the other end of capacitor C72 is grounded; the positive power supply of amplifier U9B is connected to the VDD_3V3 terminal of BUCK step-down circuit, and the negative power supply of amplifier U9B is grounded.

[0015] Furthermore, the current sampling circuit B of this utility model includes resistor R77, capacitor C67, resistor R74, resistor R76, resistor R73, resistor R78, capacitor C69, amplifier U9A, resistor R75, and capacitor C68. In the driving circuit, the SM1_SENB signal output terminal of chip U8 is connected to the SM1_SENB signal input terminal of the current sampling circuit; the SM1_SENB signal input terminal is connected to one end of resistor R77, one end of capacitor C67, and one end of resistor R74 respectively; the other end of resistor R74 is connected to the inverting input terminal of amplifier U9A, which is grounded through resistor R73; the non-inverting input terminal of amplifier U9A is connected to one end of resistor R76, and the other ends of resistor R77, capacitor C67, and resistor R76 are all grounded; the non-inverting input terminal of amplifier U9A is connected to resistors... One end of resistor R78 and one end of capacitor C69, and the other ends of resistor R78 and capacitor C69 are respectively connected to the output terminal of amplifier U9A; the output terminal of amplifier U9A is connected to one end of resistor R75, and the other end of resistor R75 is respectively connected to the SMOTOR1_1B signal output terminal and one end of capacitor C68. The SMOTOR1_1B signal output terminal is connected to the SMOTOR1_1B signal input terminal of chip U4 in the MCU main control circuit, and the other end of capacitor C68 is grounded; the positive power supply terminal of amplifier U9A is connected to the VDD_3V3 terminal of BUCK buck circuit, and the negative power supply terminal of amplifier U9A is grounded.

[0016] In summary, this invention is applicable to painting robots, significantly improving the resolution, smoothness, and quietness of stepper motors, achieving high-precision, low-cost motion control, and reducing stepper motor heat generation. Compared to existing technologies, this invention has the following technical advantages: (1) The MCU main control circuit outputs a PWM signal, which is converted by a level conversion circuit to generate a sine / cosine current waveform with matching amplitude, ensuring reliable transmission of the signal between high and low voltage domains.

[0017] (2) The drive circuit adopts a dual H-bridge topology. Each H-bridge independently controls one phase winding of the stepper motor. By modulating the conduction state of the H-bridge with PWM, the vector synthesis of the two phase currents is realized, thereby accurately controlling the rotor angle.

[0018] (3) The current sampling circuit detects the actual current value of the two-phase winding in real time through the ADC. The MCU main control circuit compares the sampled data with the target waveform, dynamically adjusts the PWM output, realizes closed-loop control, and compensates for the current deviation caused by load changes.

[0019] Furthermore, this invention enables the painting robot to write and draw using its accompanying paintbrush, achieving precise positioning of the paintbrush and completing related tasks by accurately navigating a map. This expands the application scenarios of the painting robot and enhances its fun factor. Attached Figure Description

[0020] Figure 1 This is an electrical principle block diagram of one embodiment of the present invention; Figure 2 This is a circuit diagram of the power supply circuit in one embodiment of the present invention; Figure 3 This is a circuit diagram of the MCU main control circuit in one embodiment of the present invention; Figure 4 This is a circuit diagram of a level conversion circuit in one embodiment of the present invention; Figure 5 This is a circuit diagram of the driving circuit in one embodiment of the present invention; Figure 6 This is a circuit diagram of the current sampling circuit in one embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this utility model clearer, the technical solutions of this utility model will be clearly and completely described below in conjunction with the embodiments of this utility model.

[0022] like Figure 1 As shown, this embodiment provides a stepper motor for a painting robot, including a power supply circuit, an MCU main control circuit and a drive circuit respectively connected to the power supply circuit, and a stepper motor connected to the drive circuit; furthermore, the MCU main control circuit is connected to the drive circuit via a level conversion circuit, and the drive circuit is connected to the MCU main control circuit via a current sampling circuit.

[0023] The power supply circuit converts the battery voltage into the operating voltage of the drive circuit and the operating voltage of the MCU main control circuit, respectively. The MCU main control circuit generates two PWM signals and outputs them to the level conversion circuit. The level conversion circuit includes level conversion circuit A and level conversion circuit B, which convert the two PWM signals into sine or cosine current waveforms and output them to the drive circuit. The drive circuit includes two H-bridge topologies, each connected to a two-phase winding of a stepper motor, and controls the two-phase windings of the stepper motor according to the two sine or cosine current waveforms. The current sampling circuit includes current sampling circuit A and current sampling circuit B, which detects the actual current value of the two-phase windings in real time and feeds it back to the MCU main control circuit, enabling the MCU main control circuit to dynamically adjust the output of the two PWM signals according to the actual current value. Details are as follows.

[0024] like Figure 2As shown, the power supply circuit includes a BOOST boost circuit and a BUCK buck circuit. The BOOST boost circuit boosts the voltage to 5V to power the drive circuit, while the BUCK buck circuit bucks the voltage to 3.3V to power the MCU main control circuit. Specifically, the battery (BAT) is connected to the input of the BOOST boost circuit, and the output of the BOOST boost circuit is connected to the VCC_5V terminal to power the drive circuit. The VCC_5V terminal is connected to the input of the BUCK buck circuit, and the output of the BUCK buck circuit is connected to the VDD_3V3 terminal to power the MCU main control circuit.

[0025] In specific implementation, the BOOST boost circuit includes a chip U1, model MP3423GG; the battery BAT is connected to one end of capacitor C4, one end of capacitor C5, one end of capacitor C6, one end of capacitor C7, one end of inductor L2, and pins 9 and 10 of chip U1; the other end of inductor L2 is connected to pins 3 and 14 of chip U1, and pin 14 is grounded through resistor R8 and capacitor C14; pin 8 of chip U1 is connected to one end of resistor R11; the other ends of capacitor C4, capacitor C5, capacitor C6, capacitor C7, and resistor R11, as well as pins 1, 2, 3, and 11 of chip U1 are all grounded. Furthermore, pins 4, 5, and 6 of chip U1 are connected to one end of resistor R4, one end of capacitor C3, one end of capacitor C8, one end of capacitor C9, one end of capacitor C10, one end of capacitor C11, and one end of resistor R1, respectively. The other end of resistor R4 is connected to one end of resistor R9. The other end of resistor R1 is connected to the VCC_5V terminal and one end of resistor R5. The other end of resistor R5 is connected to the anode of diode D1. The other ends of resistor R9, capacitor C8, capacitor C9, capacitor C10, capacitor C11, and the cathode of diode D1 are all grounded. In addition, the above BOOST boost circuit requires the input loop area to be as small as possible, and the output loop area should also be as small as possible.

[0026] Furthermore, the BUCK step-down circuit includes a chip U3, model LP3220AB5F; the VCC_5V terminal is connected to the anode of diode D2, and the VCC_USB terminal is connected to the anode of diode D3; the cathodes of diode D2 and diode D3 are respectively connected to one end of capacitor C21, one end of capacitor C22, one end of resistor R23, and pin 4 of chip U3; pin 1 of chip U3 is respectively connected to the other end of resistor R23 and one end of capacitor C26; the other ends of capacitor C21, capacitor C22, capacitor C26, and pin 2 of chip U3 are all grounded. Furthermore, pin 3 of chip U3 is grounded via resistor R14 and capacitor C18, and pin 3 is connected via inductor L3 to one end of resistor R18, one end of capacitor C23, one end of capacitor C24, one end of capacitor C25, one end of resistor R20, and one end of capacitor C20. Pin 5 of chip U3 is connected to the other end of resistor R20, the other end of capacitor C20, and one end of resistor R27. The other end of resistor R18 is connected to VDD_3V3, and VDD_3V3 is connected to the anode of diode D4 via resistor R21. The other ends of capacitors C23, C24, and C25, the other end of resistor R27, and the cathode of diode D4 are all grounded. In addition, the above BUCK buck circuit requires the input loop area to be as small as possible, and the output loop area should also be as small as possible.

[0027] When the above power supply circuit is working, it achieves dual-voltage power supply of 5V / 3.3V through BOOST boost and BUCK buck. Specifically, the voltage of the battery BAT is boosted by the BOOST circuit to output 5V at the VCC_5V terminal, thus providing a stable power supply to the stepper motor drive circuit. The 5V is bucked by the BUCK circuit to output 3.3V at the VDD_3V3 terminal, thus providing a stable power supply to the MCU main control chip U4 and other peripheral circuits.

[0028] like Figure 3 As shown, the MCU main control circuit includes chip U4; chip U4 includes SMOTOR1_INA signal output terminal, SMOTOR1_INB signal output terminal, SMOTOR1_1A signal input terminal, and SMOTOR1_1B signal input terminal, which are described below.

[0029] In specific implementation, the chip U4 is model ESP32-D0WD-V3. Pins 1, 46, and 37 of chip U4 serve as power supply pins, connected to the VDD_3V3 terminal of the BUCK step-down circuit; pins 12 and 13 are the SMOTOR1_INA and SMOTOR1_INB signal output terminals, respectively; and pins 7 and 8 are the SMOTOR1_1A and SMOTOR1_1B signal input terminals, respectively. During operation, the MCU main control circuit precisely controls the PWM output through chip U4.

[0030] like Figure 4 As shown, the level conversion circuit includes level conversion circuit A and level conversion circuit B; level conversion circuit A includes a SMOTOR1_INA signal input terminal and a SMOTOR1_INAN signal output terminal; level conversion circuit B includes a SMOTOR1_INB signal input terminal and a SMOTOR1_INBN signal output terminal, as described below.

[0031] In specific implementation, the level conversion circuit A includes resistors R153, R154, and R151, and an NMOS transistor Q10. Pin 12 (SMOTOR1_INA signal output) of chip U4 in the MCU main control circuit is connected to the SMOTOR1_INA signal input. The SMOTOR1_INA signal input is connected via resistor R153 to one end of resistor R154 and the gate of the NMOS transistor Q10. The other end of resistor R154 is grounded to the source of the NMOS transistor Q10. The drain of the NMOS transistor Q10 is connected to the SMOTOR1_INAN signal output and one end of resistor R151. The other end of resistor R151 is connected to the VDD_3V3 terminal of the BUCK step-down circuit to pull up the converted level.

[0032] Furthermore, the level conversion circuit B includes resistors R159, R160, and R155, and an NMOS transistor Q11. Pin 13 (SMOTOR1_INB signal output) of chip U4 in the MCU main control circuit is connected to the SMOTOR1_INB signal input. The SMOTOR1_INB signal is connected via resistor R15 to one end of resistor R160 and the gate of NMOS transistor Q11. The other end of resistor R160 is grounded to the source of NMOS transistor Q11. The drain of NMOS transistor Q11 is connected to the SMOTOR1_INBN signal output and one end of resistor R155. The other end of resistor R155 is connected to the VDD_3V3 terminal of the BUCK step-down circuit to pull up the converted level.

[0033] When the aforementioned level conversion circuit operates, pin 12 of chip U4 in the MCU main control circuit outputs the SMOTOR1_INA signal, which is input to the SMOTOR1_INA signal input terminal of level conversion circuit A. After level conversion by NMOS transistor Q10, the SMOTOR1_INAN signal output terminal of level conversion circuit A outputs the SMOTOR1_INAN signal, which is then input to the SMOTOR1_INAN signal input terminal of chip U8 in the driver circuit. Furthermore, when the SMOTOR1_INA signal is high, NMOS transistor Q10 is in the on state, and the SMOTOR1_INAN signal is low; when the SMOTOR1_INA signal is low, NMOS transistor Q10 is in the off state, and the SMOTOR1_INAN signal is high.

[0034] Similarly, in the MCU main control circuit, pin 13 of chip U4 outputs the SMOTOR1_INB signal, which is input to the SMOTOR1_INB signal input terminal of level conversion circuit B. After level conversion by NMOS transistor Q11, the SMOTOR1_INBN signal output terminal of level conversion circuit B outputs the SMOTOR1_INBN signal, which is then input to the SMOTOR1_INBN signal input terminal of chip U8 in the driver circuit. Furthermore, when the SMOTOR1_INB signal is high, NMOS transistor Q11 is in the on state, and the SMOTOR1_INBN signal is low; when the SMOTOR1_INB signal is low, NMOS transistor Q11 is in the off state, and the SMOTOR1_INBN signal is high.

[0035] It should be noted that this invention adds a level conversion circuit between the MCU main control circuit and the stepper motor drive circuit. Compared to the traditional MCU main control circuit that uses software to drive a two-phase stepper motor and output four PWM signals, the above-mentioned level conversion circuit only needs to control one PWM signal to control one coil of the stepper motor. That is, the MCU main control circuit only needs two PWM signals (SMOTOR1_INA signal and SMOTOR1_INB signal) to control one stepper motor. The complementary signals (SMOTOR1_INAN signal and SMOTOR1_INBN signal) are automatically generated by level conversion circuits A and B to simulate a sine or cosine current waveform and send it to the stepper motor drive circuit. In this way, not only is the stepper motor circuit simpler, but the number of PWM output channels is also reduced, making the control method simpler as well.

[0036] like Figure 5As shown, the driving circuit includes a chip U8 and two H-bridge topologies; the chip U8 controls two-phase windings of the stepper motor respectively through the two H-bridge topologies; the chip U8 includes SMOTOR1_INA signal input terminal, SMOTOR1_INB signal input terminal, SMOTOR1_INAN signal input terminal, SMOTOR1_INBN signal input terminal, SM1_SENA signal output terminal, and SM1_SENB signal output terminal, which are described below.

[0037] In specific implementation, the driving circuit includes chip U8, model MP6508GR-Z; and stepper motor interface J2, model M1250VS-04PJ2. Specifically, pins 14 and 13 of chip U8 are the SMOTOR1_INA and SMOTOR1_INAN signal input terminals, respectively; pins 7 and 8 are the SMOTOR1_INB and SMOTOR1_INBN signal input terminals, respectively; pins 1 and 4 are the SM1_SENA and SM1_SENB signal output terminals, respectively; and pins 11 and 17 of chip U8 are both grounded.

[0038] Furthermore, pin 12 (SMOTOR1_INA signal output) of chip U4 in the MCU main control circuit is connected to pin 14 (SMOTOR1_INA signal input) of chip U8 in the driver circuit; pin 13 (SMOTOR1_INB signal output) of chip U4 in the MCU main control circuit is connected to pin 7 (SMOTOR1_INB signal input) of chip U8 in the driver circuit; pin 1 (SM1_SENA signal output) of chip U8 in the driver circuit is connected to the SM1_SENA signal input of the current-selection circuit; and pin 4 (SM1_SENB signal output) of chip U8 in the driver circuit is connected to the SM1_SENB signal input of the current-selection circuit.

[0039] In addition, the VCC_5V terminal of the BOOST boost circuit is connected to one end of capacitor C56, one end of capacitor C60, one end of capacitor C61, one end of resistor R66, one end of capacitor C57, and pin 10 of chip U8 via resistor R65; the other end of resistor R66 is connected to pin 9 of chip U8 via capacitor C54; pin 12 of chip U8 is connected to one end of capacitor C62 and one end of capacitor C63; the other ends of capacitors C56, C60, C61, C57, C62, and C63 are all grounded.

[0040] One H-bridge topology includes capacitor C55, capacitor C58, ferrite bead FB2, bipolar TVS diode D11, bidirectional trigger diode D16, capacitor C59, and ferrite bead FB3. Pin 16 of chip U8 is connected to one end of capacitor C55, one end of capacitor C58, and one end of ferrite bead FB2. The other end of ferrite bead FB2 is connected to one end of bipolar TVS diode D11, one end of bidirectional trigger diode D16, and pin 4 of stepper motor interface J2. Pin 2 of chip U8 is connected to one end of capacitor C59, the other end of capacitor C58, and one end of ferrite bead FB3. The other end of ferrite bead FB3 is connected to one end of bipolar TVS diode D11, one end of bidirectional trigger diode D15, and pin 3 of stepper motor interface J2. The other ends of capacitors C55, C59, D16, and D15 are all grounded. Furthermore, the bipolar TVS diode D11 is connected across the output terminal of its H-bridge topology to absorb the instantaneous current during motor rotation.

[0041] Another H-bridge topology includes capacitor C64, capacitor C65, ferrite bead FB4, bipolar TVS diode D12, bidirectional trigger diode D14, capacitor C66, and ferrite bead FB5. Pin 5 of chip U8 is connected to one end of capacitor C64, one end of capacitor C65, and one end of ferrite bead FB4. The other end of ferrite bead FB4 is connected to one end of bipolar TVS diode D12, one end of bidirectional trigger diode D14, and pin 2 of stepper motor interface J2. Pin 3 of chip U8 is connected to one end of capacitor C66, the other end of capacitor C65, and one end of ferrite bead FB5. The other end of ferrite bead FB5 is connected to the other end of bipolar TVS diode D12, one end of bidirectional trigger diode D13, and pin 1 of stepper motor interface J2. The other ends of capacitors C64, C66, D13, and D14 are all grounded. Pins 5 and 6 of stepper motor interface J2 are both grounded. Furthermore, the bipolar TVS diode D12 is connected across the output terminal of its other H-bridge topology to absorb the instantaneous current during motor rotation.

[0042] When the aforementioned drive circuit operates, pin 12 of chip U4 in the MCU main control circuit outputs the SMOTOR1_INA signal and inputs it to the SMOTOR1_INA signal input terminal of chip U8 in the drive circuit; pin 13 of chip U4 in the MCU main control circuit outputs the SMOTOR1_INB signal and inputs it to the SMOTOR1_INB signal input terminal of chip U8 in the drive circuit. Similarly, pin 1 of chip U8 in the drive circuit outputs the SM1_SENA signal and inputs it to the SM1_SENA signal input terminal of the current sampling circuit; pin 4 (SM1_SENB signal output terminal) of chip U8 in the drive circuit outputs the SM1_SENB signal and inputs it to the SM1_SENB signal input terminal of the current sampling circuit. Based on this, the MCU main control circuit simulates sine and cosine current waveforms through a level conversion circuit, and this waveform is amplified by the stepper motor drive circuit before being sent to the two-phase windings of the stepper motor.

[0043] like Figure 6 As shown, the current sampling circuit includes current sampling circuit A and current sampling circuit B; current sampling circuit A includes an SM1_SENB signal input terminal and a SMOTOR1_1B signal output terminal; current sampling circuit B includes an SM1_SENA signal input terminal and a SMOTOR1_1A signal output terminal, as described below.

[0044] In specific implementation, the current sampling circuit A includes resistor R83, capacitor C71, resistor R80, resistor R81, resistor R79, resistor R84, capacitor C73, amplifier U9B, resistor R82, and capacitor C72. The SM1_SENA signal output terminal of chip U8 in the driving circuit is connected to the SM1_SENA signal input terminal of the current sampling circuit; the SM1_SENA signal input terminal is connected to one end of resistor R83, one end of capacitor C71, and one end of resistor R80; the other end of resistor R80 is connected to the non-inverting input terminal of amplifier U9B, which is grounded via resistor R79; the inverting input terminal of amplifier U9B is connected to one end of resistor R81, and the other ends of resistor R83, capacitor C71, and resistor R81 are all grounded; the inverting input terminal of amplifier U9B is connected to resistor R82, capacitor C72, and capacitor C72. One end of resistor R84 and one end of capacitor C73, and the other ends of resistor R84 and capacitor C73 are respectively connected to the output of amplifier U9B. The output of amplifier U9B is connected to one end of resistor R82, and the other end of resistor R82 is connected to the SMOTOR1_1A signal output and one end of capacitor C72. The SMOTOR1_1A signal output is connected to the SMOTOR1_1A signal input of chip U4 in the MCU main control circuit, and the other end of capacitor C72 is grounded. The positive power supply of amplifier U9B is connected to the VDD_3V3 terminal of the BUCK step-down circuit, and the negative power supply of amplifier U9B is grounded. Furthermore, the sampling circuit lines should be as short and thick as possible, and the signal lines should be routed in parallel.

[0045] The current sampling circuit B includes resistor R77, capacitor C67, resistor R74, resistor R76, resistor R73, resistor R78, capacitor C69, amplifier U9A, resistor R75, and capacitor C68. The SM1_SENB signal output terminal of chip U8 in the driving circuit is connected to the SM1_SENB signal input terminal of the current sampling circuit; the SM1_SENB signal input terminal is connected to one end of resistor R77, one end of capacitor C67, and one end of resistor R74; the other end of resistor R74 is connected to the inverting input terminal of amplifier U9A, which is grounded via resistor R73; the non-inverting input terminal of amplifier U9A is connected to one end of resistor R76, and the other ends of resistor R77, capacitor C67, and resistor R76 are all grounded; the non-inverting input terminal of amplifier U9A is connected to resistor R75 and capacitor C68 respectively. One end of resistor R78 and one end of capacitor C69 are connected to the output of amplifier U9A, and the other ends of resistor R78 and capacitor C69 are connected to the output of amplifier U9A. The output of amplifier U9A is connected to one end of resistor R75, and the other end of resistor R75 is connected to the SMOTOR1_1B signal output and one end of capacitor C68. The SMOTOR1_1B signal output is connected to the SMOTOR1_1B signal input of chip U4 in the MCU main control circuit, and the other end of capacitor C68 is grounded. The positive power supply of amplifier U9A is connected to the VDD_3V3 terminal of the BUCK step-down circuit, and the negative power supply of amplifier U9A is grounded. Furthermore, the sampling circuit lines are kept as short and thick as possible, and the signal lines are routed in parallel.

[0046] When the sampling circuit described above is operating, the SM1_SENA signal output terminal of chip U8 in the drive circuit outputs the SM1_SENA signal and sends it to the SM1_SENA signal input terminal of current sampling circuit A. The output terminal of amplifier U9B in current sampling circuit A outputs the SMOTOR1_1A signal and sends it to the SMOTOR1_1A signal input terminal of chip U4 in the MCU main control circuit. Similarly, the SM1_SENB signal output terminal of chip U8 in the drive circuit outputs the SM1_SENB signal and sends it to the SM1_SENB signal input terminal of current sampling circuit B. The output terminal of amplifier U9A in current sampling circuit B outputs the SMOTOR1_1B signal and sends it to the SMOTOR1_1B signal input terminal of chip U4 in the MCU main control circuit. Based on this, the current sampling circuit detects the actual current value of each phase winding of the stepper motor through the ADC and feeds it back to the MCU main control circuit. The MCU main control circuit dynamically adjusts the output PWM waveform according to the comparison result between the actual current value and the target waveform and feeds it back to the drive circuit, thereby realizing closed-loop control.

[0047] In summary, this invention achieves motion performance comparable to servo motors while maintaining the low-cost advantage of stepper motors through closed-loop current control and stepper drive. It not only significantly improves the resolution, smoothness, and quietness of stepper motors, but also realizes high-precision, low-cost motion control and reduces the heat generation of stepper motors.

[0048] Furthermore, this invention is applicable to scenarios requiring high precision, such as painting robots. Based on the inherent step angle characteristics of stepper motors, the painting robot can accurately calculate displacement without external sensors. In particular, for a preset grid map (such as a 10cm × 10cm grid), the software in the MCU main control circuit binds the stepper motor pulse count to the grid size, allowing the painting robot to move precisely along the grid lines on the map with extremely high positioning accuracy and superior behavior predictability. Moreover, a detachable pen mounting hole is designed at the center of the painting robot. Inserting the pen into this hole enables the robot to perform precise writing and drawing functions, making the gameplay more diverse and interesting, especially suitable for educational and artistic creation scenarios.

[0049] The technical solutions provided by the embodiments of this utility model have been described in detail above. Specific embodiments have been used to illustrate the principles and implementation methods of this utility model. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this utility model. At the same time, for those skilled in the art, based on the ideas of this utility model, modifications can be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the ideas and scope of the technical solutions of the embodiments of this utility model.

Claims

1. A stepper motor for a painting robot, characterized in that, It includes a power supply circuit, an MCU main control circuit and a drive circuit connected to the power supply circuit respectively, and a stepper motor connected to the drive circuit; and the MCU main control circuit is connected to the drive circuit via a level conversion circuit, and the drive circuit is connected to the MCU main control circuit via a current sampling circuit. The power supply circuit is used to convert the battery voltage into the operating voltage of the drive circuit and the operating voltage of the MCU main control circuit, respectively. The MCU main control circuit is used to generate two PWM signals and output them to the level conversion circuit; The level conversion circuit includes level conversion circuit A and level conversion circuit B, which are used to convert the two PWM signals into sine or cosine current waveforms respectively and output them to the drive circuit. The drive circuit includes two H-bridge topologies, which are respectively connected to two phase windings of the stepper motor, and are used to control the two phase windings of the stepper motor according to two sinusoidal or cosine current waveforms. The current sampling circuit includes a current sampling circuit A and a current sampling circuit B, which are used to detect the actual current value of the two-phase winding in real time through the ADC and feed it back to the MCU main control circuit, so that the MCU main control circuit can dynamically adjust the output of the two PWM signals.

2. The stepper motor for a painting robot according to claim 1, characterized in that, The power supply circuit includes a BOOST boost circuit and a BUCK buck circuit; The battery BAT is connected to the input of the BOOST boost circuit, and the output of the BOOST boost circuit is connected to the VCC_5V terminal to power the drive circuit. The VCC_5V terminal is connected to the input of the BUCK buck circuit, and the output of the BUCK buck circuit is connected to the VDD_3V3 terminal to power the MCU main control circuit.

3. A stepper motor for a painting robot according to claim 2, characterized in that, The MCU main control circuit includes chip U4, model number ESP32-D0WD-V3.

4. A stepper motor for a painting robot according to claim 3, characterized in that, The level conversion circuit A includes resistors R153, R154, and R151, and an NMOS transistor Q10. In the MCU main control circuit, the SMOTOR1_INA signal output terminal of chip U4 is connected to the SMOTOR1_INA signal input terminal; the SMOTOR1_INA signal input terminal is connected to one end of resistor R154 and the gate of NMOS transistor Q10 via resistor R153; the other end of resistor R154 is grounded to the source of NMOS transistor Q10; the drain of NMOS transistor Q10 is connected to the SMOTOR1_INAN signal output terminal and one end of resistor R151; the other end of resistor R151 is connected to the VDD_3V3 terminal of the BUCK step-down circuit.

5. A stepper motor for a painting robot according to claim 3 or 4, characterized in that, The level conversion circuit B includes resistors R159, R160, and R155, and an NMOS transistor Q11. In the MCU main control circuit, the SMOTOR1_INB signal output terminal of chip U4 is connected to the SMOTOR1_INB signal input terminal; the SMOTOR1_INB signal terminal is connected to one end of resistor R160 and the gate of NMOS transistor Q11 via resistor R15; the other end of resistor R160 and the source of NMOS transistor Q11 are grounded; the drain of NMOS transistor Q11 is connected to the SMOTOR1_INBN signal output terminal and one end of resistor R155; the other end of resistor R155 is connected to the VDD_3V3 terminal of the BUCK buck circuit.

6. A stepper motor for a painting robot according to claim 3, characterized in that, The driving circuit includes a chip U8, model number MP6508GR-Z.

7. A stepper motor for a painting robot according to claim 6, characterized in that, One of the H-bridge topologies of the drive circuit includes capacitor C55, capacitor C58, ferrite bead FB2, bipolar TVS diode D11, bidirectional trigger diode D16, capacitor C59, and ferrite bead FB3. Pin 16 of chip U8 is connected to one end of capacitor C55, one end of capacitor C58, and one end of ferrite bead FB2. The other end of ferrite bead FB2 is connected to one end of bipolar TVS diode D11, one end of bidirectional trigger diode D16, and pin 4 of stepper motor interface J2. Pin 2 of chip U8 is connected to one end of capacitor C59, the other end of capacitor C58, and one end of ferrite bead FB3. The other end of ferrite bead FB3 is connected to one end of bipolar TVS diode D11, one end of bidirectional trigger diode D15, and pin 3 of stepper motor interface J2. The other ends of capacitors C55, C59, D16, and D15 are all grounded.

8. A stepper motor for a painting robot according to claim 6 or 7, characterized in that, Another H-bridge topology of the drive circuit includes capacitor C64, capacitor C65, ferrite bead FB4, bipolar TVS diode D12, bidirectional trigger diode D14, capacitor C66, and ferrite bead FB5. Specifically, pin 5 of chip U8 is connected to one end of capacitor C64, one end of capacitor C65, and one end of ferrite bead FB4; the other end of ferrite bead FB4 is connected to one end of bipolar TVS diode D12, one end of bidirectional trigger diode D14, and pin 2 of stepper motor interface J2; pin 3 of chip U8 is connected to one end of capacitor C66, the other end of capacitor C65, and one end of ferrite bead FB5; the other end of ferrite bead FB5 is connected to the other end of bipolar TVS diode D12, one end of bidirectional trigger diode D13, and pin 1 of stepper motor interface J2; the other ends of capacitors C64, C66, D13, and D14 are all grounded; pins 5 and 6 of stepper motor interface J2 are both grounded.

9. A stepper motor for a painting robot according to claim 6, characterized in that, The current sampling circuit A includes resistor R83, capacitor C71, resistor R80, resistor R81, resistor R79, resistor R84, capacitor C73, amplifier U9B, resistor R82, and capacitor C72. In the driving circuit, the SM1_SENA signal output terminal of chip U8 is connected to the SM1_SENA signal input terminal of the current sampling circuit; the SM1_SENA signal input terminal is connected to one end of resistor R83, one end of capacitor C71, and one end of resistor R80 respectively; the other end of resistor R80 is connected to the non-inverting input terminal of amplifier U9B, which is grounded through resistor R79; the inverting input terminal of amplifier U9B is connected to one end of resistor R81, and the other ends of resistor R83, capacitor C71, and resistor R81 are all grounded; the inverting input terminal of amplifier U9B is connected to resistor R... One end of resistor R84 and one end of capacitor C73, and the other ends of resistor R84 and capacitor C73 are respectively connected to the output of amplifier U9B; the output of amplifier U9B is connected to one end of resistor R82, and the other end of resistor R82 is respectively connected to the SMOTOR1_1A signal output terminal and one end of capacitor C72. The SMOTOR1_1A signal output terminal is connected to the SMOTOR1_1A signal input terminal of chip U4 in the MCU main control circuit, and the other end of capacitor C72 is grounded; the positive power supply of amplifier U9B is connected to the VDD_3V3 terminal of BUCK step-down circuit, and the negative power supply of amplifier U9B is grounded.

10. A stepper motor for a painting robot according to claim 6 or 9, characterized in that, The current sampling circuit B includes resistor R77, capacitor C67, resistor R74, resistor R76, resistor R73, resistor R78, capacitor C69, amplifier U9A, resistor R75, and capacitor C68. In the driving circuit, the SM1_SENB signal output terminal of chip U8 is connected to the SM1_SENB signal input terminal of the current sampling circuit; the SM1_SENB signal input terminal is connected to one end of resistor R77, one end of capacitor C67, and one end of resistor R74 respectively; the other end of resistor R74 is connected to the inverting input terminal of amplifier U9A, which is grounded through resistor R73; the non-inverting input terminal of amplifier U9A is connected to one end of resistor R76, and the other ends of resistor R77, capacitor C67, and resistor R76 are all grounded; the non-inverting input terminal of amplifier U9A is connected to resistors... One end of resistor R78 and one end of capacitor C69, and the other ends of resistor R78 and capacitor C69 are respectively connected to the output terminal of amplifier U9A; the output terminal of amplifier U9A is connected to one end of resistor R75, and the other end of resistor R75 is respectively connected to the SMOTOR1_1B signal output terminal and one end of capacitor C68. The SMOTOR1_1B signal output terminal is connected to the SMOTOR1_1B signal input terminal of chip U4 in the MCU main control circuit, and the other end of capacitor C68 is grounded; the positive power supply terminal of amplifier U9A is connected to the VDD_3V3 terminal of BUCK buck circuit, and the negative power supply terminal of amplifier U9A is grounded.