BlueHID Brings wireless Bluetooth connectivity to the Universal Human Interface Device. Unique driver-free Input and Output features now without wires!... [Read More...]
U-HID Board Overview
BlueHID Board Overview
U-CONFIG Utility
U-HID Nano
Harness Options
Gamepad Buttons
Mouse Buttons
Keyboard Switch
Analog Input
Encoder Devices
U-HID Controlled LED
PC-Controlled LED
Power and Ground
U-HID Shift Feature
Self-Test LED
USB Output Drivers
USB Input Devices
Gamepad Buttons

Device Type: Switch/Pushbutton

Any pin can be defined as a switch.

You can define a switch as:

  • Mouse button (including double-click)

  • Gamepad button

  • Keyboard key.

    Each switch input has a primary assignment and a secondary assignment (optional).

    Both the primary and secondary assignmets can be used in key action settings and the secondary assignment is also activated in place of primary when a "U-HID Shift" key is held down.

    You can assign a different action for the event when the switch is closed (ie grounded) and for when the switch is opened.
    The two possible keycodes (or buttons) coupled with the way in which you define closed/open events gives a mass of flexibility in the types of control you can connect without using any external circuitry.

The keycode which is sent when you activate the switch is defined using the U-Config utility. You can assign any connection to send any keypress.
Switches can also be assigned as game controller buttons, which are numbered 0-32 (32 is a Windows limitation).
Mouse button selections available are left, right, middle or left double-click.

Example 1

Simple keyboard-type button (Normally Open):For this you would set the “down” action to be the required keycode and “up” action to be “Clear”.

Example 2

Simple keyboard-type button (Normally Closed):Set “down” action to be “clear” and Up action to be the required keycode.

Example 3

Toggle switch with integral LED:
This type of switch sends a 5 volt signal when closed, and ground when open. Let’s say you want to turn on a control when you switch “on” the toggle but you don’t want to generate masses of key-presses which the toggle is still down. You can send one key-press only, by configuring:“down” action to be “clear” and “up” action to be “pulse” and the required keycode. Setting it up this way means the internal LED in the switch will function properly with no external circuitry to control it.

Connecting Switches

Usually you would use normally-open switches or pushbuttons (although the U-HID does support normally-closed)
One connection of each switch would be connected to the required U-HID input pin. The other to any ground pin. So, if many switches are used on a control panel, all of them have one connection which is "daisy-chained" to each other and routed back to a ground pin. We supply a pre-made "daisy-chain" wiring harness which can be used for this purpose.

ESD Protection

Connectors J1, J2 and J3 have ESD static discharge protection. These 24 pins should be used in preference over the others when connecting switches. ESD can be a problem in warm dry environments and can cause false triggering or even damage.

Special-Purpose Switches

Some switches have special connectivity or an in-built LED which mean you need to connect in a different way to the U-HID. The principle is always that the U-HID pin is assumed to be sitting at a voltage of 5 volts when not activated and zero when activated (but note that you can reverse the behaviour the PC sees using the config utility). If the circuit is "open" (ie a normally-closed switch is not activated) then it will sit at 5 volts.

Switches which have in-built self-powered LEDs will have a connection which sits either at zero or supply voltage. These switches would require a constant 5 volt supply to one terminal, a ground on another terminal, and the switched voltage appears on a third. The switched voltage is connected to the U-HID input pin. These switches actively tie the pin to 5 volts (supply) or ground. This is fine for the U-HID.

Important! Never connect any device to the U-HID which sends more than 5 volts otherwise damage could occur!

Testing Switches

Switches defined as keyboard keys can be tested using Notepad or any program which displays text.
Gamepad buttons can be tested using Control Panel, Game Controllers. The display is shown below:


  Réalisation :   |   Contact :
Copyright u-hid (c) 2008