27
iPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

Embed Size (px)

Citation preview

Page 1: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

iPhone Controlled RC Car

CE Senior Design IIJordan BeanPhil Doughty Xander Fiss

Chris Murphy

Page 2: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

Presentation Outline• Introductions• Project Overview & Major Goals

– Network (Jordan Bean)• Infrastructure• Range• Protocol Ideas

– iPhone (Xander Fiss)• Software User Interface• Hardware• SDK• Networking

– GumStix (Phil Doughty)• System• Networking• Robostix• Software

– RC Car (Chris Murphy)• Electronics • Power• Mechanical Components

• Integration• Restrictions• Anticipated Problems• Power Requirements• Testing Strategy• Multidisciplinary Aspects• Cost

Page 3: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

IntroductionsJordan Bean

Behavioral Model/Network CommunicationsPhil Doughty

GumStix RC Car Control UnitXander Fiss

iPhone Application ProgrammingChris Murphy

RC Car Electronics

Page 4: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

Project Overview & Major Goals

Use the iPhone as a tilt-based human control interface for an RC car

System communication over Wi-FiRC Car Electronics Interfacing

PWM Channel Controlled Steering and Acceleration

GumStix provides Wi-Fi PWM Interface

Page 5: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

The Network InfrastructureThe overall existing RIT wireless network

will be used for iPhone to RC car communication

Steering Control

Acceleration Control

WiFi Expansion

Robotix Expansion:

PWM Channels

Serial Console

Expansion

DebugSerial

Console

RC Car Gumstix PC

Accelerometer

Touch Screen Buttons

iPhone/iPod Touch

802.11B/G WiFi Comm.

802.11B/G WiFi Access Point

Built-in 802.11B/G

WiFi

PC

Page 6: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

InfrastructureiPhone will run a UDP client during

operating mode, and a TCP client for testing

The GumStix will run a UDP server during operating mode, and a TCP server for testing

Overall model/testing environment will allow for early testing and easy integration

Page 7: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

RangeThe RC car will be able to operate within the

range of the RIT wireless networkAs long as UDP packets keep arriving at the

GumStix control unit, user control will be maintained

If no packets are received within a predefined timeout period, the RC car will automatically stop

Maintaining visual contact with RC car is recommended for operational feedback purposes

Page 8: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

ProtocolsFor operation, the UDP protocol has been

initially selectedOffers fast transfer of information to RC car

For testing and in case of major UDP issues, TCP communication capabilities have also been includedAllows for guaranteed connection and

transfer of data

Page 9: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

iPhone Software UI• Tilt Values

Read in Real Time

• Connect to GumStix

• On/Off Send Data

• System Settings

• Speedometer

Page 10: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

iPhone HardwareTouch Screen User InterfaceAccelerometer Integrates to Obtain

Ground-Relative Tilt DataAccelerometer data put through low pass

filter to ignore sudden movement (drops)Built in Wi-Fi

Page 11: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

iPhone SDKC for Low-Level OS Calls & FunctionsObjective-C for Cocoa Touch API

Object OrientedStrict Superset of C

Extensive DocumentationTutorialsExample Code

Includes Simulator for Speedy UI DevelopmentDoes Not Simulate Accelerometer

Page 12: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

NetworkingConnectivity Handled Behind the ScenesiPhone OS is essentially Mac OS XTraditional Unix Socket Programming

Code written in CLibraries built into iPhone OS

Page 13: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

GumStix (Phil Doughty)Embedded Linux OSPlug & PlayModules connect on

either sideNetwork and WiFi

Modules were purchasedRobostix Microcontroller Module was also

purchased

Page 14: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

GumStix NetworkingLinux Networking Stack

Proven ReliabilityWiFi directly supported

Needed to change 1 line of a configuration file to automatically join RIT’s WiFi Network

Support for UDP and TCP ConnectionsRemote Login via SSH

Page 15: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

RoboStix• Autonomous Microcontroller

– Programmed independently• Receives data over I2C bus from GumStix

motherboard– No knowledge of I2C required– Programs freely available control Robostix

from Linux System Calls over I2C• Contains MANY useful features

– 9 PWM Channels– 8 ADC Channels

Page 16: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

GumStix SoftwareSimple Program

Wait for UDP Data on a specific portOnce data is received, adjust PWM channels

accordinglySend acknowledgement packet (optional)If data is not received within a specified

timeout period, turn off PWM channels (safety)

Page 17: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

GumStix Help and ThanksInitial Setup, Getting on the Network, etc.

Charles GruenerGumStix/RoboStix programming advice and

informationNick PalladinoEric Offermann

Page 18: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

ElectronicsThe RC car is powered by a 7.2 V, 3300

mAh batteryThree wire servo

6.0 volt VDD0.0 volt GNDPWM (0V5V)

Page 19: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

Powering the GumStixSeveral options

Battery for the Nintendo DS or Sony PSPRechargeable AA Batteries + Voltage

RegulatorPower directly from the 6.0 volt VDD servo

wireNeed to be extremely careful with the

sensitive microchipsDon’t want a showstopper

Page 20: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

Mechanical ComponentsRC Car will be run in training mode so that

forward and reverse only run at 50% of capacity

Speed of the RC Car has to be governed in softwareTheoretically capable of going 35+ mph

Page 21: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

IntegrationEase of integration will be supported by the

testing and integration behavioral modelsUse of behavioral models as an initial

standard will help to avoid any integration problems

Integration of the RC car and the GumStix control unit will be done as early as possible

Page 22: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

RestrictionsIt is highly recommended that visual

contact be maintained with the RC car at all times to ensure safe operation

The RC cars operation is also restricted to within range of a wireless network

Overall speed of the RC car will be governed for safety purposes

Steering of RC car is limited to 90° in each direction

Page 23: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

Anticipated ProblemsReal-time control of the PWM channel

outputsUDP packet reliabilityPowering the GumStix control unit

Page 24: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

Power RequirementsRC Car

3.3 Ah RC Car Battery x2 (~24 Watt-hours)Estimated battery life on a charge: 30

minutesGumStix

Powered Separately from RC CarRequires 5 Watts at mostRuns on 4.5V – 6V

Page 25: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

Testing StrategyModule testing will be completed first

RC CarGumStix PCiPhone

Integrated project testingForward, reverse, left, and right capabilitiesEdge of network operation

Page 26: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

Multidisciplinary AspectsCarefully researched ergonomic user

interface (Industrial Engineering)Mechanized RC car (Mechanical/Electrical

Engineering)Wi-Fi Interfacing (Network Administration)Carefully engineered and documented

software (Software Engineering)

Page 27: IPhone Controlled RC Car CE Senior Design II Jordan Bean Phil Doughty Xander Fiss Chris Murphy

Project CostsProject Modules Cost Our Cost

Verdex Pro XL6P $169.00 Provided By CE Department

Robostix $66.42 $66.42

Tweener $20.00 Provided By CE Department

Wi-Fi module FCC $44.52 $44.52

NetPro VX $77.42 $77.42

Serial Null-Modem Cable $15.25 $15.25

5.0 volt Power Adapter $10.00 Provided By CE Department

iPhone SDK Dev Program $99.00 $99.00

Hobby Grade Remote Control Car $183.59 $183.59

Remote Control Car Batteries $75.67 $75.67

Battery Charger $41.03 $41.03

Project Totals $801.90 $602.90