V
V
vladimir percov2017-04-08 15:50:42
Physics
vladimir percov, 2017-04-08 15:50:42

How to determine the position of the cube?

Good day!
There is a cube inside which is a microcontroller with sensors.
The sides of the cube are numbered from 1 to 6. When the cube is rolled, the program must determine which number came up.
There is a gyroscope and an accelerometer. Are these sensors enough for this task or do you need some more? And how can I derive the formulas (conditions) for each side using their values?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
x67, 2017-04-08
@Arhimed96

triaxial accelerometer. A gyroscope is not needed. We look at which axis we have the acceleration of free fall. 401911900f957f3db7cd68acab3e7fae.jpg
Suppose, along the x-axis, then if the acceleration is +, then the bottom side is shaded, if -, then the opposite side of it. The accelerometer, of course, will make noise and not always fall smoothly, so filter the noise very slightly and without bothering and set the setting in the region of 8-9.

A
Alexander, 2017-04-08
@NeiroNx

The 3 accelerometer coordinates each take a value equal to "g" or "-g" if the surface on which the cube is ideal. The resulting value will be in the range "g/2< val < g" or "-g < val < -g/2" for the opposite side. val is one of the x,y,z coordinates of the acceleration data from the accelerometer. you can even take not 1/2 but 2/3 of the maximum in order to more clearly separate the values.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question