So maybe the first sample was only the Gyro I saw. Some cables had been loose. After some debugging it still seamed not to work.
So a started to play arround with another concept I thought of; using the 3D magnetic sensors (QMC5883L). On the table they nicely detected small movements from arround 2cm distance with a good signal:
And I found a very handsome tool for fast 3D magnetic field calculation with python MagPyLib. I looked for such tools quite some time but was not successfull. I was quite easy to setup a simulation of this concept and evaluate the magnetic measuremtts depending on the movement of the knob. This would also be an important step to derive the back calcualtion formula, how to get back from magnetic measurements to the movement of the know.
3x 3D magnetic sensors and 3x 5x2 neodym magnets with a magnetization of 1T each. each 10 samples have been a rotation over each axis by +/- 5° and a movement of +/-2mm respectively. For each I got different patterns of measurement at around 0.1mT which should be good to be used as measurement.
I tried to calcualte the inverse function by a simple linear regression (and some more datapoints) and it did not look to bad:
Adding an arctan of the measured B values to the regression leaded to a sufficient result:
- I might experiment a bit with different setting to explore the stability
- Might also work with only one magnet wich is sufficiently decentered so that not knob movement will result in ambigious measurements. Or 2x magnet sensors should be also sufficient.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.