Wireless Interface

Download Report

Transcript Wireless Interface

Workout Buddy
A muscle fiber stimulation sensor
and data logger
Senior Design
Group 8
Summer 2009
Matt McNealy (EE)
Scott Martin (EE)
Andrew Lee (CpE)
Josh Hamby (EE)
Goals & Objectives


To design and implement a device that will allow weight lifters
to monitor and track their progress electronically.
To build a sensor system that:




Measures the electric potential generated by certain muscle groups.
Detects the angle of body part being exercised.
To learn about wireless technology, medical devices and
programming microcontrollers.
To find points of over exertion in any particular exercise and
improve on underworked muscle groups.
Specifications and Requirements

Sensor circuit:








Operating time: 3 hours.
Operating voltage: 2.8-3.7V
Powered by polymer lithium ion
battery
Dimensions: 2.1” x 2.3”
Measure S-EMG ranging from
0.02-5mV.
Capability of measuring a full
360 degree range of motion in
three dimensions.
Communicate with the control
module up to 3 meters.
Must secure to the body via
velcro strap.

Control module:








Operating time: 3 hours.
Operating voltage: 3.3V
Powered by a 9V lithium battery.
Dimensions: 3” x 2.6”
Wirelessly receive data from the
sensor circuit.
Automatically count repetitions
and sets.
Display data on the LCD screen.
Write data to a micro-SD card.
Block Diagram
Sensor Unit
Block Diagram
Control Module
EMG & EKG Requirements
Amplifier:



Gain of 1000+
High CMRR >95 db for frequencies 10 – 500 Hz
Input impedance = 10 x electrode impedance
Skin Preparation:



Cleaned and freed of dry skin cells
Centered on the belly of the muscle
2 Electrodes 2 cm center to center
Sensor Circuitry
EMG & EKG Detection:

INA122P-ND Instrumentation Amplifier
Angle Detection:

MMA7260Q Triple Axis Accelerometer
Instrumentation Amplifier

INA122P-ND
Voltage supply:
2.2 - 36 VDC
 Supply current:
60 - 85 μA
 CMRR: 83 - 96 db
 Gain: 1-10000
 Input impedance:
10^10 ohm
 Digikey: $5.56


AD626AN-ND
Voltage supply:
2.4 - 10 VDC
 Supply current:
230 - 290 μA
 CMRR: 66 - 90 db
 Gain: 1-100
 Input impedance:
200 k ohm
 Digikey: $7.46

Signal Acquisition & Processing

Processing of the signal enables the user to maximize
their workout experience.
Triple Axis Accelerometer

MMA7260Q :

Power supply:
2.2 - 3.7 VDC
 500 - 800 μA


Selectable sensitivity:




1.5g = 800 mV/g
2g = 600 mV/g
4g = 300 mV/g
6g = 200 mV/g
Sleep mode option
 Sparkfun: $19.95

MMA7260Q Orientation
Testing The MMA7260Q
X-axis = vertical
Z-axis = horizontal
X-axis = horizontal
Z-axis = vertical
Atmel Atmega 168





8 bit MCU running at 16 MHZ with XTAL
Serial Communication via UART, I2C, SPI
6 channel 10 bit Analog to Digital Converter
3 Timers, 6 PWM channels
Free C Compiler and Development Tools
Analog to Digital Conversion



Using highest possible Sampling Frequency
125kHz
Approximate resolution is 4.9 mV
The free running mode allows the control unit
to continuously update the voltage received off
the sensor and provide the user with a
measurable output of intensity.
Development Environments


AVR Studio is an Integrated Development
Environment for writing, compiling, simulating, and
debugging
AVRDUDE is an open source utility to
download/upload/manipulate the ROM and
EEPROM
AVRlibc and AVRlib


AVRlibc is the Standard C Library for AVR
microcontrollers and provides basic functions
like printf, stdio calls, math functions, plus some
AVR-specific functions
AVRLib provides functions for conventional
tasks such as writing to LCD’s and SD cardsand
reading from buttons and encoders
Getting User Input – Rotary
Encoder

3 Terminal Device to get sequential input
2 bit grey code provides 4 states for MCU to read
MCU must keep track of previous state.
Debouncing via software delays or hardware LPF’s

Triggering via Interrupts or Polling



Color LCD 128x128 Nokia Clone






LCD Logic - 3.3V @ 2-3mA
LED Backlight - 7V @ 40-50mA (very bright)
Full 4,096 Color Display
Uses the Epson S1D15G10 or Philips PCF8833 Controller
Active Display Dimensions: 1.2"x1.2”
Two-wire serial SPI interface (clock and data)
Setting the Processor Speed

The clock must be at a specific frequency in
order to set the correct sampling rate to sample
data from the EMG sensor. The clock value was
chosen to ensure the highest sampling resolution
possible that the Atmega 168 can support.
User Interface
Wireless Interface - TXM-900

Specifications



Operating voltage: 2.8–13 VDC
Supply current: 14-17 mA
Transmit frequency range:



