PID (Proportion Integration Differentiation) motor control and inverted pendulum teaching device capable of changing forms
By designing a PID motor control and inverted pendulum teaching device with a changeable form, and using a potentiometer knob and OLED display screen to intuitively adjust the PID parameters, the problem of cumbersome operation of existing devices is solved, and beginners' understanding and practical ability of PID control are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- NANJING JIANGXIE TECHNOLOGY CO LTD
- Filing Date
- 2025-03-31
- Publication Date
- 2026-05-01
AI Technical Summary
Existing PID learning experimental devices are cumbersome to operate. Beginners need to manually input parameters when debugging P, I, and D parameters, which wastes time and patience and lacks practical opportunities to intuitively understand PID control.
Design a transformable PID motor control and inverted pendulum teaching device, including motor control state and inverted pendulum state. The PID parameters can be intuitively adjusted through potentiometer knob and OLED display screen. Real-time feedback is provided by combining coded motor and angle sensor to simplify the operation process.
It improves beginners' understanding and practical experience of PID control. Through intuitive parameter adjustment and real-time feedback, it reduces the time learners spend debugging PID parameters and enhances their mastery of the PID control algorithm.
Smart Images

Figure CN224190582U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of experimental teaching platforms, specifically to a PID motor control and inverted pendulum teaching device with a changeable form. Background Technology
[0002] PID control is widely used in industrial control. It is a control algorithm based on error feedback that continuously adjusts the controller output to maintain the state of the controlled object near the setpoint, achieving stable and precise automatic control. However, in classroom teaching, this method tends to be theoretically oriented, with only verification experiments to help beginners understand and validate existing conclusions. It lacks the ability to debug and solve problems in actual control systems. This platform uses a DC motor as the controlled object. Beginners can observe the phenomena of two structures provided by the platform by changing the P, I, and D parameters, gaining a deep and intuitive understanding of PID control theory and truly making the PID control method their own tool for future projects.
[0003] Currently, most PID learning experimental devices require three cumbersome steps to debug by connecting to a computer, manually inputting parameters, downloading the program to the control chip, and observing the experimental phenomena when changing the P, I, and D values. These steps waste the time and patience of beginners.
[0004] No effective solutions have yet been proposed to address the problems in the relevant technologies. Utility Model Content
[0005] In view of the problems in related technologies, this utility model proposes a PID motor control and inverted pendulum teaching device with a changeable form, so as to overcome the above-mentioned technical problems existing in the existing related technologies.
[0006] Therefore, the specific technical solution adopted by this utility model is as follows:
[0007] A PID motor control and inverted pendulum teaching device with a changeable form, which is used to switch between motor control state and inverted pendulum state for teaching.
[0008] The motor control state teaching device includes:
[0009] The main frame is used to install and support the control components and motor components;
[0010] The control board is used to output control signals to drive the motor assembly to rotate;
[0011] The motor assembly is used to observe the rotational position and status of the motor, which facilitates subsequent PID parameter tuning.
[0012] The inverted pendulum state teaching device includes:
[0013] The main frame is used to install and support the control components and motor components;
[0014] The control board is used to output control signals to drive the motor mechanism to rotate.
[0015] The motor mechanism is used to drive the inverted pendulum arm structure to rotate;
[0016] The inverted pendulum arm structure is used to observe the rotation position and state of the pendulum, which facilitates subsequent PID parameter tuning.
[0017] Furthermore, the main frame includes a base plate, with a plurality of first support columns provided on one side of the top of the base plate, and the top of the first support columns being connected to the control board; a plurality of second support columns are provided on the other side of the top of the base plate, with a first support plate provided on the top of the second support columns, and a motor assembly is installed on the first support plate.
[0018] Furthermore, the top side of the control board is provided with several encoder motor interfaces, and on the side of the encoder motor interfaces are several angle sensor interfaces, motor drive modules, voltage regulator modules, power switches and several power interfaces in sequence; the other side of the top of the control board is provided with several potentiometer knobs and several buttons, a display screen is provided on one side of the potentiometer knobs, an STM32 motherboard is provided on one side of the display screen, and a serial port interface is provided on the side of the STM32 motherboard away from the display screen.
[0019] Furthermore, the chip model of the motor drive module is TB6612FNG, the chip model of the voltage regulator module is MP1584EN, the chip model of the display screen is SSD1315 or SSD1306, and the chip model of the STM32 motherboard is STM32F103C8T6.
[0020] Furthermore, the motor assembly includes an encoder motor mounted at the bottom of the first support plate. The encoder motor, in conjunction with the encoder interface mode of the STM32 motherboard, allows the angle and speed of the motor rotation to be determined. The output shaft of the encoder motor passes through the first support plate and is connected to a motor turntable located above the first support plate. An arrow mark is provided on one side of the top of the motor turntable.
[0021] Furthermore, the motor mechanism includes an encoder motor, the output shaft of which passes through the first support plate and is connected to a brass coupling located above the first support plate; a conductive slip ring is provided at the top of the brass coupling, and the conductive slip ring and transmission structure can connect the circuit while ensuring that the shaft can rotate indefinitely; a second support plate is sleeved on the outside of the conductive slip ring, and the bottom corners of the second support plate are connected to the first support plate through a third support column; a rigid shaft is inserted through the middle of the conductive slip ring, and the bottom end of the rigid shaft extends downward and is connected to the output shaft of the encoder motor through the brass coupling; a slip ring upper washer is provided at the top of the rigid shaft, and the bottom end of the slip ring upper washer is connected to the top of the conductive slip ring; a first flange coupling is provided at the top of the slip ring upper washer.
[0022] Furthermore, in motor-controlled mode, the first support column and the control board, as well as the second support column and the first support plate, are connected by nuts. In inverted pendulum mode, the first support column and the control board, as well as the third support column and the second support plate, are connected by nuts. In inverted pendulum mode, the bottom end of the third support column has a threaded hole, and the top end of the second support column has a threaded connection part that mates with the threaded hole.
[0023] Furthermore, the inverted pendulum arm structure includes a crossbar, one end of which is connected to a first flange coupling; a rear cover is provided at the other end of the crossbar, a central body is provided on one side of the rear cover, and an angle sensor is provided between the central body and the rear cover; a bearing is inserted through the middle of the central body, and a central shaft that mates with the bearing is provided inside the bearing, the other end of the central shaft being connected to the central body through a front cover; a second flange coupling is provided in the middle of the front cover, one end of the second flange coupling being connected to one end of the central shaft, and the other end of the second flange coupling being connected to one end of the pendulum arm, a counterweight screw being inserted through the other end of the pendulum arm, and a counterweight nut being provided at the other end of the counterweight screw.
[0024] The beneficial effects of this utility model are as follows:
[0025] 1) This utility model adopts a PID motor control and inverted pendulum device, which can not only demonstrate the closed-loop control experiment of the coded motor and learn the program implementation process and parameter tuning techniques of single-loop PID, but also modify the PID motor control device to the inverted pendulum state to learn double-loop PID, deepen the understanding of PID control algorithm, and enhance practical project experience.
[0026] 2) The control board of this utility model is equipped with a potentiometer knob module and an OLED display screen. The PID parameters can be changed by turning different knobs. The OLED display screen displays the current PID parameters in a clear and intuitive way, and the corresponding device makes different responses. This allows beginners to intuitively and quickly learn about PID control, saving learners time in learning how to debug PID parameters and deepening their understanding of PID parameters. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this utility model or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this utility model. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a schematic diagram of the motor control state in a PID motor control and inverted pendulum teaching device with a changeable form according to an embodiment of the present utility model.
[0029] Figure 2 yes Figure 1 Side view;
[0030] Figure 3 This is a schematic diagram of the inverted pendulum state in a PID motor control and inverted pendulum teaching device with a changeable form according to an embodiment of the present utility model.
[0031] Figure 4 yes Figure 2 Side view;
[0032] Figure 5 This is a three-dimensional assembly diagram of the motor mechanism in the inverted pendulum state according to an embodiment of the present utility model;
[0033] Figure 6 This is a three-dimensional assembly diagram of the inverted pendulum arm structure in the inverted pendulum state according to an embodiment of the present utility model;
[0034] Figure 7 This is a silkscreen pattern of the control board according to an embodiment of the present utility model;
[0035] Figure 8 This is a circuit diagram of the control board according to an embodiment of the present utility model.
[0036] In the picture:
[0037] 1. Base plate; 2. First support column; 3. Control panel; 4. Second support column; 5. First support plate; 6. Encoder motor; 7. Motor turntable; 8. Arrow markings; 9. Brass coupling; 10. Conductive slip ring; 11. Second support plate; 12. Third support column; 13. Rigid shaft; 14. Upper washer of slip ring; 15. First flange coupling; 16. Crossbar; 17. Rear cover; 18. Intermediate body; 19. Angle sensor; 20. Bearing; 21. Central shaft; 22. Front cover; 23. Second flange coupling; 24. Swing rod; 25. Counterweight screw; 26. Counterweight nut. Detailed Implementation
[0038] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are usually used to represent similar components.
[0039] According to an embodiment of this utility model, a transformable PID motor control and inverted pendulum teaching device is provided. This device can transform into two states: a motor control state and an inverted pendulum state. In the motor control state, a closed-loop control experiment of an coded motor can be performed. This experiment is a classic application scenario of the PID control algorithm, allowing learners to learn the program implementation flow and parameter tuning techniques of single-loop PID. Furthermore, this kit can be modified based on the motor control state by adding inverted pendulum-related parts, thus transforming it into an inverted pendulum state. In the inverted pendulum state, learners can study dual-loop PID, deepening their understanding of the PID control algorithm and increasing practical project experience.
[0040] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figures 1-8 As shown, a PID motor control and inverted pendulum teaching device with a changeable form according to an embodiment of the present utility model is used to realize the switching teaching of motor control state or inverted pendulum state.
[0041] Specifically, the motor control state teaching device includes:
[0042] The main frame, consisting of acrylic panels and several copper columns, is used to install and support the control components and motor components.
[0043] The main frame includes a base plate 1, which is used to build the control board and the encoder motor. Several first support columns 2 are provided on the top side of the base plate 1 to vertically support the STM32 control board 3, and the top of the first support columns 2 is connected to the control board 3. Several second support columns 4 are provided on the top side of the base plate 1. The top of the second support columns 4 is provided with a first support plate 5 to ensure that the encoder motor 6 and the motor turntable 7 are connected together, and the motor assembly is installed on the first support plate 5.
[0044] In motor control mode, the first support column 2 and the control board 3, and the second support column 4 and the first support plate 5 are all connected by nuts;
[0045] The control board is used to output control signals to drive the motor assembly to rotate;
[0046] The control board includes: encoder motor interface A-channel M1, encoder motor interface B-channel M2, encoder motor interface A-channel M3, encoder motor interface B-channel M4, STM32 minimum system board U1 (i.e., STM32 mainboard), motor drive module U2, voltage regulator module U3, 0.96-inch OLED display U4, power switch S1, power interface DC1, power interface J4, angle sensor interface J1, angle sensor interface J2, serial port interface J3, potentiometer knob RP1, potentiometer knob RP2, potentiometer knob RP3, potentiometer knob RP4, button K1, button K2, button K3, and button K4;
[0047] The STM32 minimum system board U1 uses the STM32F103C8T6 main control chip. Through the onboard SWD debugging interface and external ST-LINK, it can be used to debug and download programs to the STM32.
[0048] The OLED display U4 uses either the SSD1315 or SSD1306 main control chip and a four-pin I2C interface.
[0049] The motor drive module U2 uses a TB6612FNG chip, and the voltage regulator module U3 uses an MP1584EN chip.
[0050] Currently, there are two interface types for encoder motors on the market (XH2.54 and PH2.0). To better accommodate the two motor interfaces, the STM32 control board adds two interfaces for each motor in parallel. The XH2.54 interfaces are encoder motor interface A (M1) and encoder motor interface B (M2); the PH2.0 interfaces are encoder motor interface A (M3) and encoder motor interface B (M4). Furthermore, only one of the XH2.54 or PH2.0 encoder motor interfaces can be used simultaneously.
[0051] Both power connectors DC1 and J4 are power connectors connected in parallel, and only one is needed at a time. Power connector DC1 can be connected to a 5.5mm power adapter plug, while power connector J4 can be used to connect wires to batteries or other powered devices.
[0052] The fixed terminals of potentiometer knobs RP1, RP2, RP3, and RP4 are all connected to 3.3V and GND, respectively, and the tap terminals are directly connected to the GPIO ports of the STM32 minimum system board U1 that support AD acquisition.
[0053] One end of buttons K1, K2, K3, and K4 is connected to GND, and the other end is directly connected to the GPIO port of the STM32 minimum system board U1.
[0054] The principle of the control board is as follows:
[0055] Either the DC1 power interface or the J4 power interface can be selected as the power supply port, with an input voltage range of 5 to 12V. The input voltage is output as 3.3V through the voltage regulator chip U3, which is used to supply the STM32 minimum system board U1, the OLED display U4, the angle sensor interface J1, and the motor drive module U2.
[0056] The signals from rotating potentiometer knobs RP1, RP2, RP3, and RP4, and pressing buttons K1, K2, K3, and K4, are transmitted to the GPIO ports of the STM32 minimum system board U1 for signal processing, thereby changing the motor control parameters.
[0057] The angle sensor interface J2 is used to receive the angle signal from the angle sensor and input it to the GPIO port of the STM32 minimum system board U1 that supports AD acquisition for signal processing.
[0058] The STM32 minimum system board U1 processes the input signals and outputs motor control signals.
[0059] The motor control signal output by the STM32 minimum system board U1 is amplified by the motor drive module U2, and then input to the motor through either encoder motor interface A M1 and encoder motor interface B M2 or encoder motor interface A M3 and encoder motor interface B M4 for motor control and drive.
[0060] The OLED display U4 is the display module, which displays the changes in PID control parameters in real time and intuitively.
[0061] The motor assembly is used to observe the rotational position and status of the motor, which facilitates subsequent PID parameter tuning.
[0062] The motor assembly includes an encoder motor 6 mounted on the bottom of the first support plate 5. The encoder motor 6 is a DC brushed motor with a built-in encoder. The encoder can be used to measure the position and speed of the motor and is an essential component in the PID closed-loop control feedback loop. The output shaft of the encoder motor 6 passes through the first support plate 5 and is connected to the motor turntable 7 located above the first support plate 5. An arrow mark 8 is provided on one side of the top of the motor turntable 7. The motor turntable 7 is a circular turntable with an arrow mark on the motor output shaft, which can intuitively indicate the position of the motor output shaft, making it easy to observe and adjust.
[0063] The motion principle of the motor control state teaching device is as follows:
[0064] After power is supplied, the STM32 control board 3 outputs PID control signals to drive the encoder motor 6 to rotate. The motor turntable 7 is equipped with arrow markings, which allows for intuitive observation of the motor's rotation position and status at all times, facilitating subsequent PID parameter tuning.
[0065] Specifically, the inverted pendulum teaching device shares a base for both the inverted pendulum state and the motor-controlled state, and the two can be flexibly switched. Its basic structure is the same as that of the motor-controlled state teaching device. The difference is that the motor turntable 7 is removed, a second support frame plate 11 is added, an inverted pendulum arm structure is added on the basis of the second support frame plate 11, and parts are added on the basis of the motor assembly to form a motor mechanism.
[0066] The motor mechanism is used to drive the inverted pendulum arm structure to rotate;
[0067] The motor mechanism includes an encoder motor 6. The output shaft of the encoder motor 6 passes through the first support plate 5 and is connected to a brass coupling 9 located above the first support plate 5. The brass coupling 9 connects the rigid shaft 13 to the output shaft of the encoder motor 6. A conductive slip ring 10 is provided at the top of the brass coupling 9. The conductive slip ring 10 can connect the circuit while ensuring that the shaft can rotate infinitely (i.e., a device that connects the wire while allowing the wire to rotate infinitely 360 degrees). In order to ensure that the angle sensor signal can be connected to the control board, this kit adds a 3-wire conductive slip ring as a relay structure. The outer side of the conductive slip ring 10... A second support plate 11 is provided, and the bottom corners of the second support plate 11 are connected to the first support plate 5 through a third support column 12; a rigid shaft 13 is inserted through the middle of the conductive slip ring 10, which is responsible for the rigid transmission of power, and the bottom end of the rigid shaft 13 extends downward and is connected to the output shaft of the encoder motor 6 through a brass coupling 9; a slip ring upper pad 14 is provided at the top of the rigid shaft 13, which is used to fill the gaps between the structures, and the bottom end of the slip ring upper pad 14 is connected to the top end of the conductive slip ring 10, and a first flange coupling 15 is provided at the top end of the slip ring upper pad 14;
[0068] In the inverted pendulum state, the first support column 2 and the control plate 3, and the third support column 12 and the second support plate 11 are all connected by nuts. The bottom end of the third support column 12 is provided with a threaded hole, and the top end of the second support column 4 is provided with a threaded connection part that matches the threaded hole.
[0069] The inverted pendulum arm structure is used to observe the rotation position and state of the pendulum arm, which facilitates subsequent PID parameter tuning.
[0070] The inverted pendulum arm structure includes a crossbar 16, one end of which is connected to a first flange coupling 15. A rear cover 17 is located at the other end of the crossbar 16. A central body 18 is located on one side of the rear cover 17, and an angle sensor 19 is positioned between the central body 18 and the rear cover 17. The angle sensor 19 is equipped with a 360-degree rotating potentiometer for detecting the angle of the shaft. The angle sensor 19 is a device that allows the pendulum arm to rotate freely while simultaneously measuring its current angle. This kit uses a potentiometer-based angle measurement scheme. Users can obtain the angle information of the pendulum arm based on the voltage output by the potentiometer. The angle sensor is an essential component in the feedback loop of the inverted pendulum PID closed-loop control. A bearing 20 is inserted through the middle of the central body 18. The bearing 20 is responsible for supporting the shaft structure and allowing the shaft to rotate freely. Inside the bearing 20, there is a central shaft 21 that mates with it. The other end of the central shaft 21 is connected to the intermediate body 18 through the front cover 22. The rear cover 17, the intermediate body 18, and the front cover 22 are used to fix the bearing and the angle sensor, ensuring that the angle sensor can work normally. The middle of the front cover 22 is provided with a second flange coupling 23, and one end of the second flange coupling 23 is connected to one end of the central shaft 21. The other end of the second flange coupling 23 is connected to one end of the swing rod 24. The other end of the swing rod 24 is provided with a counterweight screw 25, and the other end of the counterweight screw 25 is provided with a counterweight nut 26 that mates with it. The counterweight nut 26 and the counterweight screw 25 ensure that the swing rod 24 is easier to control during the swing and inversion process.
[0071] The motion principle of the inverted pendulum teaching device is as follows:
[0072] After power is supplied, the STM32 control board outputs a PID control signal to drive the motor mechanism to rotate the crossbar 16. At the same time, the rotation of the crossbar 16 causes the swing arm 24 to swing. The angle sensor 19 is used to detect the swing angle of the swing arm and feeds the signal back to the control board 3 through the conductive slip ring 10. This allows the control board 3 to process the signal and use the PID algorithm to control the swing arm 24 to reach and maintain a vertically upward state.
[0073] In summary, by utilizing the above-mentioned technical solution of this utility model, which employs a PID motor control and an inverted pendulum device, this utility model can not only demonstrate the closed-loop control experiment of the coded motor and learn the program implementation process and parameter tuning techniques of single-loop PID, but also modify the PID motor control device to an inverted pendulum state to learn double-loop PID, deepen the understanding of PID control algorithms, and enhance practical project experience.
[0074] In addition, the control board of this utility model is equipped with a potentiometer knob module and an OLED display screen. By turning different knobs, the PID parameters can be changed. The OLED display screen synchronously and intuitively displays the current PID parameters and the corresponding device makes different responses. This allows beginners to intuitively and quickly learn about PID control, saving learners time in learning how to debug PID parameters and deepening their understanding of PID parameters.
[0075] In this utility model, unless otherwise explicitly specified and limited, the terms "installation", "setting", "connection", "fixing", "screw connection", etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal connection of two components or the interaction between two components. Unless otherwise explicitly limited, those skilled in the art can understand the specific meaning of the above terms in this utility model according to the specific circumstances.
[0076] The above description is only a preferred embodiment of the present utility model and is not intended to limit the present utility model. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present utility model should be included within the protection scope of the present utility model.
Claims
1. A transformable PID motor control and inverted pendulum teaching device, characterized in that, This teaching device is used to teach the switching between motor control mode and inverted pendulum mode; The motor control state teaching device includes: The main frame is used to install and support the control components and motor components; The control board is used to output control signals to drive the motor assembly to rotate; The motor assembly is used to observe the rotational position and status of the motor, which facilitates subsequent PID parameter tuning. The inverted pendulum state teaching device includes: The main frame is used to install and support the control components and motor components; The control board is used to output control signals to drive the motor mechanism to rotate. The motor mechanism is used to drive the inverted pendulum arm structure to rotate; The inverted pendulum arm structure is used to observe the rotation position and state of the pendulum arm, which facilitates subsequent PID parameter tuning. The main frame includes a base plate, and a plurality of first support columns are provided on one side of the top of the base plate, and the top of the first support columns is connected to the control plate. A plurality of second support columns are provided on the other side of the top of the base plate, and a first support plate is provided at the top of the second support columns, and the motor assembly is installed on the first support plate. The top side of the control board is provided with several encoder motor interfaces, and the side of the encoder motor interfaces is provided with several angle sensor interfaces, a motor drive module, a voltage regulator module, a power switch and several power interfaces in sequence. The control board has several potentiometer knobs and several buttons on the top side. A display screen is located on one side of the potentiometer knobs, and an STM32 motherboard is located on one side of the display screen. A serial port interface is located on the side of the STM32 motherboard away from the display screen.
2. A morphing PID motor control and inverted pendulum teaching device according to claim 1, characterized in that, The motor drive module uses a TB6612FNG chip, the voltage regulator module uses an MP1584EN chip, the display screen uses an SSD1315 or SSD1306 chip, and the STM32 motherboard uses an STM32F103C8T6 chip.
3. The morphing PID motor control and inverted pendulum teaching device of claim 1, wherein, The motor assembly includes an encoder motor mounted on the bottom end of the first support plate; The output shaft of the encoder motor passes through the first support plate and is connected to the motor turntable located above the first support plate, and an arrow mark is provided on one side of the top of the motor turntable.
4. A morphing form PID motor control and inverted pendulum teaching device according to claim 3, characterized in that, The motor mechanism includes the encoder motor, the output shaft of which passes through the first support plate and is connected to a brass coupling located above the first support plate; The top of the brass coupling is provided with a conductive slip ring, and a second support plate is sleeved on the outside of the conductive slip ring. The bottom corners of the second support plate are connected to the first support plate through a third support column. A rigid shaft is inserted through the middle of the conductive slip ring, and the bottom end of the rigid shaft extends downward and is connected to the output shaft of the encoder motor through a brass coupling. The top end of the rigid shaft is provided with a slip ring upper pad, and the bottom end of the slip ring upper pad is connected to the top end of the conductive slip ring. The top end of the slip ring upper pad is provided with a first flange coupling.
5. The PID motor control and inverted pendulum teaching device with a changeable form according to claim 1, characterized in that, In motor control mode, the first support column and the control board, and the second support column and the first support plate are connected by nuts.
6. The PID motor control and inverted pendulum teaching device with a changeable form according to claim 4, characterized in that, In the inverted pendulum state, the first support column and the control plate, as well as the third support column and the second support plate, are connected by nuts.
7. A morphing PID motor control and inverted pendulum teaching device according to claim 6, wherein, In the inverted pendulum state, the bottom end of the third support column is provided with a threaded hole, and the top end of the second support column is provided with a threaded connection part that mates with the threaded hole.
8. The PID motor control and inverted pendulum teaching device with a changeable form according to claim 6, characterized in that, The inverted pendulum arm structure includes a crossbar, and one end of the crossbar is connected to the first flange coupling; The other end of the crossbar is provided with a rear cover, a middle body is provided on one side of the rear cover, and an angle sensor is provided between the middle body and the rear cover. A bearing is inserted through the middle of the intermediate body, and a central shaft is provided inside the bearing to cooperate with it. The other end of the central shaft is connected to the intermediate body through a front cover. A second flange coupling is provided in the middle of the front cover, and one end of the second flange coupling is connected to one end of the central shaft. The other end of the second flange coupling is connected to one end of the swing rod. A counterweight screw is inserted through the other end of the swing rod, and a counterweight nut is provided at the other end of the counterweight screw.