Email us

Este artículo está en inglés. Ver el sitio en español

Cet article est en anglais. Voir le site en français

Dieser Artikel ist auf Englisch. Website auf Deutsch ansehen

Este artigo está em inglês. Ver o site em português

Mounting an IMU enclosure with magnets: what it disturbs

Static magnets leave the accelerometer and gyro untouched, but they bias the magnetometer: a 5 µT offset against a 50 µT earth field swings heading 5.7 degrees, and only a 60-second stationary log proves it. For a box you swap between machines, use a located base plate with a strap or clamp, and keep magnets a full enclosure-width from the sensor if magnetic heading matters.

NEMA4 Enclosure engineering team · Published November 3, 2026 · 7 min read

Short answer: magnets under the box leave your accelerometer and gyro untouched, but they sit inside the magnetometer's measurement, and a 5 µT offset against the earth's ~50 µT field is 5.7 degrees of heading error. One 60-second stationary log, magnets on and magnets off, settles the question. For a box that swaps between a tractor and a combine, the mount that wins is a located base plate with a strap or clamp: stops or pins set the alignment, the strap holds it down, and nothing magnetic rides under the sensor. Keep magnets at least one full enclosure-width away from the IMU when magnetic heading matters — at five times the distance, their field drops to 1/125. Then tighten the board itself, because a loose PCB hurts every axis.

What a magnet can and cannot touch

An IMU is an accelerometer and a gyro on one board; a 9-axis IMU adds a magnetometer. The first two are MEMS parts, and a static magnetic field exerts no measurable force on a proof mass or a resonating structure, so magnets change nothing they read. Every magnetic concern on this page is about the third sensor, and about the heading it feeds.

The magnetometer measures the total field at the chip: the earth's 25–65 µT depending on latitude (about 50 µT at US mid-latitudes), plus every magnet and every piece of steel within a few enclosure-widths. A magnet fixed to the box is a hard-iron source — a constant offset in the sensor's frame, identical on every sample. Hard- and soft-iron correction notes from MEMS makers put the limit in one line: you can calibrate out only distortion that stays fixed and rigid relative to the sensor. Magnets bonded inside your lid qualify; the steel of a machine floor does not, and it changes each time you swap.

Check what your display actually fuses. Heading can come from GNSS, from the magnetometer, or from a blend, and a 2023 study on magnetometer-based heading correction treats interference detection as the first step before trusting magnetic heading in a disturbed environment. A cab floor with steel, motors and wiring counts as disturbed. The box material plays a part too — see what an enclosure material does to a magnetic sensor's range.

The four mounts, side by side

Here are the mounts people actually reach for on farm machinery, rated for the two things an IMU cares about:

Mount How it holds Magnetometer Accel and gyro Swapping machines
Magnets under the box Strong pull; shear about 20 % of rated pull Hard-iron bias within one box-width, plus machine steel Field has no effect; slides in a hard stop Seconds, no tools
Hook-and-loop strips High pull when clean None; the material reads as air Soft in shear; box tilts and creeps Seconds, alignment varies each fit
Located base plate + strap or clamp Stops or pins locate, strap holds None with aluminum or 316L hardware Stiff path; box moves with the machine Seconds, once each machine has its plate
Elastic band or bungee Variable tension None Compliant; box rocks and lags Seconds, position never repeats

Only the third row gives you repeatable alignment and a stiff path at the same time, which is why it is the answer for boxes that travel between machines.

Where magnets win

Magnets are the right call when the board has no magnetometer and heading comes from GNSS. They need no holes, so the enclosure stays as sealed as you bought it, with the same gland count, and you can move the box in seconds. Size them for shear rather than pull. Magnet suppliers rate pull force straight onto thick steel; on a floor, friction carries the side load at roughly 20 % of that, so a pair rated 30 lb [133 N] of pull holds about 6 lb [27 N] sideways — plenty for a 2 lb [9 N] loaded box in vibration.

Shocks are the exception that bites. A 1 kg box stopping from 10 km/h against cab steel in 10 ms decelerates at about 280 m/s² (28 g) and pulls with about 280 N — ten times that shear hold. Give the magnets a locating rim, a corner stop or a light strap, so a slam becomes a thud instead of a projectile.

Why the located plate and strap win

A plate bolted to each machine turns every swap into the same installation. Stops or pins set the position, so the sensor-to-vehicle axes repeat to the tolerance of the hole — and every degree the box sits rotated would otherwise show up as a degree of yaw in your data. The strap only holds the box down, which means a simple cam buckle still gives you exact alignment. A removable mounting plate also lets you wire the whole box on the bench.

Keep the magnetic path clean and the mechanical path short. Aluminum and austenitic stainless hardware read as air to a magnetometer, so build the stops from those. If the board fixes to the plate with clips, DIN rail clip mounting on a base plate keeps it serviceable; boards without holes have their own answers in mounting a PCB with no mounting holes. We also build boxes with locating holes, dimples and strap bosses drawn into the part — see custom enclosures, delivered in 10 business days counted from your approval of the drawing.

The magnet test on a combine cab floor: 50 µT against 5 µT

The inputs:

  • Earth field at the site: 50 µT (mid-latitude; the field spans 25–65 µT from equator to pole).
  • The box: a typical 5 × 4 × 2 in [127 × 102 × 51 mm] PCB enclosure, with the magnet pair under the floor 1 in [25 mm] from the sensor.
  • The log: 60 s stationary, 10 Hz, 600 samples, engine off, box in its installed spot. Log the raw field components if your tool shows them; hard iron appears as a constant step on each axis.
  • Baseline log: heading 212.4° with 0.3° peak-to-peak scatter; horizontal field magnitude 50 µT.
  • Log with magnets: heading 218.1°; the horizontal components shifted by a constant 5 µT vector.

The rule in words: a hard-iron offset perpendicular to the earth field tilts the computed heading by the angle whose sine is the offset divided by the field. For a magnet small beside its distance to the sensor, field falls with the cube of distance.

The arithmetic:

  • Measured shift: 218.1 − 212.4 = 5.7°.
  • Predicted shift: arcsin(5 ÷ 50) = arcsin(0.10) = 5.7°. The log and the physics agree, so the shift is hard iron from the magnets.
  • Budget: guidance-grade heading wants about 1°, so the largest offset you can carry is 50 µT × sin 1° = 50 × 0.0175 ≈ 0.87 µT.
  • 5 µT misses that budget by more than five times.

Result and decision: move the magnets out from under the box to 5 in [125 mm] from the sensor. That is five times the distance, so 1/125 of the field: 5 µT ÷ 125 = 0.04 µT, inside the 0.87 µT budget with margin. Re-run the 60 s log and accept the mount only when the shift stays under 1°. Run it again on each machine before you trust it, because each floor adds its own steel.

What a loose mount does to the gyro

An accelerometer and a gyro can only measure motion at their own mount point. When the box rocks on its mount, that rocking arrives as real data, mixed into the machine's motion with no way to separate it afterwards. Run the numbers once and you will tighten every strap on the farm: a box rocking ±0.5° at 3 Hz shows a false rate of 0.5 × 2π × 3 ≈ 9.4 °/s — the same rate as a genuine 180° headland turn made in 20 s.

Make the path stiff and short. Pull the strap flat across the widest face, support the box on two edges at least, and keep the plate tight to the floor. Rap the box with a knuckle while logging the gyro: a good mount shows one short spike, and a compliant one rings for a second or two — that ring is the mount's own frequency being written into your data. The board inside needs the same discipline; the rigid IMU mounting checks cover standoffs, posts and clip stiffness. Hook-and-loop holds well until the hooks fill with chaff, so wash the strip and replace it when engagement drops.

