This article is sponsored by PCBWAY [ Ссылка ]
This time I will show you how to make a simple One axis self balancing device, which is based on the PID control system. A PID controller continuously calculates an error value as the difference between a desired setpoint and a measured process variable and applies a correction based on proportional, integral, and derivative terms.
In our case, the MPU6050 sensor collects data of the position (more precisely the angle) of the device, and sends that data to the microcontroller which performs calculations based on previously given algorithms and constants, and sends the result to the electric motor, which with its movement tends to hold the device in the desired position.
Depending on the placement and weight of the batteries and the characteristics of the sensor itself, during the first activation the device will probably not be completely stable and will swing left and right. To stabilize, it is necessary to experiment with the values of floatX1, floatX2, and floatX3 in the code. If it is well tuned even if we try to mechanically shift it to an unbalanced state, it returns automaticly to a state of equilibrium.
Detailed instructions, schematic, code, and 3D files at:
[ Ссылка ]
If you are interested in this area, look at the Playlist with all my Arduino Robots at:
[ Ссылка ]
If you like my job buy me a coffee: [ Ссылка ]
Visit my Youtube Channel for more Projects , DIY and How To Make videos:
[ Ссылка ]
by mircemk
SUBSCRIBE LIKE AND SHARE !!!!
Thanks for your Support !
DIY Aduino One Axis Self Balancing Device
Теги
One axis stabilising systemArduino MPU6050 systemarduino self balancing systemarduino Nema24 motorarduino one axis reaction wheelarduino PID control systemsimple arduino projecthomemade arduino3d Print arduino devicenuts and boltsPID balancing system arduino nanoinstructions to buildeasy to build balancing systemarduino gyroscopefree arduino code