A simple rotating inverted pendulum and control device uses STM32F407VET6 as the main control chip, TB6612 drives the deceleration encoding motor, and LM2596 plus an 8V battery provides stable power supply. The WDD35D4 potentiometer is used to detect the angle, and the relative angle is obtained by AD converting the potentiometer voltage. The control algorithm uses PID control (the upright control of a first-order inverted pendulum is similar to a balancing car). (WDD35D4 comes with high-speed bearings inside~~~~)
The external mechanical structure is 3D printed, refer to the following open source blueprint
The system block diagram is as follows:
The program flow chart is as follows:
Because there is no real 3D printer and online 3D printing is too expensive, I can only create an inverted pendulum model by piecing together things. It is not recommended: Use modules: TB6612, LM2596, encoder motor plus STM32F407 minimum system version TB6612 and LM2596 are used respectively. Power the motor and output a stable 5V power supply for each module. The STM32F407 minimum system board is used as the main control
This is a makeshift inverted pendulum. It cannot be placed still on the platform to maintain stability (it can only be supported by the hand~). The specific details are to use a sliding rheostat to convert the angle of the pendulum to complete PID closed-loop control. The motor is used There is a motor on a balancing car (with a tire in the middle). The board is actually removed from the balancing car (with an extra motor drive) and is plugged into the STMF4 minimum board; ADC sampling uses the ADC that comes with STM32 itself ( It can be done, and the test error is still a little compared to the JLC three-and-a-half-digit multimeter, but it is still feasible if you can adjust the PID parameters), and the inverted pendulum swing rod uses a carbon rod (lighter in weight), and the sliding rheostat shaft itself is very smooth. There is no damping in the rotation; the battery is just two ordinary rechargeable 3.7V cells connected in series; in fact, OLED is useless, and if you want to draw a board, you only need an STM32F1 minimum system, driven by a motor, stabilized voltage, and lead to a few interfaces. Do, you can do it very small. At this time, if it can be combined with external fixing devices, it can be well controlled. The estimated cost of doing a set like this is about 100, which can ensure that the basic part can be completed. The advanced part may require better motors or sensors, because I don’t have any later. I've tried it, but it hasn't worked out here, so there's nothing much to say.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet