Table of Contents

Magnetic angle sensors

MT-6816 A magnetic angle sensor is a contactless electronic device used to measure the rotational position of a shaft or object. It works by detecting the orientation of a magnetic field—usually from a small permanent magnet attached to the rotating part—and converting that physical position into a digital or analog signal.

How It Works

Technical Comparison of Several Typical Magnetic Angle Sensors

FeatureAS5047PAS5600MT6701MT6816MT6835TLE5012B
Max Resolution14-bit (SPI)12-bit (I²C)14-bit (I²C/SSI)14-bit (SPI)21-bit (SPI)15-bit (SSC/SPI)
InterfacesSPI, ABI, UVW, PWMI²C, PWM, AnalogI²C, SSI, ABZ, UVW, PWMSPI, ABZ, UVW, PWMSPI, ABZ, UVW, PWMSSC (SPI), IIF, HSM, PWM
Max Speed (RPM)28,000Low speed (potentiometer)55,00025,000120,000~10,000+
Latency< 1 µs (DAEC)High (I2C)< 5 µs< 2 µs Ultra-lowLow
Accuracy (Typ)±0.34° at speed±0.5° (static)±1.0°High precisionMicro-level±1.0°
Best ForHigh-speed BLDCContactless KnobsGeneral PurposeStandard RoboticsHigh-end ServoAutomotive/Industrial

Key Product Highlights

Common Sensor Types

MT-6816

MT-6816 The MagnTek MT6816 is a high-speed, 14-bit magnetic angle sensor IC based on advanced Anisotropic Magnetoresistive (AMR) technology. It is specifically designed to provide absolute 0°–360° angle sensing for high-performance applications like BLDC motor control and robotics.

Core Technical Specifications

According to official technical documents from MagnTek and Novosense, the sensor features the following primary specifications:

MT-6816 Pinout

PinPin NameType
1CSNInputChip Select (Active Low) for SPI communication
2SCKInputSerial Clock input for SPI
3SDOOutputSerial Data Output (MISO) for SPI
4SDI / SDAI/OSerial Data Input (MOSI) for 4-wire SPI, or Data I/O for 3-wire SPI
5TEST / PWMOutputPWM absolute angle output; also used as a factory test pin
6OUT / Z / WOutputZ-index for ABZ mode, or W phase for UVW mode
7VSSPowerGround (0V)
8VDDPowerSupply Voltage (3.0V to 5.5V)

Pin Functionality by Mode

The output pins (Pins 5 and 6) and the SPI pins change behavior based on your interface choice:

Connection Notes

Arduino example

To read the 14-bit absolute angle from the MagnTek MT6816 using an Arduino, you use the SPI interface. The sensor requires SPI Mode 3 (CPOL=1, CPHA=1) and a clock speed up to 16MHz.

Arduino Wiring

Connect the MT6816 to your Arduino (e.g., Uno/Nano) as follows:

Example Sketch

This code initializes the SPI bus and reads the absolute angle from registers 0x03 and 0x04

#include <SPI.h>
 
const int CS_PIN = 10;
const byte READ_REG_03 = 0x83; // Read command for Register 0x03
 
void setup() {
  Serial.begin(115200);
  pinMode(CS_PIN, OUTPUT);
  digitalWrite(CS_PIN, HIGH);
 
  SPI.begin();
}
 
void loop() {
  uint16_t angle = readMT6816();
 
  // Convert 14-bit raw value (0-16383) to degrees (0-360)
  float degrees = (angle * 360.0) / 16384.0;
 
  Serial.print("Raw: ");
  Serial.print(angle);
  Serial.print(" | Angle: ");
  Serial.println(degrees);
 
  delay(100);
}
 
uint16_t readMT6816() {
  // MT6816 requires SPI Mode 3, MSB first, max 16MHz
  SPI.beginTransaction(SPISettings(10000000, MSBFIRST, SPI_MODE3));
 
  digitalWrite(CS_PIN, LOW);
 
  // Step 1: Send read command for the first register
  SPI.transfer(READ_REG_03);
 
  // Step 2: Read two bytes
  uint8_t highByte = SPI.transfer(0x00);
  uint8_t lowByte = SPI.transfer(0x00);
 
  digitalWrite(CS_PIN, HIGH);
  SPI.endTransaction();
 
  // Combine bytes: The 14-bit angle is in highByte and bits [7:2] of lowByte
  uint16_t rawData = (highByte << 8) | lowByte;
  uint16_t angle = (rawData & 0x3FFF); // Mask to 14 bits
 
  return angle;
}

Key Coding Details

MT-6835

MT-6835 The MagnTek MT6835 is a fourth-generation magnetic angle encoder IC that significantly improves upon the MT6816, offering higher resolution and specialized calibration features. Based on Anisotropic Magnetoresistive (AMR) technology, it is designed for ultra-high-precision applications such as absolute-value servo motor control and high-speed robotics.

Technical Specifications

According to data from MagnTek and Novosense, the MT6835 features the following core parameters:

Output Interfaces

The MT6835 provides several independent output modes, making it a versatile replacement for optical encoders:

MT6835 Pinout

PinPin NameTypeFunction Description
1U / CALOutput/InputU phase for UVW mode; also used as an Auto-Calibration trigger
2VOutputV phase for UVW commutation mode
3WOutputW phase for UVW commutation mode
4VSSPowerGround (0V)
5PWMOutput12-bit Pulse Width Modulation absolute angle output
6AOutputA channel for incremental ABZ quadrature mode
7BOutputB channel for incremental ABZ quadrature mode
8ZOutputZ (Index) pulse for incremental ABZ mode
9MISOOutputMaster In Slave Out for SPI communication (4-wire)
10MOSIInputMaster Out Slave In for SPI communication (4-wire)
11SCKInputSerial Clock for SPI (up to 16MHz)
12CSNInputChip Select (Active Low) for SPI
13VDDPowerSupply Voltage (3.0V to 5.5V)
14VOUTPowerInternal LDO output (typically connected to a decoupling capacitor)
15NCNo Internal Connection (Leave floating)
16NCNo Internal Connection (Leave floating)

Key Hardware Considerations

MT-6835 Arduino example code

To read the 21-bit absolute angle from the MT6835, you must use the SPI interface. Because 21 bits exceed a standard 16-bit integer, you will need to store the data in a uint32_t.

Wiring (MT-6835 to Arduino)

Example code

The MT6835 stores its 21-bit angle across three registers starting at 0x03.

#include <SPI.h>
 
const int CS_PIN = 10;
const byte READ_CMD = 0x83; // Read bit (0x80) + Register address (0x03)
 
void setup() {
  Serial.begin(115200);
  pinMode(CS_PIN, OUTPUT);
  digitalWrite(CS_PIN, HIGH);
 
  SPI.begin();
}
 
void loop() {
  uint32_t rawAngle = readMT6835();
 
  // Convert 21-bit (0 to 2,097,151) to degrees
  float degrees = (rawAngle * 360.0) / 2097152.0;
 
  Serial.print("21-bit Raw: ");
  Serial.print(rawAngle);
  Serial.print(" | Angle: ");
  Serial.println(degrees, 4); // 4 decimal places for precision
 
  delay(50);
}
 
uint32_t readMT6835() {
  // MT6835 SPI: Mode 3, MSB first, up to 16MHz
  SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE3));
  digitalWrite(CS_PIN, LOW);
 
  SPI.transfer(READ_CMD);
  uint32_t b1 = SPI.transfer(0x00); // Bits 20-13
  uint32_t b2 = SPI.transfer(0x00); // Bits 12-5
  uint32_t b3 = SPI.transfer(0x00); // Bits 4-0 + Status bits
 
  digitalWrite(CS_PIN, HIGH);
  SPI.endTransaction();
 
  // Combine the bytes:
  // The 21-bit angle is packed into the 24 bits of data returned.
  // Format: [Byte1: 8 bits][Byte2: 8 bits][Byte3: 5 bits + 3 status bits]
  uint32_t combined = (b1 << 16) | (b2 << 8) | b3;
  uint32_t angle = combined >> 3; // Shift right by 3 to remove status bits
 
  return angle;
}

