Technical Lecture Slides

advertisement
Team 8: Blake Frantz, Zhichao Lu, Alex Mazzoni,
Nori Wilkins, Chenli Yuan, Dan Zilinskas



Introduction
Background
Hardware Connections
◦ I2C Connections

Data Capturing
◦ Arduino Software

Data Output
◦ Converting Data

Develop recording system that receives data
from sensors and sends data wirelessly to
processor
◦ Body-worn controller (Arduino) sends data to PC
◦ Real-time processing on external PC

Focus on communication between one sensor
and Arduino

IMU- MPU9150
◦
◦
◦
◦

Accelerometer
Gyroscope
Magnetometer
Captures Motion
Arduino
◦ Arduino Uno
 14 digital I/O
 Operating Voltage-5V
 Input Voltage Limit 620V
◦ Collects Data
4 wires connected from IMU to Arduino
 VCC, Clock, Ground, Data
 I2C Bus
 2 pull-up resistors (2.2 kΩ)-for the line to be able to go
high
 Clock frequency- 400kHz
 Pin 4 (SDA data line)
 Pin 5 (SCL clock)
3.3V



Data on I2C bus is transferred in 8-bit packets
Each packet must be followed by an
Acknowledgement packet
If no Acknowledgement is received, data is not
being transferred




Both signals (SDA and SCL) are bidirectional
Specifies connections, protocols, formats, addresses and
procedures
For each clock pulse, one bit of data is transferred
Lines can only change when SCL is low
VCC
GND
SDA
SCL


I2C bus can only handle 2
addresses
Multiplexer
◦ Switch to control
multiple devices
◦ Capable of multiple
addresses


Sensors are connected to channel ports
(C0,C1, etc.)
Channels are selected by selector bits
(S0…S3)


Arduino Software
Libraries
 MPU6050-Modified to a IMU-9150
 I2C
 Wire
◦ Serial Monitor
 Terminal window that displays raw data from Arduino

Functions
◦ Serial.begin (baudrate)
◦ Accelgyro.initialize()
◦ Accelgyro.GetMotion9-built into the library


String -prints the data points into a string
Serial.print-prints the data points to the serial
monitor

Time-stamping
◦ Useful when connecting multiple sensors
◦ Micros();
 Gives you time in Microseconds
◦ Millis();
 Gives you time in Milliseconds

Questions??
Download