Data rate: 100-56,000 bps
Operating temperature range:


-30 to 85C
SIP Style Price: $29.45 from Digikey


902.62-927.62 MHZ
Part #: TXM-900-HP3-PPO-ND
SMD Style Price: $29.45 from Digikey

Part #: TXM-900-HP3SPO-ND
Wireless Interface - RXM-900-HP3-xxx

Specifications



Operating voltage: 2.8–13 VDC
Supply current: 16-21 mA
Receive frequency range:



Data rate: 100-56,000 bps
Operating temperature range:


-30 to 85C
SIP Style Price: $43.40 from Digikey


902.62-927.62 MHZ
Part #: RXM-900-HP3-PPO_-ND
SMD Style Price: $39.22 from Digikey

Part #: RXM-900-HP3-SPO-ND
Antenna

JJB Series

The Electrical Specifications:





Center Freq. 916MHz
Bandwidth 30MHz
Wavelength 1/4-wave
Impedance 50 ohms
Connection Direct solder
Model: ANT-916-JJB-xx
Price: $1.96 from Digikey
Antenna

SP Series “The Splatch”

The Electrical Specifications:





Center Freq. 916MHz
Bandwidth 30MHz
Wavelength 1/4-wave
Impedance 50 ohms
Connection Surface-mount
Model: ANT-916-SP
Price: $2.08 from Digikey
SD CARD MODULE
For our data logging we based our design
off of CC Dharmani’s “SD Card
Interfacing with ATmega 8/32 (FAT32
implementation)” project.
The circuit design and open source files
were carefully adapted to work with our
Atmega328p.
We used his method of creating FAT32
files.
More info at:
http://www.dharmanitech.com/2009/01/
sd-card-interfacing-with-atmega8fat32.html
SD MODULE cont..
This schematic shows
the integration of the
SD card module into
our design.
The SD card module
requires 3.3-3.6v in
order to write data to
the micro SD card.
Layout of Parts
Sensor Unit

Data from the
accelerometer and
sensor units are fed
into the ATmega328p
MCU.
DATA

This data is streamed
to the control unit via
transmitter at
9600bps.
Layout of Parts
Control Unit


Data will be received by
the receiver and fed into
the ATmega328p MCU.
Data is then saved to
the SD card in the
FAT32 file system
architecture. It will
become a CSV file.
(Comma-separated
values)
Splatch
1 2 3 4 5 6
DATA
On/
Off
19
20
21HP3
22RXM
23 900
24
25
26
27
LP8345
Nokia
Display
28
29
30
31
32
33
34
35
36
29
18
9V
10nF
1uF
4
6
20
7
8
22pF
Atmel
Atmega
328
22pF
5
3
21
ISP
Prog
23
24
25
26
27
28
19
22
30
31
32
1
2
9
10
11
12
13
14
15
16
17
330
330
DATA
330
330

The SD card can now
be removed from the
device and read on a
computer .
Reset
330
Rot
Enc
Reset
330
330
1
2
3
4
uSD
5
Socket
6
7
8
CD1
CD2
D1
D2
CSV file


The CSV file saved on the SD card can be opened and
read.
The SD card will contain from each workout:




X-axis
# of repetitions
Z-axis
EMG signal

Format: 126,0,200,5,
125,0,201,5,
....................

Used to keep track of the effectiveness of the user’s
workouts.
CSV file (Excel)
It is up to the user how he/she would like to use
the data. For example, the CSV file can be easily
opened using Excel and a graph can be made
using the values stored.
The columns are the X-Axis, Repetitions, Z-Axis
and EKG signals respectively.
300
250
200
Series1
Series2
150
Series3
Series4
100
50
0
1
Opening the CSV file in Excel
3
5
7
9
11
13
15
17
19
Graphing the data in Excel
21

Requirements
Power System
Sensor Circuit
Generate sufficient electricity to keep the unit running for
3 hours.
 Environmentally friendly
 Length of charge
 Motivating factors: Availability, capacity

Power System
Sensor Circuit

Operating Voltages
(1) MMA7260Q – 3.6V
 (1) Atmel ATmega328 – 3.6V
 (1) TXM-900-HP3 – 3.6V
 (2) INA122 Instrumentation amplifier – 3.6V
 Total Power Consumed: 360mW
 CR2032 3V lithium button cell battery was used initially,
but the accelerometer did not function properly due to a
dropout voltage across the battery of 500mV.Minimum
voltage for the accelerometer is 2.7V


Capacity: 225mAh. Radius=20mm ,height=3mm
Power System
Sensor Circuit

Powered by a rechargeable 3.7V polymer lithium-ion
battery.

Has a capacity of 650mAh.
Sensor system
Power Supply

Display module



Demands 340mA
Total power consumption of 1.112 W
Powered by the Ultra life 9V battery



Chemistry: Lithium
Capacity: 1.2 A*h
Can run the module for 4 hours before replacement is
needed.
Display Module
Project Timeline
Budgeting

Fully funded by
the V.A.

Questions?