group 21 kathryn morales mike strobridge chris perez lee sully

47
Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully EPOCalypse Mind Controlled Car

Upload: whitney-porter

Post on 26-Dec-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Group 21

Kathryn Morales

Mike Strobridge

Chris Perez

Lee Sully

EPOCalypse Mind Controlled Car

Page 2: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Basic Overview

Page 3: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

• To be able to control an RC car using only the mind.

• When certain brain waves or facial expressions are detected, the software will interpret them into separate vehicle operations

• Depending on what signal is detected the vehicle will go forward, left, right, or stop

Objectives

Page 4: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

1. Headset: sampling rate of > 100 Hz, Resolution of 16 bits, Dynamic range > 250 mVpp

2. Emotiv Software: 2.4GHz processor, 1GB RAM, 50 MB disk space.

3. RC car: A range of at least 20ft, with full range of motion.

Requirements/Specifications

Page 5: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

EMOTIV EPOC Neuro-Headset

Page 6: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

• 14 channels with 7 paired sensors

• Sampling rate of 128 Hz

• 16 bit resolution

• 0.2 – 45 Hz bandwidth

• Dynamic Range 256 mVpp

Emotiv EPOC Headset

Page 7: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Area Name Brodmann Area #

Dorsolateral prefrontal cortex

9

Frontal eye fields 8

Anterior Prefrontal Cortex

10

Primary gustatory gyrus 43 (not shown)

Middle temporal gyrus 21

Primary motor cortex 4

Somatosensory association cortex

7

Brodmann Areas

Page 8: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully
Page 9: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Emotiv’s 3 suites

• Cognitiv- registers and interprets users conscious thoughts

• Expressiv- uses the signals measured to interpret users facial expressions

• Affectiv- monitors user’s emotional states

• All suites reflect real time measurements

• Controlling forward motion of the car through the Cognitiv suite by training the mind to manipulate a 3D cube.

Emotiv Suites

Location of sensors on scalp

Page 10: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Emotiv Headset Training/Testing

Expressiv Suite Testing;Detects range of facial expressionsWe will be using the left wink and right wink detection for left and right turning.

Cognitiv Suite Training;Methods tried•Thinking in a different language•Reaction to modest pain (oceans 11 tec.)•Focusing on/past an object•Immediate local temperature change

Page 11: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Main Board OptionsMainboard type

Processors

System Memory

Bios Chipset Price (w/o processor)

Intel DQ77KB

Core i3/i5/i7(Ivy/Sandy Bridge) desktop processors

2 DDR3 1333 SO-DIMMUp to 16 GB memory size

AMI uEFI BIOS 96 Mb flash memory

Intel Q77 Express

$149.95

Jetway NF9G-QM77

Core i3/i5/i7 (Ivy/Sandy Bridge) mobile processors

2 DDR3 1333 SO-DIMMUp to 16 GB memory size

AMI EFI 64MB SMT Flash ROM

Intel QM77 $245.00

Intel DH61AG

Core i3/i5/i7 (sandy bridge) desktop processors

2 DDR3 1333 SO-DIMMUp to 16 GB memory size

AMI uEFI BIOS 16 Mb flash memory

Intel H61 Express

$135.95

Page 12: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Decided on DH61AG

• Because of price meets minimum requirements.

• Using Intel Core i3 sandy bridge processor running at 2.5 Ghz.

• System Memory of 1 GB. Integrated Intel HD graphics as a bonus.

• 160 GB laptop hard drive added.

Intel DH61AG Mini Motherboard

Mini- ITX (17 X 17 cm)

Page 13: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Software

Page 14: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

• We decided to write the EPOC software using C++

• There are many examples of code already written in C++

• No prior experience in C++, so wanted a challenge.

EPOC Software

Page 15: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Class Diagram

Page 16: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Data Flow Diagram

Page 17: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Expressive

“WL” = Turn Wheels Left

“WR” = Turn Wheels Right

“GS” = Go Straight

“SW” = Straighten Wheels

Cognitive

“Neutral” = Stop

“Push” = Move Forward

“Pull” = Move Backwards

Final Command String

-Final command string will be a concatenation between one of the expressive commands and one of the cognitive commands.

- The first two characters of the final string will be the expressive command and the remainder of the string will be the cognitive command.

- Ex:

WLPush

Page 18: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Emotiv Software Testing:Expressive Commands

Page 19: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Emotiv Software Testing:Expressive Commands

Page 20: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Emotiv Software Testing:Expressive Commands

Page 21: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Emotiv Software Testing:Cognitive Commands

Page 22: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Emotiv Software Testing:Cognitive Commands

Page 23: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Emotiv Software Testing:Cognitive Commands

Page 24: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Emotiv Software Testing:Final Command String

Page 25: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Arduino 1.0.3 Digi XCT-U

Development Environments

Microsoft Visual Studio 2010

Page 26: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Class Diagram

Page 27: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Activity Diagram

Page 28: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

SW/HW interface

Page 29: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Atmega 328 Processed Signals

cogCommand expCommand FinalCommand PORTBAss.Hex

Result

“Neutral” “WR”“WL”“Straight”

“100 101”“100 110”“ 100 000”

0x290x190x011

Turn rightTurn leftMove Forward

“Push” “WR”“WL”“Straight”

“101 101”“101 110”“101 000”

0x2D0x1D0x05

Move forward turn RightMove forward turn leftMove forward

“Pull” “WR”“WL”“Straight”

“110 101”“110 110”“110 000”

0x2B0x1B0x03

Move backward turn RightMove backward turn leftMove backward

