mocapsim - Motion Capture Simulator & Editor

back to tabinda© | mocapsim on sourceforge | download mocapsim
subglobal1 link | subglobal1 link | subglobal1 link | subglobal1 link | subglobal1 link | subglobal1 link | subglobal1 link
subglobal2 link | subglobal2 link | subglobal2 link | subglobal2 link | subglobal2 link | subglobal2 link | subglobal2 link
subglobal3 link | subglobal3 link | subglobal3 link | subglobal3 link | subglobal3 link | subglobal3 link | subglobal3 link
subglobal4 link | subglobal4 link | subglobal4 link | subglobal4 link | subglobal4 link | subglobal4 link | subglobal4 link
subglobal5 link | subglobal5 link | subglobal5 link | subglobal5 link | subglobal5 link | subglobal5 link | subglobal5 link
subglobal6 link | subglobal6 link | subglobal6 link | subglobal6 link | subglobal6 link | subglobal6 link | subglobal6 link
subglobal7 link | subglobal7 link | subglobal7 link | subglobal7 link | subglobal7 link | subglobal7 link | subglobal7 link
subglobal8 link | subglobal8 link | subglobal8 link | subglobal8 link | subglobal8 link | subglobal8 link | subglobal8 link

hardware

Purpose of Use

This IC has a vital role in the whole circuit. It selects one analog channel and outputs that channel to our ADC IC. The selection is done via 7414 HEX inverter or in other words from control pins of our Parallel port.

Actual Configuration of 4051

It has inputs from 8 sensors in analog format varies from 0V to 5V DC. Now we cannot have 8 ADC ICs, so we need to multiplex all 8 inputs to one ADC IC. The input of sensors are given at pin # 13,14,15,12,1,5,2,4. VCC is given at pin # 16 while GND is at pin # 8.

Pin # 6 is low enable so grounded and pin # 7 is VEE which should be less than VCC so we grounded it as well. Our input selections lines are at pin # 9,10,11 and out put is at pin # 3 which will be applied to ADC IC.

ZN448E

8-bit successive approximation ADC

9us conversion time (110kHz max sampling rate)

+5 volt (4.5 to 5.5v) supply, 25mA current consumption

inbuilt 2.55 volt reference

Max error: +/- 0.5LSB

18-pin DIL package

ZN448E is only available ADC which gives you direct interfacing to PC parallel port. That's why it's a costly device generally available @ Rs. 950.

Purpose of Use

Its purpose is very obvious we are using analog sensors and our system is interfaced with PC so we can't pass that analog output to that PC as it is. So we need ADC of type which can give direct interfacing to parallel port. And ZN448E is only available ADC, which gives required result.

Configuration and pin description

As mentioned before it is available in package of 18 pins.

Pin 1 is output pin which will give you 5V during conversion of Analog signal so it can be passed to Busy status pin of Parallel port but we are not using it because it is working at very high speed and our sensor are not working at that much speed.

Pin 2 is Enable pin, which is low enable so we grounded it. Pin 3 is used to receive clock, which we are generating from our analog input via 47pf capacitor and 22KR resistor. Pin 4 is used to initialize the ADC for incoming data. Pin 5 is Rext which require –5V supply which is provided by out Hex Schmitt-trigger inverter at pin 4 via capacitors and diode network. Pin 6 is Analog In i.e. it receive analog data to be digitized. Pin 7 and 8 are V reference in and V reference out respectively used to specify reference voltage in our case it is provided from the same Analog in with 10M resistance. Pin 9 is GND. Pin 10 is VCC i.e. 5V and Pin 11 to 18 are 8 digital lines passes to computer parallel port. It can give values between 0 and 255 (as we have 8 digital lines).

ADC0408

 The most commonly available and cheapest analog to digital converter is 0408. It has a conversion time of about 10usec. It is based on successive approximation technique in which all 8 bits are made zero and then it checks for MSB first by generating a reference voltage and if the incoming voltage is more than its reference voltage it makes that MSB 1.

Similarly it for the second bit and checks it with reference voltage and makes that bit 1 or 0. The increment is done by a counter. It goes from MSB to LSB and after one complete calculation it outputs whole 8 bits to output pins and go for other iteration with in 10usec. Time period is set by external RC circuit connected between pin 4 and pin 19.

The formula to find time required for a single iteration is

T=(1.1)(R*C).

In our circuit we used 150pf capacitor with 10kR resistance so time is 1.65uSec. We can increase it by increasing value of resistance or capacitor.

The circuit diagram is shown below

74245

74245 is actually a buffer in general. It is called as bi-directional buffer with tri-state output.

It has two busses bus A and B with one direction bit which controls the direction of data in this case we are using direction from B to A hence we grounded direction pin.

74LS245 is the best option to used with parallel port it source and sinks all current to and from external circuit and hence securing out port completely in case of short circuit in external circuit it can sours up to 20mA of current in above that it become fatly and ants as open circuit.

The Circuit of Interface Card

 

 

 

 

 

 

 

Status

Up till this point the status of my project would have been quite evident. Still I have put my best endeavors to provide the best possible realization of the project. I have also provided brief sketches of different dimensions and attributes to give a deep insight into the project at the grass root level which quite realistically speaking would be heavier and possess larger substance than a thousand pages worth of reports in written format to highlight the status of the project.

Currently the system consists of 16 sensors, which can be attached to any joint as per requirement but for the demonstration I have connected these sensors to the following joints.

  • Two sensors (Twin axis sensor) on the right shoulder
  • Two sensors (Twin axis sensor) on the left shoulder
  • One sensor on the right and left elbow
  • One sensor on the right and left wrist
  • One sensor on the right and left knee
  • One sensor on the right and left thai
  • One sensor on the right and left ankle
  • Two sensors for X & Y Movement

 

 

 

 

 

 

 

 

 

Fixing of sensors

 

 

 

 

Mechanical dynamics of my project is by far the most interesting feature. It involves the blend of comedy and innovation. Its a roller coaster ride from a high-tech industrial setup where every thing is available to a lay man disposition where nothing is available. Thereby inducing an evident and far sighting reality in the humble misery where we had to use our available recourses. The motion of human body is highly complex and intricate and thus definitely requires an expert mechanical engineer and a lathe machine operator to provide for a mechanism which moves the variable resistance proportional to the complexities, as regards the motion of the body. During this innovation process while sitting in the room our brain was working for all possible solutions.

The first bunch of variable resistances saw a sad demise when we went to the welding garage and tried to weld these wires with their arms. The resistances couldn't withstand the temperature at which the welding was done and they melted from inside under high temperature. I became aware of this fact when their sensitivity was tempered by welding.

Resistances were made stable on thermopol by placing those hanger wires upon. Passing the wire through the resistance knob was a cumbersome task, because it requires soft hands and more preciously speaking a touch of delicacy. The wire was heated via a candle and passed through the knob with soft hands such that it went all the way through with precautionary measures such as avoiding the wire to slide astray and waiting for an ample amount of time so that the melted knob cools down. now one end of the wire is fixed to the knob and other end is floating, providing basis for the rotation of the resistance knob by using its floating end in a way that when the system is placed on the human body it provides mechanism for changing the resistance without hindering with the complex motion of the body. This involved the considerable amount of repetitive molding, soldering, turning, twisting, bending and heating of the wire from the floating end as per the requirement and specification within the physical constraints imposed upon our mechanical system because of using whatever that was readily available. The initial values of the resistances had to be adjusted in order to provide data to the interface card so that it manipulates the software efficiently. The motion from the floating end should be adjusted so that it provides maximum possible deflection.

When the wire was passed through thermopol and taped on a suitable place adjacent to the joint which provides as much deflection as possible, thus making the floating end stationary with the body. This taping and placement might seem easy but believe us it was the mammoth task on our part.

 

The best part of this design process was designing the twin axis variable resistance for the shoulder and providing mechanism so that all the motions of the shoulder should not hinder or intermingle each other. the human shoulder moves in three dimensions we could efficiently cater two out of these motions but for the third motion we didn't develop a system however we had a proposal that if this question was asked to us then we had a solution in my mind that we could use another resistance separately from this twin axis variable resistance network and thereby catering the third dimension as well. However the sole purpose of my project was to provide an intuitive thought ,an outlook or more precisely speaking an ideology which induces an innovation but ultimately and definitely will take you to a final achievement.

The Parallel Port

Details of Parallel Ports

The Parallel Port is the most commonly used port for interfacing home made projects. This port will allow the input of up to 9 bits or the output of 12 bits at any one given time, thus requiring minimal external circuitry to implement many simpler tasks. The port is composed of 4 control lines, 5 status lines and 8 data lines. It's found commonly on the back of your PC as a D-Type 25 Pin female connector. There may also be a D-Type 25 pin male connector. This will be a serial RS-232 port and thus, is a totally incompatible port.

Newer Parallel Port 's are standardized under the IEEE 1284 standard first released in 1994. This standard defines 5 modes of operation which are as follows,

  1. Compatibility Mode
  2. Nibble Mode. (Protocol not Described in this Document)
  3. Byte Mode. (Protocol not Described in this Document)
  4. EPP Mode (Enhanced Parallel Port ).
  5. ECP Mode (Extended Capabilities Mode).

The aim was to design new drivers and devices which were compatible with each other and also backwards compatible with the Standard Parallel Port (SPP). Compatibility, Nibble & Byte modes use just the standard hardware available on the original Parallel Port cards while EPP & ECP modes require additional hardware which can run at faster speeds, while still being downwards compatible with the Standard Parallel Port.

Compatibility mode or "Centronics Mode" as it is commonly known, can only send data in the forward direction at a typical speed of 50 kbytes per second but can be as high as 150+ kbytes a second. In order to receive data, you must change the mode to either Nibble or Byte mode. Nibble mode can input a nibble (4 bits) in the reverse direction. E.g. from device to computer. Byte mode uses the Parallel's bi-directional feature (found only on some cards) to input a byte (8 bits) of data in the reverse direction.

Extended and Enhanced Parallel Ports use additional hardware to generate and manage handshaking. To output a byte to a printer (or anything in that matter) using compatibility mode, the software must

•  Write the byte to the Data Port.
•  Check to see is the printer is busy. If the printer is busy, it will not accept any data, thus any data which is written will be lost.
•  Take the Strobe (Pin 1) low. This tells the printer that there is the correct data on the data lines. (Pins 2-9)
•  Put the strobe high again after waiting approximately 5 microseconds after putting the strobe low. (Step 3)

This limits the speed at which the port can run at. The EPP & ECP ports get around this by letting the hardware check to see if the printer is busy and generate a strobe and /or appropriate handshaking. This means only one I/O instruction need to be performed, thus increasing the speed. These ports can output at around 1-2 megabytes per second. The ECP port also has the advantage of using DMA channels and FIFO buffers, thus data can be shifted around without using I/O instructions.

Hardware Properties

Below is a table of the "Pin Outs" of the D-Type 25 Pin connector and the Centronics 34 Pin connector. The D-Type 25 pin connector is the most common connector found on the Parallel Port of the computer, while the Centronics Connector is commonly found on printers. The IEEE 1284 standard however specifies 3 different connectors for use with the Parallel Port. The first one, 1284 Type A is the D-Type 25 connector found on the back of most computers. The 2nd is the 1284 Type B which is the 36 pin Centronics Connector found on most printers.

IEEE 1284 Type C however, is a 36 conductor connector like the Centronics, but smaller. This connector is claimed to have a better clip latch, better electrical properties and is easier to assemble. It also contains two more pins for signals which can be used to see whether the other device connected, has power. 1284 Type C connectors are recommended for new designs, so we can look forward on seeing these new connectors in the near future.

Pin No (D-Type 25)

Pin No (Centronics)

SPP Signal

Direction In/out

Register

Hardware Inverted

1

1

nStrobe

In/Out

Control

Yes

2

2

Data 0

Out

Data

 

3

3

Data 1

Out

Data

 

4

4

Data 2

Out

Data

 

5

5

Data 3

Out

Data

 

6

6

Data 4

Out

Data

 

7

7

Data 5

Out

Data

 

8

8

Data 6

Out

Data

 

9

9

Data 7

Out

Data

 

10

10

nAck

In

Status

 

11

11

Busy

In

Status

Yes

12

12

Paper-Out / Paper-End

In

Status

 

13

13

Select

In

Status

 

14

14

nAuto-Linefeed

In/Out

Control

Yes

15

32

nError / nFault

In

Status

 

16

31

nInitialize

In/Out

Control

 

17

36

nSelect-Printer / nSelect-In

In/Out

Control

Yes

18 – 25

19-30

Ground

Gnd

 

 

Table Pin Assignments of the D-Type 25 pin Parallel Port Connector.

The above table uses "n" in front of the signal name to denote that the signal is active low. e.g. nError. If the printer has occurred an error then this line is low. This line normally is high, should the printer be functioning correctly. The "Hardware Inverted" means the signal is inverted by the Parallel card's hardware. Such an example is the Busy line. If +5v (Logic 1) was applied to this pin and the status register read, it would return back a 0 in Bit 7 of the Status Register.

The output of the Parallel Port is normally TTL logic levels. The voltage levels are the easy part. The current you can sink and source varies from port to port. Most Parallel Ports implemented in ASIC, can sink and source around 12mA. However these are just some of the figures taken from Data sheets, Sink/Source 6mA, Source 12mA/Sink 20mA, Sink 16mA/Source 4mA, Sink/Source 12mA. As you can see they vary quite a bit. The best bet is to use a buffer, so the least current is drawn from the Parallel Port.

Centronics

Centronics is an early standard for transferring data from a host to the printer. The majority of printers use this handshake. This handshake is normally implemented using a Standard Parallel Port under software control. Below is a simplified diagram of the `Centronics' Protocol.

Centronics WaveformData is first applied on the Parallel Port pins 2 to 7. The host then checks to see if the printer is busy. i.e. the busy line should be low. The program then asserts the strobe, waits a minimum of 1uS, and then de-asserts the strobe. Data is normally read by the printer/peripheral on the rising edge of the strobe. The printer will indicate that it is busy processing data via the Busy line. Once the printer has accepted data, it will acknowledge the byte by a negative pulse about 5uS on the nAck line.

 

Quite often the host will ignore the nAck line to save time. Latter in the Extended Capabilities Port , you will see a Fast Centronics Mode, which lets the hardware do all the handshaking for you. All the programmer must do is write the byte of data to the I/O port. The hardware will check to see if the printer is busy, generate the strobe. Note that this mode commonly doesn't check the nAck either.

Port Addresses

The Parallel Port has three commonly used base addresses. These are listed in table 2, below. The 3BCh base address was originally introduced used for Parallel Ports on early Video Cards. This address then disappeared for a while, when Parallel Ports were later removed from Video Cards. They has now reappeared as an option for
About | Copyright | Contact Me | © 2006-2008 M.H.A.Q.S.