MOT0109 User Guide: Difference between revisions

From Phidgets Support
No edit summary
Line 4: Line 4:
[[Category:UserGuide]]
[[Category:UserGuide]]
==Part 1: Setup==
==Part 1: Setup==
{{PT1 Deck Sequence}}


== Part 2: Using Your Phidget ==
== Part 2: Using Your Phidget ==

Revision as of 21:57, 29 June 2022


Part 1: Setup

Part 2: Using Your Phidget

About

The MOT0109 combines an accelerometer (±8g), gyroscope (± 2000°/s), and magnetometer (± 8 G). Each sensor measures in the x, y, and z-axis. You can also use the Spatial object to obtain data from all three sensors, synchronized to the same timestamp.

MOT0109-About.jpg

Explore Your Phidget Channels Using The Control Panel

You can use your Control Panel to explore your Phidget's channels.

1. Open your Control Panel, and you will find the following channels:

MOT0109 Panel.jpg

2. Double click on a channel to open an example program. Each channel belongs to a different channel class:

Expand All
Accelerometer: Reports the acceleration of the MOT0109 in the X, Y and Z axis

In your Control Panel, double click on "3-Axis Accelerometer":

For a more comprehensive look at how to use this example, take a look at the Accelerometer Primer

MOT0109-Accelerometer.jpg
Gyroscope: Reports the angular velocity of the MOT0109 along the X, Y, and Z plane

In your Control Panel, double click on "3-Axis Gyroscope":

For a more comprehensive look at how to use this example, take a look at the Gyroscope Primer

MOT0109-Gyroscope.jpg
Magnetometer: Reports the magnetic field strength in the X, Y, and Z-axis

In your Control Panel, double click on "3-Axis Magnetometer":

For a more comprehensive look at how to use this example, take a look at the Magnetometer Primer

MOT0109-Magnetometer.jpg
Spatial: Reports synchronized data from all three objects at once (Accelerometer, Gyroscope, and Magnetometer)

In your Control Panel, double click on "Spatial":

For a more comprehensive look at how to use this example, take a look at the Spatial Primer

MOT0109-Spatial.jpg
Temperature Sensor: Measures the temperature inside the enclosure

A temperature sensing chip and self-heating element is present on the MOT0109 so the Phidget22 libraries can keep the inside of the enclosure at 45°C for optimal performance. This feature is disabled by default, and can be enabled through the Spatial, Magnetometer, Accelerometer, or Gyroscope API.

This temperature data is also available so you can tell when the board has reached the target temperature.

In your Control Panel, double click on "Temperature Sensor":

MOT0109-Temp.jpg


Part 3: Create your Program

Part 4: Advanced Topics and Troubleshooting

Expand All
How do I know what channel, serial number, or hub port to use in my program?

Before you open a Phidget channel in your program, you can set these properties to specify which channel to open. You can find this information through the Control Panel.

1. Open the Control Panel and double-click on the red map pin icon:

The locate Phidget button is found in the device information box

2. The Addressing Information window will open. Here you will find all the information you need to address your Phidget in your program.

All the information you need to address your Phidget


See the Phidget22 API for your language to determine exact syntax for each property.

How can I plot or record sensor data?

Note: Graphing and logging is currently only supported in the Windows version of the Phidget Control Panel.

In the Phidget Control Panel, open the channel for your device and click on the Plot.jpg icon next to the data type that you want to plot. This will open up a new window:

Plot2.jpg

If you need more complex functionality such as logging multiple sensors to the same sheet or performing calculations on the data, you'll need to write your own program. Generally this will involve addressing the correct channel, opening it, and then creating an Event Handler and adding graphing/logging code to it.

The quickest way to get started is to download some sample code for your desired programming language and then search google for logging or plotting in that language (e.g. "how to log to csv in python") and add the code to the existing change handler.

Filtering

You can perform filtering on the raw data in order to reduce noise in your graph. For more information, see the Control Panel Graphing page.

Graph Type

You can perform a transform on the incoming data to get different graph types that may provide insights into your sensor data. For more information on how to use these graph types, see the Control Panel Graphing page.

Upgrading or Downgrading Device Firmware

Firmware Upgrade

MacOS users can upgrade device firmware by double-clicking the device row in the Phidget Control Panel.

Linux users can upgrade via the phidget22admin tool (see included readme for instructions).

Windows users can upgrade the firmware for this device using the Phidget Control Panel as shown below.

ControlpanelFWup.jpg

Firmware Downgrade

Firmware upgrades include important bug fixes and performance improvements, but there are some situations where you may want to revert to an old version of the firmware (for instance, when an application you're using is compiled using an older version of phidget22 that doesn't recognize the new firmware).

MacOS and Linux users can downgrade using the phidget22admin tool in the terminal (see included readme for instructions).

Windows users can downgrade directly from the Phidget Control Panel if they have driver version 1.9.20220112 or newer:

ControlpanelFWdown.jpg

Firmware Version Numbering Schema

Phidgets device firmware is represented by a 3-digit number. For firmware patch notes, see the device history section on the Specifications tab on your device's product page.

