This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMAG3001: Immunity to external magnetic fields

Part Number: TMAG3001


We are considering using the TMAG3001 and a magnet separated by a spring to measure force in a robotic application.  The application environment is noisy, likely with lost of stray, external magnetic fields. How can we calibrate out those external fields ?

  • Michael,

    Welcome to E2E, thanks for reaching out with your question.  TMAG3001 will measure the total magnetic field at the sensor location, so stray fields can pose a challenge.

    • If the timing of the stray fields correlate with specific positions, then you might be able to create a look up table. 
    • Another possibility is that the fields are faster transient events and you might be able to integrate this noise out by over-sampling.  You could either increase the averaging on chip or capture multiple samples and average on the MCU
    • If neither of the above are workable options, you might be able to create a differential signal by placing a second sensor.  Suppose we place two sensors side-by-side for an on-axis angle measurement.  If rotated 180° from each other the result will produce sin+, cos+, sin-, cos- outputs from two devices.  Any stray field would generally be very similar between the two devices.  If we subtract sensor2 outputs from sensor1, we could double our measured input amplitude while cancelling out the common mode stray field.  I've put together an example of how this could work with our free simulation tool: www.ti.com/TIMSS

      I've attached a configuration file which you can import into the TI Magnetic Sense Simulator here:
      {
        "version": "3.5.0",
        "design_name": "",
        "magnet_id": 2,
        "poles": 2,
        "material_id": 1,
        "grade_id": 1,
        "select_remanence": "br_average",
        "remanence": 1200,
        "temperature": 20,
        "temperature_coefficient": -0.12,
        "coercivity": 10.9,
        "function_id": 4,
        "magnet_geometry": {
          "outer_diameter": 10,
          "height": 2
        },
        "magnet_position": {
          "x_position": 0,
          "y_position": 0,
          "z_position": 0
        },
        "magnet_angle": {
          "x_angle": 0,
          "y_angle": 0,
          "z_angle": 0
        },
        "magnet_movement": {
          "arc_length": 360
        },
        "sim_setting": {
          "angular_step_size": 1
        },
        "sensor": [
          {
            "sensor_id": "TMAG3001",
            "sensor_position": {
              "x_position": 1,
              "y_position": 0,
              "z_position": -5
            },
            "sensor_angle": {
              "x_angle": 0,
              "y_angle": 0,
              "z_angle": 0
            },
            "custom_inputs": {
              "variant": "TMAG3001A2YBGR",
              "applied_vcc": 3.3,
              "temperature_compensation": 0,
              "averaging": 1,
              "maximum_input": 120
            },
            "id": -1
          },
          {
            "sensor_id": "TMAG3001",
            "sensor_position": {
              "x_position": -1,
              "y_position": 0,
              "z_position": -5
            },
            "sensor_angle": {
              "x_angle": 0,
              "y_angle": 0,
              "z_angle": 180
            },
            "custom_inputs": {
              "variant": "TMAG3001A2YBGR",
              "applied_vcc": 3.3,
              "temperature_compensation": 0,
              "averaging": 1,
              "maximum_input": 120
            },
            "id": -2
          }
        ]
      }

    Thanks, 

    Scott

  • Hi Scott,  

    Thanks for the idea !  Seems simple enough, I think I understand the concept.  I guess it works for all the cases except when the signal to measure is perfectly aligned with the external field.  A second aspect is that I am not always on-axis.  I need to measure normal and shear forces.  So would I need 3 hall sensors ?

    I had thought to use a second hall sensor perhaps 5 - 10 cm away from the measurement point, at a distance where the magnetic field from my magnet is .  And if oriented 180 degrees from the signal measurement, I can just do the sum.  I expect this will work in all cases of stray magnetic fields but assumes that the stray field is uniform over the distance between the two sensors and that the magnetic field from my magnet does not alter the stray magnetic fields. I admit that I have no experience with stray magnetic fields or working in noisy environments.  Which strategy do you think works best ?

    Can you also recommend one of these hall sensors that integrates the second sensor and performs the cancelation directly and with a small package ?  I need something in a relatively small package.

    Thanks,

    Michael

  • Michael,

    Magnet fields decrease in magnitude exponentially as distance from the source increases.  Having your sensors close to each other will best match the stray component they are exposed to.  However, if you knew what the source might be (like a long current carrying wire) you might be able to place the second sensor further from the signal magnet, but equidistant to the wire.

    The goal with the setup I suggested was to reject the field component in the XY plane, particularly when it is aligned to the signal.  If our two sensors produce values of:

    Out1 = X + stray

    Out2 = -X + stray

    Then:

    Out1-Out2 = (X + stray) - (-X + stray) = 2X

    This will not work exactly the same when shear causes the alignment of the magnet to shift. The worst case condition is when the shear is in the same direction as the sensors are spaced apart.  When this happens, the magnet will travel towards one sensor and away from the other.  Your relative amplitude of Out1 and Out2 will not match.  

    It is likely possible to create a similar schema with 3 sensors in such a way to create better overall rejection, but it will require a bit more effort to process the signals.  I am not quite sure if it would work out better to have them all in a straight line or if you would do better with them spaced to be 120° rotated about the center of the magnet.  I suspect that if you are able to work out the signal processing, that the latter option might work out more cleanly.

    We don't yet have any device with stray field rejection implemented.  To minimize size TMAG3001 is going to be your best option.

    Thanks,

    Scott

  • Hi Scott,

    Thanks for the further feedback and ideas.  We'll have to try the different orientations, as you suggest, and see what works best.

    Thanks !

    Michael