13
Implementing dead-reckoning on a mobile ground robot using a 3-axis accelerometer and a 3-axis gyroscope Iat Chi Sin Faculty Advisor: Dr. Ani Hsieh, Dhanushka Kularatne, PhD. Dept. of Mechanical Engineering and Mechanics Drexel University, Philadelphia, PA

Implementing dead-reckoning on a mobile ground robot using

Embed Size (px)

Citation preview

Page 1: Implementing dead-reckoning on a mobile ground robot using

Implementing dead-reckoning on a mobile ground robot using a 3-axis accelerometer and a

3-axis gyroscope

Iat Chi SinFaculty Advisor: Dr. Ani Hsieh, Dhanushka Kularatne, PhD.

Dept. of Mechanical Engineering and MechanicsDrexel University, Philadelphia, PA

Page 2: Implementing dead-reckoning on a mobile ground robot using

Introduction

• Implement dead-reckoning with accelerometer and gyroscope

• Understanding the mathematics (integration, filtering, co-ordinate rotation, etc.)

• Programming a microcontroller and using serial protocols for communication (I2C and USART)

Page 3: Implementing dead-reckoning on a mobile ground robot using

Dead-Reckoning

• Process of calculating one’s current position by using a previously determined position.

A

B

ϑ

,

Page 4: Implementing dead-reckoning on a mobile ground robot using

Hardware operation overview

•MPU 6000•3-axis accelerometer and 3-axis gyroscope•I2C protocol

XBee radioXBee radio

PIC 18f47j13Microcontroller

I2C

USART

MATLABData analysis

Page 5: Implementing dead-reckoning on a mobile ground robot using

Serial Protocols (USART and I2C)USART (Universal Synchronous/Asynchronous Receiver Transmitter)

Page 6: Implementing dead-reckoning on a mobile ground robot using

Serial Protocols (USART and I2C)I2C (Inter-Integrated Circuit)• synchronous protocol• I2C uses 2 wires, one for the clock (SCL) and one for the data

(SDA)• In this project, microcontroller is in master mode and MPU

6000 is in slave mode

Master (microcontroller) Slave (MPU)

clock (SCL)

data (SDA)

Page 7: Implementing dead-reckoning on a mobile ground robot using

I2C Master Mode Transmission

Page 8: Implementing dead-reckoning on a mobile ground robot using

Operation Diagram

Computer (Matlab) Microcontroller

Mpu6000

command

data

Acceleration and angular velocity

Data Analysis

Page 9: Implementing dead-reckoning on a mobile ground robot using

Data Analysis

Raw angular velocity

Raw acceleration

filter

Get orientation

Take out affect of gravity

Integrate acceleration

Position

Travelling direction

Page 10: Implementing dead-reckoning on a mobile ground robot using

Obtain orientation from gyroscope data• First integrate angular velocity to angle

displacement (roll, pitch and yaw)• New= Rotation matrix*original

Page 11: Implementing dead-reckoning on a mobile ground robot using

Rotation MatrixAssume r is 1

a1a2

y2

x2

y1

x1

-

= Rx Ry Rz

Ultimately,

Page 12: Implementing dead-reckoning on a mobile ground robot using

Future Works

Raw angular velocity

Raw acceleration

filter

Get orientation

Take out affect of gravity

Integrate acceleration

Position

Travelling direction

Page 13: Implementing dead-reckoning on a mobile ground robot using

References• http://en.wikipedia.org/wiki/Microcontroller• http://www.instructables.com/id/Processing-Controls-RC-Car-

with-XBee-modules/step8/Brief-Introduction-to-XBee-Module/• http://www.invensense.com/mems/gyro/mpu6050.html• http://electronics.stackexchange.com/questions/37814/usart-

uart-rs232-usb-spi-i2c-ttl-etc-what-are-all-of-these-and-how-do-th

• http://ww1.microchip.com/downloads/en/DeviceDoc/39974A.pdf

• http://ogldev.atspace.co.uk/www/tutorial07/tutorial07.html