iPhone Controlled RC Car
Download
Report
Transcript iPhone Controlled RC Car
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)
•
•
•
–
iPhone (Xander Fiss)
•
•
•
•
–
•
•
•
•
•
•
•
•
•
•
•
System
Networking
Robostix
Software
RC Car (Chris Murphy)
•
•
Software User Interface
Hardware
SDK
Networking
GumStix (Phil Doughty)
•
–
Infrastructure
Range
Protocol Ideas
Electronics
Power
Mechanical Components
Integration
Restrictions
Anticipated Problems
Power Requirements
Testing Strategy
Multidisciplinary Aspects
Cost
Introductions
Jordan Bean
Behavioral Model/Network Communications
Phil Doughty
GumStix RC Car Control Unit
Xander Fiss
iPhone Application Programming
Chris Murphy
RC Car Electronics
Project Overview & Major Goals
Use the iPhone as a tilt-based human control interface for an RC
car
System communication over Wi-Fi
RC Car Electronics Interfacing
PWM Channel Controlled Steering and Acceleration
GumStix provides Wi-Fi PWM Interface
The Network Infrastructure
The overall existing RIT wireless network will be used for
iPhone to RC car communication
RC Car
Gumstix PC
iPhone/iPod Touch
PC
Steering
Control
Acceleration
Control
Serial
Console
Expansion
Debug
Serial
Console
Robotix
Expansion:
PWM
Channels
802.11B/G WiFi Comm.
Accelerometer
Touch Screen
Buttons
Built-in
802.11B/G
WiFi
WiFi
Expansion
802.11B/G
WiFi Access Point
Infrastructure
iPhone 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
Range
The RC car will be able to operate within the range of the RIT
wireless network
As 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
Protocols
For operation, the UDP protocol has been initially selected
Offers fast transfer of information to RC car
For testing and in case of major UDP issues, TCP
communication capabilities have also been included
Allows for guaranteed connection and transfer of data
iPhone Software UI
• Tilt Values Read in
•
•
•
•
Real Time
Connect to
GumStix
On/Off Send Data
System Settings
Speedometer
iPhone Hardware
Touch Screen User Interface
Accelerometer Integrates to Obtain Ground-Relative Tilt
Data
Accelerometer data put through low pass filter to ignore
sudden movement (drops)
Built in Wi-Fi
iPhone SDK
C for Low-Level OS Calls & Functions
Objective-C for Cocoa Touch API
Object Oriented
Strict Superset of C
Extensive Documentation
Tutorials
Example Code
Includes Simulator for Speedy UI Development
Does Not Simulate Accelerometer
Networking
Connectivity Handled Behind the Scenes
iPhone OS is essentially Mac OS X
Traditional Unix Socket Programming
Code written in C
Libraries built into iPhone OS
GumStix (Phil Doughty)
Embedded Linux OS
Plug & Play
Modules connect on
either side
Network and WiFi
Modules were purchased
Robostix Microcontroller Module was also purchased
GumStix Networking
Linux Networking Stack
Proven Reliability
WiFi directly supported
Needed to change 1 line of a configuration file to automatically
join RIT’s WiFi Network
Support for UDP and TCP Connections
Remote Login via SSH
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
GumStix Software
Simple Program
Wait for UDP Data on a specific port
Once data is received, adjust PWM channels accordingly
Send acknowledgement packet (optional)
If data is not received within a specified timeout period, turn off
PWM channels (safety)
GumStix Help and Thanks
Initial Setup, Getting on the Network, etc.
Charles Gruener
GumStix/RoboStix programming advice and information
Nick Palladino
Eric Offermann
Electronics
The RC car is powered by a 7.2 V, 3300 mAh battery
Three wire servo
6.0 volt VDD
0.0 volt GND
PWM (0V5V)
Powering the GumStix
Several options
Battery for the Nintendo DS or Sony PSP
Rechargeable AA Batteries + Voltage Regulator
Power directly from the 6.0 volt VDD servo wire
Need to be extremely careful with the sensitive microchips
Don’t want a showstopper
Mechanical Components
RC 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 software
Theoretically capable of going 35+ mph
Integration
Ease of integration will be supported by the testing and
integration behavioral models
Use 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
Restrictions
It 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
Anticipated Problems
Real-time control of the PWM channel outputs
UDP packet reliability
Powering the GumStix control unit
Power Requirements
RC Car
3.3 Ah RC Car Battery x2 (~24 Watt-hours)
Estimated battery life on a charge: 30 minutes
GumStix
Powered Separately from RC Car
Requires 5 Watts at most
Runs on 4.5V – 6V
Testing Strategy
Module testing will be completed first
RC Car
GumStix PC
iPhone
Integrated project testing
Forward, reverse, left, and right capabilities
Edge of network operation
Multidisciplinary Aspects
Carefully researched ergonomic user interface (Industrial
Engineering)
Mechanized RC car (Mechanical/Electrical Engineering)
Wi-Fi Interfacing (Network Administration)
Carefully engineered and documented software (Software
Engineering)
Project Costs
Project 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