You can contact to me using this form.
Content
- 1 What Kind of Magnet Works Best for a Hall Sensor?
- 2 How a Magnetic Encoder Uses a Hall Sensor and Magnet Together
- 3 Magnet Materials: NdFeB, Ferrite, SmCo, and AlNiCo Compared
- 4 Magnetization Patterns: Diametric vs. Axial vs. Multi-Pole
- 5 Key Dimensional Parameters: Diameter, Height, and Air Gap
- 6 Magnetic Field Strength Requirements for Common Hall Sensor ICs
- 7 Centering and Alignment: Why Offset Kills Accuracy
- 8 Temperature Effects on Magnets in Hall Sensor Systems
- 9 Single-Pole vs. Multi-Pole Magnetic Encoder Architectures
- 10 Interference and Shielding Considerations
- 11 Practical Magnet Selection Checklist for Hall Encoder Projects
- 12 Common Application Scenarios and Recommended Magnet Configurations
- 13 Sourcing and Quality Verification of Encoder Magnets
What Kind of Magnet Works Best for a Hall Sensor?
The short answer: a diametrically magnetized permanent magnet — typically made from neodymium (NdFeB) or ferrite — is the most reliable choice for pairing with a Hall sensor. In a Magnetic Encoder system, the magnet sits on the rotating shaft directly above the Hall sensor IC, and the sensor detects changes in the magnetic field direction as the shaft turns. The magnet does not need to be strong; it needs to be consistent, well-centered, and properly oriented for your sensor's detection range.
Most Hall-effect encoder ICs — such as the AMS AS5047, AS5600, or Allegro A1333 — specify a recommended magnetic flux density at the sensor surface, typically between 20 mT and 75 mT. Going outside that range causes clipping or signal dropout. Selecting a magnet that delivers field strength within that window, at the correct air gap, is the single most important design decision in any Hall-based rotary position system.
How a Magnetic Encoder Uses a Hall Sensor and Magnet Together
A rotary Magnetic Encoder converts angular position into an electrical signal. The system relies on two core components: a permanent magnet fixed to the rotating shaft, and a Hall sensor IC mounted on a stationary PCB directly below or above it. As the shaft rotates, the magnetic field vector rotates with it. The Hall sensor measures the X and Y components of that rotating field and computes the angle — usually through an internal CORDIC algorithm — with a resolution that can reach 14 bits (0.022°) on higher-end ICs.
The magnet in this context is not just a source of "magnetism." It is a precision input device. Its diameter, height, material, magnetization axis, and magnetic moment all determine the quality of the field profile presented to the sensor. A poorly selected or off-center magnet introduces harmonic distortion into the angular output — a phenomenon called angle error — which can range from a few tenths of a degree up to several degrees depending on how bad the mismatch is.
Linear Hall sensor setups work similarly, but instead of rotating magnets, they use magnets moving laterally past the sensor face. In both cases, the principle is the same: control the field profile, control the output accuracy.
Magnet Materials: NdFeB, Ferrite, SmCo, and AlNiCo Compared
Four main permanent magnet materials appear in Hall sensor and Magnetic Encoder applications. Each has different energy density, temperature stability, cost, and corrosion resistance. The table below summarizes the key parameters:
| Material | Max Energy Product (MGOe) | Max Operating Temp (°C) | Corrosion Resistance | Relative Cost | Common Use Case |
|---|---|---|---|---|---|
| NdFeB (sintered) | 35 – 52 | 80 – 200 (grade dependent) | Poor (needs coating) | Medium | Robotic joints, servo motors, encoder discs |
| NdFeB (bonded) | 5 – 12 | 120 – 150 | Better than sintered | Low–Medium | Multi-pole encoder rings, compact sensors |
| Ferrite (hard) | 3 – 5 | 250 | Excellent | Very Low | Speed sensors, low-precision position detection |
| SmCo | 18 – 32 | 250 – 350 | Good | High | Aerospace, high-temp industrial encoders |
| AlNiCo | 1.5 – 10 | 450 – 550 | Good | Medium–High | Specialized high-temperature sensing |
For most hobbyist or industrial encoder builds operating below 80°C, sintered NdFeB with a Ni-Cu-Ni coating offers the best balance of field strength, dimensional tolerance, and cost. In automotive or underhood applications where temperatures regularly exceed 120°C, either a high-temperature NdFeB grade (such as 38SH or 38EH) or SmCo becomes necessary to prevent irreversible demagnetization.
Magnetization Patterns: Diametric vs. Axial vs. Multi-Pole
The magnetization direction determines how the magnetic field vector rotates relative to the sensor. Getting this wrong is one of the most common mistakes in DIY encoder builds.
Diametrically Magnetized Discs and Cylinders
A diametrically magnetized cylinder has its north and south poles on opposite sides of the curved surface, not on the flat ends. When placed on a shaft and viewed from the end, the magnet looks like it has a north pole on the left and a south pole on the right (or any other diameter). As the shaft rotates, the field vector at the sensor center rotates in the XY plane — which is exactly what rotary Hall sensor ICs like the AS5600 or MA730 are designed to read. This is the correct magnetization for on-axis rotary Magnetic Encoder applications.
Axially Magnetized Magnets
An axially magnetized cylinder has north on one flat face and south on the other. This creates a strong field pushing straight into the sensor — but that field does not rotate when the magnet spins. The Hall sensor sees only a constant DC field, not an angle. Using an axially magnetized magnet with a rotary encoder IC produces no useful position output, only a static offset. This mismatch is surprisingly common and wastes hours of debugging time.
Multi-Pole Encoder Rings
Multi-pole rings use alternating north-south poles arranged radially or axially around a ring. Each time a pole pair passes the sensor, the sensor outputs one electrical cycle. A ring with 64 poles (32 pole pairs) generates 32 electrical cycles per revolution. Combined with a linear Hall sensor or a dedicated multi-pole encoder IC, this architecture achieves very high pulse counts — equivalent to hundreds of lines on an optical encoder — at a lower cost per unit. These rings are fabricated from bonded NdFeB or flexible rubber magnets and are standard in brushless motor commutation systems and industrial linear stages.
Key Dimensional Parameters: Diameter, Height, and Air Gap
Magnet geometry directly controls the field strength at the sensor surface and the radial field uniformity — the latter determines angle error. Here is what each dimension does:
Magnet Diameter
Larger diameter increases the magnetic moment and therefore the field at a given air gap. However, going too large relative to the sensor's active area introduces gradient effects — the field at the sensor edge differs from the center — which causes nonlinearity. For most single-chip encoder ICs with a sensing area of 1–2 mm, magnets between 4 mm and 10 mm in diameter cover the practical range. AMS recommends a 6 mm diameter diametric magnet for their AS5047 family at a 1.5 mm air gap, delivering approximately 45 mT at the sensor surface.
Magnet Height (Thickness)
Increasing height raises the magnetic flux density and shifts the optimal air gap outward. A short, wide magnet (aspect ratio < 0.5) has a rapidly decaying axial field, requiring a short air gap for adequate strength. A taller magnet (aspect ratio ≥ 1) sustains field strength over a longer distance, giving more mechanical tolerance in the Z-axis. For shaft-end mounting, an aspect ratio close to 1 (height ≈ diameter) is generally a good starting point.
Air Gap
Air gap is the distance between the magnet's sensing face and the top of the Hall sensor package. Most encoder ICs have a recommended operating range — for example, the AS5600 specifies 0.5 mm to 3.0 mm — and performance degrades sharply outside that window. Maintaining air gap tolerance within ±0.2 mm across production units typically requires a mechanical stop or controlled adhesive layer in the assembly process. Field strength falls roughly as the inverse square of air gap distance, so even small variations matter at tight gaps.
Magnetic Field Strength Requirements for Common Hall Sensor ICs
Different encoder ICs have different magnetic operating windows. Using a magnet that delivers field outside the specified range causes the IC to report errors or output incorrect angles. The table below lists the key field requirements for several widely used devices:
| IC Model | Manufacturer | Min Field (mT) | Max Field (mT) | Resolution (bits) | Interface |
|---|---|---|---|---|---|
| AS5600 | AMS-OSRAM | 20 | 70 | 12 | I²C, PWM, Analog |
| AS5047P | AMS-OSRAM | 25 | 90 | 14 | SPI, ABI, UVW |
| MA730 | MPS | 30 | 100 | 14 | SPI |
| TLE5012B | Infineon | 25 | 100 | 15 | SSC (SPI-like) |
| A1333 | Allegro | 20 | 75 | 12 | SPI, PWM, Analog |
| MT6701 | MagnTek | 25 | 120 | 14 | I²C, SSI, PWM |
The AGC (Automatic Gain Control) built into many of these ICs can compensate for moderate field variation, but it has limits. The TLE5012B, for example, reports a dedicated magnitude register — if the value falls below 0x0100 or above 0x0700, the device flags a magnetic field error and the position output becomes unreliable. Always verify field strength with a gaussmeter or by reading the IC's magnitude register during prototype commissioning.
Centering and Alignment: Why Offset Kills Accuracy
Even a perfect magnet produces large angle errors if it is not centered over the Hall sensor. Radial offset — where the magnet center is shifted sideways relative to the sensor center — introduces a once-per-revolution sinusoidal error. The magnitude of this error depends on the offset distance and the sensor's sensitivity to field gradients.
For a 6 mm NdFeB diametric magnet at 1.5 mm air gap used with an AS5047P, a radial offset of just 0.5 mm produces approximately 0.3° of peak angle error. At 1 mm offset, that grows to around 1.2°. In a servo drive application where you need sub-degree accuracy, that is a meaningful problem. Machining a tight-tolerance pocket in the shaft adapter — typically to ±0.1 mm — keeps offset well within acceptable bounds.
Tilt error (where the magnet axis is not parallel to the shaft axis) is generally less severe than radial offset, but in designs using flexible shaft couplings or press-fit magnet holders with poor squareness, it adds a further harmonic error term. Use a flat-bottom magnet pocket rather than a spherical or tapered one whenever possible.
Practical Centering Methods
- Machine a cylindrical recess in the shaft end matching the magnet OD to within 0.05–0.1 mm clearance fit
- Use a custom magnet holder printed with an FDM or SLA printer that also locates the PCB, ensuring sensor-to-magnet concentricity
- Check centering by slowly rotating the shaft one full revolution and monitoring the IC's magnitude register — a centered magnet produces less than 5% variation in magnitude per revolution
- Apply a small drop of threadlocker or epoxy after centering to prevent the magnet from migrating under vibration
Temperature Effects on Magnets in Hall Sensor Systems
Permanent magnets lose flux density as temperature rises. For NdFeB, the reversible temperature coefficient of remanence (Br) is typically −0.11% to −0.13% per °C. Over a 100°C temperature swing (say, from −20°C to 80°C), that is a total Br change of up to 13%. If your magnet delivers 50 mT at 25°C and the IC's lower limit is 20 mT, that leaves a margin of 30 mT — more than enough to survive that swing. But if the air gap is large or the magnet is undersized and already near the minimum at room temperature, thermal effects can push the field below the IC's operating window at high temperatures.
SmCo has a reversible coefficient of only −0.03% to −0.04% per °C, making it the preferred choice for precision instruments operating over wide temperature ranges. It is also immune to the irreversible demagnetization that standard NdFeB grades experience above 80°C if the knee point of the demagnetization curve is exceeded — something to watch for in motors that get hot during stall conditions.
Ferrite magnets actually have a positive temperature coefficient for coercivity, meaning they become harder to demagnetize at higher temperatures — but their already low energy product limits their field contribution at any temperature, so they are rarely the right choice for precision Magnetic Encoder applications unless cost absolutely dominates.
Single-Pole vs. Multi-Pole Magnetic Encoder Architectures
The choice between a single diametric magnet and a multi-pole encoder ring shapes the entire mechanical and electrical design of the Magnetic Encoder system.
Single-Pole (Diametric) Architecture
One diametric magnet on the shaft end, one angle-sensing IC below it. This gives absolute position over a full 360° with a single revolution. Advantages include simplicity, low part count, and easy firmware integration — you read one SPI or I²C register and get an absolute angle. Disadvantages include limited resolution (up to 14 bits with top-tier ICs) and sensitivity to magnetic interference from motor windings or nearby iron cores. For servo motors and robotic joints, this architecture dominates because absolute position on power-up is essential.
Multi-Pole Ring Architecture
A ring with alternating poles passing a Hall sensor generates a quasi-sinusoidal output per pole pair. A ring with 64 poles generates 32 electrical cycles per revolution, and interpolation within each cycle can push effective resolution to 10,000 counts per revolution or higher. The trade-off is that output is incremental, not absolute — the system needs an index pulse or a home sequence on startup. Multi-pole rings are common in CNC machine tools, industrial servo systems, and wheel speed sensors where high resolution and robustness to contamination matter more than absolute startup position.
Hybrid Systems
Some designs combine a multi-pole ring for high-resolution incremental output with a separate single-pole magnet on a coaxial gear (geared down, so it rotates once per several motor revolutions) to provide multi-turn absolute position. This is the approach used in many industrial absolute encoders. The Hall sensor ICs reading each magnet operate independently and the microcontroller combines both outputs to reconstruct full multi-turn absolute position.
Interference and Shielding Considerations
Hall sensors are passive magnetic detectors — they respond to whatever magnetic field is present at the sensing element, from any source. In a motor assembly, stray fields from the stator windings, rotor back-iron, and nearby bus bars can all corrupt the encoder output. The effect shows up as a periodic angle error at the electrical frequency of the motor, or as a static offset that changes with motor current.
Strategies for managing interference include:
- Increasing magnet strength: A stronger signal from the encoder magnet improves the signal-to-noise ratio against stray fields. Moving from 40 mT to 60 mT at the sensor surface directly reduces the relative impact of a 3 mT stray field from 7.5% to 5%.
- Back-iron or flux concentrator: A soft iron disc placed behind the encoder magnet (on the side away from the sensor) concentrates flux toward the sensor and partially shields against axial interference from the motor rotor.
- Sensor placement: Positioning the encoder at the non-drive end of the motor, as far as physically possible from the stator, reduces field coupling. Adding 10–15 mm of axial distance between the last winding and the magnet typically halves the stray field contribution.
- Differential sensing ICs: Some encoder ICs use differential Hall sensor pairs to cancel homogeneous external fields — the Infineon TLE5012B is one example. This architecture rejects uniform fields while preserving the rotating gradient of the encoder magnet.
- Magnetic shield housing: A mu-metal or silicon steel cup around the PCB and magnet assembly blocks external interference at the cost of adding weight and complexity.
Practical Magnet Selection Checklist for Hall Encoder Projects
Before ordering magnets for a Hall sensor or Magnetic Encoder build, run through these checkpoints:
- Confirm the encoder IC's required field range (mT) from its datasheet — both minimum and maximum.
- Determine the air gap your mechanical assembly can maintain, including manufacturing tolerances and thermal expansion.
- Use the encoder IC manufacturer's magnet selection tool (AMS, Infineon, and MPS all provide these) or a FEA simulation to confirm field at the sensor surface for your chosen magnet geometry and air gap.
- Specify diametric magnetization explicitly on the purchase order — do not assume; many standard catalog magnets are axially magnetized.
- Check the operating temperature range. If the environment exceeds 80°C, upgrade to an SH, UH, or EH grade NdFeB, or switch to SmCo.
- Design a mechanical centering feature in the shaft adapter or magnet holder to keep radial offset below 0.2 mm.
- Specify surface coating if the magnet will be exposed to humidity, lubricants, or salt spray. Ni-Cu-Ni is the standard; epoxy or parylene coatings provide better chemical resistance.
- After assembly, verify field strength by reading the IC's magnitude or AGC register and confirm it sits in the middle third of the allowed range.
- Rotate the shaft one full revolution and log the magnitude register — variation greater than ±10% indicates centering or field uniformity problems.
- Repeat the field verification over the full operating temperature range if accuracy is critical — thermal demagnetization shifts the operating point and can move a borderline design outside the IC's acceptable window.
Common Application Scenarios and Recommended Magnet Configurations
Different end uses impose different requirements on the magnet. The following profiles cover the most frequent Hall sensor encoder applications:
Brushless DC Motor Commutation
Three Hall sensors arranged 120° apart detect the rotor pole positions to switch motor phases. The rotor itself carries the encoder magnets — either the main rotor poles or a dedicated encoder ring. In this context, a multi-pole ring bonded to the rotor back-iron is common. The magnetic poles of the ring must align precisely with the rotor's electrical phase, or commutation timing errors will reduce efficiency and torque output. Resolution requirements here are modest (3 or 6 pulses per revolution for six-step commutation), but field uniformity and thermal stability matter because automotive underhood temperatures frequently exceed 125°C.
Robotic Joint Actuators
Modern collaborative robot joints use a single diametric NdFeB magnet on the motor shaft paired with a 14-bit angle IC. The encoder provides both commutation feedback for the motor controller and position feedback for the joint control loop. Key requirements here are low angle error (better than 0.1° at system level after calibration), compact axial length (often below 5 mm total encoder stack height), and immunity to the stray fields from the motor windings. A 6 mm × 2.5 mm NdFeB N45 diametric disc with Ni coating is a widely used configuration in this application, paired with an AS5047P or TLE5012B at a 1.0–1.5 mm air gap.
Automotive Throttle Position and Steering Angle Sensors
Automotive Hall sensor position systems operate over −40°C to +150°C and must survive 10–15 years of vibration, thermal cycling, and chemical exposure. SmCo magnets are the standard choice here despite their higher cost. The sensor ICs in automotive applications are AEC-Q100 qualified and often use redundant dual-die sensor elements for functional safety compliance under ISO 26262. Magnet tolerances are tighter than industrial grades — typically ±5% on Br — to ensure consistent output across the production population.
3D Printers and CNC Machines
Hobbyist and prosumer motion systems frequently use the AS5600 or MT6701 with a small diametric NdFeB magnet for closed-loop stepper or BLDC control. Operating temperatures are benign (below 50°C), fields are clean, and cost sensitivity is high. A 5 mm × 3 mm or 6 mm × 2.5 mm N35 or N42 diametric NdFeB magnet from any reputable supplier works reliably in this context. The main failure mode is using an axially magnetized magnet (much more common in catalog stock) rather than a diametrically magnetized one — always verify magnetization direction when ordering.
Sourcing and Quality Verification of Encoder Magnets
The quality of small permanent magnets varies enormously between suppliers. Cheap magnets from unverified sources often have:
- Remanence (Br) 10–20% below the stated grade
- Magnetization axis deviation of several degrees from nominal
- Dimensional tolerances of ±0.3 mm or worse
- Inconsistent coating adhesion that fails under thermal cycling
For prototype work, reputable small-quantity suppliers such as K&J Magnetics, Supermagnete, and Arnold Magnetic Technologies offer well-characterized magnets with traceable lot documentation. For production volumes, request a material certificate confirming Br, Hcj, and BHmax, and spot-check incoming lots with a gaussmeter against the spec. A 5% Br variation across a production lot causes a corresponding 5% variation in field at the sensor — manageable if the nominal operating point is centered in the IC's window, but problematic if the design is already close to the edge.
Encoder IC manufacturers themselves sell application-specific magnets — AMS-OSRAM offers a range of diametric NdFeB discs validated against their ICs, and Infineon provides matched magnet kits for their TLE5012B. These cost more per piece than generic catalog magnets but eliminate the risk of field mismatches and come with application notes confirming which air gap range produces compliant field levels.



Français
Español
Türk
++86 19941472007





.jpg)