Page 30: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Atmega 328 Processed Signals

cogCommand expCommand FinalCommand PORTBAss.Hex

Result

“Neutral” “WR”“WL”“Straight”

“100 101”“100 110”“ 100 000”

0x290x190x011

Turn rightTurn leftMove Forward

“Push” “WR”“WL”“Straight”

“101 101”“101 110”“101 000”

0x2D0x1D0x05

Move forward turn RightMove forward turn leftMove forward

“Pull” “WR”“WL”“Straight”

“110 101”“110 110”“110 000”

0x2B0x1B0x03

Move backward turn RightMove backward turn leftMove backward

Page 31: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Atmega 328 Processed Signals

cogCommand expCommand FinalCommand PORTBAss.Hex

Result

“Neutral” “WR”“WL”“Straight”

“100 101”“100 110”“ 100 000”

0x290x190x011

Turn rightTurn leftMove Forward

“Push” “WR”“WL”“Straight”

“101 101”“101 110”“101 000”

0x2D0x1D0x05

Move forward turn RightMove forward turn leftMove forward

“Pull” “WR”“WL”“Straight”

“110 101”“110 110”“110 000”

0x2B0x1B0x03

Move backward turn RightMove backward turn leftMove backward

Page 32: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

The Car

Page 33: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Transmitter on motherboard

Receiver on PCB Atmega328p-pu

DC Drive MotorDC Steering

Motor

Basic Car Layout

Page 34: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Full PCB

Page 35: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

• New Bright Ford F-150

• 3 lbs

• $26.00

• Ideal size for use.

• Atmega 328p-pu microcontroller with 28 pins and a 5V operating voltage.

17.7 inches

9.3 inches

9.8 inches

.28in

1.36in

Page 36: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

• 1N4004 Fly Back diodes (circled) added to avoid damage to the circuitry connected to the inductive load of the motors.

•L298 dual full bridge driver.•LM 7805 Voltage Regulators•Directional LEDs, capacitors (.1uF, 22uF, 22pF), resistors (2.2kohm & 47kohm), and female pin headers

The PCB

Page 37: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

•L298N H-Bridge•Able to control two motors at the same time with a 5V operating voltage•When Enable A is activated it turns on the drive motor•When Enable B is activated it turns on the turn motor

.344in

.069 in

.157in

Drive Motor 1

Turning Motor 2

Enable Pin 14

Input Pin 15/16

Enable Pin 17

Input Pin 18/19

Result

L 00/11

L 00/11 OFF

L 01 L 01 OFF

L 10 L 10 OFF

H 00/11

L 00/11 STOP

H 01 L 00 FORWARD

H 10 L 00 BACK

H 01 H 01 RIGHT

H 01 H 10 LEFT

H-Bridge L298N

Page 38: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Motor Control Circuit

Page 39: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Wireless Transmitter/ReceiverRF Link 315 MHz Transmitter/ Receiver

Xbee 802.15.4 (2.4 GHz)

Seeedstudio 315MHz RF Low Cost Transmitter / Receiver Pair

Range 500ft range (given perfect conditions)

100 feet (indoor)300 feet (outdoor, line-of-sight)

300 – 500 meters

Cost Transmitter: $3.95Receiver: $4.95

$21.99 each Pair: $4.99

Pros Very Cheap -Very reliable and simple communication- Ready to use out-of-box

- Very Cheap- Commonly used

Cons - Signal is very noisy- No method for pairing devices (Must do manually)

A little more expensive

Signal is very noisy (requires addition of encoder/decoder to remove disturbances)

Page 40: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

• 2 Xbee modules communicate between the motherboard and the vehicle

• 1 Xbee connected to an Xbee Explorer dongle, then connected to the motherboard

• 1 Xbee connected to an Xbee Explorer Regulated, then connected to the PCB

• Range of 100 ft indoors/300 ft outdoor.

• Operating frequency at 2.4 GHz

Transmitting and Receiving Data

Page 41: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Final Printed Circuit Board

Page 42: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

• Car: 6 volts, via four AA batteries, to power everything on the vehicle.

• Motherboard: 90W 19V Laptop power source.

• Headset: Lithium polymer rechargeable battery with 12 hr life.

Power

Page 43: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Administrative Content

Page 44: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

• Analysis and encoding of raw EEG data.

• Maintaining left and right directional signals from left and right blinking.

• Transmitting and receiving data from DH61AG motherboard to the onboard PCB.

• Not funded.

Difficulties Overcome

Page 45: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Team Member

Emotiv EPOC

Headset

Emotiv Coding

Software / other coding

Onboard PCB

Remote Controlled

Car

Kathryn X X

Mike X X

Chris X X

Lee x X

Work Distribution

Page 46: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Part Price Part PriceEmotiv EPOC Neuro-Headset

$750.00 Atmega 328 Processor (2)

$5.68

Intel Mini-ITX Motherboard

$135.95 16 MHz Crystal Oscillator (2)

$1.20

Intel Core i3 Processor $189.00 H-Bridge $2.95

1 GB Onboard Memory $18.00 1N4004 Diodes (8) $2.21

CPU Cooler $39.00 Xbee Series 1 (2) $64.00

160 GB Laptop Hard Drive

$95.84 Xbee Explorer USB $24.95

Mounting Hardware $15.25 Xbee Explorer Regulated

$28.00

90W 19V Power Source $53.24 PCB $78.34

Remote Control Car $26.00 Miscellaneous $24.44

DVI – VGA Converter $17.03 Total $1569.66

Budget

Page 47: Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully

Questions?