Phidgets are like Makey-Makey but they have a wider range of analog functionality, as opposed to only digital on-off functionality. They're generally used for measurement or sensing in a professional environment, but they are also widely used in escape room/location-based experiences because of their versatility and physically interactive nature. Phidgets range from sensors to controllers and steppers, so they can be used for both input and show control.
Older Phidgets are mainly USB-based, but modern Phidgets utilize the VINT Hub, which is a USB-connected hub device to route up to 6 other Phidgets through. There are also devices that can be used alongside the VINT Hub to create more inputs as well as devices for direct connection into a USB slot.
- 1 Getting Started
- 2 Important Notes
- 3 Devices
- 3.1 VINT Hub
- 3.2 Spatial Phidget
- 3.3 Dial Phidget
- 3.4 Touch Wheel Phidget
- 3.5 Touch Keypad Phidget
- 3.6 Thumbstick Phidget
- 3.7 Sound Phidget
- 3.8 Sound Sensor (discontinued)
- 3.9 Light Phidget
- 3.10 Temperature Phidget
- 3.11 IR-Reflective 10cm Sensor
- 3.12 Touch Sensor
- 3.13 Magnetic Sensor
- 3.14 Magnetic Sensor (USB)
- 3.15 Force Sensor
- 3.16 Slider 60mm Sensor
- 3.17 Rotation 300-Degree Sensor
- 3.18 Multi-Turn Rotation Sensor
- 3.19 Encoder Phidget (USB)
- 3.20 Rotary Encoder (USB)
- 3.21 Phidget Interface Kit 8/8/8
- 3.22 Phidget Stepper
- 3.23 Switch
- 4 Programming Information
- 5 Art (2D & 3D) Information
- 6 Sound Information
- 7 Design Guidelines & Tips
- 8 Example Projects
Developing with and using the Phidgets requires that you have the Phidget drivers installed. These can be found at http://www.phidgets.com/drivers.php.
Here is a UnityPackage that contains the DLL and a sample file for using Phidgets with Unity. Below you can see an example of using the Phidgets within Unity.
In order to use Phidgets, you will need to change Unity's Scripting Runtime Version in the Player Settings to .NET 4.x Equivalent. You also may need to update your .NET Framework in order to use Visual Studio with these settings—if a window pops up asking about the .NET framework, choose the second option and download the framework version specified (at the time of writing, it's .NET 4.7.1).
- Phidgets must be returned at the end of the project. Do not permanently install or damage them.
- Phidgets are not waterproof.
- Any Phidget that is connected (using Open()) must be closed (using Close()) if you want to connect to it again. Otherwise the next time you run the game, it will likely freeze.
- Phidgets are analog, so their performance could be adversely affected if you set the DataInterval too low.
- Phidgets get less responsive when connected over longer distances (the latency is still acceptable if you are not trying to hit the combo like crazy), and are not recommended to be connected over 5m.
- If you are trying to use Phidgets on C.A.V.E., do remember to change the Phidgets version into Phidget21.
Here is a list of all of the Phidget devices that we own at the ETC. A comprehensive list on the presently in-stock Phidgets can be found here—to request an available device: BVW - post to Piazza, anyone else - email etc-support.
If you're an ETC student who is looking to use Phidgets for BVW or a project, you can also look at https://www.phidgets.com/ to see what other devices are available. If the ETC does not have a device you need, talk to your instructor about ordering some.
Most of the devices you use will be routed through the VINT Hub. It's practically plug-and-play. Each of the devices must specify the Hub port that they are attached to in order to connect the correct devices to their C# object equivalents. More information about using the VINT Hubs can be found on the What Is VINT? page.
The Spatial Phidget contains a 3-axis accelerometer, a 3-axis gyroscope, and a 3-axis magnetometer which can be used as a compass. It is very noisy, which the programmer should account for when reading data from the device. The device also possibly requires calibration for the magnetic sensor, which can be read about here.
The Dial Phidget has a twisting knob and a single push-button input. The twisting knob is tick-based, so the data is noiseless but it is not smooth.
Do not use the Dial Phidget as a steering wheel-like prop. Use a USB Rotary Encoder, which can be found lower on this list.
The Touch Wheel Phidget has 4 keypad-like touch sensors and a 360° touch wheel sensor whose output goes from 0 to 1. Touches can be sensed through material with 1/2" thickness depending on the sensitivity settings of the device.
The Touch Keypad Phidget has 7 keypad-like touch sensors. Touches can be sensed through material with 1/2" thickness depending on the sensitivity settings of the device.
The Thumbstick Phidget has two separate axis inputs ranging from -1 to 1 and a single push-button input. The axis input do not typically go to 0 when left at rest, so you will need to define a "dead zone" for the input to prevent drift (e.g. ignore any inputs of absolute values less than .03).
The Sound Phidget detects volumes within separated frequency bands. The device measures sounds configurable to 34 or 102 dB (SPL), and it supports A and C weightings. The frequency bands are not configurable, and they're pretty wide-ranged so detecting nuances in frequency will not be doable with this device.
This input device is considerably more complicated than others, and if you just want to measure volume levels, you can use the Sound Sensor device seen below.
The Sound Sensor detects unbanded volumes between 50dB and 100dB and is tuned to measure in the frequency range 100Hz to 8kHz. Sounds outside of this frequency range are not detected nearly as well. This device uses basic voltage input for its sensing data, so information about how to process that data effectively can be found at the Technical Details section of the device.
The Light Phidget measures radiance from 188 microlux to 220,000 lux.
The Temperature Phidget measures ambient temperatures from -40°C to 85°C. The devices does not measure direct temperatures, and its measurement method adapts slowly over time so it should not be relied upon to update to temperatures quickly.
The IR Reflective sensor detects opaque objects from 10cm away.
The Touch Sensor detects capacitative touch through 1/2" of glass or plastic (also air!). The device resets its capacitance every 60 seconds, which makes calibration straightforward but long holds are obviously not supported.
The Magnetic Sensor detects magnetic fields and magnet proximity. An unaffected sensor sits at .5V with each of the magnetic poles shifting that either down or up. The sensor is paired with a couple of small, powerful magnets that can be attached to or hidden in objects if you wanted to utilize the magnet sensor as a form of proximity sensor as well.
Magnetic Sensor (USB)
The USB Magnetic Sensor works the same as the 3-pin version but needs to be plugged in via USB.
The Force Sensor can be used as a button or to detect the weight of a small object on it. It outputs voltage ranging from 0V to 5V depending on the force used on the button.
Do not use this to detect a heavy object or a human standing. There are other sensors for that which we can purchase.
The Slider 60mm Sensor is pretty straightforward, there's not much explanation needed.
The Rotation 300-Degree Sensor smoothly detects the turn of a knob within 300° of motion and has a hard stop on both ends. The 300° maps from 0V to 1V across the turn. If you want unlimited motion, you will need the Dial Phidget, or you can use the Rotation 10-Turn Sensor for more turns.
The Multi-Turn Rotation Sensor smoothly detects the turn of a knob for 10 full rotations and has a hard stop on both ends. The full 10 turns maps between 0V and 1V, meaning the data's precision will be much lower than the Rotation 300-Degree Sensor. If you want unlimited motion, you will need the Dial Phidget.
Encoder Phidget (USB)
The USB Encoder Phidget is the same as the Dial Phidget but with a USB input instead.
Rotary Encoder (USB)
This is not a Phidget, but it can be effectively used with the Phidgets. This device plugs into the computer via USB and controls the mouse when spinning the wheel, which also means that you likely will not be able to use more than one at a time unless you can isolate the individual encoders. These big rotary encoders are particularly effective for big twisting/turning wheels, like a steering wheel or valve.
Just use the mouse Y axis input with this device.
The Phidget Interface Kit 8/8/8 has 8 analog inputs, 8 digital inputs, and 8 digital outputs. It's like a VINT Hub but suped up. It's particularly useful when you have plenty of digital devices to use as well, like switches and push buttons.
You can treat an Interface Kit just like a VINT Hub from the program's point of view.
The Phidget Stepper can be used for regular voltage connections and controls, such as switches and motors. It's usage requires more electrical knowledge and expertise in programming hardware interfaces, so it is not recommended for those new to these kinds of devices.
We also have Phidget Interface Kits that can be used more extensively than the Stepper can.
The Switch can be used to detect simple button-press type inputs and are very small and form-factor. In order to use the switch, you must connect wires to it for both the input and the ground, which is not directly compatible with the VINT Hub's 3-pin connections but can be connected with some modification as detailed in the Versatility page of the VINT page.
- Install the Phidgets drivers: http://www.phidgets.com/drivers.php (you don't need to do this on the BVW platform computers!)
- Create a Unity project and import this UnityPackage that contains the DLL and a sample file for using Phidgets with Unity.
- Change the Unity project's Scripting Runtime Version in the Player Settings to .NET 4.x Equivalent.
- When you open Visual Studio, it may request you to update your .NET Framework. Choose the second option (download and install) and get the specified framework version (at the time of writing this, it's NET 4.7.1.
You can connect the Phidgets using the .Open() function on the Phidget object in Unity, but it's highly recommended that you take a look at the PhidgetTest.cs script for examples on how to use the Phidgets.
Each sensor-type Phidget has a DataInterval property that can be changed to increase or decrease the rate at which the data is polled from the device. Each of the sensors have data intervals and change trigger intervals that can be configured per device, but changing these values have heavy implications for usability and device performance. If you can help it, don't set the data interval too low—the lower the data interval, the higher the current consumption of the device. Too high of a current consumption could have a negative impact on the device's effectiveness or could damage the device.
The Update Loop
Unity's Update() function runs much more quickly than analog devices typically like getting queried, so you shouldn't put any Phidget API calls within the Update() function itself. If you want to consistently query the devices, either use coroutines that update less frequently or use the callbacks provided. You can store those values elsewhere in your program and then use that as part of the Update loop if you need everything to be in a sequence.
Art (2D & 3D) Information
Phidgets are simply input devices, which makes the art unrestricted by the device. It's wise to match any in-game control visually to what your physical control is, so if your game has something that is controlled by a Dial Phidget, you should probably make it look something like a dial. This might seem obvious, but it throws a lot of designers. Don't forget to be creative with it!
Phidgets also do not restrict any of the sound design of the game, but because they provide a very tactile part of the experience, you can greatly enhance the guest's experience by closely pairing sounds with the usage of the Phidgets. Some examples would include a ticking sound for when you're twisting a dial, or a growing swell when you bring a magnet closer to a magnetic sensor.
Design Guidelines & Tips
Phidgets provide unique design control compared to most other platforms in that you can create your own controller. Unfortunately, it takes some ingenuity to use this control to go above and beyond when you're limited to a 2D screen as the sensory part of the experience. The most effective uses of the Phidgets comes from escape room-type experiences and VR/AR experiences, so think about how you can integrate aspects of those experiences into your game to most effectively utilize what the Phidget has to offer.
This example project uses 6 different Phidgets that you may not have available, so make sure you go into the test script and comment out whatever Open() and Close() calls you don't expect to work. You can see this project in action in the video at the top of this page.