Define Map/Orientation

Hey guys,

I'm currently planning a project which should enable an arduino to have a certain orientation, so it "knows" that it should spit out a tone at a certain point. For example:

  1. coded map - e.g.:
    (for each point: anchor-point = reference-point)
    a) point x in 2 cm distance to the right
    b) point y in 3 cm distance to the left
    c) point z in 4 cm distance up

  2. switch Arduino on = calibrate and determine "anchor-point"/"starting-point"/"reference-point" = set covered distance to 0

  3. move and if you reach point x (or y, or z) --> make tone

I've already got many solutions with a bunch of sensors like ultrasonic-sensors or IR-sensors. But I want to solve that problem with a sensor chip such as a MPU6050 or MPU9250, because it's much more accurate and stable in its measurement. I've also studied solutions like that pozyx positioning shield and learned much about IMU/Quaternions theory. But I'm still confused, because that theory (IMU/Quaternions) and that MPU-family are mainly just about rotation and can't measure a covered distance, can it?

Are there any other chips/shields, which can get a coded orientation and keep aware of this "inner-map " while switched on and move? Or is there even any possible solution using MPU6050/MPU9250?

I hope I've explained my intention and problem clear enough. Many thanks in advance for any solution or tip!!!
cheers Tom

But I want to solve that problem with a sensor chip such as a MPU6050 or MPU9250, because it's much more accurate and stable in its measurement.

Are you sure about that? Accelerometers report instantaneous acceleration every time you read them. Making use of that data takes time. While you are using the data, you are not reading the data. This means that you can't exactly predict where you are, since you might have missed a peak acceleration or deceleration.

And, gyros drift.

Thanks a lot for your answer mate! :slight_smile:
You might be right with the precision and stability and especially with the drift..mainly for MPU6050, less for MPU9250 or MPU9150! But in terms of sending and reading data, every sensor would have the same problem of precision-lost, wouldn't it?..well depends, how each module is build up. But in general and as far as I know, this problem (using/reading data) is already "solved" with e.g. the Kalman filter or SLAM - mapping and knowing, where you are, simultaneously.

But I have some different picture of orientation in mind: Arduino would not read data and than use it. It sounds to much like a mapping process. For my project, I want this very serial process (what every code of course is) to be more ...simultaneous. So not like: 1.) I moved 1 cm to the right and 2.) this is 1 cm to point x etc., but more like: I move 1 cm closer to point x/4 cm further away from y/ etc.

So it is not really measure distance but more "living" in a constant relationship to all defined points (or whatever might be defined)...well, in fact, it would be somehow a little bit like a simple mouse cursor on the screen, but should not have this constant "physical touch"... :relaxed:

It is difficult to get accurate 2D positions indoors.

If you have a wheeled robot, wheel encoders can work fairly well to define the robot position. If not, Pozyx, or an overhead video camera with image processing are the other popular solutions. Accelerometer/gyro combinations do not work for position.

Thanks again for your answer! :slight_smile: Well, fundamentally you're right. It is not very hard to measure 2D position indoors. Next to pozyx, which is quite expensive, there are other methods like RSSI-band indoor localization, IEEE tracking or IR UWB radar.

But all of them dealing with "something outside" the module, which tells them, where they are. I want a module, which is able to measure distance "from the inside". I did a little more research and find a pure accelerometer - ADXL335-module (with two or three axis).

A beginner's guide to accelerometers

I now try to get along with a solution based on this method. :slight_smile:

As I said, an accelerometer won't work at all. You can read about why it won't work here.

Or continue with your learning experience.

there are other methods like RSSI-band indoor localization

That also does not work.

That also does not work.

Well, it will, if "inside" or "outside" is sufficient resolution.

I think that the position resolution with RSSI methods is better stated as "for sure somewhere in the vicinity" or "perhaps not in the vicinity".