36
Footswitch controller for Tektronix oscilloscopes Group #13

Footswitch controller for Tektronix oscilloscopes

  • Upload
    isaura

  • View
    63

  • Download
    0

Embed Size (px)

DESCRIPTION

Footswitch controller for Tektronix oscilloscopes. Group #13. - PowerPoint PPT Presentation

Citation preview

Page 1: Footswitch controller for Tektronix oscilloscopes

Footswitch controller for Tektronix oscilloscopes

Group #13

Page 2: Footswitch controller for Tektronix oscilloscopes

When an engineer or technician is using a Tektronix

oscilloscope, they often have both hands busy probing a circuit board. Sometimes they need a “third hand” to operate the Oscilloscope. This need can cause some users to create Rube Goldberg type machines to manually press buttons, employ another operator to run the Oscilloscope, or find creative ways to tape down probes to free up hands. Without a solution, it can take users much longer to test circuits and collected required data.

Page 3: Footswitch controller for Tektronix oscilloscopes

Our solution to this problem is to implement a footswitch that will act as a third hand to control the Oscilloscope.

(This was proposed as a capstone project for 2010)

Page 4: Footswitch controller for Tektronix oscilloscopes

The goal of this project is to design and build a working prototype of a footswitch and a software GUI that successfully integrates the footswitch with various Tektronix Oscilloscope. An ideal design would:

• Be able to communicate with any Tektronix Oscilloscope.• Have multiple user configurable commands.• Have a minimum of 2 foot controls.• Have USB 2.0 interface.

An individual momentary button’s functionality is expand by creating multiple mouse button type interaction. Separate actions include a short click, a long click and a double click. Both buttons may be pressed simultaneously. A 3rd On/Off type button is included, giving a total of 9 possible user input actions.

Page 5: Footswitch controller for Tektronix oscilloscopes

Design Schedule

WBS Predecessors % Complete Duration Start Finish Assigned team members Task Name

1 100% 62 days? Mon 10/3/11 Sat 12/3/11 All team Project report

1.1 100% 8 days Mon 10/3/11 Mon 10/10/11 All team Project proposal

1.1.1 100% 4 days Mon 10/3/11 Thu 10/6/11 All team Choosing project

1.1.2 3 100% 4 days Fri 10/7/11 Mon 10/10/11 All team Writing proposal

1.2 19 100% 7 days Thu 10/13/11 Wed 10/19/11 Jason Project requirements

1.3 5FS+18 days 100% 7 days Mon 11/7/11 Sun 11/13/11 All team System design and modeling

1.3.1 100% 7 days Mon 11/7/11 Sun 11/13/11 All team System block diagram

1.3.1.1 100% 3 days Mon 11/7/11 Wed 11/9/11 Hung Footswitch block diagram

1.3.1.2 8 100% 4 days Thu 11/10/11 Sun 11/13/11 Chris and Jason Whole system and GUI

1.3.2 8 100% 3 days Thu 11/10/11 Sat 11/12/11 Hung Footswitch UML - State Machine1.3.3 8 100% 3 days Thu 11/10/11 Sat 11/12/11 Huy Footswitch UML - Activity view

1.4 40 100% 5 days Thu 11/24/11 Mon 11/28/11 All team Test plan

1.4.1 100% 2 days Thu 11/24/11 Fri 11/25/11 Huy Write test plan

1.4.2 13 100% 3 days Sat 11/26/11 Mon 11/28/11 All team Write test cases

1.5 16FS-6 days 100% 1 day Mon 11/28/11 Mon 11/28/11 Chris Register for review time slot

1.6 52 100% 1 day? Sat 12/3/11 Sat 12/3/11 All team Project presentation

2 3 100% 55 days Fri 10/7/11 Wed 11/30/11 All team Design

2.1 100% 18 days Fri 10/7/11 Mon 10/24/11 All team Research

2.1.1 100% 6 days Fri 10/7/11 Wed 10/12/11 All team Pre-research

2.1.2 100% 13 days Fri 10/7/11 Wed 10/19/11 All team Interface research

2.1.3 19 100% 7 days Thu 10/13/11 Wed 10/19/11 Huy and Hung Micro-controller research

2.1.4 21 100% 5 days Thu 10/20/11 Mon 10/24/11 Chris Sampling intervals

2.2 19 100% 49 days Thu 10/13/11 Wed 11/30/11 Chris and Jason PC Software design

2.2.1 20 100% 20 days Thu 10/20/11 Tue 11/8/11 Chris USB interface

2.2.2 100% 49 days Thu 10/13/11 Wed 11/30/11 Jason Design GUI

2.3 21 100% 13 days Thu 10/20/11 Tue 11/1/11 All team Build test circuit

2.3.1 100% 3 days Thu 10/20/11 Sat 10/22/11 Hung Test schematic

2.3.2 27 100% 4 days Sun 10/23/11 Wed 10/26/11 All team Build test circuit

2.3.3 27 100% 10 days Sun 10/23/11 Tue 11/1/11 Hung ATmega8 program testing

2.4 27 100% 14 days Sun 10/23/11 Sat 11/5/11 Hung Schematic

2.4.1 100% 3 days Sun 10/23/11 Tue 10/25/11 Hung Select components

2.4.2 31 100% 3 days Wed 10/26/11 Fri 10/28/11 Hung Finish schematic

2.4.3 32 100% 8 days Sat 10/29/11 Sat 11/5/11 Hung Revew and make changes if needed

2.5 32 100% 15 days Sat 10/29/11 Sat 11/12/11 All team Layout

2.5.1 100% 2 days Sat 10/29/11 Sun 10/30/11 Huy First draft layout

2.5.2 35 100% 8 days Mon 10/31/11 Mon 11/7/11 Chris Final layout

2.5.3 36 100% 5 days Tue 11/8/11 Sat 11/12/11 Jason Review layout with TA

2.6 26 100% 22 days Wed 11/2/11 Wed 11/23/11 Hung Device software

2.6.1 100% 5 days Wed 11/2/11 Sun 11/6/11 Hung Port test program to real one

2.6.2 39SS+2 days 100% 20 days Fri 11/4/11 Wed 11/23/11 Hung Design ATmega8 program

3 26 100% 31 days Wed 11/2/11 Fri 12/2/11 All team Test

3.1 100% 6 days Wed 11/2/11 Mon 11/7/11 Hung Timing detection on prototype3.2 51 100% 4 days Tue 11/29/11 Fri 12/2/11 All team Test device with test plan

4 37 100% 20 days Sun 11/13/11 Fri 12/2/11 All team Implementation

4.1 100% 4 days Sun 11/13/11 Wed 11/16/11 Chris Order boards

4.1.1 100% 1 day Sun 11/13/11 Sun 11/13/11 Chris Create Gerber files

4.1.2 46 100% 1 day Mon 11/14/11 Mon 11/14/11 Chris Create Sunstone account

4.1.3 47 100% 2 days Tue 11/15/11 Wed 11/16/11 Chris Order boards on Sunstone

4.2 45SS+2 days 100% 4 days Tue 11/15/11 Fri 11/18/11 All team Order components

4.3 45FS+6 days 100% 3 days Wed 11/23/11 Fri 11/25/11 All team Solder boards

4.4 50 100% 3 days Sat 11/26/11 Mon 11/28/11 Hung Porting the develop program on the device

4.5 51 100% 4 days Tue 11/29/11 Fri 12/2/11 Jason Finish physical parts

Page 6: Footswitch controller for Tektronix oscilloscopes

Long vs. Short vs. Double

To determine pulse width times, we collected 30+ samples of each type of action each, for 4 different users. This data was collected on an Oscilloscope using a data logging program. Next a python script analyzed each set of waveforms to find the pulse widths and spacing for each interaction. Using Matlab to plot standard distributions of the results, the optimal values for pulse width duration for a short vs. a long click is and pulse space for a double click vs. two single click was derived. A short pulse is defined as less than 365mS pulse width. For double clicks, 275 spacing or less between two clicks is defined as a double. Because a action will be tied to a scope control command that may take several seconds to complete, it is less likely that the input action will be separate repeat clicks for the same command.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

1

2

3

4

5

6

7

8

9

Time (s)

Nor

mal

Pro

babi

lity

Double click space vs. multiple singles spacing

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.5

1

1.5

2

2.5

3

3.5

4

4.5

X: 0.364Y: 1.097

Time (s)

Nor

mal

Pro

babi

lity

Short vs Long pulse times

Page 7: Footswitch controller for Tektronix oscilloscopes

System Model Level 1

Page 8: Footswitch controller for Tektronix oscilloscopes

GUI Software Model Level 1

Page 9: Footswitch controller for Tektronix oscilloscopes

Footswitch Model Level 1

Page 10: Footswitch controller for Tektronix oscilloscopes
Page 11: Footswitch controller for Tektronix oscilloscopes

Footswitch Controller – Hardware

System View – Level 0

Page 12: Footswitch controller for Tektronix oscilloscopes

Footswitch Controller – Hardware

System View – Level 1

Page 13: Footswitch controller for Tektronix oscilloscopes

Footswitch Controller – Hardware

USB 2 Block

5V Power Supply

D+, D-for data lines

Page 14: Footswitch controller for Tektronix oscilloscopes

Footswitch Controller – Hardware

MCP2200 – USB Controller Block

GPIO [3..7] for transferring data

Tx, Rx for UART status

Use 12MHz crystal osc.

Page 15: Footswitch controller for Tektronix oscilloscopes

Footswitch Controller – Hardware

Buttons and Programmer

Ports D2, D3 for momentary buttons

Ports D4 for on/off status button

Port B3 for MOSI pin

Port B4 for MISO pinPort B5 for SCK pin

Page 16: Footswitch controller for Tektronix oscilloscopes

Footswitch Controller – Hardware

Microcontroller – ATmega 8

Use 12MHz crystal osc.

Use TQFN package

Page 17: Footswitch controller for Tektronix oscilloscopes

2.02

inch

Footswitch Controller – Hardware

Board layout 2.80 inch~$20/Board~$10 for components

Page 18: Footswitch controller for Tektronix oscilloscopes

Footswitch Controller – Hardware

Test Plan for hardware

Unit TestsUSB Port, Power SupplyMCP2200 USB ControllerAtmega 8Button and Programmer

Integration TestsConnection between USB Port and MCP2200Connection between MCP2200 and Atmega 8Connection from button and programmer to ATmega8

Page 19: Footswitch controller for Tektronix oscilloscopes
Page 20: Footswitch controller for Tektronix oscilloscopes

ATmega8 - Functionality

• Detect button states• Determine short/long/double pushed• Communicate with PC GUI through MCP2200

– Send commands to GUI– Handle MCP2200 status and commands from GUI

Page 21: Footswitch controller for Tektronix oscilloscopes

ATmega8 - Method

• Using 1ms timer interrupt to poll button states• Using counter to count interval time• Determine press type by compare detected

interval with preset intervals in EEPROM• Using command queue and ACK signal to send

command to MCP2200

Page 22: Footswitch controller for Tektronix oscilloscopes

ATmega8 – State diagram

Page 23: Footswitch controller for Tektronix oscilloscopes

ATmega8 - Behavior

Page 24: Footswitch controller for Tektronix oscilloscopes
Page 25: Footswitch controller for Tektronix oscilloscopes

ATmega8 – Source code

• C language• 5.59KB (69.9% Flash of ATmega8)• Pre-defined header for easily configure system

later• Using AVRStudio 5 develop environment with

Atmel libraries (io, delay, string, interrupt)

Page 26: Footswitch controller for Tektronix oscilloscopes

ATmega8 – Test plan

Engineer requirement: “The device must measure the timing interval accurately with error less than 1%”.

=> Acceptance test: inject pulse with pulse width varies from 100ms to 900ms and record detected time.

Page 27: Footswitch controller for Tektronix oscilloscopes
Page 28: Footswitch controller for Tektronix oscilloscopes
Page 29: Footswitch controller for Tektronix oscilloscopes

Foot switch project

GUI software design

Page 30: Footswitch controller for Tektronix oscilloscopes

Oscilloscope Communication

• Uses VISA protocol for scope communication.– Common on Tektronix Oscilloscope platforms.– Commands are published by Tektronix in the form

of Programmers manual for each oscilloscope family.

– Test and Measurement Industry standard.

Page 31: Footswitch controller for Tektronix oscilloscopes

VISA

Page 32: Footswitch controller for Tektronix oscilloscopes

PC / USB communication

• For communication to the PC, USB interface was used.– Made easy in the form of a dedicated USB bridge

and dll libraries for the device “SimpleIO-UM.dll” device in conjunction with MCP2200 python module, developed in house.

– Unnecessary to deal with USB Stack.

Page 33: Footswitch controller for Tektronix oscilloscopes

GUI behavior• Python 2.7.2 used for GUI development.

– PyVisa 1.3• Scope communication

– Wxpython• GUI development

– Numpy 1.6.1• Curve data calculation

– ScopeControl• Use PyVisa to send interpreted commands

– MCP2200• Communicate with PC over USB. “SimpleIO-UM.dll”

Page 34: Footswitch controller for Tektronix oscilloscopes

Polling

Page 35: Footswitch controller for Tektronix oscilloscopes

Interface layout

• Tabs for each function– Tab dedicated to each button– Double Click– Scope connection / file placement– Script entry

Page 36: Footswitch controller for Tektronix oscilloscopes

Results / Lessons learned

• What worked well– Engineers at Tektronix have been impressed.

• What didn’t work– We were unable to get USB ports configured as

COM port, - Adjustment routine dropped as a result.

– Should have made silk screen larger / readable.– Post size was same as .632, same size as screws.