|
Useful Tip
|
1. Start and maintain a logbook to record the changes you make to
the settings and configurations.
2. Keep a note of the wiring layout of all the downstream components
for your platform |
| |
| |
| |
|
USB Modules
Provided as part of the Motion Drive 3.0 package are two USB modules.
The software sends the drives signals out to these modules and collects
inputs from the platform sensors via these modules.
They are numbered USB#1 and USB #2. Do not mix them up. Each one
is already configured to perform a specific role in the input and output
of the signals.
USB#1 is configured to send out the drive signals to up to three platform
drives/motors.
USB#2 is configured to do several roles:-
1. It sends out the signal indicating whether the platform drive motor
should go forwards or reverse (reverse signal).
2. It sends out the control signal for each DAC to enable the DAC to convert
digital signals to analogue voltages.
3. It collects the state of the set of platform sensor switches for input
to the PC.
Essential Information
Care and location of your USB Modules
Storage. The USB Modules are a delicate item of electronic circuitry.
They are supplied to you in special anti-static protective wrapping and
should be kept stored in that wrapping until ready for use in a clean
dry place.
Location. They should be located in a suitable place on your motion
base, where they will not be subject to physical or electrical damage,
preferably firmly fixed inside a suitable elecrtical enclosure box of
the type that can be purchased from component suppliers.
Installation. When handling and installing the modules, you should
take care not to incur damage through careless handling and static electrical
discharge. Make sure you use a suitable earthing method on yourself before
and during handling. When connecting downstream components (DAC boards
etc.), ensure that the modules are NOT powerd up by disconnecting them
from the USB port of your PC.
How the modules work
Some basics
Computers work in digital format, being essentially vast switching machines.
They run programmes and use data in digital form - a series of ones and
zeros, representing a switch state of on and off. When we see letters
and decimal numbers being displayed, inside the computer they are represented
as a series of ones and zeros. Each one or zero is a bit. A group of bits
is called a byte - be it a group of 16 bits or, more usually now, 32 bits.
Numbers can be interpreted by using binary, or Base 2, code (as opposed
to what we are used to, which is decimal or Base 10 code). Instead of
having columns of units, tens, hundreds etc, in binary the columns are
units, twos, fours, eights etc. Instead of using the terms one and zero
to say whether the bit is switched on or off, convention is that a bit
is termed 'high' when on or one, and 'low' when off or zero.
The USB modules use groups of 8 bits, which are called Words. Conventionally
the bits are numbered from 0 to 7 as shown:-
| Bit No |
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
| Decimal Value (if high) |
128
|
64
|
32
|
16
|
8
|
4
|
2
|
1
|
| |
|
|
|
|
|
|
|
|
Bit 0, being the lowest value is called the Least Significant Bit (LSB).
Bit 7, being the highest value is called the Most Significant Bit (MSB).
So, using the 8-bit word system, we can represent any value from 0 to
255 (being the sum of all the bits if all are high). Zero would be shown
as 00000000, and 255 as 11111111. An in between value might be 117 and
shown as 01110101.
The USB Modules
Each modules has three ports (groups of input/output pins). Each group
of pins has eight data pins and two voltage pins (+5V and Ground 0V).
Following on from above, each port can show an 8-bit word according to
the state (high or low) of each of the data pins. So we can input or output
values between 0 and 255.
How the data is actually transmitted depends on the type of DAC board
being used. The DAC should in any case be one that accepts 8-bit words.
Each USB module also has a type A USB socket. This is used to connect
the module to the computer.
Unipolar DAC Operation
If the DAC configuration is unipolar
then the output signal for the motor will be between 0 and 255, which
will be converted to a control voltage
of 0V to 5V maximum. In addition, there needs to be two other signals
for the DAC. The first is the control signal, which is a single pin held
low to allow new data into the DAC and held high to allow the DAC to output
the analogue control voltage corresponding to the input it received. The
second is the signal which dictates whether the platform drive is to go
forwards or backwards. In unipolar mode this is done by a single pin held
low for forwards and high for reverse.
| Decimal |
Binary |
Reverse pin |
Voltage |
Result |
| 255 |
11111111 |
low (0) |
+5V |
Full speed forwards |
| 117 |
01110101 |
low(0) |
+2.3V |
Half-ish speed forwards |
| 0 |
00000000 |
low or high |
0V |
Stop |
| -145 |
10010001 |
high(1) |
+2.8V |
Half-ish speed backwards |
| -255 |
11111111 |
high (1) |
+5V |
Full speed backwards |
Bipolar DAC Operation
In bipolar operating mode, the DAC
can output either positive or negative voltages, for forward or reverse
platform drive directions. This is achieved by using one of the 8 word
pins as a forward/reverse indicator and the other seven pins for the amount
of power. The pin used for signalling forward/reverse is the pin for Bit
7, the MSB. So, the maximum value of the other seven pins is now 127,
giving an output control voltage of -2.5V to +2.5 V. Motion Drive allows
for two different types of bipolar DAC, depending on how the bipolar range
is set out within the 8 bits.
a) For the Classic Flight DAC (DAC mode = 2)
The Classic Flight DAC sets out the range of power values such that a
decimal value of zero equates to full speed backwards and a decimal value
of 255 equates to full speed forwards. Motion Drive does the conversion
so that the correct decimal value is sent to the DAC to signal both direction
and speed.
| Decimal |
Binary |
Voltage |
Result |
| 255 |
11111111 |
+2.5V |
Full speed forwards |
| 180 |
10110100 |
+1.2V |
Half-ish speed forwards |
| 128 |
10000000 |
0V |
Stop |
| 60 |
10111100 |
-1.2V |
Half-ish speed backwards |
| 0 |
11111111 |
-2.5V |
Full speed backwards |
b) For Other DACs (DAC mode = 3)
Here the power and direction signals are kept separate. The power signal
is expressed using the first seven bits and the direction signal is expressed
using Bit 8, with backwards being set by that bit being high. Again, Motion
Drive will send out the correct decimal value to signal motor speed and
direction. If using a DAC other than the Classic Flight DAC, you do need
to check that the signals required are inline with those sent by Motion
Drive.
| Decimal |
Binary |
Voltage |
Result |
| 127 |
01111111 |
+2.5V |
Full speed forwards |
| 60 |
00111100 |
+1.2V |
Half-ish speed forwards |
| 0 or 128 |
00000000 or 10000000 |
0V |
Stop |
| 180 |
10110100 |
-1.2V |
Half-ish speed backwards |
| 255 |
11111111 |
-2.5V |
Full speed backwards |
Connecting and Installing the USB Modules
To connect the modules to your PC, simply connect each module using a
suitable USB cable (type A to type B) (not supplied), to the USB port
of your PC. We recommend that you use a USB hub as this will allow you
to place your PC away from the motion platform and reduces the number
of cables around. If you intend to place your PC more than 2metres away
from the platform (again a good idea) it may be necessary to buy a powered
USB Hub, which will boost the signal to and from the modules.
On connection of the first USB module, your PC will start to look for
the driver for it. You should go through the appropriate procedure to
direct your PC to the driver located in the folder called USBDriver, which
you transferred from the CD-ROM.
Once both modules are connected and the driver installed, you should check
in Device Manager where you should see the USB modules on the list of
USB devices.
It doesn't matter which USB module is connected to which USB port on
your PC, the software will identify and allocate tasks to USB#1 and USB#2
correctly. It does matter what you connect to the ports of the USB modules
though. That is dealt with below.
Having done the connection to your PC, you can open Motion Drive. On the
main page you should see that the message titled Connection to Platform
should say "Connected OK". Once that is seen close Motion Drive
and disconnect the USB cables before proceeding with downstream connection.
Connecting Downstream equipment.
Downstream equipment in the word we shall use for the rest of the drive
control system (DAC boards, motor control boards et al) and the sensors
on your platform.
First it is necessary to understand the pin layout of the ports on each
USB module. Each port has 10 pins. These are shown and their designations
given below:-
| |
USB Pin
|
Use
|
Bit No.
|
Value (high)
|
 |
1
|
+5V
|
-
|
-
|
|
2
|
I/O 8
|
Bit 7
|
128
|
|
3
|
I/O 7
|
Bit 6
|
64
|
|
4
|
I/O 6
|
Bit 5
|
32
|
|
5
|
I/O 5
|
Bit 4
|
16
|
|
6
|
I/O 4
|
Bit 3
|
8
|
|
7
|
I/O 3
|
Bit 2
|
4
|
|
8
|
I/O 2
|
Bit 1
|
2
|
|
9
|
I/O 1
|
Bit 0
|
1
|
|
10
|
GND
|
-
|
-
|
| |
|
|
|
|
The Ports (Port A, Port B and Port C) are clearly marked on the board.
Connection to the ports is achieved by using a standard IDC 10-way header
plug and ribbon cable, both of which are easily obtainable from component
suppliers.
What to connect to which Port on which Module?
The table below set out the configuration of each pin for each Port on
both modules. You should connect your downstream equipment accordingly.
Reminder: check that you are connecting to the correct Port on the
correct USB module - this matters if your platform is to work correctly.
Check the modules are disconnected from your PC first.
USB Module #1 connections
|
USB Pin
|
Port A Function
|
Port B Function
|
Port C Function
|
|
1
|
+5V |
+5V |
+5V |
|
2
|
Pins 2 to 9 -
Output signal
to Drive A |
Pins 2 to 9 -
Output signal
to Drive B |
Pins 2 to 9 -
Output signal
to Drive C |
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
GND |
GND |
GND |
USB Module #2 connections
|
USB Pin
|
Port A Function
|
Port B Function
|
Port C Function
|
|
1
|
+5V |
+5V |
+5V |
|
2
|
Pitch sensor BB |
Spare |
Control Pin Drive C |
|
3
|
Roll sensor RR |
Heave sensor UU |
Control Pin Drive B |
|
4
|
Pitch sensor Back |
Spare |
Control Pin Drive A |
|
5
|
Roll sensor Right |
Heave sensor Up |
Control Pin Drive D |
|
6
|
Pitch sensor Forward |
Spare |
Reverse Pin Drive D |
|
7
|
Roll sensor Left |
Heave sensor Down |
Reverse Pin Drive C |
|
8
|
Pitch sensor FF |
Spare |
Reverse Pin Drive B |
|
9
|
Roll sensor LL |
Heave sensor DD |
Reverse Pin Drive A |
|
10
|
GND |
GND |
GND |
For more details on Sensor terminology and configuration see the section
on Sensor Configuration.
|