Inverted pendulum control circuit

By designing an inverted pendulum control circuit including ARM microcontroller, attitude detection module and DC motor drive module, the problem of difficult control of the instability of the inverted pendulum system is solved, and the precise control of the inverted pendulum is achieved, and reliable research support is provided.

CN221977291UInactive Publication Date: 2024-11-08SHANDONG PETROCHEMICAL INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202420714282.0
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-04-09
Publication Date
2024-11-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The inverted pendulum system is unstable and difficult to control, and the prior art is difficult to achieve precise control of the inverted pendulum.

Method used

An inverted pendulum control circuit including an ARM microcontroller, an attitude detection module, a DC motor driving module and a communication module is designed. Data is collected through an attitude sensor, and the motor output is adjusted using the DC motor driving module to achieve precise control of the inverted pendulum.

Benefits of technology

It realizes precise control of the inverted pendulum, the circuit structure is simple and compact, and it is easy to use, providing strong technical support for the research of the inverted pendulum.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN221977291U_ABST
    Figure CN221977291U_ABST
Patent Text Reader

Abstract

The utility model belongs to the technical field of inverted pendulum control, and particularly relates to an inverted pendulum control circuit. According to the inverted pendulum control circuit, the inverted pendulum can be accurately controlled by detecting the posture of the inverted pendulum, collecting data and then driving and adjusting the direct-current brush motor matched with the inverted pendulum, and the inverted pendulum control circuit is simple and compact in circuit structure, reliable in use effect and high in practicability. And powerful technical support is provided for assisting technicians in realizing control research on the inverted pendulum. The inverted pendulum control circuit comprises an ARM microcontroller, an attitude detection module, a direct current motor driving module and a communication module. The attitude detection module is composed of an attitude sensor and an attitude data transmission interface; the attitude sensor is installed on a swing rod of the inverted pendulum and used for collecting attitude data of the inverted pendulum. The direct current motor driving module is used for driving and controlling a direct current brush motor matched with the inverted pendulum; and the communication module is used for establishing communication interconnection between the ARM microcontroller and external equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model belongs to the technical field of inverted pendulum control, in particular to an inverted pendulum control circuit. Background Art

[0002] As a typical multivariable, high-order, nonlinear, strongly coupled, and naturally unstable system, the inverted pendulum's stable control process is a typical problem in control theory and practical applications, and can be used to reflect many problems in control theory, such as nonlinear problems, robustness problems, following problems, stabilization, tracking problems, etc. Therefore, it is very necessary to study the control of the inverted pendulum.

[0003] However, due to the unstable and difficult-to-control characteristics of the inverted pendulum system, higher control requirements are placed on the inverted pendulum control circuit. How to set up a control system to achieve precise control of the inverted pendulum, such as stable control of its swinging and inverting, has become a technical problem that needs to be urgently solved by technical personnel in this field. Utility Model Content

[0004] The utility model provides an inverted pendulum control circuit. The control circuit has a simple and compact structure and is easy to use, and can realize accurate control of the inverted pendulum.

[0005] In order to solve the above technical problems, the utility model adopts the following technical solutions:

[0006] An inverted pendulum control circuit includes: an ARM microcontroller, a posture detection module, a DC motor drive module and a communication module;

[0007] Wherein, the posture detection module is composed of a posture sensor and a posture data transmission interface; the posture sensor is installed on the pendulum rod of the inverted pendulum and is used to collect the posture data of the inverted pendulum;

[0008] The DC motor drive module is used to drive and control a DC brushed motor that matches the inverted pendulum;

[0009] The communication module is used to establish communication interconnection between the ARM microcontroller and an external device outside the inverted pendulum control circuit.

[0010] Preferably, the ARM microcontroller uses a chip model STM32F103C8T6;

[0011] Among them, the VDD pin of the ARM microcontroller with chip model STM32F103C8T6 is connected to a +3.3V DC voltage, the VSS pin of the ARM microcontroller with chip model STM32F103C8T6 is grounded, and an 8MHz / 16pF crystal oscillator is also arranged between the OSC_IN pin and the OSC_OUT pin of the ARM microcontroller with chip model STM32F103C8T6.

[0012] Preferably, the attitude sensor uses a 9-axis motion processing sensor with a chip model of MPU6050; the attitude data transmission interface uses a Header connector with 6 pins;

[0013] Through the IIC bus, a communication connection is established between the attitude data transmission interface and the attitude sensor to read the three-axis gravity acceleration data and three-axis angular velocity data collected by the attitude sensor.

[0014] Preferably, the DC motor drive module uses a chip model TB6612FNG;

[0015] Among them, the PWMA pin of the DC motor drive module with chip model TB6612FNG is connected to the PB0 pin of the ARM microcontroller with chip model STM32F103C8T6; the AIN1 pin of the DC motor drive module with chip model TB6612FNG is connected to the PB14 pin of the ARM microcontroller with chip model STM32F103C8T6; the AIN2 pin of the DC motor drive module with chip model TB6612FNG is connected to the PB15 pin of the ARM microcontroller with chip model STM32F103C8T6;

[0016] The AO1 pin of the DC motor driver module with the chip model TB6612FNG is connected to the positive pole of the DC brush motor; the AO2 pin of the DC motor driver module with the chip model TB6612FNG is connected to the negative pole of the DC brush motor;

[0017] The VM1, VM2, and VM3 pins of the DC motor driver module with chip model TB6612FNG are all connected to a +12V DC voltage; the VCC pin of the DC motor driver module with chip model TB6612FNG is connected to a +5V DC voltage; and the GND pin of the DC motor driver module with chip model TB6612FNG is grounded.

[0018] Preferably, the communication module uses a chip model CH340G;

[0019] Among them, the TXD pin of the communication module with chip model CH340G is connected to the PA10 pin of the ARM microcontroller with chip model STM32F103C8T6; the RXD pin of the communication module with chip model CH340G is connected to the PA9 pin of the ARM microcontroller with chip model STM32F103C8T6;

[0020] The D+ pin of the communication module with chip model CH340G is connected to pin 3 of the communication interface J3; the D- pin of the communication module with chip model CH340G is connected to pin 4 of the communication interface J3; the VCC pin of the communication module with chip model CH340G is connected to the +5V DC voltage; the GND pin of the communication module with chip model CH340G is connected to the ground.

[0021] Preferably, it also includes: a power supply module;

[0022] The power supply module is used to convert the input 220V AC voltage into the output +12V, +5V, +3.3V DC voltage.

[0023] The utility model provides an inverted pendulum control circuit, which includes: an ARM microcontroller, a posture detection module, a DC motor drive module and a communication module; wherein the posture detection module is composed of a posture sensor and a posture data transmission interface; the posture sensor is installed on the pendulum rod of the inverted pendulum, and is used to collect the posture data of the inverted pendulum; the DC motor drive module is used to drive and control the DC brush motor matched with the inverted pendulum; the communication module is used to establish communication interconnection between the ARM microcontroller and an external device outside the inverted pendulum control circuit. An inverted pendulum control circuit with the above structural features can realize precise control of the inverted pendulum by detecting the posture of the inverted pendulum and collecting data, and then by adjusting the drive of the DC brush motor matched with the inverted pendulum. The circuit structure is simple and compact, and the use effect is reliable, which provides strong technical support for assisting technical personnel to realize the control research of the inverted pendulum. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation on the present invention. In the following drawings:

[0025] Figure 1 A schematic diagram of the structural framework of the inverted pendulum control circuit provided by the utility model;

[0026] Figure 2 It is a schematic diagram of the electrical structure of an ARM microcontroller whose chip model is STM32F103C8T6;

[0027] Figure 3 This is a schematic diagram of the electrical structure of a 9-axis motion processing sensor with chip model MPU6050;

[0028] Figure 4 This is a schematic diagram of the electrical structure of a DC motor drive module with a chip model of TB6612FNG;

[0029] Figure 5 This is a schematic diagram of the electrical structure of a communication module with chip model CH340G. DETAILED DESCRIPTION

[0030] The utility model provides an inverted pendulum control circuit. The control circuit has a simple and compact structure and is easy to use, and can realize accurate control of the inverted pendulum.

[0031] In order to make the purpose, technical solution and advantages of the utility model more clear, the utility model is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the utility model and are not used to limit the utility model.

[0032] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.

[0033] The utility model provides an inverted pendulum control circuit, such as Figure 1 As shown, it includes: an ARM microcontroller, a posture detection module, a DC motor drive module and a communication module. Among them, the posture detection module is specifically composed of two parts: a posture sensor and a posture data transmission interface. The posture sensor is installed on the pendulum of the inverted pendulum to collect the posture data of the inverted pendulum; the posture data transmission interface is specifically used to transmit the posture data collected by the posture sensor. The DC motor drive module is used to drive and control the DC brushed motor matched with the inverted pendulum. The communication module is used to establish communication interconnection between the ARM microcontroller and the posture detection module and the DC motor drive module.

[0034] As a more preferred embodiment of the present invention, Figure 2As shown, the ARM microcontroller uses a chip model STM32F103C8T6. It is worth noting that the ARM microcontroller is specifically used to complete the (posture) solution of the collected inverted pendulum posture data; and then generate corresponding control instructions according to the preset control program, thereby driving the DC motor drive module to complete the control of the DC brushed motor and other functions.

[0035] Specifically, the following pin settings of the ARM microcontroller are further provided here as a reference: the VDD pin of the ARM microcontroller with chip model STM32F103C8T6 is connected to a +3.3V DC voltage, the VSS pin of the ARM microcontroller with chip model STM32F103C8T6 is grounded, and an 8MHz / 16pF crystal oscillator is also arranged between the OSC_IN pin and the OSC_OUT pin of the ARM microcontroller with chip model STM32F103C8T6.

[0036] As a more preferred embodiment of the present invention, Figure 3 As shown in the figure, the attitude sensor uses a 9-axis motion processing sensor with the chip model MPU6050. It is worth noting that the 9-axis motion processing sensor with the chip model MPU6050 integrates three-axis acceleration, three-axis angular velocity and an expandable digital motion processor DMP (Digital Motion Processor), which can be used to obtain the attitude data of the inverted pendulum including angular velocity and acceleration.

[0037] The attitude data transmission interface uses a 6-pin Header connector. This attitude data transmission interface establishes a communication connection with the attitude sensor through the IIC bus to read the three-axis gravity acceleration data and three-axis angular velocity data collected by the attitude sensor; then, through the connection between the 3rd and 4th pins of the Header connector and the PA0 and PA1 of the ARM microcontroller with the chip model STM32F103C8T6, the corresponding attitude data is transmitted to the ARM microcontroller for solution to calculate the attitude information of the inverted pendulum.

[0038] As a more preferred embodiment of the present invention, Figure 4 As shown in the figure, the DC motor drive module uses the chip model TB6612FNG. This DC motor drive module with the chip model TB6612FNG can independently and bidirectionally control up to 2 DC brushed motors. It has a high degree of integration, can provide sufficient output capacity, and has excellent operating performance and energy consumption advantages.

[0039] Specifically, the pin settings of the DC motor drive module can be referred to as follows:

[0040] The PWMA pin of the DC motor drive module with the chip model TB6612FNG is connected to the PB0 pin of the ARM microcontroller with the chip model STM32F103C8T6; the AIN1 pin of the DC motor drive module with the chip model TB6612FNG is connected to the PB14 pin of the ARM microcontroller with the chip model STM32F103C8T6; the AIN2 pin of the DC motor drive module with the chip model TB6612FNG is connected to the PB15 pin of the ARM microcontroller with the chip model STM32F103C8T6;

[0041] The AO1 pin of the DC motor driver module with the chip model TB6612FNG is connected to the positive pole of the DC brush motor; the AO2 pin of the DC motor driver module with the chip model TB6612FNG is connected to the negative pole of the DC brush motor;

[0042] The VM1, VM2, and VM3 pins of the DC motor driver module with chip model TB6612FNG are all connected to a +12V DC voltage; the VCC pin of the DC motor driver module with chip model TB6612FNG is connected to a +5V DC voltage; and the GND pin of the DC motor driver module with chip model TB6612FNG is grounded.

[0043] It should be noted that after the ARM microcontroller calculates the posture data of the inverted pendulum, it can further determine the difference between the current posture of the inverted pendulum and the target vertical posture according to the preset program, and then (using the PID algorithm) it can calculate the control amount for controlling the DC brushed motor. At this time, the PWM waveform frequency and duty cycle (drive signal) corresponding to the control amount can be calculated and output to complete the drive control process of the DC brushed motor.

[0044] For example: when the PB14 pin of the ARM microcontroller with the chip model STM32F103C8T6 is high and the PB15 pin is low, the voltage output to the two ends of the DC brushless motor through the AO1 and AO2 pins of the DC motor driver module with the chip model TB6612FNG is positive, and the DC brushless motor can rotate forward. When the PB14 pin of the ARM microcontroller with the chip model STM32F103C8T6 is low and the PB15 pin is high, the voltage output to the two ends of the DC brushless motor through the AO1 and AO2 pins of the DC motor driver module with the chip model TB6612FNG is negative, and the DC brushless motor can reverse. When the duty cycle of the PWM wave output by the PB0 pin of the ARM microcontroller with the chip model STM32F103C8T6 changes, the voltage at both ends of the DC brushless motor connected to the DC motor driver module with the chip model TB6612FNG changes accordingly. Thus, the inverted pendulum can be controlled to reach an inverted vertical state.

[0045] As a more preferred embodiment of the present invention, Figure 5 As shown, the communication module uses a chip model CH340G. As a communication conversion adapter, the communication module with the chip model CH340G can provide serial, parallel or IrDA interface communication through the USB bus.

[0046] Take the communication between ARM microcontroller and computer as an example. Specifically, the pin setting of the communication module can be referred to as follows: the TXD pin of the communication module with chip model CH340G is connected to the PA10 pin of the ARM microcontroller with chip model STM32F103C8T6; the RXD pin of the communication module with chip model CH340G is connected to the PA9 pin of the ARM microcontroller with chip model STM32F103C8T6; the D+ pin of the communication module with chip model CH340G is connected to the 3 pin of the communication interface J3; the D- pin of the communication module with chip model CH340G is connected to the 4 pin of the communication interface J3. That is, through the CH340G communication module, the RM microcontroller establishes a communication connection with the computer, so that the posture information of the inverted pendulum is sent to the computer in the format of ASCII code for the technician to view.

[0047] In addition, the remaining pin settings of the communication module can be referred to as:

[0048] The VCC pin of the communication module with the chip model CH340G is connected to the +5V DC voltage; the GND pin of the communication module with the chip model CH340G is connected to the ground.

[0049] Finally, as a more preferred embodiment of the present invention, it also includes: a power supply module; the power supply module is used to convert the input 220V AC voltage into the output +12V, +5V, +3.3V DC voltage.

[0050] The utility model provides an inverted pendulum control circuit, which includes: an ARM microcontroller, a posture detection module, a DC motor drive module and a communication module; wherein the posture detection module is composed of a posture sensor and a posture data transmission interface; the posture sensor is installed on the pendulum rod of the inverted pendulum, and is used to collect the posture data of the inverted pendulum; the DC motor drive module is used to drive and control the DC brush motor matched with the inverted pendulum; the communication module is used to establish communication interconnection between the ARM microcontroller and an external device outside the inverted pendulum control circuit. An inverted pendulum control circuit with the above structural features can realize precise control of the inverted pendulum by detecting the posture of the inverted pendulum and collecting data, and then by adjusting the drive of the DC brush motor matched with the inverted pendulum. The circuit structure is simple and compact, and the use effect is reliable, which provides strong technical support for assisting technical personnel to realize the control research of the inverted pendulum.

