When designing any end product, it is not uncommon for engineers of multiple disciplines to work together to create the final design. Often a mechanical engineer might set aside an area where electronic components can reside and provide area constraints that must fit the PCB within. Simulation tools exist to assist electrical engineers with layout and circuit design to optimize performance for most devices. However, this is not typically the case for magnetic position sensors. The challenge for these devices is that SPICE modelers cannot determine the input magnetic field provided the shape, material, and position of the magnet. However, this information is critical to understand when defining sensor placement and when selecting the magnet to use in the final product. Without these details, the total design cycle time can be lengthened by repeated prototype and verification test builds.
The purpose and function of the Magnetic Sensing Enhanced Proximity Tool is to provide an easy access simulation platform which is able to quickly provide simulated magnetic field and device output data. Guess work in prototype builds can be greatly reduced by modeling the complete electro-mechanical response. This is accomplished using the open-source python library MagPyLib.
All trademarks are the property of their respective owners.
The Magnetic Sense Enhanced Proximity Tool is built in Python using a simple graphical user interface, which prompts the user for design information regarding the magnetic material, magnet shape, type of motion, sensor location and sensor type. Successful simulations will produce a 3D animation showing the motion of the magnet relative to a sensor marker. The orientation of the magnet and sensor may be adjusted to model many basic motion types. These include axial, joystick and hinge rotations as well as linear travel. It is also possible to capture the magnetic field vector components at a single sample location.
This tool is intended for use as an electro-mechanical design aid to help understand the magnetic field produced by a single moving magnet and to predict device behavior by plotting simplified sensor outputs.
Temperature inputs for this tool only evaluate changes in the magnet strength on the assumption of a constant linear response. However, real magnets have temperature operating ranges that vary based on shape and material selection. It is the sole responsibility of the user to be aware regarding the operating range of their selected magnet and to ensure that both the magnet and sensor always remain within their specified operating range. The modeled temperature compensation for device output behavior only considers intentional compensation of the device sensitivity, but this will not impact any other device parameters.
It is always recommended to prototype and evaluate mechanical systems using real components to verify typical operating tolerances and system behaviors. For instance, ferromagnetic materials which may be present in system construction can interact with magnetic fields and will change the observable inputs to the magnetic sensor.
Functions matching several common types of motion are provided, and resulting typical device performance are modeled to demonstrate the relationship between mechanical position of the magnet and the electrical response of the sensor.
When defining magnet and sensor position and alignment, this tool allows for independent rotation of both the magnet and the sensor. Each user defined rotation is applied by rotating the object around the specified axis. This may also be understood to be rotation within the plane orthogonal to the rotation axis. For example, rotation about the Z-axis is rotation in the XY plane. #GUID-CE761BC3-061D-49E4-B074-94BB47C62E4A shows the default sensor orientation aligned to the positive X,Y, and Z axes. #GUID-3954A121-FFA5-4728-9B07-9D3EF84F8B45 through #GUID-5AF4E953-9CC7-4949-A6A7-FFF06C67517E show the result of a single +90° rotation about the X,Y,&Z axes from the default alignment. In each case the global orientation remains unchanged, but the relative sensitivity of the sensor is changed to reflect the rotation.
In each image, the red arrow represents the sensor X-axis, the green arrow represents the sensor Y-axis, and the blue arrow represents the sensor Z-axis.
The default orientations for each magnet shape are shown in GUID-20221121-SR0T-R1LG-Z9QJ-FJMC8WKBF5PW.html#GUID-1D115757-CEEF-4551-A2F4-6B4274012BF5.
The Magnetic Sensing Enhanced Proximity Tool allows the user to select several types of motion for each of the magnet options. Hinge motion, rotation, linear displacement, and joystick functions are all available with customizable user inputs. Additionally, for a quick approximation, the field produced by each magnet type may be checked at individual static positions.
The general flow when defining a simulation follows this process: