ahmed khawaja: microcontroller jonathan limpalair: construction bryan mason: microcontroller ...

32
Team 0

Upload: michael-singleton

Post on 16-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Team 0

Page 2: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Ahmed Khawaja: Microcontroller Jonathan Limpalair: Construction Bryan Mason: Microcontroller Jesse Mccall: Editor, UI David Pesa: Construction Eric Stockton: Team Captain, UI

Our Team

Page 3: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Our goal was to make a reprogrammable Turing machine.

The physical machine is made entirely of Lego parts.

The Lego microcontroller is programmed in C like language.

The GUI is programmed in Java.

Description

Page 4: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

The machine interfaces with the tape based on a program specified by an end-user.

The machine has an instruction set including jump, move, and write.

The machine uses a 32 bit reel of tape. The user interface displays output that

explains the binary on the tape.

Features

Page 5: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

DemonstrationLet us show you…

Page 6: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Microcontroller

Page 7: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Bricx Command Center BricxCC used to program the controller for

the LEGO motors◦ No need for Arduino, we have a powerful tool at our

disposal already◦ Simpler and well-documented examples

nXc – Not eXactly C◦ More control over the machine

Access of encoders, byte-flag options for sensors◦ Tasks

“Threaded” programs◦ Functions

Normal C-like functions

Page 8: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction
Page 9: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Test Plan Overview Initially test components individually

◦ Hardware Move tape, flip bits, read bits Testing while building allows a quick modification of

hardware configuration to achieve desired results◦ GUI

Accept user input, modify existing input, export input Easier to determine which component

contributes to failure After both hit acceptable levels, start testing

combination of GUI and Hardware What our machine is designed to do

Page 10: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Physical Machine

Page 11: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

We used the Mindstorms NXT 2.0 set (#8547).

We also ordered spare parts from both the Mindstorms NXT 2.0 set and crane set.

The Intelligent Brick, motors, and sensors from the Mindstorms NXT 2.0 set are all that operate the motor functions of the machine.

Parts

Page 12: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

The physical machine consists of a base and the strip of tape.

The bit flipping arm, the motor that moves the tape, and the sensor are on the base.

The Tape is a 32 bit long connected piece that floats along the base and is driven by the motors.

Build

Page 13: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Graphical User Interface

Page 14: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

GUI Overview

Page 15: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Testing

Page 16: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Color sensor used to read in the value of a bit (Zero or One position)

One of the more complex parts of the project

Values read in by the sensor are affected by the ambient light in the room

We use a calibration and voting algorithm to get accurate readings from the sensor.

Color Sensor

Page 17: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Sensor Test Code

Page 18: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Sensor Test Control Flow

Page 19: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

The predicate: (buttonClicked || (ctrlKey && shiftKey && qKey));

This predicate acts as a contingency plan for the Turing machine. If preferred, the user can use keyboard commands to exit the program.

Complex Predicate

Page 20: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Evaluation Tree

Page 21: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Path # buttonClicked

ctrlKey shiftKey qKey True

1 T - - - Yes2 F F - - No3 F T T T Yes4 F T F - No5 F T T F No6 F T T T Yes

Modified Condition Coverage

Page 22: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Configurations

Parameter Value

Workstation Mac Dell Vostro

Personal Build

Dell Laptop

Screen Size 15" 18" 22"

GUI Size (In Dimension/Java)

30x50

50x50 60x40

Bit Flip Speed (Motor %)

30% 60% 100%

Tape Movement Speed (Motor %)

30% 60% 100%

Page 23: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Run No

WorkStation Screen Size

GUI BFS TMS Pass/Fail

1 Mac 15" 30x50 30% 30%2 Mac 18" 50x50 60% 60% F3 Mac 22" 60x40 100% 100% F4 Mac 15" 30x50 30% 30%5 Dell Vostro 15" 50x50 100% 30% F6 Dell Vostro 18" 30x50 30% 100%7 Dell Vostro 22" 30x50 30% 60%8 Dell Vostro 15" 60x40 60% 30% F9 Personal Build 15" 60x40 30% 60% F

10 Personal Build 18" 30x50 100% 30%11 Personal Build 22" 30x50 60% 30%12 Personal Build 15" 50x50 30% 100% F13 Dell Laptop 15" 30x50 60% 100%14 Dell Laptop 18" 60x40 30% 30% F15 Dell Laptop 22" 50x50 30% 30% F16 Dell Laptop 15" 30x50 100% 60%

Orthogonal Array

Page 24: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Entry Test (Maxing Out Space)

Tested:◦ 10 Entry Maximum◦ 20 Entry Maximum◦ 50 Entry Maximum

Process:◦ Changed array size accordingly.

Result:◦ All results gave the desired output.

Input was given up to the maximum limit and no more was allowed.

Page 25: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

“Execution” Testing Tested:

◦ Actual sending of the instructions to a file. Process:

◦ Entered Commands and verified their transmission to the file.

Result:◦ After a few problems with the controller and IO,

we were able to achieve successful transmission.

Page 26: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Dynamic Cursor Test Tested:

◦ The cursor’s accuracy on the Scrolling Screen. Process:

◦ Entered commands and verified their transmission.

◦ Checked the current command being changed with the cursor’s position on the Scrolling Screen.

Results:◦ After making changes to the Scrolling screen’s

interactionwith the controller, we achieved the desired result.

Page 27: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Clearing IO Test 2 Parts Tested:

◦ Clearing on the screen◦ Clearing in the document.

Process:◦ Entered commands and verified their

transmission.◦ Issued the “Clear” command.

Results:◦ After reconfiguring the controller interface and the

IO interfacewe achieved the desired results.

Page 28: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Student (Samuel Jackson – age 13): Samuel represents the common student

Professor (Dr. Hawking – age 45): Dr. Hawking is demonstrating the Turing machine

Breaker (Attila Dada – age 14): Attila loves to break things and will to cause glitches

Tinkerer (Albert Newton - age 12): Albert will tinker and play around with the machine

Personas

Page 29: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Use-Case Diagram

Page 30: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Actor: Student, Samuel Jackson Preconditions: The specific bit is a 0 Steps: The user enters the read bit command

on the GUI. The user sends the command to the

microcontroller on the Turing Machine. The microcontroller signals the sensor to read

the bit. Postconditions: The bit is read as a 0. Alternative Scenarios:

◦ Scenario One: The bit is incorrectly read as a 1.

Sample Use Case: Read a 0

Page 31: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

ScheduleES

Page 32: Ahmed Khawaja: Microcontroller  Jonathan Limpalair: Construction  Bryan Mason: Microcontroller  Jesse Mccall: Editor, UI  David Pesa: Construction

Current Status and Plan As of now we have successfully built the

entire machine and have functionality on it. We have completed the GUI and are

finalizing the coding for the actual machine to work behind the scenes.

In the next few weeks all we will be doing is testing all of our test cases and making the tweaks we need to get a final product done by the end of the semester.