Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

TMAG5170: Magnetic ring rotation detection

Part Number: TMAG5170
Other Parts Discussed in Thread: TMAG5110, DRV5055, TMAG5111, TMAG6180-Q1

Tool/software:

We are exploring the use of TI's hall encoders to optimize the detection of the rotation of a 90mm ring.
Currently we have two separate hall latches that can detect about a 2 degree rotation of a 90mm ring.
However, 1 degree detection is preferred for user experience. We only need incremental encoding including direction.
Would this be possible with TI's 3D linear hall effect sensors (e.g. TMAG5170)? Or otherwise AMR type sensors?

The current mechanical situation is as follows (orange is a magnetized band with ~2mm poles, specs can be changed):

  • Hi,

    Thanks for posting your question to the Sensors forum!

    I encourage you to take a look at our free online simulation tool, TI Magnetic Sense Simulator (TIMSS). You can access TIMSS here: https://webench.ti.com/timss/

    In TIMSS, you can specify the magnet and device, relative location and magnet motion. You can use the incremental encoding example reference design as a starting point by clicking "open design" for the incremental encoding reference design on the TIMSS home page. By default, this design uses a 10-pole BDM-12 type ring magnet, and the device selected is our TMAG5110, which is a 2D Hall effect latch, but these configurations can be modified, along with the device location. Please feel free to follow up if you have additional questions!

    The TMAG5110 can be used instead of two single hall latch sensors because it has two integrated hall latch sensors spaced at a 90° angle from each other, which allows each sensor to detect a quadrature component of the same magnetic field. The TMAG5110 is available in XY, ZX, and ZY variants. The product page is linked here: https://www.ti.com/product/TMAG5110 

    Best regards,

    Jesse

  • Thanks for the quick response Jesse. 

    Would I be right to assume that our resolution is inherently limited by the magnet pole width in the ring if we use latches? Currently we have about 2mm, which is about the limit according to the manufacturer. Smaller pitch might also be difficult for the sensor to measure.

    I was looking into different sensor solutions to see if I can increase the resolution of rotation to about 1 degree or better. Do you know if TI has a sensor which can help with this? Perhaps linear hall or AMR? We can adjust the magnets we have embedded in the rotating ring to whatever topology would work best.

  • Hi,

    For incremental rotary encoding, the angle resolution will be dependent upon the number of magnetic poles

    For example, in the incremental rotary encoding example in TIMSS, a 10 pole ring magnet with a 2D latch like the TMAG5110, we end up with ~18° of resolution --> 360 / (10*2).

    Our linear hall effect devices and AMR angle sensors can be used to perform absolute angle encoding. We offer analog, I2C, and SPI outputs for these devices. 

    For AMR, you could take a look at the TMAG6180-Q1 (analog sin/cos outputs)

    For linear hall effect sensors, we have devices like the DRV5055 (1D linear), TMAG5170 (3D linear, SPI output), and TMAG5173 (3D linear, I2C output).

    Best regards,

    Jesse

  • So while in theory rotation detection only needs one axis, the sensing axis needs to line up with the magnet orientation. It seems that something like the DRV5055 is not suitable for this application (chip is mounted perpendicular to the magnet ring). So if cost allows, a 3D sensor seems beneficial because it always has an axis that lines up right?

    Would a chip like the TMAG5170 mounted like in the mechanical drawing send in previous post enable 1 degree sensing resolution? Would pole pitch matter much in this case? Can you determine direction with a single chip?

    Im still reading all the datasheets and application notes, but it is not yet fully clear to me if AMR would be advantageous in this case. Sine/cosine output would load our main processor too much. If the chip has no onboard CORDIC,I assume a co-processor would be the solution? Does TI have any recommendations for this, possibly including the required code/firmware? 

  • So I have loaded our situation into TIMSS, but I am not fully sure how to interpret the outputs:

    How can I know if this is suitable as incremental encoder? Could CORDIC process this to a position within the magnet pole?
    This is with 64 poles, our current situation has about 140, but we are open to changing it to whatever is necessary/possible.

  • Hello Jesse,

    Thanks for the responses, Jesse is currently out of the office on holiday so I will respond on his behalf for today.

    To get angular data out of the magnet you typically require two axis of direction for information or a specific offset between the linear sensors. So a DRV5055 would require two sensors in order to extract angle data and directional data. A sensor like TMAG5170 could in fact achieve less than a degree of sensing resolution but I am not sure if it would be the best solution for your current magnet configuration and your specific application.

    The reason I say this because the internal CORDIC for our 3D sensors like TMAG5170 or TMAG5173 will generate a value from -180to 180 degrees after every combination of poles, meaning that if you are using a magnet with 40 poles would see this repeated a total of 20 times. You can see this in TIMSS, since it will show you the  expected output of the CORDIC under the "Device Output 2" graph. There are different axis combinations you can choose from since it is a 3D sensor but for something like you showed above the XY combination may be the best option. This is what it would look like:

    If you are trying to keep track of the absolute position of the ring magnet then a solution like this may not be the best and you may want to use a diametric magnet with a single pole pair. Ring magnets with many pole pairs are great incremental applications to use with latches so you could always downsize the use of two latches with the TMAG5110 or TMAG5111 which are 2D latches. The minimum detectable angle you could keep track of would be mainly be dependent on the amount of poles on your magnet but the higher in pole count you go the weaker your magnets get. My recommendation would be to download the angle data provided by TIMSS and cross check the angle provided by the sensor in reference to simulation angle to see if this meets your performance/error requirements. There are things you can do to reduce performance/error so let us know if there are questions on that.

    For the AMR solutions we currently offer they don't have a built in CORDIC so an external microcontroller would have to process the sin/cos data output from the sensor in order to convert that into angle. We do have example code on how to perform the angle calculations based on sin/cos data this can be found in the TMAG5170 example code. A user can use the internal CORDIC to get 0.25 degrees of resolution but if the angle is calculated externally users could improve the resolution.

    Based on the image you provided it does look like the TMAG5170 would generate an angle for you application. My two main concern with using a sensor like this would be if the ring is expected to spin fast then this device may not be the best solution due to the sampling time and this is where something like our AMR TMAG6180-Q1 would be useful. The other concern would be sensor placement and calibration, since we are using linear field data to capture the angle we would need to ensure our placement is great and may also need to do some adjustment to make sure there is minimum error in the angle calculation. But if you plan to use a 3D sensor using a large number of poles on a magnet may not be necessary and you could in fact reduce this pole count since the sensing resolution would not be dependent on this like the latches are.

    Please let us know if there are any more questions and please be mindful that there will be a delay in our responses since we will be out of office starting tomorrow.

    Best,

    Isaac