Getting started with the TMAG5170EVM
Resources
[BRIGHT TONE]
[LOGO WHOOSHING]
At Texas Instruments, our sensing portfolio provides your system with the ability to accurately measure data and make real-time decisions based on the surrounding environment. One of our linear 3D Hall-effect sensors, the TMAG5170, allows you to achieve ultra-high precision at speeds up to 20 kilosamples per second for faster and more accurate real-time control. The device also offers integrated functions and diagnostics to maximize flexibility and safety in your systems while providing multiple operation modes to reduce power consumption. Additionally, the added TMAG5170 is capable of calculating angle and magnitude for any two axes, making this device ideal for both rotational angle tracking and monitoring linear position.
Now I will introduce you to the TMAG5170 EVM, walk you through the setup process, and provide a few basic examples of how this evaluation module can be used. Upon opening the kit, you will find the TMAG5170 EVM, which features a snap apart PCB to allow for the testing of the TMAG5170A1 with programmable sensitivity ranges of plus or minus 25, 50, or 100 millitesla as well as the TMAG5170A2 with sensitivity ranges of plus or minus 75, 150, or 300 millitesla. These devices are 3D Hall-effect sensors, which communicate over SPI for high-speed data transmission up to 20 kilosamples per second. Each half of the board may be independently connected to the included TI sensor control board, which provides a USB interface for data capture using an MSP432 microcontroller.
Additionally, the TMAG5170 EVM includes a USB cable, a sample magnet to provide a test magnetic field, and a rotate and push knob demo. The EVM is connected by inserting the 90 degree header pin on either the TMAG5170A1 or TMAG5170A2 PCB and to the other header pin on the sensor control board. Once secured, connect the USB cable from the control board to your computer. When fully powered, you should observe three green LEDs, 1, to indicate the power near the TMAG5170 is good, the second to show the power near the USB connector is good, and a third to indicate that the microcontroller is fully initialized.
To access the GUI, it is possible to launch the tool from dev.ti.com. Here in the gallery, we can search across Texas Instrument product categories for a number of software platforms for development kits. Searching for TMAG5170 will show us all versions of the software. We can launch the latest version of the software for this device by clicking the appropriate title.
At this point, a Read Me notice will pop up with instructions regarding a one-time firmware update and instructions guiding how to verify a successful connection to the EVM. Once this is closed, the EVM should detect which variant has been connected and will update accordingly. In the event that the EVM needs a firmware update, an error message may pop up indicating that the EVM was not recognized.
To ensure your EVM is loaded with the latest firmware, it is recommended to check for firmware updates by clicking the File menu, then clicking Program Device to initiate a firmware flash In the event that this option is not available, it may be necessary to manually enter the DFU mode. This can be achieved by shorting the DFU pins located in the lower right-hand corner of the PCB near the MSP432 on the sensor control board.
Once these pins are shorted, press the reset button on the control board. The indicator light for the MCU should be disabled and indicate the device was waiting to be flashed. Checking the File menu dropped down again should enable the Program Device menu option.
Once flashed with the latest firmware, the GUI will restart, and you may proceed to test the EVM. In the event of any future firmware upgrades, it should no longer be necessary to provide a physical short to enter DFU mode. It is helpful to keep in mind, however, that if for any reason the control board becomes non-responsive and basic debugging steps of power cycling or changing USB ports do not restore communication, it may be helpful to manually reprogram the device this way.
Clicking the pencil icon on the left allows us to access the Register Map of the device. Here, we can select Register Settings through the dropdown menus or by manually toggling available bits. For a simple configuration, we will enable temperature data in the DEVICE_CONFIG register.
Enter Active Trigger Mode and select 32 samples per conversion set and then enter the SENSOR_CONFIG register. Here, we can set all three magnetic channels to measure a single channel per sample and enable angle and magnitude calculations using the x and y-axes. We can verify that the device is able to produce measurable data by selecting a sample rate in the Auto Read drop down.
By selecting "As fast as possible," we should be able to see all of the result registers begin to produce data. This setting is an independent feature from the main capture function on the plots page. If you proceed using the rotate and push demo, this will need to stay enabled.
But the GUI will automatically disable this read function when plotting data directly. If we now click the graph icon on the left, we will see a number of data capture settings. We may select any combination of X Axis, Y Axis, Z Axis, Temperature, Magnitude, or Angle. These checkboxes only instruct the GUI which channels we wish to read and have no impact on the Register Map.
Since we have previously enabled each of these channels, we will leave each of them set to sample. Next, we can set the sample rate. Based on conversion settings, the GUI will automatically assume a rate just above the minimum possible conversion time, which can be manually overridden. By default, the window is set to display 1,000 samples and will run continuously once enabled.
To sample for a specific time period, we can set to capture only one complete window by checking #Samples Only and entering the desired number of samples. For example, with a sample rate of once every 2.541 milliseconds, we can capture 5 seconds worth of data using about 1,967 samples.
After clicking Collect, we can pass our magnet by the sensor and gather all three components of the magnetic field vector simultaneously. x, y, and z data are all shown on a single plot and can be turned on or off after capture to isolate any channel without losing data. Each individual plot is set to auto scale to match the inputs provided and may be manually configured to display the region of interest. The data for each plot can be individually saved to file or, if preferred, all plots can be saved together in one master file.
Another feature of the EVM is the included rotate and push knob. With a diametric magnet placed just above the sensor, we can produce a near ideal input for angle measurements as the knob is rotated for capturing angle information using the x and y components that were selected previously. This knob was designed using a diametric cylinder magnet to enable tracking of both rotational angle and button press status.
This function is particularly useful in user interfaces in applications ranging from consumer electronics and appliances to automotive e-shifters. With the magnet centered above the sensor this way, our EVM is now configured to measure angle using the x and y-axes. Button press events are easily detected by observing magnitude shifts in these vector components.
To use the Demo page, which is located in the Plots section, we must first return to the Register Map and re-enable the Auto Read and set the sensitivity range to plus or minus 100 millitesla for both x and y. We can then navigate to Plots and select the tab at the top for the Rotate and Push demo.
With the knob connected to the EVM, we can see that the device will generate an angle output using the integrated cortic engine. Alternatively, the GUI will simultaneously calculate the angle based on the x and y output. As we rotate the knob, we can see that the indicator will follow our rotation and provide output to a quarter of a degree resolution.
The knob also acts as a push button. Here we have the two indicators. Using the user-defined threshold, the GUI will track and display button state on the left using the green indicator and will track and display a toggle switch state on the right using the blue indicator. This completes the setup process for the TMAG5170 EVM.
The TMAG5170 boasts other useful features, which can be configured through the Register Map. These include programmable alert outputs that can be set to detect user-defined input or temperature thresholds, temperature compensation, and gain and offset corrections. Please refer to the User Guide for further details.
We can't wait to see how you use the TMAG5170 to achieve ultra-high precision for more accurate real-time control in your systems. Visit ti.com to learn more. Thanks for watching.