android controlled robot

18
Android-Controlled Robot 1 Ben Johnke ECE561 Final Project December 16, 2013

Upload: ben-johnke

Post on 27-Nov-2014

1.694 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Android controlled robot

1

Android-Controlled RobotBen Johnke

ECE561 Final ProjectDecember 16, 2013

Page 2: Android controlled robot

2

Project Overview• What?– Vehicle which can be controlled remotely by an

Android smartphone• How?– Write an Android app which allows the user to

provide throttle and steering inputs– The app sends commands via Bluetooth– Commands received by Bluetooth modem

connected to microcontroller– Microcontroller controls motors

Page 3: Android controlled robot

3

System Overview

Motor driver

Power source

Microcontroller

Bluetooth modem

Drivetrain

Android controller application

Page 4: Android controlled robot

4

System Overview

Motor driver

Power source

Microcontroller

Bluetooth modem

Drivetrain

Android controller application

Page 5: Android controlled robot

5

Drivetrain• Vehicle driven by left and right

DC motors• Motor torque spec based on

estimated vehicle weight, desired acceleration

• Differential steering employed– Turn vehicle by driving motors at

different velocities– Ball casters in front allow pivoting;

no additional wheels needed

Page 6: Android controlled robot

6

System Overview

Motor driver

Power source

Microcontroller

Bluetooth modem

Drivetrain

Android controller application

Page 7: Android controlled robot

7

Power Source• Few battery technologies can

provide high current• Max. discharge rate specified by

“C”-rating– C = battery capacity in amp hrs.– NiMH: ~1C– LiPo: 10C+

• LiPo selected to meet this application’s high-current needs– 6A stall current per motor– Chosen battery has 4.0Ah

capacity and 25C discharge rating

Page 8: Android controlled robot

8

System Overview

Motor driver

Power source

Microcontroller

Android controller application

Bluetooth modem

Drivetrain

Page 9: Android controlled robot

9

Motor Driver• Motor control requires full processor attention

– Monitor motor speed– Continuously adjust motor voltage to minimize error between desired and

actual motor speeds– Essentially a digital feedback control system

• Want to avoid this additional hardware and software complexity• Solution: Pololu Dual Motor Driver Shield for Arduino

– Contains 2 STMicroelectronics VNH5019 motor drivers, each rated for 12A– Includes Arduino library allowing motor speeds to be set with simple

function call

Page 10: Android controlled robot

10

System Overview

Motor driver

Power source

Microcontroller

Bluetooth modem

Drivetrain

Android controller application

Page 11: Android controlled robot

11

Microcontroller• Arduino UNO

– 14 digital I/O pins which can also be used for serial communication

– On-board regulated 5V supply– Works with Pololu Motor Driver Shield

• Implements differential steering algorithm– Outside wheel speed set based on

throttle command alone– Inside wheel speed also set based on

throttle command, but subtracted from according to sharpness of steering angle

– Rate limiter keeps speeds from changing too quickly

Page 12: Android controlled robot

12

System Overview

Motor driver

Power source

Microcontroller

Bluetooth modem

Drivetrain

Android controller application

Page 13: Android controlled robot

13

Bluetooth Modem• Want Class 1 Bluetooth for long range

(~100m)– Chosen model: BlueSMiRF Gold

• Essentially implements a wireless serial stream– When modem receives a message via

Bluetooth, it sends that message via serial– When modem receives a message via serial,

it sends that message via Bluetooth• Has static network address which Android

controller uses to establish a connection

Page 14: Android controlled robot

14

System Overview

Motor driver

Power source

Microcontroller

Bluetooth modem

Drivetrain

Android controller application

Page 15: Android controlled robot

15

Android Controller Application• Creates socket for

communicating with Bluetooth modem, using its known address

• Reads throttle and steering slider bar values, transmits periodically on socket’s OutputStream

• Listens on socket’s InputStream for error messages from Arduino

Page 16: Android controlled robot

16

Lessons Learned• Skills

– Android app development (Java, XML)– Selecting parts based on datasheets– Practical aspects: sourcing parts, mechanical fabrication– Bringing a design from concept to implementation

• Conclusion– It is feasible to implement Bluetooth communication between

smartphone and microcontroller– This opens door for wide range of possible similar

applications• Remote starter for car• Automation of household tasks

Page 17: Android controlled robot

17

Future Extensions• Advanced motion

– i.e. robot arm controlled by servo motor

• Obstacle avoidance– Install proximity sensor; develop

algorithms to steer around / back up when obstacles detected

• Vision– Use camera to transmit frames back

to Android application for display to user

– Bluetooth too low-bandwidth; switch to WiFi

Page 18: Android controlled robot

18

Video

• https://www.youtube.com/watch?v=LB0zt2BYd84