FWversion.jpg

  • If the digit in the 'ones' spot changes, it means there have been bug fixes or optimizations. Sometimes these changes can drastically improve the performance of the device, so you should still upgrade whenever possible. These upgrades are backwards compatible, meaning you can still use this Phidget on a computer that has Phidget22 drivers from before this firmware upgrade was released.
  • If the digit in the 'tens' spot changes, it means some features were added (e.g. new API commands or events). These upgrades are also backwards compatible, in the sense that computers running old Phidget22 drivers will still be able to use the device, but they will not be able to use any of the new features this version added.
  • If the digit in the 'hundreds' spot changes, it means a major change has occurred (e.g. a complete rewrite of the firmware or moving to a new architecture). These changes are not backwards compatible, so if you try to use the upgraded board on a computer with old Phidget22 drivers, it will show up as unsupported in the Control Panel and any applications build using the old libraries won't recognize it either. Sometimes, when a Phidget has a new hardware revision (e.g. 1018_2 -> 1018_3), the firmware version's hundreds digit will change because entirely new firmware was needed (usually because a change in the processor). In this case, older hardware revisions won't be able to be upgraded to the higher version number and instead continue to get bug fixes within the same major revision.
AHRS Data and Parameters

For details on how to interpret Euler angles and Quaternions, and how to select the right AHRS parameters for your device, see the Spatial Primer.

Setting the Change Trigger and Data Interval

The Change Trigger is the minimum change in the sensor data needed to trigger a new data event.

The Data Interval is the time (in ms) between data events sent out from your Phidget.

The Data Rate is the reciprocal of Data Interval (measured in Hz), and setting it will set the reciprocal value for Data Interval and vice-versa.

You can modify one or both of these values to achieve different data outputs. You can learn more about these properties here.

Calibrating the Magnetometer

Magnetometer Calibration

Magnetometer Calibration Guide

In order for your magnetometer to provide accurate heading information, it must be calibrated.

Follow this guide to complete the calibration process.

1. Open the Magnetometer example for your device, and click the Calibrate button. This will open the Compass Calibration tool.

2. If your device supports heating, we recommend checking the HeatingEnabled checkbox. Wait for the temperature reading to turn green:

If your Spatial does not support heating (neither of the above controls will be available), you can skip this step.

3. Next, decide if you're using 2-axis or 3-axis calibration:

● If the spatial is free to move in all directions, use 3-axis

● If the spatial is being kept mostly level (e.g. in a car), use 2-axis

4. You can leave the Local Field Strength at 1.0 for general use since magnitude doesn't affect heading. If you need more quantitative results, look up your local value.

5. Make sure your Phidget Spatial is firmly in the position you intend to calibrate it for, and begin by clicking the Start button.

Begin rotating the structure your Phidget is mounted to. Notice the red dots appearing on the graph.

6. Try to rotate it so that it fills out as much of the sphere (or circle in 2-axis mode) as possible. When you're finished, click Stop.

You should now see red and green spheres (or circles) in the graph. The red one is the raw measurements, and the green one is the calibrated measurements.

Newly calibrated data from the magnetometer will be indicated by a green line that matches the sphere. The green sphere should be more centered than the red one. If not, try repeating the calibration.

You're now done the calibration process! On most Phidget Spatials, the calibration will be stored in flash, so it stays calibrated to this environment even across power cycles.

7. If you need to repeat this exact calibration, you can save the values listed in the text box.

You can use these values in the setMagnetometerCorrectionParameters method. See our API Documentation for more details.

«
»
Temperature Control (Self-Heating)

This Phidget comes equipped with a temperature sensor and a heating element so the Phidget22 libraries can keep the inside of the enclosure at {{{1}}}°C for optimal sensor performance. This feature is disabled by default and can be activated using the HeatingEnabled property through the Accelerometer, Gyroscope, Magnetometer, or Spatial API.

Be sure when using the temperature stabilization feature to insulate the sensor from its environment, for example by protecting it from outside air currents.

Mounting Considerations

Phidget Spatials are excellent at detecting and measuring motion. Mounting your Phidget Spatial correctly will ensure you get the most accurate results possible.

SpatialMounting.jpg

We recommend mounting the board in its enclosure, directly to your system using M2 bolts. Follow these steps:

  1. Remove the top half of the enclosure.
  2. Locate the four mounting holes.
  3. Bolt the Phidget Spatial to your system.
  4. Reattach the top half of the enclosure.


Ensure the bolts are tight enough to prevent the Phidget Spatial from moving, but not so tight that they strain the board. Any strain on the board can introduce unwanted measurement errors.

Spatial mounting strain.png
The illustration above shows exaggerated flexing of the device from overtightened bolts. Overtightening is imperceivable to the eye, but can cause significant measurement errors.


We recommend using a thread locker on your bolts to prevent them from slowly moving over time. This is especially important in systems that are exposed to vibrations.

Zeroing the Gyroscope

You can zero the gyroscope of this device by opening the gyroscope example and clicking on the "Zero Gyro" button. When you write your own program, you can also use a function call to zero the gyro during the program's operation. For details on how to do this in your language, see the Phidget22 API.

For details on how zeroing the gyro works, and when to do it, see the Gyroscope Primer.