Author Topic: 9DoF sensor and ground underneath?  (Read 453 times)

0 Members and 1 Guest are viewing this topic.

Offline TantalumTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: 00
9DoF sensor and ground underneath?
« on: January 11, 2025, 11:24:15 am »
Hello

Short question.

Should I remove the ground-fill on all layer underneath a 9DoF sensor?

Does the masse harm the magnetic field?

Thank you
 

Offline ahsrabrifat

  • Regular Contributor
  • *
  • Posts: 73
  • Country: pk
Re: 9DoF sensor and ground underneath?
« Reply #1 on: January 11, 2025, 04:12:17 pm »
Remove the ground plane or ground-fill directly underneath the 9DoF sensor. Place the sensor where there is minimum number of traces. It should be away from inductors, transformers and high-current traces.
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 9534
  • Country: fi
Re: 9DoF sensor and ground underneath?
« Reply #2 on: January 11, 2025, 04:18:54 pm »
Current flowing in the ground plane obviously causes a magnetic field so removing the fill makes sense, then again current flowing in nearby traces affect it anyway. If you are trying to do compass measurements you are going for some serious learning curve, expect some serious engineering effort including calibration jigs. This is because the whole PCB is full of ferromagnetic stuff (something as simple as metal alloys in component leads) which distorts the Earth's field you are trying to measure, and varying supply currents.

What are you planning to do with the sensor, and what kind of expectations do you have?
« Last Edit: January 11, 2025, 04:57:17 pm by Siwastaja »
 

Offline TantalumTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: 00
Re: 9DoF sensor and ground underneath?
« Reply #3 on: January 11, 2025, 05:50:17 pm »
I expected to use it as a compass :-/

I though it would be easier with a sensor which incorporates already a fusion algorithm.

Currently it looks like this:
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 9534
  • Country: fi
Re: 9DoF sensor and ground underneath?
« Reply #4 on: January 11, 2025, 07:19:38 pm »
If it has a built-in algorithm, surely it must come with example layout and PCB design guidelines. If not, the whole story sounds fishy.

What is the claimed application for the "fusion algorithm"? I mean, stuff like leveling pitch and roll is pretty easy because the gravity (acceleration of 1g) is a perfect natural reference; all the algorithm needs to do is to compensate for other accelerations when the sensor moves, using the gyros. But yaw is different, accelerometer is of no help and gyros drift within seconds, so you have magnetic only. And magnetic is notoriously problematic even just because of stuff in the ground (even naturally occurring minerals, not to even talk about buildings, underground cables etc), which is why when using manual compass you are supposed to take the direction frequently from different spots and average it out in your Human Intelligence algorithm.

Now with your own PCB and components and casing sitting around, the least you can do is to calibrate out their effect. If the existing algorithm is worth anything, it will have some described procedure how to do that calibration.

The best I was ever able to get out of a magnetometer (indoors application, maybe that was one of the mistakes) was something like +/- 30 degrees. I just gave up. But of course it can be done and there are companies specialized to do it.

For the PCB, I would probably put the chip as far from other parts carrying current as possible. I.e., in the corner. It seems you have some empty space there.
« Last Edit: January 11, 2025, 07:23:47 pm by Siwastaja »
 

Offline TantalumTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: 00
Re: 9DoF sensor and ground underneath?
« Reply #5 on: January 12, 2025, 02:16:56 pm »
Thank you for your advises :)

I will make a prototype first and see if the data are usable or not.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7450
  • Country: fi
    • My home page and email address
Re: 9DoF sensor and ground underneath?
« Reply #6 on: January 12, 2025, 02:45:19 pm »
What is the claimed application for the "fusion algorithm"?
Sensor fusion can help the precision even in orientation in the plane perpendicular to gravity, as long as the movement of the IMU is not strictly planar and perpendicular to gravity; say when walking, for example.  Less useful for smooth-wheeled devices on utterly flat surfaces (where you may need to use high-precision gyroscopes or beacon-based navigation instead).

The difference between sensor fusion and simply averaging the estimates from different sensor is qualitatively similar to the difference between mean and median in statistics, especially when it comes to filtering out noise from the sensor readings: Sensor fusion combines different inputs in a logical manner, whereas averaging the estimates makes all sorts of conceptual and mathematical assumptions you may not be aware of.

There are three main sensor fusion algorithms used: Kalman, Mahony, and Madgwick filters.  See this explanation at QSenseMotion, and Complementary, Extended Kalman, Mahony, and Madgwick orientation filter descriptions at AHRS documentation at Attitude and Heading Reference System library (written in Python) documentation.
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 9534
  • Country: fi
Re: 9DoF sensor and ground underneath?
« Reply #7 on: January 13, 2025, 08:56:27 am »
Sensor fusion can help the precision even in orientation in the plane perpendicular to gravity

I meant, what is the claimed application for this specific fusion algorithm? Manufacturer of the chip (and the algorithm) should be saying something about what it can do and to what accuracy - and also have application notes how to achieve this accuracy (e.g. PCB layout).
« Last Edit: January 13, 2025, 09:16:31 am by Siwastaja »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7450
  • Country: fi
    • My home page and email address
Re: 9DoF sensor and ground underneath?
« Reply #8 on: January 13, 2025, 10:39:01 am »
Sensor fusion can help the precision even in orientation in the plane perpendicular to gravity
I meant, what is the claimed application for this specific fusion algorithm? Manufacturer of the chip (and the algorithm) should be saying something about what it can do and to what accuracy - and also have application notes how to achieve this accuracy (e.g. PCB layout).
Apologies, I was apparently particularly dense yesterday. :palm:

Yes, fully agreed.

After looking at the 28-pin LGA footprint, I'm pretty sure OP is talking about Bosch BNO055 9DoF sensor; PDF datasheet, documentation.  Or possibly a clone.  It is not a particularly good or precise 9DoF sensor, though.

Sensor fusion isn't difficult to implement yourself, though.  You can find many open source ones for the 9DoF MPU9250, for example.  I do believe some are so disappointed at the BNO055 built-in one that they prefer to use it as a dumb 9DoF IMU and run their own Madgwick sensor fusion algorithm on a suitable microcontroller.



Whatever you do, learn to use versors/unit quaternions/bivectors –– four-component \$(q, i, j, k)\$ objects –– for the orientation and describing rotations in general.

Euler and Tait-Bryan angles will lead you astray, because they are actually an ordered set of rotations around specific axes, with at least the third one dependent on the first two and thus leading to gimbal lock, and nobody agreeing to exactly what axes are to be rotated in which order, leading to many different variants used under the same name, leading to surprising issues when part of your implementation uses a different one by accident.

Perhaps I should write a post to the Beginners section to describe the operations needed.  Euler/Tait-Bryan angles users too often fall into its traps, thinking they're easier than the versor/quaternion/bivector approach, but it's just not true!  And using 3×3 matrices (or two unit vectors perpendicular to each other, the third being the cross product of the first two) is just too cumbersome.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf