Human Input Primer

From Phidgets Support
Revision as of 16:25, 1 June 2023 by Mparadis (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Getting to Know Human Input Sensors

There are many ways to provide inputs for people to interact with your program. This page lists common types of devices used to get human input into a system. It will also detail the uses and important features of each.

Switches

A common selector switch

Switches are the simplest form of a human input device. They operate by opening or closing a circuit when they are moved from one position to another. This simple binary operation makes them ideal as basic human input devices. Some switches are made with more than two possible positions, which will open or close different circuits in various ways, depending on the switch.

Some switches are constructed to switch a common terminal between two or more other terminals, which can redirect a signal between multiple paths.

Common Uses

A rotary switch being used to select the operation of the headlights in a car.

Switches are typically used to turn devices on or off, or to make a selection between a set specific set of options.

  • Power Switches
  • Selector Switches

Features:

  • Simple
  • Inexpensive
  • Persistent state
  • For switches with more than two states, each option requires a different input

How to Use with Phidgets

Using a switch with a VINT Hub
  1. Connect the wires from the button white and black wires of a Phidget cable.
  2. Plug other end of the Phidget cable into the VINT Hub.
  3. Use the DigitalInput object to detect if the button is pressed.

You can use switches with Phidgets with Digital Inputs, such as:


Buttons

Simple buttons

Buttons are a subset of switches that operate by opening or closing a circuit when they are pressed. This simple binary pressed/not pressed state makes them ideal for basic inputs into a program.

Common Uses

Elevator Buttons

Buttons are practically everywhere, from elevator doors, to game controllers, to the control panels of electronic appliances.

Features:

  • Simple
  • Inexpensive
  • Binary pressed/not pressed feedback

How to Use with Phidgets

Using a button with a VINT Hub
  1. Connect the wires from the button white and black wires of a Phidget cable.
  2. Plug other end of the Phidget cable into the VINT Hub.
  3. Use the DigitalInput object to detect if the button is pressed.

You can use buttons with Phidgets with Digital Inputs, such as:


Potentiometers

A 3583 Rotary Potentiometer
Volume knobs on an audio mixer
Wiring a generic potentiometer to a Phidget cable
A Phidget 1112 slider

Potentiometers are a common way to get one-dimensional input from a user. They are used to track the relative position of a control within its range of motion. In technical terms, potentiometers work as an adjustable voltage divider, with an output proportional to the input voltage and an electrical contact's position along a resistive surface. Potentiometers can track either rotary (circular) or linear position, depending on the device's construction.

Common Uses

Potentiometers have a wide range of applications, in the form of volume knobs, brightness sliders, and anywhere else where a persistent settable input is desired.

Features:

  • Simple
  • Inexpensive
  • Versatile
  • Continuous voltage ratio feedback

How to Use with Phidgets

  1. Plug a 1112 Slider into a VINT Hub
  2. Use a VoltageRatioInput channel to read the position of the slider

Phidgets sensors that provide potentiometers include:

You can use other potentiometers with Phidgets by attaching the appropriate terminals to the red, black, and white wires of a Phidget Cable, as shown in the diagram to the right.

You can use Phidgets with VINT ports and Analog Input Ports to read potentiometers:


Joysticks

An example of a joystick
An HIN1100 Joystick

Joysticks represent another very common form of human input devices in modern technology. They generally indicate their position as ratios along two axes. They are well suited to real-time control applications, where precision input is required. They are typically spring-loaded to return the stick to a neutral position when it is not in use.

Common Uses

Joysticks are used for a wide range of applications, typically involving fine real-time control of a system. Joysticks can be found in many places, from video game controllers to the controls for heavy machinery.

Features:

  • Simple
  • Return to centre when not in use
  • Continuous analog feedback

How to Use with Phidgets

  1. Plug an HIN1100 into a VINT Hub
  2. Use two VoltageRatioInput channels to read the position of each axis

Phidgets that use this kind of sensor include:


Encoder Dials

A large encoder dial
The scroll wheel on computer mice is typically an encoder input
An HIN1101 Dial Phidget

An encoder dial input uses an encoder to track the movement of a dial from the time the program began tracking it. They indicate their change in position in the form of "encoder counts". These encoder counts can then either be used as an abstract counting of movement, or as a known fraction of rotation.

Many encoder dials have detents, which break up the motion of the dial into segments and hold the dial in place when not in use. A common example of detents is in the scroll wheel of computer mice, where the scroll wheel's rotation is noticeably segmented. This can give helpful tactile feedback indicating a set amount of movement to the user.

Common Uses

Encoder dials are typically used where fine controls are required, but one-to-one mapping is not. Mouse scroll wheels are a good example of encoder dials at work.

Features:

  • Precise
  • Digital
  • Can have detents
  • Relative position only

How to Use with Phidgets

  1. Plug a - HIN1101 Dial Phidget into a VINT Hub
  2. Use an Encoder channel to read the movement of the dial

Phidgets that use this kind of sensor include:

Or you can interface your own encoder as a dial by using an encoder Phidget:


Capacitive Touch

An HIN1000 Capacitive Touch Keypad Phidget

Capacitive touch inputs use the capacitance of the human hand to detect if they are being touched. Certain specialized varieties of these sensors can also determine where along their axis they are being touched.

Capacitive touch inputs have the advantage of being able to sense a touch through a thin protective surface, such as plastic or glass, and have no moving parts to wear out over time.

Common Uses

Smartphones use capacitive touch sensors in their touch screens
An HIN1001 Capacitive Touch Scroll Wheel Phidget

The capacitive input you are probably most familiar with is your cell phone screen. The vast majority of cell phones use capacitive touch sensing technology to detect your fingers through screen. Capacitive touch buttons are also being used on an increasing number of consumer electronics in place of physical ones.

Features:

  • Settable sensitivity
  • No moving parts
  • Can indicate a relative position
  • Often don't work through gloves

How to Use with Phidgets

  1. Plug a capacitive touch sensing Phidget into a VINT Hub
  2. Use CapacitiveTouch channels to read the capacitive buttons, and touch position on the wheel

Phidgets that use this kind of sensor include: