[sci.virtual-worlds] Power Glove

tony@clio.las.uiuc.edu (Tony) (09/14/90)

Awhile ago a few people mentioned that they were trying to
get information on the Mattel data glove.  I was wondering if 
anyone was succesful in contacting the designers.  Please respond
via E-mail.  Thanks.


tony@clio.las.uiuc.edu

pepke@SCRI1.SCRI.FSU.EDU (Eric Pepke) (09/20/90)

I bought a power glove, and last night I rented a Nintendo with which to 
try it, ripped the glove apart, and did some in-circuit testing.

The glove system is made up of the glove itself, an L-shaped structure of 
three ultrasonic recievers, perhaps half a meter on a side, that fits on 
the TV, and a junction box connecting the two.  The glove has two boxes--a 
knuckle box and a wrist box.  The knuckle box contains the two ultrasonic 
transmitters, simple driver circuitry, connections to the finger flexion 
sensors, and a piezoelectric beeper.  The writs box contains a 
microprocessor with a 10 MHZ (!) crystal and a handful of support 
components.  It also has quite a few conductive rubber buttons on the back.

The interface to the Nintendo is a game controller emulator.  There are 
several built-in programs that can be changed at any time by pushing the 
buttons on the back of the wrist box.  There is one where the joystick is 
controlled by moving the hand right, left, up, or down, which is good for 
X-Z games.  There is one where the joystick is controlled by moving the 
hand right, left, forward, or back, which is good for X-Y games.  There 
are some programs optimized for certain games.  For example, there is one 
for Double Dragon.  Right, left, forward, back controls the joystick.  
Thumb, index finger, and last three fingers control various motions, all 
available ordinarily through combinations of presses on the controller.  
Hand forward and clutch makes the character climb a ladder.  Twist of the 
hand causes a head butt.

The glove also has the ability to recieve downloaded programs from a 
cartridge; an example of this is Joust.  I have no details of what kinds 
of programs can be downloaded.

I tried Double Dragon, Joust, and an X-Y/X-Z game (Teenage Mutant Ninja 
Turtles).

The glove is operated by holding it within a sensing frustrum projected 
from the structure of recievers.  Good readings can be obtained within 
about 20 degrees divergence outside the structure.  I don't know how far 
back you can get, as I ran out of living room first.  Most orientations of 
the hand give good readings, except those where the meat of the hand is 
between the transmitters and the receivers.  One can push the Center 
button at any time, and the joystick emulation will occur around the 
current position of the glove at the center.  I suspect the device has 
quite a lot more resolution than they are putting to work.

The untrasonic transmitters are controlled by three driver transistors.  I 
think that one recieves a constant square wave (an inductor smooths it 
out), and the other two are used to gate the two transmitters on and off.  
There are four finger flexion sensors, one each on the thumb, index 
finger, middle finger, and ring finger.  They are resistive elements, and 
resitance roughly doubles from full extension to full flexion.  Fully 
extended resistance for my glove was 100K on three of the sensors and 50K 
on one.  I have no idea if this is intentional or an artifact of the 
manufacturing process, but in any event, it would be a good idea to 
calibrate the glove every time it is used.  Resistance is not linearly 
related to flexion; there is a threshold effect, but with delicate 
movements of the fingers and a little practice, one can make quite small 
adjustments to resistance.  The commons of the four sensors are connected 
through diodes to a common high.  The whole mess is powered by a single 5V 
negative ground supply.

I think the best idea would be to replace the entire wrist box with new 
circuitry.  I am looking at Motorola's 68705S3 microcontroller.  It seems 
perfect for the job.  It has four high-impedance A-D converters, serial 
communications built in, an EPROM for the program, several timers, and 
enough parallel I/O lines to get the job done.  It requires little 
external support circuitry.  I don't think it has enough oomph to do the 
trig, but it should be able to handle timing calculations fine.  Though 
the three receivers are good enough for game stuff, ideally one would want 
to have more to cover more orientations and positions.  Perhaps a room 
with a receiver at each of the eight corners would work well.

Eric Pepke                                    INTERNET: pepke@gw.scri.fsu.edu
Supercomputer Computations Research Institute MFENET:   pepke@fsu
Florida State University                      SPAN:     scri::pepke
Tallahassee, FL 32306-4052                    BITNET:   pepke@fsu

Disclaimer: My employers seldom even LISTEN to my opinions.
Meta-disclaimer: Any society that needs disclaimers has too many lawyers.

pepke@SCRI1.SCRI.FSU.EDU (Eric Pepke) (09/20/90)

[With thanks to Randolph Langley for retrieving this article -- Moderator]

I bought a power glove, and last night I rented a Nintendo with which to 
try it, ripped the glove apart, and did some in-circuit testing.

The glove system is made up of the glove itself, an L-shaped structure of 
three ultrasonic recievers, perhaps half a meter on a side, that fits on 
the TV, and a junction box connecting the two.  The glove has two boxes--a 
knuckle box and a wrist box.  The knuckle box contains the two ultrasonic 
transmitters, simple driver circuitry, connections to the finger flexion 
sensors, and a piezoelectric beeper.  The writs box contains a 
microprocessor with a 10 MHZ (!) crystal and a handful of support 
components.  It also has quite a few conductive rubber buttons on the back.

The interface to the Nintendo is a game controller emulator.  There are 
several built-in programs that can be changed at any time by pushing the 
buttons on the back of the wrist box.  There is one where the joystick is 
controlled by moving the hand right, left, up, or down, which is good for 
X-Z games.  There is one where the joystick is controlled by moving the 
hand right, left, forward, or back, which is good for X-Y games.  There 
are some programs optimized for certain games.  For example, there is one 
for Double Dragon.  Right, left, forward, back controls the joystick.  
Thumb, index finger, and last three fingers control various motions, all 
available ordinarily through combinations of presses on the controller.  
Hand forward and clutch makes the character climb a ladder.  Twist of the 
hand causes a head butt.

The glove also has the ability to recieve downloaded programs from a 
cartridge; an example of this is Joust.  I have no details of what kinds 
of programs can be downloaded.

I tried Double Dragon, Joust, and an X-Y/X-Z game (Teenage Mutant Ninja 
Turtles).

The glove is operated by holding it within a sensing frustrum projected 
from the structure of recievers.  Good readings can be obtained within 
about 20 degrees divergence outside the structure.  I don't know how far 
back you can get, as I ran out of living room first.  Most orientations of 
the hand give good readings, except those where the meat of the hand is 
between the transmitters and the receivers.  One can push the Center 
button at any time, and the joystick emulation will occur around the 
current position of the glove at the center.  I suspect the device has 
quite a lot more resolution than they are putting to work.

The untrasonic transmitters are controlled by three driver transistors.  I 
think that one recieves a constant square wave (an inductor smooths it 
out), and the other two are used to gate the two transmitters on and off.  
There are four finger flexion sensors, one each on the thumb, index 
finger, middle finger, and ring finger.  They are resistive elements, and 
resitance roughly doubles from full extension to full flexion.  Fully 
extended resistance for my glove was 100K on three of the sensors and 50K 
on one.  I have no idea if this is intentional or an artifact of the 
manufacturing process, but in any event, it would be a good idea to 
calibrate the glove every time it is used.  Resistance is not linearly 
related to flexion; there is a threshold effect, but with delicate 
movements of the fingers and a little practice, one can make quite small 
adjustments to resistance.  The commons of the four sensors are connected 
through diodes to a common high.  The whole mess is powered by a single 5V 
negative ground supply.

I think the best idea would be to replace the entire wrist box with new 
circuitry.  I am looking at Motorola's 68705S3 microcontroller.  It seems 
perfect for the job.  It has four high-impedance A-D converters, serial 
communications built in, an EPROM for the program, several timers, and 
enough parallel I/O lines to get the job done.  It requires little 
external support circuitry.  I don't think it has enough oomph to do the 
trig, but it should be able to handle timing calculations fine.  Though 
the three receivers are good enough for game stuff, ideally one would want 
to have more to cover more orientations and positions.  Perhaps a room 
with a receiver at each of the eight corners would work well.

Eric Pepke                                    INTERNET: pepke@gw.scri.fsu.edu
Supercomputer Computations Research Institute MFENET:   pepke@fsu
Florida State University                      SPAN:     scri::pepke
Tallahassee, FL 32306-4052                    BITNET:   pepke@fsu

Disclaimer: My employers seldom even LISTEN to my opinions.
Meta-disclaimer: Any society that needs disclaimers has too many lawyers.


------

later,
rdl

pepke@SCRI1.SCRI.FSU.EDU (Eric Pepke) (10/03/90)

Has anybody kept a copy of the message I sent out a little more than a 
week ago describing the internals of Mattel's power glove?  I neglected to 
keep a copy, and it has expired here.  I would like to post an update, and 
it would be nicer if I could read what I've already written.

Eric Pepke                                    INTERNET: pepke@gw.scri.fsu.edu
Supercomputer Computations Research Institute MFENET:   pepke@fsu
Florida State University                      SPAN:     scri::pepke
Tallahassee, FL 32306-4052                    BITNET:   pepke@fsu

Disclaimer: My employers seldom even LISTEN to my opinions.
Meta-disclaimer: Any society that needs disclaimers has too many lawyers.

pepke@SCRI1.SCRI.FSU.EDU (Eric Pepke) (10/06/90)

The Spine-Chilling Saga of the Power Glove, Part 2

I got an MC68705S3 processor from Motorola.  I also got a board for 
programming it, which Motorola sends out for free.  It is designed to copy 
the program from an external EPROM to the processor's built-in EPROM using 
a bootstrap program in the processor.  It also has a connection for an IBM 
PC printer cable so that you can program it without going through the 
extra step of programming an EPROM.  Unfortunately, the sections of the 
documentation that refer to this process have statements like, "Do not 
use!  Does not work yet!" scrawled over them.  It's hard to imagine how 
the hardware connection could fail to work.  Maybe they mean the software. 
Further experiments will have to wait until I get the parts to make the 
programmer work and I replenish my stock of IC's for experimentation.

Meanwhile, I have been doing some thinking about the math involved.  The 
time for a signal to get to a receiver gives you a distance, which you can 
think of as the radius of a sphere.  Three receivers give you three 
spheres.  Two spheres intersect in a circle (if they intersect at all).  
An additional sphere usually intersects with a circle at two points.  The 
two points reflect each other in the plane determined by the centers of 
all the spheres.  If you know that the glove is in front of the sensors, 
you can choose the point in front of the sensors.

Now, in the general case, it takes a fair amount of trig to solve this 
problem.  Fortunately and unfortunately, with the power glove as it is 
normally used, this is quite simplified.  First of all, one deals with a 
fairly small delta around a predetermined center.  Knowledge of the three 
radii for the center can be introduced into the equations at an early 
stage to get an inexpensive simplification.  Second of all, the distance 
to the sensor array is large compared to the spacing between elements of 
the array, though not too large.  Effectively, this means that the hard 
3-D problem can be approximated by two easier 2-D problems.

This is fortunate, because it simplifies the amount of processing that the 
power glove has to do.  It is unfortunate, because it probably means that 
the designers of the software made those approximations, which may mean 
that figuring out how to program the internal processor won't help if you 
want to do something very sophisticated.

Of course, I have a vested interest in justifying the effort I am making 
in replacing the procesor for one of my own, which may affect my 
willingness to believe this.

Eric Pepke                                    INTERNET: pepke@gw.scri.fsu.edu
Supercomputer Computations Research Institute MFENET:   pepke@fsu
Florida State University                      SPAN:     scri::pepke
Tallahassee, FL 32306-4052                    BITNET:   pepke@fsu

Disclaimer: My employers seldom even LISTEN to my opinions.
Meta-disclaimer: Any society that needs disclaimers has too many lawyers.

gaspo@ds1.scri.fsu.edu (Scott Gasparian) (10/26/90)

Ok, I'm new to this group, so if this is the wrong place, let me
know (and if it is, you should).

What I was wondering is, the general status of input devices for
VR systems.  Like, I keep seeing references to a "6D" ball or
something. What excactly is it? Also, has any tinkerers out there
managed to connect the nintendo's "power glove" setup to interface
with, say, standard serial port of a pc?  I had an idea awhile
ago that I actuallt tinkered with that resulted in a joystick
type contraption that worked like so:

standard joystick movement for x and y planes
slide the stick up and down (telescopic like) for z plane
twist the stick for adjusting x/y perspective
thumb roller for z perspective.

What I'm looking for is anything and everything that can
relatively cheaply provide at least the above inputs, and
possibly more.  Garage creations, marketed products, references,
pointers etc.....  In other words, send anything you have on
interfaces for a poor student who likes to tinker.

/----------------------------------------------------------------------------\
| Scott "gaspo" Gasparian - Teenage Mutant Ninja Technician |    "back user!"|
| Supercomputer Computations Research Institute             |\   ,_      _/\ |
| 400 SCL, F.S.U., Tallahassee, FL 32306-4052               |/ _/ '__       \|
| gaspo@ds1.scri.fsu.edu     | "I do NOT do lunch, I do NOT ||/  / ,,"   __o/|
| gaspo@scri1.scri.fsu.edu   | wear 'power ties', and I do  | \_\|_\,     /  |
| (904) 644-4277 / 222-5630  | NOT EVER do COBOL! Get it?!" | /+-+-\    _/\_ |
\----------------------------------------------------------------------------/

pepke@SCRI1.SCRI.FSU.EDU (Eric Pepke) (04/08/91)

Saturday, April 6, I went to the local Toys 'R' Us.  The Power Gloves had 
been removed from their normal location behind bulletproof glass and 
dumped in by the carrying cases.  There were about a dozen.  They had 
indeed been discounted to $50.  Fearing that this did indicate their 
discontinuance, I bought two.  Along with the one that I have, this gives 
me enough ultrasonic recievers to wire a room and enough gloves to last 
for a while.  If anybody is still interested in the technology, it might 
be a good idea to snap up one or two while there is still time.  I wish I 
had bought the Sega flip glasses when I could, too.

In a way, I'm glad they're being discontinued.  I was facing a 
psychological block getting mine to work, because I had invested a great 
deal of effort and some money in a Motorola microprocessor which is 
absolutely perfect for the job but is soon to be discontinued.  I didn't 
want to continue and lock myself into this processor, and I didn't have 
the gumption to switch processors.  Now, it really doesn't matter.  So,
expect more installments about the Power Glove from me RSN.

Eric Pepke                                    INTERNET: pepke@gw.scri.fsu.edu
Supercomputer Computations Research Institute MFENET:   pepke@fsu
Florida State University                      SPAN:     scri::pepke
Tallahassee, FL 32306-4052                    BITNET:   pepke@fsu

Disclaimer: My employers seldom even LISTEN to my opinions.
Meta-disclaimer: Any society that needs disclaimers has too many lawyers.

galt@dsd.es.com (Greg Alt - Perp) (05/03/91)

Well, so far I haven't found an extension cord to do the Byte magazine idea
for connecting it to my PC, but I did have an idea...  How about sending input
from the Power glove through the game port?  The game port has 4 analog inputs
(I think).  Now, the glove has a total of 11 analog outputs (2 3D positions, 5
fingers).  Is it possible to have 2 game ports (somehow using separate 
addresses)?

This would allow the position/rotation plus the thumb and forefinger inputs.  
Also, if anyone has info about the source code mentioned in the BYTE magazine, 
please post the source code, or at least the phone number for the byte bbs.
Thanks.

     Greg

galt@dsd.es.com (Greg Alt - Perp) (05/20/91)

Well, I gave up on finding an extension cord for the 
nintendo controller.  I called every local place imaginable.
I decided to just solder some wires to the printer port 
connector, and shove them into the nintendo connector.  For
the 5 volt supply, I used an old variable power supply that I
built in highschool.  I got it to work almost perfectly.  The
first thing I noticed is that the receivers need to be held 
several inches above the monitor so that the keyboard doesn't
block the lower one.  Also, the position (up/down/left/right)
is very jittery.  Even when centered, it jumps back and forth
between different values.  I think this is because my 5 volt
source is too noisy (any suggestions?), but it works perfectly
if I put it in program 14(?) that uses the buttons on the glove.
The thumb/finger info seems to work just fine also.

Since I didn't feel like doing the assembly, I wrote a short
C program that gets the info and prints it out.  If people are
interested, I'll post it. 
 
(does anyone know if the power glove can use 4.5 volts instead 
of 5?)
    Greg

[Moderator(Mark): I have requested the author's source code-- 
 I will post it as soon as I receive it.]

galt@hellgate.utah.edu (Greg Alt) (05/21/91)

> [Moderator(Mark): I have requested the author's source code-- 
>  I will post it as soon as I receive it.]

ok, here it is:

#include <dos.h>
main()
{
int b,x;
while(1)
  {
  outportb(0x378,1);
  outportb(0x378,3);
  outportb(0x378,1);
  for(b=x=0;x<8;x++)
    {
    b=b<<1;
    b+=(inportb(0x379)&16)>>4;
    outportb(0x378,0);
    outportb(0x378,1);
    }
  b^=255;
  gotoxy(1,1);
  printf("%d%d%d%d%d%d%d%d\n",(b&128)>>7,(b&64)>>6,(b&32)>>5,
         (b&16)>>4,(b&8)>>3,(b&4)>>2,(b&2)>>1,b&1);
  }
}


It's exactly the same as the assembly code shown in the BYTE
article, but I figured it would be much simpler to do it in 
C.  The final value from the glove is in b at the end of the 
loop.  You can change this to a simple function like:
 
char powerglove()
{
. 
[Moderator(Mark): Is this the end, or a mailer glitch?]

galt@toddler.es.com (Greg Alt - Perp) (05/23/91)

Does anyone have any ideas how to put the power glove into
hi-res mode?  I was thinking there are a few different ways
that it could be done:
 
1) the nintendo system sends a program to the glove.
2) the nintendo system sends a secret code to the glove
   which tells it to load a pre-existing program.
3) the nintendo system tells the glove to use a specific
   pre-existing program #.
4) the user tells the glove to use a specific pre-existing
   program #.


Now, if the way it is done is #1, then it is essentially
impossible to figure it out on ourt own.  If it is #2, then
it will be difficult, but not impossible.  If it is #3 or
#4, then we should be able to find it just by trying all 
possible program numbers (probably either 256 or 65536)
manually.  I would appreciate it if someone who knows would
post anything, otherwise, I will try out the assumption that
it is #3 or #4.  The other assumption that I am making is 
that the connection described in BYTE will allow all the 
information to be sent.
 
I tried different programs, and most seemed very similar to 
1-14, but I noticed that 104 sometimes seems to get info
from 4 fingers, but I'm not sure the format.  It doesn't seem
to give any position info.  

If anyone else has success, please post it here...  It would
be great to get this info into the public domain.  Then we 
could all start doing more interesting things...
       Greg

yonder@netcom.com (Christopher Russell) (06/16/91)

Well, I finally got my PowerGlove hooked up to my computer (Atari ST).
My plans are to make a controller in the future.  Currently I have 
just used the BYTE article and have it hooked up in standard "Low Res"
mode.  The glove seems to be very sensitive to the frequency of the 
"RESET" and "CLOCK" (BYTE article terminology).  It seems to work 
very intermittently (or not at all) as I add or delete instructions 
from my program inbetween the reading of data.  I'm not sure exactly
how it should "solid" the glove should work, because I do not have a
Nintendo.  When I am using it there always seems to be at least some 
"noise", i.e. the LED's and the data read from the glove is "mostly"
correct.  Uhhg, anyways, I could use any tips or ideas (schematics).
Thanks to everyone who has already supplied me with info.  Looks like
it is time to track down an O'scope....
-- 
Christopher L. Russell (yonderboy)  Phone: (408)378-9078 Campbell,CA
yonder@netcom.COM or clr40@amail.amdahl.com or chrisr@leland.stanford.edu