Products for USB Sensing and Control
Products for USB Sensing and Control

Spatial Phidget Tutorial

MOT1101 - Spatial Phidget


by Phidgets Education

Introduction

The Spatial Phidget combines a 3-axis accelerometer, 3-axis gyroscope and 3-axis magnetometer. You can use it in your projects to capture motion, position and direction.

In this tutorial you will :

  • Connect your Phidget to your computer.
  • Learn about data collected from your Phidget.
  • Practice using your Phidget in a mini-project.

Hardware Setup

Using the Phidget

In order to connect your Spatial Phidget to your computer you will need the following:

Connect Device



Connect your Spatial Phidget to your VINT Hub using the Phidget cable and connect your VINT Hub to your computer with the USB Cable.


When all components are connected, open the Phidget Control Panel on your computer and find the Spatial Phidget entry.


Double-click on the Spatial entries and observe the changes as you move your phidget.




Device Properties

The accelerometer measures acceleration in units of g-force which represents acceleration in increments of Earth’s standard gravitational acceleration (approximately 9.81 m/s²). A stationary object experiences 1 g of acceleration due to the Earth's gravitational field. For reference, a high-speed roller coaster typically develops 4 g to 6 g, while instantaneous (short duration) g-forces in a car crash can be as high as 100g.

Gyroscopes measure rotational motion. Rotational motion (also known as angular velocity) is measured in degrees per second (°/s). In order to get position information from the gyroscope, the angular velocity needs to be converted into an angular position value.

The magnetometer will report magnetic field strength along the x, y, and z axes. Magnetic field strength is measured in units of Gauss (G). In order to determine the sensors compass heading, we must convert the sensor readings into a direction.


Mini-Project

Now that you have your MOT1101 connected and working, the next step is writing some code. Write a program in the language of your choice that outputs the data from the Phidget's accelerometer. Your code should have the following flow.

Note: Acceleration data is represented as a list or array of three acceleration values, one for each sensor axis.

Now that you have your MOT1101 connected and working, the next step is writing some code. Write a program in the language of your choice that outputs the data from the Phidget's Gyroscope.Your code should have the following flow.

Note: Angular velocity data is represented as a list or array of three values, one for each sensor axis.

Now that you have your MOT1101 connected and working, the next step is writing some code. Write a program in the language of your choice that outputs the data from the Phidget's Magnetometer.Your code should have the following flow.

Note: Magnetic field strength data is represented as a list or array of three values, one for each axis.


Conclusion

You have completed the MOT1101 - Spatial Phidget Tutorial. You are now ready to use your Phidget in a project.