The decision, and what to order

  • 9-axis IMU, magnetic heading in the filter: located plate and strap, aluminum or 316L stops, nothing magnetic under the box. Magnets only after the 60-second test passes with them a full enclosure-width out.
  • 6-axis IMU, heading from GNSS: magnets are clean. Buy pull at five times the loaded box weight, count shear at 20 % of pull, and add a locating stop for the 28 g slam.
  • Swapping weekly between machines: a plate on every machine, one box. Draw the locating holes and strap bosses into the enclosure when you order it, and the swap becomes a ten-second job.

Inside the cab, dust is the main enemy and a dust-tight Type 12 build covers it; outside the cab or on a washdown machine, step up to a build rated NEMA 4X / IP66 by the manufacturer, not UL listed, with sealed glands. Every NEMA type or IP code on these enclosures is a manufacturer rating for the specified design, never a UL listing. The enclosure selector walks the environment and size questions when you are ready to order.

The strap wins the swap. The magnets only win when there is no magnetometer to offend — and the 60-second log is what tells you which box you have.

Enclosures for this job

Catalog sizes that suit the job this article answers, picked from its subject; open one for its full specifications.

EnclosureMaterialOutside H x W x D / displayRating
12 × 10 × 6 in304 stainless12 x 10 x 6 inRated NEMA 4X / IP66 by the manufacturer; not UL listed
20 × 16 × 8 in304 stainless20 x 16 x 8 inRated NEMA 4X / IP66 by the manufacturer; not UL listed
24 × 20 × 8 in304 stainless24 x 20 x 8 inRated NEMA 4X / IP66 by the manufacturer; not UL listed

Questions

Will strong magnets damage the accelerometer, gyro or magnetometer?

No. A static magnetic field exerts no measurable force on a MEMS proof mass, and the magnetometer simply reads the field it sits in — the bias is a calibration offset, not damage. Remove the magnets and the readings return to the pre-magnet baseline; log 30 s before and after to see it.

Can I calibrate the magnetometer with the magnets installed?

Yes, while the magnets stay fixed to the box. Rotate the assembled box through a full 360° in its mounting plane and fit the offset — the classic ellipsoid fit in most sensor toolkits. What you cannot calibrate away is the machine's own steel, because it changes with every swap. A calibration done on the tractor can still sit several degrees off on the combine, so re-fit it per machine.

My tractor has GNSS — do I still need the magnetometer?

Single-antenna GNSS gives course over ground, which degrades to noise below about 2 km/h and lies during wheel slip or reversing. Dual-antenna heading is solid but needs a baseline along the roof. Many fusion filters blend in the magnetometer at low speed — exactly where magnetic bias does its damage. Read which sensors your filter enables before trusting magnets.

Is an elastic band or bungee good enough to hold the box?

It holds the box, but it is the worst mount for an IMU. Elastic isolates, and an inertial sensor wants the opposite: every motion the mount absorbs is motion the sensor no longer measures. A bungee-held box rocks at a few hertz over every furrow, and that lands straight in the gyro. Use a located plate and keep the strap short and flat.

Checklist before you order

Specify it once, built to your drawing

  • Environment and NEMA type: Type 1, Type 3R, Type 4, Type 4X, Type 6P, Type 12, Type 13 (manufacturer ratings, not UL listed)
  • Material: 304 stainless steel, 316L stainless steel, Powder-coated carbon steel, Aluminum, Polycarbonate, Fiberglass (FRP)
  • Size: inside or outside height, width and depth, with the depth your deepest component needs
  • Cutouts, glands and windows, dimensioned from one datum on each face
  • Mounting and access: wall, pole or stand, hinge side, mounting panel
  • Quantity: from one piece

Delivered in 10 business days, anywhere in the world. Counted from your order; for custom work, from your approval of the drawing.

Build it from 12 × 10 × 6 inRequest a custom quote

NEMA 4X enclosures: sizes for this job

Keep reading

More on industries and applications

All articles

Buying guides

The guides behind this answer

All guides