Group 21 Kathryn Morales Mike Strobridge Chris Perez
Group 21 Kathryn Morales Mike Strobridge Chris Perez Lee Sully
Basic Overview
Objectives • 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
Requirements/Specifications 1. Headset: sampling rate of > 100 Hz, Resolution of 16 bits, Dynamic range > 250 m. Vpp 2. Emotiv Software: 2. 4 GHz processor, 1 GB RAM, 50 MB disk space. 3. RC car: A range of at least 20 ft, with full range of motion.
EMOTIV EPOC Neuro-Headset
Emotiv EPOC Headset • 14 channels with 7 paired sensors • Sampling rate of 128 Hz • 16 bit resolution • 0. 2 – 45 Hz bandwidth • Dynamic Range 256 m. Vpp
Brodmann Areas 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
Emotiv Suites 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 3 D cube. Location of sensors on scalp
Emotiv Headset Training/Testing Expressiv Suite Testing; Detects range of facial expressions We 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
Main Board Options Mainboard Processors System type Memory Bios Chipset Price (w/o processor) Intel DQ 77 KB Core i 3/i 5/i 7 (Ivy/Sandy Bridge) desktop processors 2 DDR 3 1333 SO-DIMM Up to 16 GB memory size AMI u. EFI BIOS 96 Mb flash memory Intel Q 77 Express $149. 95 Jetway Core i 3/i 5/i 7 (Ivy/Sandy Bridge) mobile processors 2 DDR 3 1333 SO-DIMM Up to 16 GB memory size AMI EFI 64 MB SMT Flash ROM Intel QM 77 $245. 00 Intel DH 61 AG Core i 3/i 5/i 7 (sandy bridge) desktop processors 2 DDR 3 1333 SO-DIMM Up to 16 GB memory size AMI u. EFI BIOS 16 Mb flash memory Intel H 61 Express $135. 95 NF 9 G-QM 77
Intel DH 61 AG Mini Motherboard Decided on DH 61 AG • Because of price meets minimum requirements. • Using Intel Core i 3 sandy bridge processor running at 2. 5 Ghz. • System Memory of 1 GB. Integrated Intel HD graphics as a bonus. Mini- ITX (17 X 17 cm) • 160 GB laptop hard drive added.
Software
EPOC Software • 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.
Class Diagram
Data Flow Diagram
Final Command String Cognitive Expressive “Neutral” = Stop “WL” = Turn Wheels Left “Push” = Move Forward “WR” = Turn Wheels Right “Pull” = Move Backwards “GS” = Go Straight “SW” = Straighten Wheels -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 the remainder of the string will be the cognitive command. - Ex: WLPush
Emotiv Software Testing: Expressive Commands
Emotiv Software Testing: Expressive Commands
Emotiv Software Testing: Expressive Commands
Emotiv Software Testing: Cognitive Commands
Emotiv Software Testing: Cognitive Commands
Emotiv Software Testing: Cognitive Commands
Emotiv Software Testing: Final Command String
Development Environments Arduino 1. 0. 3 Digi XCT-U Microsoft Visual Studio 2010
Class Diagram
Activity Diagram
SW/HW interface
Atmega 328 Processed Signals cog. Command exp. Command Final. Command PORTB Ass. Hex Result “Neutral” “WR” “WL” “Straight” “ 100 101” “ 100 110” “ 100 000” 0 x 29 0 x 19 0 x 011 Turn right Turn left Move Forward “Push” “WR” “WL” “Straight” “ 101” “ 101 110” “ 101 000” 0 x 2 D 0 x 1 D 0 x 05 Move forward turn Right Move forward turn left Move forward “Pull” “WR” “WL” “Straight” “ 110 101” “ 110” “ 110 000” 0 x 2 B 0 x 1 B 0 x 03 Move backward turn Right Move backward turn left Move backward
Atmega 328 Processed Signals cog. Command exp. Command Final. Command PORTB Ass. Hex Result “Neutral” “WR” “WL” “Straight” “ 100 101” “ 100 110” “ 100 000” 0 x 29 0 x 19 0 x 011 Turn right Turn left Move Forward “Push” “WR” “WL” “Straight” “ 101” “ 101 110” “ 101 000” 0 x 2 D 0 x 1 D 0 x 05 Move forward turn Right Move forward turn left Move forward “Pull” “WR” “WL” “Straight” “ 110 101” “ 110” “ 110 000” 0 x 2 B 0 x 1 B 0 x 03 Move backward turn Right Move backward turn left Move backward
Atmega 328 Processed Signals cog. Command exp. Command Final. Command PORTB Ass. Hex Result “Neutral” “WR” “WL” “Straight” “ 100 101” “ 100 110” “ 100 000” 0 x 29 0 x 19 0 x 011 Turn right Turn left Move Forward “Push” “WR” “WL” “Straight” “ 101” “ 101 110” “ 101 000” 0 x 2 D 0 x 1 D 0 x 05 Move forward turn Right Move forward turn left Move forward “Pull” “WR” “WL” “Straight” “ 110 101” “ 110” “ 110 000” 0 x 2 B 0 x 1 B 0 x 03 Move backward turn Right Move backward turn left Move backward
The Car
Basic Car Layout Transmitter on motherboard Receiver on PCB Atmega 328 p-pu DC Steering Motor DC Drive Motor
Full PCB
• • New Bright Ford F-150 3 lbs 9. 8 inches $26. 00 Ideal size for use. 9. 3 inches • Atmega 328 p-pu microcontroller with 28 pins and a 5 V operating voltage. 17. 7 inches 1. 36 in . 28 in
The PCB • 1 N 4004 Fly Back diodes (circled) added to avoid damage to the circuitry connected to the inductive load of the motors. • L 298 dual full bridge driver. • LM 7805 Voltage Regulators • Directional LEDs, capacitors (. 1 u. F, 22 p. F), resistors (2. 2 kohm & 47 kohm), and female pin headers
H-Bridge L 298 N Drive Motor 1 Turning Motor 2 Enable Pin 14 Enable Pin 17 Input Pin 18/19 Result L. 069 in 00/11 L 00/11 OFF L 01 OFF L 10 OFF H 00/11 L 00/11 STOP L L 00. 157 in 00 FORWARD H 01. 344 in 10 H 01 RIGHT H 01 H 10 LEFT H Input Pin 15/16 BACK • L 298 N H-Bridge • Able to control two motors at the same time with a 5 V operating voltage • When Enable A is activated it turns on the drive motor • When Enable B is activated it turns on the turn motor
Motor Control Circuit
Wireless Transmitter/Receiver RF Link 315 MHz Transmitter/ Receiver Xbee 802. 15. 4 (2. 4 GHz) Seeedstudio 315 MHz RF Low Cost Transmitter / Receiver Pair Range 500 ft range (given perfect conditions) 100 feet (indoor) 300 feet (outdoor, line -of-sight) 300 – 500 meters Cost Transmitter: $3. 95 Receiver: $4. 95 $21. 99 each Pair: $4. 99 Pros Very Cheap -Very reliable and - Very Cheap simple communication - Commonly used - Ready to use out-ofbox 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)
Transmitting and Receiving Data • 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
Final Printed Circuit Board
Power • Car: 6 volts, via four AA batteries, to power everything on the vehicle. • Motherboard: 90 W 19 V Laptop power source. • Headset: Lithium polymer rechargeable battery with 12 hr life.
Administrative Content
Difficulties Overcome • Analysis and encoding of raw EEG data. • Maintaining left and right directional signals from left and right blinking. • Transmitting and receiving data from DH 61 AG motherboard to the onboard PCB. • Not funded.
Work Distribution Team Member Emotiv EPOC Headset Emotiv Coding Software / other coding Kathryn Mike X Onboard PCB Remote Controlled Car X X X Chris X X Lee x X
Budget Part Price Emotiv 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 i 3 Processor $189. 00 H-Bridge $2. 95 1 GB Onboard Memory $18. 00 1 N 4004 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 90 W 19 V Power Source $53. 24 PCB $78. 34 Remote Control Car $26. 00 Miscellaneous $24. 44 DVI – VGA Converter $17. 03 Total $1569. 66
Questions?
- Slides: 47