Received: from watserv1.uwaterloo.ca (watserv1.waterloo.edu) by karazm.math.UH.EDU with SMTP id AA18002 (5.65c/IDA-1.4.4 for ); Wed, 16 Oct 1991 16:38:29 -0500 Received: by watserv1.uwaterloo.ca id ; Wed, 16 Oct 91 17:34:28 -0400 Date: Wed, 16 Oct 91 17:34:28 -0400 From: Dave Stampe-Psy+Eng Message-Id: <9110162134.AA22998@watserv1.uwaterloo.ca> To: glove-list@karazm.math.uh.edu I've been experimenting with the hi-res mode, and I want to compare my results with others. I have found a way to read the glove as fast as possible. Simply read the 6 data bytes from the glove, then 2 more at the fast speed (discard these). Now read a byte from the glove every 2 to 4 millisecond (with an interrupt?). If the read returns $A0, read the next data set. If 500 reads pass without $A0, repeat the hires setup sequence. This can run in the background while graphics are drawn. This results in speeds of 17 samples/sec (fingers open) to 12.5 (fist). It appears that up to 25 samples/sec could be achieved by disabling finger reads by the glove controller, and reading finger positions externally as I suggested earlier. (Lance Norskog suggested using an IBM PC's game port as an analog input for this. Sounds feasible, and could be made fast). The data etc. read from the glove is in 6 bytes: 1) X (side-to side) 2) Y (up and down) 3) Z (distance) 4) rot (turning wrist) 5) fingers (2 bits for each finger) 6) keys on glove For X and Y, the glove seems to return differences in distances to receiver pairs from the transmitters. This implies that the X and Y scaling to position gain changes with position, being greatest closer to and centered on the receiver array. At 300 cm (10') the resolution is 3 mm per count. Right and up are positive, left and down are negative. Range is +/- 127, which is achived at 45 degrees from and outside the receiver array (!). Z resolution seems disappointingly low, being 1.6 cm (0.65") per step. I KNOW that the internal resolution is 2 mm for this one! Away is positive, toward is negative. Rotation is also low resolution, and seems quite nonlinear. This could be caused by the room I'm in, though. The values increase with clockwise rotation, palm down being 0. Steps are (about) 30 to 40 degrees, with a range of 0 to 13. Sensitivity seems greatest in palm-up position (6 to 9). Finger positions are packed into 1 byte, with 2 bits per finger. The format is: T t I i M m R r for thumb, index, middle and ring fingers. Open hand is 0, fist is 3. Capital is MSB, lowercase is LSB. The key byte can accept all number keys (0 to 9) and returns their number codes (0-9). If no key is pressed, this byte is $FF. Other key codes are: SEL $83 START $82 A $0A B $0B UP $0D DOWN $0E LEFT $0C RIGHT $0F Codes are returned as long as the key is held down. NOTE ON NOISE: I have found the glove position data tends to take jumps of about 6 to 8 units in X and Y position (about an inch). This is NOT a glitch or a misread, but a position-related discontinuity. The reason for this can be seen by scoping the receiver detector inputs and outputs (in the small box joining the receivers and the glove). These are peak detectors, and respond when the sound pulse has been received. However, the glove uses piezoelectric transducers in its transmitters and receivers, which have a VERY high Q. This means that a 12-cycle pulse driving the transmitter is stretched to several hundred pulses at the receiver detector. Also, the "rising edge" of the received envelope increases linearly for at least 20 cycles before stablizing. This means that 3 to 6 pulses actually arrive at the receivers before the detector is tripped. The detection point is always near the peak of one of the 45 KHz wave cycles, and this adds a quantized offset to the delay. The power glove seems to use a delay resolution of 2 microseconds. However, if the strength of the pulse at the receiver changes ( or if a reflection of the pulse interferes) the detector will trigger on an earlier or later cycle than it did on the last pulse. This causes a +/- 20 microsecond change in the delay time, or about 8 mm of distance. Thus, the glove can resolve about 1.3 mm of distance, but with errors of +/- 8 mm superimposed! See this diagram for a possible result: __________ / \ / \ / \ ^ | | <-- GLITCH! | | | | / \ | __ / \___ position time---> This problem is built into the design, and can't be fixed. If the user moves the glove slowly enough, these glitches might be filterable by software. Have to try it, though. -Dave Stampe