Skip to content

Inconsistent X/Y axis magnetic field readings, incorrect temperature reading #5

@asfarley

Description

@asfarley

I am using:

  • A custom board based on the Leonardo (Atmega32u4)
  • TMAG5273A1
  • Arduino IDE 2.2.1
  • SparkFun TMAG5273 Arduino Library 1.0.3
  • Board powered by USB at 5.08V, serial port working, LED output working

Steps to reproduce

Run BasicReadings code. Observe that Z-axis readings are consistent/make sense based on magnet presence, but X/Y axis readings seem to just be jumping around without any relationship to field strength.

Also, the temperature reading is indicating -266C. It's about 21C here.

Expected behavior

I expect a close-to-0 reading on magnetic axes when they're not exposed to a magnet. I expect a temperature reading around 21C.

Here's what I'm seeing from the Serial Monitor:

-266.31 C
(0.94, -0.47, -0.03) mT
-266.31 C
(0.94, -0.66, -0.03) mT
-266.31 C
(0.51, -0.70, -0.02) mT
-266.31 C
(0.70, -0.66, -0.02) mT
-266.31 C
(0.94, -0.35, -0.02) mT
-266.31 C
(0.27, -0.82, -0.02) mT
-266.31 C
(0.86, -0.39, 0.00) mT
-266.31 C
(0.86, -0.86, -0.03) mT
-266.31 C
(0.43, -0.35, -0.03) mT
-266.31 C
(0.94, -0.47, -0.02) mT
-266.31 C

I'll do some lower-level debugging and post the results here.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions