The following is a rough guide to constructing a wireless chording input device by modifying a Twiddler (either version 1 or 2) and a bluetooth accelerometer (btacc). The directions are not precise, but most of the issues in constructing a Bluetooth Twiddler are addressed here.
Theory of operation
This design will completely bypass the guts of the twiddler and only make use of its key switches and plastic casing. It does not make use of the twiddler 2's mouse. It does, however, provide access to 3 axes of accelerometer data, which could be used in a manner similar to the twiddler 1's tilt sensor. The accelerometers could also be used as a platform for sending gesture data to the host for scripted gesture recognition [PDF].
In order to keep things really simple and since there are a lot of extra I/O lines on the btacc module, each button is connected directly to an I/O line using a pullup resistor. There are 16 buttons on the twiddler including thumb keys and exactly 16 free I/O lines on the btacc board. This circuit merely reads key and accelerometer status and sends it back to the host via a bluetooth RFCOMM link. The host decodes the data and feeds it to the operating system's HID layer.
- Bluetooth RFCOMM (SPP) link
- Infolithium battery
- 16 key twiddler
- no mouse
- 3 axes of accelerometer data
- access to keypress timing information
- power switch
- status LEDs
- recharging connector
- built entirely into a twiddler case
This is what you're going to end up with :
The batteries are located on the bottom and fit snugly into the modified case. The btacc board lies in between the battery and the finger keyboard. Note the gray power connector. The power switch has not been installed yet.
Remove the three small screws from the twiddler case. They strip easily, so use as little force as possible on them.
There are three main boards in a PS/2 twiddler 2: the CPU board, the thumb key/mouse board, and the finger keyboard. For this modification you'll need to take the CPU board out.
Left ellipse: desolder the thumb board from the CPU board here
Lower middle ellipse: the unscrewed mouse transducer
Right ellipse: the front 12-key keyboard has been desoldered from the main CPU board
- unsolder finger keyboard ribbon cable
- unsolder thumb keyboard ribbon cable
- unscrew mouse from thumb keyboard
The idea is to make each key a direct input to the PIC on the btacc as in the following diagram.
Here's what I did:
- Cut traces on the finger keyboard since we're not using a row/column scheme. They can be restored with a solder bridge later..
- Connect ground traces
- Solder on pull-up resistors
- Connect pull-up resistors to Vcc line
- Connect individual keys to btacc I/O lines
- Do the same for the thumb keys. You need four more pullup resistors there.
A battery after taking the cells out of the casing.
The battery used in this project is a 2 cell infolithium. You'll need to remove the cells from the plastic housing of the battery. They don't come apart easily. Be careful not to damage the electronics which are located at the top of the battery near the contacts.
The battery fits neatly into the twiddler case when you scrape out some of the extra plastic as in the following picture.
Use any connector you have on hand with at least two leads.
Any switch will do as long as you can squeeze it in.
- connect key wires to I/O ports
- LED extension
- connect power and switch
- firmware modifications
Notes on Operation
Currently the btacc board is configured to operate in "slave" mode. This means that the host computer must initiate an RFCOMM connection to the twiddler. The user would either have to make this connection manually or have a script poll for the bluetooth twiddler device and make the connection when the device becomes available.
If polling is not desirable, the Taiyo Yuden bluetooth module can operate in "master" mode and initiate the connection to the host when the twiddler is powered on. The bluetooth module exposes an AT command set for this purpose which is fully documented in the file
/net/hm41/folks/will/btacc/EYMF2CAMM-XX_U_NDA_18Jul03_Ver1_3.pdf which I can't post here due to NDA restrictions. The PIC will need to have a serial dialogue with the bluetooth module to make the connection.
This latter method may be more desirable because the bluetooth module's command set allows you to specify encryption parameters for a secure link. Note however that the twiddler will need to know which host address to connect to in this mode. This means that either a) the twiddler's firmware will be paired to a specific bluetooth dongle (or host) or b) the firmware needs to be written such that it can be reconfigured over the air.
The device can be used while it is charging. I think.
Ideally the device would adhere to the Belutooth HID standard and any operating system supporting HID devices could use it as a composite pointing device/character input device. This would require using something other than the btacc board. A Btnode would probably work pretty well for this, although I think a fair amount of work would be required to code up the HID layer stuff. The design presented on this page can be done now.
You can use "master" mode to initiate an RFCOMM link to a cell phone. You must determine how to get characters to the phone using the phone's GSM 07.07 AT command set (this is different from the taiyo yuden's AT command set). This would be possible using the AT+CKPD command to simulate keypresses on the phone. Many phones are compliant.