UBalance is an auto-leveling platform borned for testing the new Python MAGUM library (https://github.com/ubalance-team/magum) by Ubalance Team. For full documentation please check this link (http://magum.ml).
This is only an experimental project which may have further developments and improvements.
DescriptionUbalance is composed by two wooden platforms linked by two servomotors that manage the inclination of two axes (x and y).
The logic behind how the platform behaves is quite simple, after that the base platform has been calibrated, the second platform linked by the servomotors opposes to the movement of the base, trying to stay parallel to the ground.
DemonstrationThe following video shows a better understanding regarding how the system works:
HardwareWe assembled the engines uncoupling their movement. Below, photos to clarify how we performed the assembling:
This is the linking configuration of the pins. You only need 8 male to male jump wires and a breadboard:
- base servo: pin 10
- top servo: pin 9
Ubalance works thanks to a Python script that reads the angles from both gyroscope and accelerometer (integrating measures using a complementary filter already provided by MAGUM library) and an Arduino sketch that works as a static controller and moves the engines. Below, a flow chart showing the communication between Python script and Arduino sketch:
Before you start:
Python script needs the Python module Pyserial to communicate with Arduino, and MAGUM library to read data from the sensors.
Install Pyserial running this command from your terminal:
pip install pyserial
Download MAGUM library from Github (https://github.com/ubalance-team/magum) and install it following the documentation of the README file.
How to:
1) Copy the Arduino sketch and load it on the M4 controller of your UDOO Neo
2) Copy the Python script in a new file and save it with ".py" extension
3) Run Python script typing this command on your terminal:
sudo python YourScriptName.py
Be careful at the calibration: don't move UDOO Neo while calibrating!!
4) Now it should work. Move the base platform and verify it!
Comments