QMC5883L compass: specs and pinout
A 3-axis magneto-resistive magnetic field sensor chip with a 16-bit ADC and I2C interface, used for compass heading.
Specs
| Spec | Value | Source |
|---|---|---|
| Supply voltage VDD | 2.16 V min, 3.6 V max | source Table 2 Specifications (p.4) |
| I/O voltage VDDIO | 1.65 V min, 3.6 V max (Table 2); pin table says 1.71 V to VDD | source Table 2 (p.4); Table 5 pin 13 (p.6) |
| Interface | I2C, standard 100 kHz and fast 400 kHz; external pull-up resistors required | source Section 5.4 |
| I2C address | 0x0D (0001101), 7-bit | source Section 5.4 |
| Field range | +/-2 G or +/-8 G, programmable | source Table 2 Specifications (p.4) |
| Output data rate | 10, 50, 100 or 200 samples/s | source Table 2 Specifications (p.4) |
| Field resolution | 2 mGauss (standard deviation, FS +/-2 G) | source Table 2 Specifications (p.4) |
| Continuous-mode current | 75 uA typ at 10 Hz (low power mode); 450 uA typ at 200 Hz | source Table 2 Specifications (p.4) |
| Operating temperature | -40 to 85 C | source Table 2 Specifications (p.4) |
| Absolute maximum VDD | 5.4 V | source Table 3 (p.5) |
Power
| Value | Source | |
|---|---|---|
| Supply | VDD 2.16-3.6 V (chip) | source Table 2 (p.4) |
| Current | 75 uA typ at 10 Hz low-power mode; standby 3 uA | source Table 2 (p.4) |
Chip pins
These are the pins of the chip on the module, from the chip datasheet. The module's own header may label or expose them differently.
Pins above are the QMC5883L chip (LGA-16) pins. The compass module board (regulator, pull-ups, header order, 5 V tolerance) is not covered by an official document.
| Pin | Function | Voltage | Notes | Source |
|---|---|---|---|---|
| SCL | Serial clock, I2C | Chip pin 1 | source Table 5 (p.6) | |
| SDA | Serial data, I2C | Chip pin 16 | source Table 5 (p.6) | |
| VDD | Power supply (2.16V to 3.6V) | 2.16-3.6 V | Chip pin 2 | source Table 5 (p.6) |
| VDDIO | IO Power Supply (1.71V to VDD) | 1.71 V to VDD | Chip pin 13 | source Table 5 (p.6) |
| DRDY | Data ready, interrupt pin; default low, data ready high until data register is read | Chip pin 15 | source Table 5 (p.6) | |
| GND | Supply ground | Chip pins 9 and 11 | source Table 5 (p.6) |
Build with it
Project ideas for the QMC5883L compass. Each link opens Soldr with the prompt filled in; Soldr assigns the pins, checks power and shows how to wire every part.
- Compass heading display: Both parts use I2C on the ESP32's 3.3 V bus, within the chip's 2.16-3.6 V supply range. Keep the sensor away from magnets and iron.
- Servo compass pointer: The servo runs from its own 5 V supply with grounds joined, not from the ESP32 3.3 V pin. Mount the sensor away from the servo, whose motor and magnets disturb the field.
- Tilt-aware heading: Both sensors share the I2C bus at different addresses; the QMC5883L uses 0x0D. Combine accelerometer tilt with the magnetic field in code.
Common mistakes
- Using the wrong I2C address: the default address is 0x0D (source).pdf, Section 5.4)
- Treating the chip limits as module limits: the chip VDD is 2.16-3.6 V with absolute maximum 5.4 V, and whether the module has a regulator is not covered by this document (source).pdf, Tables 2-3)
- Placing it near ferrous parts or magnets: the datasheet says to keep ferrous components away from the sensor (source).pdf, layout guidance section)
Not covered by the official source
- Module board not covered by an official document.
- Table 2 values are from p.4.
Sources
- link).pdf (QMC5883L Datasheet, Doc 13-52-04, Rev. A, QST Corporation)