This small Arduino construction reproduces the machanics of a (single) ball kept inside a torus. By moving the Arduino board itself accross the 6 dimansions, the ball circulates inside.
The behavior is calculated realtime by the processor, based on standard mechanics equations, using moment of inertia.
All calculations are based on Euler angles, in the canonical (first) approach based on the ZXZ axis rotation order: ψ (psi), θ (theta) then φ (phi, ϕ in the picture bellow). This picture from Berkeley University explains the used notation.
Few notations:
- l : the torus radius
- α (alpha) : the angle of the ball in the torus referential with the x axis
- g : the gravity constant
- m : the mass of the ball
- fr : the friction factor
When the board is fixed, where its z axis points verticaly upward, the only moment is from the gravity force:
When the board starts to move by a human hand, the board referencial can not be considered galilean anymore. The moment of fictitious forces apply too. First as the referential translates along the 3 axis, the moment of the inertia force applies. As the referential rotates, the 3 new fictitious forces are the Euler force, the Coriolis force and the centrifugal force. The 3 forces are explained here.
A friction force has also been added, it acts inverse to the ball speed.
The moment of the 4 fictitious forces and the friction are equal to:
So the complete equation is:
I have calculated all the equations myself, so if you find any error, please contact me!
Thanks to Ole Eichhorn at Thingiverse for the picture of the toy.