Critical Implementation Details

Sensor topics on lamaPLC

PageDateTags
2026/02/12 22:14, , , , , , , , ,
2026/04/15 13:42, , , , , , , , ,
2026/04/11 14:50, , , , , , , , , ,
2026/04/15 16:59, , , , , , , , ,
2026/02/14 22:31, , , , , , , , , ,
2026/03/21 19:20, , , , , , ,
2026/02/15 20:33, , , , , , , , ,
2026/02/14 23:38, , , , , , , , , , , ,
2026/02/14 22:24, , , , , , , , , , , , ,
2026/03/28 22:50, , , , , , ,
2026/02/15 20:40, , , , , , , , , , , , , ,
2026/02/14 23:36, , , , , , , ,
2026/02/14 23:37, , , , , , , , , , ,
2026/02/14 22:40, , , , , , , , , ,
2026/02/14 22:39, , , , , , , , , , ,
2026/02/14 23:39, , , , , , , , , , , , ,
2026/02/14 22:16, , , , , , , , , , , , ,
2026/03/21 22:25, , , , , , , , , , ,
2026/02/14 22:55, , , , ,
2026/02/14 18:19, , , , , , , , , , ,
2026/02/15 20:42, , , , , , , , ,
2026/02/14 18:11, , , , , , , ,
2026/02/15 20:44, , , , , ,
2025/05/31 21:32, , , , , , , ,
2026/02/14 19:29, , , , , , , , , , , , , ,
2026/03/21 20:45, , , , , , , , ,
2023/07/01 15:29, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/14 22:18, , , , , , , , , , , , , , , , , , , ,
2026/03/22 00:26, , , , , , , , ,
2026/02/14 22:19, , , ,
2026/02/14 22:09, , , , , , , , , , , , , , , ,
2026/02/14 21:54, , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/15 23:59, , , , , , , , , , ,
2026/03/28 18:02, , , , , , , , , , , , , , , , , , ,
2026/02/14 23:58, , , , , , , , , , ,
2026/02/14 23:35, , , , ,
2026/02/14 22:24, , , ,
2026/02/14 23:38, , , , , , ,
2026/02/14 17:38, , , , , , , , , ,
2026/02/15 17:35, , , , , , , , , , ,
2026/02/15 20:20, , , , , , , , , , , , , , , , , ,
2026/03/22 01:24, , , , , , , , , , , ,
2026/02/14 21:17, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/15 16:39, , , , , , , ,
2026/02/14 22:23, , , , , , , ,
2025/09/23 16:59, , , , ,
2026/02/14 17:42, , , , , , ,
2026/02/14 22:33, , , , , ,
2026/02/14 22:33, , , , , , , , , , ,
2026/02/15 20:27, , , , , , , , , , , , , , , ,
2026/02/15 20:29, , , , , , , , , , , , , ,
2026/02/15 22:34, , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/14 22:22, , , , , , , , , , , , ,
2023/06/24 22:43, , , , , ,
2026/02/14 22:21, , , , , , , , , , ,
2026/02/14 22:22, , , , , , , ,
2026/02/14 22:32, , , , ,
2026/02/14 23:00, , , , , , , , ,
2026/03/05 20:19, , , , , , , , , , , , , , , , ,
2026/02/14 17:49, , , , , ,
2025/12/10 17:50, , , ,
2025/11/09 17:38, , , , , , , ,




This page has been accessed for: Today: 1, Until now: 92