Skip to content

Arduino project simulating a moving ball inside a torus

License

guyplusplus/Arduino_Virtual_Ball_in_Torus

Repository files navigation

Arduino Virtual Ball in Torus

My Toy

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 angles: ψ (psi), θ (theta) then φ (phi). This picture from Berkeley University explains the used notation.

Euler angles

Assuming a fixed board, where its z axis points verticaly upward, the only moment is from the gravity force:

Moment from gravity force

Then as the board is actually a non galilean referencial, moment of virtual forces appply. First as the referential translate, the monent of the inertia force applies. As the referential rotates, the 3 forces are the Euler force, the Coriolis force and the centrifugal force. The 3 forces are explained here.

Non Galilean virtual forces

Each moment is equal to:

Non Galilean virtual forces

So the complete equation is:

Complete equation

I have calculated all the equations myself, so if you find any error, please contact me!

Thank you to STLFinder for the picture of the toy.

About

Arduino project simulating a moving ball inside a torus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages