DLP-TILT-G

DLP-TILT-G
LEAD FREE
USB-BASED TILT SENSOR / ACCELEROMETER / VIBRATION
ANALYSIS / AC SIGNAL ANALYSIS MODULE
Features:
• Microcontroller Preprogrammed with Data-Acquisition Functions
• 3-Axis, 1.5g Accelerometer
• Single-Byte Access to All Firmware Features
• Continuously Streaming Analog Sample Rates from 100 to 6K Samples Per Second
• 4th-Generation USB Interface Silicon from FTDI (FT232R with internal ceramic resonator, internal setup
EEPROM, and clock output for microcontroller)
• Virtual COM Port Drivers for Easy Programming Interface
Vreg
3V
14-pin
Interface
Header
for I/Os
and PIC
Flash
Prog.
Interface
VCCIO
USB Type 'B'
Mini Connector
to Host
Windows/Linux/
Mac PC
5V
4th Gen USB IC
VCC
USBDP
USBDM
TXD
RXD
RTS#
CBUS1
FTDI FT232R
PIC
16F88
6MHz
Clock
Analog
Input
Buffer
±3V In
3-Axis
Accelerometer
APPLICATIONS:
•
•
•
•
•
•
•
3-Axis Tilt Sensor
Vibration Analysis (350Hz)
Two-Button Mouse (Pointing Device Alternative)
FFT-Based AC Analysis to 3KHz with Provided Software
+/-3V Analog In (Dual Channel)
Data Acquisition: 0-3V Analog In, Digital I/O
Robotic/Motion Sensing and Control
Rev. 1.1 (May 2009)
1
© DLP Design, Inc.
1.0 INTRODUCTION
The DLP-TILT USB-to-accelerometer module has four primary applications: (1) vibration analysis, (2) tilt
sensing, (3) AC signal analysis, and (4) two-button mouse pointing device alternative.
1.1 VIBRATION ANALYSIS
This module is designed to provide vibration analysis using an on-board, 2-axis, 1.5g accelerometer that is
designed for analysis of frequencies up to 350 Hz. Two of the analog channels in the microcontroller are
dedicated to the on-board accelerometer.
1.2 TILT SENSING
When used as a tilt sensor, the accelerometer can measure tilt up to approximately ±60 degrees from center in
both the X- and Y-axes. The position is reported as an 8-bit or 10-bit integer with the center position reporting
the half-scale value of 128 (8-bit) from the A/D converter in the microcontroller. The A/D converter can also be
run in 10-bit resolution mode with a resulting mid-scale value of 512. The Z-axis measurement data is also
available as a simple voltage measurement.
1.3 AC SIGNAL ANALYSIS
Voltage data from the seven analog channels can be sampled at rates ranging from 100 samples per second to
6000 samples per second, thereby enabling AC analysis of audio frequencies up to 3KHz. One module input
channel is dedicated to an analog input buffer that allows for voltages in the range of ±5 volts to be acquired.
The remaining channels allow voltages in the range of 0-5 volts to be acquired.
The microcontroller and preprogrammed firmware used in this design utilize single-byte commands to control all
aspects of operation. Once the channel and sample rates have been selected, continuous streaming of A/D
data can be enabled and disabled by sending a single-byte command. Data received by the host PC can be
analyzed for frequency content using an FFT-based Windows application available as a free download from the
DLP Design website upon purchase of the module.
1.4 POINTING DEVICE
The DLP-TILT’s preprogrammed firmware includes the feature set of a standard two-button mouse with the
motion of the cursor controlled by the tilt of the DLP-TILT’s printed circuit board and accelerometer.
When the board is level, the cursor remains motionless. As the board is tilted from center, the cursor begins to
move in the direction of the tilt. The further the board is tilted, the faster the cursor moves across the screen.
Two of the digital I/O lines serve as inputs for the buttons. Shorting these lines to ground will cause the
firmware to issue the “Button Down” signal to the host PC, thereby mimicking the operation of standard mouse
buttons.
Shorting a pin to ground in the interface header before powering up the DLP-TILT activates the two-button
mouse functionality. Refer to Section 2.0 for the I/O lines associated with the Pointing Device mode of
operation.
Rev. 1.1 (May 2009)
2
© DLP Design, Inc.
2.0 ELECTRICAL INTERFACE DESCRIPTION
Refer to the electrical schematic at the end of this document for additional details.
Pin
Description
1
MCLR
2
3
4
Vin1
B6/PGC
Vin2
5
SWVCC
6
7
8
9
10
B0
Ground
Ground
B7
B1
11
B3
12
13
14
B4
Ground
Ground
Comments
Pulling this pin to ground will reset the microcontroller.
See Note1.
Analog input for voltages in the range of ±3V.
Analog in (0-3V) or digital I/O. See Note1, Note2.
Analog input for voltages in the range of ±3V.
3 Volt output; switched on once host enumeration is
complete. See Note1.
Digital I/O; See Note2.
Note1.
Analog in (0-3V) or digital I/O. See Note1, Note2.
Digital I/O. See Note2.
Digital I/O. If held low at power up, Pointing Device
functionality is activated. See Note2.
Digital I/O. See Note2.
Note1: These pins are used for reprogramming the Flash program memory area (a user-supplied device
programmer is required).
Note2: Weak pull-ups in the microcontroller are enabled for Port B by default.
2.1 SOFTWARE INTERFACE DESCRIPTION
Royalty-free Virtual COM Port drivers are available for immediate download from www.dlpdesign.com. The
VCP drivers are available for the following systems:
• Windows 2000 / XP / VISTA
• Windows CE
• MAC OS-8 and OS-9 (Mouser function not supported)
• MAC OS-X (Mouser function not supported)
• Linux 2.40 and greater
The DLP-TILT supports two standard baud rates: 38,400 (power-up default) and 128,000 baud.
Communication with the DLP-TILT is accomplished by simply opening the COM Port at 38,400 baud and
sending single-byte commands. The commands are outlined in Section 3.0.
2.2 QUICK START GUIDE FOR WINDOWS
A.
Download the modified Virtual COM Port (VCP) drivers from www.dlpdesign.com. Unzip these files into a
new folder. The VCP drivers that are part of the Windows XP operating system will not work as the PID
code has been changed to FBFA.
B.
Connect the DLP-TILT module to the host PC, then load the USB drivers obtained in Step A.
C.
Open Device Manager and look in “Ports (COM & LPT)” to determine the COM port number that Windows
has assigned to the DLP-TILT module.
Rev. 1.1 (May 2009)
3
© DLP Design, Inc.
D.
Run Windows HyperTerminal by clicking the Start menu, selecting Programs, and navigating through
Accessories to the HyperTerminal folder. Select the following parameters:
Bits Per Second: 38,400
Data Bits: 8
Parity: None
Stop Bits: 1
Flow Control: Hardware
E.
Press the letter ‘P’ on the keyboard. The letter ‘Q’ should appear in the HyperTerminal window. (Please
note that all commands are case sensitive.)
At this point the DLP-TILT module is set up and ready for use with either one of the Windows applications
provided by DLP Design or your own custom software.
3.0 COMMAND SET
To operate the DLP-TILT, the host application simply has to open the COM port assigned to the module, set the
baud rate to 38,400, and send single-command bytes. A complete list of command bytes is presented here:
Please note that the ASCII characters are case sensitive.
Command
Hex
ASCII Character
(Case Sensitive)
Comments
PING
0x50
P
DLP-TILT will return “Q” (0x51) if module is
present and port is open.
38,400 Baud
0x69
i
Default
128,000 Baud
0x39
9
SET BAUD RATE:
A/D OUTPUT RESOLUTION:
8-Bit Data Returned
0x51
Q
10-Bit Data Returned
0x52
R
Default
A/D RETURN DATA TYPE:
Binary/Counts
0x53
S
ASCII Text
0x54
T
Default
A/D SAMPLE RATE (TIMER INTERVAL):
100 Hz
0x41
A
200 Hz
0x42
B
300 Hz
0x43
C
500 Hz
0x44
D
1.0 KHz
0x45
E
1.5 KHz
0x46
F
1.8 KHz
0x47
G
2.0 KHz
0x48
H
Rev. 1.1 (May 2009)
Default
4
© DLP Design, Inc.
2.5 KHz
0x49
I
3.0 KHz
0x4A
J
4.0 KHz
0x4B
K
5.0 KHz
0x4C
L
6.0 KHz
0x4D
M
A/D CHANNEL SELECT:
Ch0 (AN0 / A0)
0x30
0
X axis
Ch1 (AN1 / A1)
0x31
1
Y axis
Ch2 (AN2 / A2)
0x32
2
Z axis
Ch3 (AN3 / A3)
0x33
3
VIN2, J1 Pin 4
Ch4 (AN4 / A4)
0x34
4
VIN1, J1 Pin 2
Ch5 (AN5 / B6)
0x35
5
J1 Pin 3
Ch6 (AN6 / B7)
0x36
6
J1 Pin 9
A/D CLOCK SELECTION:
A/D Off
0x61
a
Internal
0x62
b
Divide by 64
0x63
c
Divide by 32
0x64
d
Divide by 16
0x65
e
Divide by 8
0x66
f
Divide by 4
0x67
g
Divide by 2
0x68
h
Default
A/D CHANNEL ENABLE: (Channels 0, 1, 2, 3 and 4 are Analog In Only)
Ch5 Enable
0x6C
l
Ch6 Enable
0x6D
m
A/D CHANNEL DISABLE: (enable digital I/O)
Ch5 Disable
0x71
q
Ch6 Disable
0x72
r
MAKE DIGITAL OUTPUT AND CLEAR TO LOW :
Port B4
0x75
u
Port B0
0x76
v
Port B1
0x77
w
Port B3
0x78
x
Port B6
0x2D
-
Port B7
0x3D
=
Rev. 1.1 (May 2009)
5
© DLP Design, Inc.
MAKE DIGITAL OUTPUT AND SET HIGH:
Port B4
Port B0
0x56
0x57
V
W
Port B1
0x58
X
Port B3
0x59
Y
Port B6
0x5B
[
Port B7
0x5D
]
RETURN SINGLE A/D CONVERSION TO HOST USING CURRENT SETTINGS:
0x37
7
BEGIN STREAMING A/D CONVERSION DATA TO HOST USING CURRENT SETTINGS:
0x38
8
Halt on Any Character Received
RETURN 8-BIT A/D CONVERSION DATA TO HOST FOR BOTH CHANNELS X AND Y OF
THE ACCELEROMETER WITH OFFSET CORRECTION AND MOUSE BUTTON STATE:
0x7A z
3 Bytes Returned
RETURN 8-BIT A/D CONVERSION DATA FOR ALL 7 CHANNELS
0x73
Rev. 1.1 (May 2009)
s
7 bytes returned
6
© DLP Design, Inc.
4.0 DEMONSTRATION SOFTWARE
Three demonstration programs are available for the DLP-TILT module: AcqFFT.exe, DLPTilt.exe, and
DLPVib.exe. All three programs are available for download from the DLP Design website upon purchase of the
DLP-TILT module.
4.1 ACQFFT.EXE
This program is designed to acquire AC signal data from any of the seven analog inputs on the DLP-TILT, then
calculate and display the FFT of the signal and provide some basic analysis. Numerous program settings are
possible including setting the COM port, A/D channel on the microcontroller, sample rate, number of samples,
and a continuous run mode.
Rev. 1.1 (May 2009)
7
© DLP Design, Inc.
4.2 DLPTILT.EXE
This program is designed to both demonstrate the tilt feature of the accelerometer and present the acquired
voltages from each of the seven analog inputs.
4.3 DLPVIB.EXE
Rev. 1.1 (May 2009)
8
© DLP Design, Inc.
This program is designed to monitor both channels of the accelerometer and graphically display frequency and
amplitude data proportional to the vibration. Limits can be set such that an error indication is made when any
frequency component rises or falls out of the limits.
5.0 MECHANICAL DIMENSIONS IN INCHES (MM)
(PRELIMINARY)
0.23 typ
(5.8 typ)
0.90 typ
(22.9 typ)
1.94 typ
(49.9 typ)
6.0 DISCLAIMER
© DLP Design, Inc., 2008
Neither the whole nor any part of the information contained herein nor the product described in this manual may
be adapted or reproduced in any material or electronic form without the prior written consent of the copyright
holder.
This product and its documentation are supplied on an as-is basis, and no warranty as to their suitability for any
particular purpose is either made or implied. DLP Design, Inc. will not accept any claim for damages
whatsoever arising as a result of the use or failure of this product. Your statutory rights are not affected. This
product or any variant of it is not intended for use in any medical appliance, device, or system in which the
failure of the product might reasonably be expected to result in personal injury.
This document provides preliminary information that may be subject to change without notice.
7.0 CONTACT INFORMATION
DLP Design, Inc.
1605 Roma Lane
Allen, TX 75013
Phone: 469-964-8027
Fax:
415-901-4859
Email Sales:
[email protected]
Email Support: [email protected]
Website URL: http://www.dlpdesign.com
Rev. 1.1 (May 2009)
9
© DLP Design, Inc.
D
CN1
5
C3
47pF
1
C10
10/10 Tant
2
FB1
240-1018-1
C8
.01
C1
47pF
J1
HEADER 7X2
2
4
6
8
10
12
14
VIN1
VIN2
B0
B1
B4
C5
0.1uF
17
8
19
24
27
28
16
15
20
C11
.01
C4
.1uF
4
4
3
IN
5
1
C31
.01uF
1
5
3
11
2
9
10
6
23
22
13
14
12
SWVCC
CBUS0
CBUS1
CBUS2
CBUS3
CBUS4
TXD
RXD
RTS#
CTS#
DTR#
DSR#
DCD#
RI#
COUT
OUT
U5
PQ1L303M2SP
CIN
U1
C23
1uF/10V
VCC5 IN
USBDM
USBDP
VCCIN/NC
RESET#
AVCC/NC
OSCI
OSCO
3V3OUT
FT232R
SWVCC
R5
10K 1%
GND
2
DLP-TILT-G
1
2
3
4
5
Mini-B USB Connector
C2
.47uF
1
3
5
7
9
11
13
Short pins 11 and 13 at
power up to enter mouse
mode.
MCLR
B6/PGC
SWVCC
B7/PGD
B3
6
5
-
+
R11
3
R10
30K
+
C6
0.1uF
12
+
-
3
-
1.5V
R6
280K
2
13
Q1
IRLML6402CT P
560K
560K
C20
10/10 Tant
.1uF
R2
CLK6
3.0V
VIN1
C9
7
U3B
MCP6004
14
R12
R14
560K
560K
VOUT1
SWVCC
SWVCC
U3D
MCP6004
1
U3A
MCP6004
R1
280K
VIN2
R13
R4
280K
47K
10
-
+
MCLR
9
2
2
8
B3
B6
B7
12
1
2
9
12
18
10
4
13
14
Sleep
GS1
GS2
C7
U4
.1
RB2/SDO/RX
RB5/TX
OSC1/CLKIN
RB3/PGM
RA5/MCLR/VPP
U2
XOUT
YOUT
ZOUT
SWVCC
4
3
2
1
RP1
1K x 4
3
2
1
20
19
17
7
8
11
5
6
7
8
PIC16LF88/SSOP20
RB4/SCK
RA4/AN4
RA3/AN3/Vref+
RA2/AN2/VrefRA1/AN1
RA0/AN0
RA6/OSC2
RB0/INT
RB1/SDI
15
14
13
SWVCC
RB6/AN5/PGC
RB7/AN6/PGD
VOUT2
MMA7260QT
U3C
MCP6004
R9
280K
16
15
VDD
VDD
GND
GND
5
6
4
R3
10K 1%
3
3
VDD
VSS
4
VCCIO
4
4
11
4
11
4
11
C
B
A
5
4
11
AGND
GND
GND
GND
TEST
25
7
18
21
26
1
1
VOUT1
VOUT2
AN2
AN1
AN0
B0
B1
B4
3
2
1
5
6
7
8
CA1
4x0.1uF
4
AN0
AN1
AN2
D
C
B
A