[0051] The above is only a specific implementation of the utility model, but the protection scope of the utility model is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the utility model, which should be included in the protection scope of the utility model. Therefore, the protection scope of the utility model should be based on the protection scope of the claims.

Claims

1. An inverted pendulum control circuit, characterized in that: Includes: ARM microcontroller, posture detection module, DC motor drive module and communication module; Wherein, the posture detection module is composed of a posture sensor and a posture data transmission interface; the posture sensor is installed on the pendulum rod of the inverted pendulum and is used to collect the posture data of the inverted pendulum; The DC motor drive module is used to drive and control a DC brushed motor that matches the inverted pendulum; The communication module is used to establish communication interconnection between the ARM microcontroller and an external device outside the inverted pendulum control circuit.

2. An inverted pendulum control circuit according to claim 1, characterized in that: The ARM microcontroller uses a chip model STM32F103C8T6; Among them, the VDD pin of the ARM microcontroller with chip model STM32F103C8T6 is connected to a +3.3V DC voltage, the VSS pin of the ARM microcontroller with chip model STM32F103C8T6 is grounded, and an 8MHz / 16pF crystal oscillator is also arranged between the OSC_IN pin and the OSC_OUT pin of the ARM microcontroller with chip model STM32F103C8T6.

3. An inverted pendulum control circuit according to claim 1, characterized in that: The attitude sensor uses a 9-axis motion processing sensor with a chip model of MPU6050; the attitude data transmission interface uses a Header connector with 6 pins; Through the IIC bus, a communication connection is established between the attitude data transmission interface and the attitude sensor to read the three-axis gravity acceleration data and three-axis angular velocity data collected by the attitude sensor.

4. The inverted pendulum control circuit according to claim 1, characterized in that: The DC motor drive module uses a chip model TB6612FNG; Among them, the PWMA pin of the DC motor drive module with chip model TB6612FNG is connected to the PB0 pin of the ARM microcontroller with chip model STM32F103C8T6; the AIN1 pin of the DC motor drive module with chip model TB6612FNG is connected to the PB14 pin of the ARM microcontroller with chip model STM32F103C8T6; the AIN2 pin of the DC motor drive module with chip model TB6612FNG is connected to the PB15 pin of the ARM microcontroller with chip model STM32F103C8T6; The AO1 pin of the DC motor driver module with the chip model TB6612FNG is connected to the positive pole of the DC brush motor; the AO2 pin of the DC motor driver module with the chip model TB6612FNG is connected to the negative pole of the DC brush motor; The VM1, VM2, and VM3 pins of the DC motor driver module with chip model TB6612FNG are all connected to a +12V DC voltage; the VCC pin of the DC motor driver module with chip model TB6612FNG is connected to a +5V DC voltage; and the GND pin of the DC motor driver module with chip model TB6612FNG is grounded.

5. The inverted pendulum control circuit according to claim 1, characterized in that: The communication module uses a chip model CH340G; Among them, the TXD pin of the communication module with chip model CH340G is connected to the PA10 pin of the ARM microcontroller with chip model STM32F103C8T6; the RXD pin of the communication module with chip model CH340G is connected to the PA9 pin of the ARM microcontroller with chip model STM32F103C8T6; The D+ pin of the communication module with chip model CH340G is connected to pin 3 of the communication interface J3; the D- pin of the communication module with chip model CH340G is connected to pin 4 of the communication interface J3; the VCC pin of the communication module with chip model CH340G is connected to the +5V DC voltage; the GND pin of the communication module with chip model CH340G is connected to the ground.

6. The inverted pendulum control circuit according to claim 1, characterized in that: Also included are: a power supply module; The power supply module is used to convert the input 220V AC voltage into output +12V, +5V, +3.3V DC voltage.