Workout Buddy Workout Buddy A muscle fiber stimulation sensor A muscle fiber stimulation sensor and data logger and data logger Senior Design Senior Design Group 8 Group 8 Summer 2009 Summer 2009 Matt McNealy (EE) Matt McNealy (EE) Scott Martin (EE) Scott Martin (EE) Andrew Lee (CpE) Andrew Lee (CpE) Josh Hamby (EE) Josh Hamby (EE)
40
Embed
Workout Buddy A muscle fiber stimulation sensor and data logger Senior Design Group 8 Summer 2009
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. - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Goals & ObjectivesGoals & Objectives To design and implement a device that will allow To design and implement a device that will allow
weight lifters to monitor and track their progress weight lifters to monitor and track their progress electronically.electronically.
To build a sensor system that:To build a sensor system that: Measures the electric potential generated by certain Measures the electric potential generated by certain
muscle groups.muscle groups. Detects the angle of body part being exercised.Detects the angle of body part being exercised.
To learn about wireless technology, medical To learn about wireless technology, medical devices and programming microcontrollers.devices and programming microcontrollers.
To find points of over exertion in any particular To find points of over exertion in any particular exercise and improve on underworked muscle exercise and improve on underworked muscle groups.groups.
Specifications and Specifications and RequirementsRequirements
ion batteryion battery Dimensions: 2.1” x 2.3”Dimensions: 2.1” x 2.3” Measure S-EMG ranging Measure S-EMG ranging
from 0.02-5mV.from 0.02-5mV. Capability of measuring a Capability of measuring a
full 360 degree range of full 360 degree range of motion in three dimensions.motion in three dimensions.
Communicate with the Communicate with the control module up to 3 control module up to 3 meters.meters.
Must secure to the body via Must secure to the body via velcro strap.velcro strap.
Control module:Control module: Operating time: 3 hours.Operating time: 3 hours. Operating voltage: 3.3VOperating voltage: 3.3V Powered by a 9V lithium Powered by a 9V lithium
battery.battery. Dimensions: 3” x 2.6” Dimensions: 3” x 2.6” Wirelessly receive data Wirelessly receive data
from the sensor circuit.from the sensor circuit. Automatically count Automatically count
repetitions and sets.repetitions and sets. Display data on the LCD Display data on the LCD
screen.screen. Write data to a micro-SD Write data to a micro-SD
Amplifier:Amplifier: Gain of 1000+Gain of 1000+ High CMRR >95 db for frequencies 10 – 500 High CMRR >95 db for frequencies 10 – 500
HzHz Input impedance = 10 x electrode impedanceInput impedance = 10 x electrode impedance
Skin Preparation:Skin Preparation: Cleaned and freed of dry skin cellsCleaned and freed of dry skin cells Centered on the belly of the muscleCentered on the belly of the muscle 2 Electrodes 2 cm center to center2 Electrodes 2 cm center to center
Signal Acquisition & Signal Acquisition & ProcessingProcessing
Processing of the signal enables the user to Processing of the signal enables the user to maximize their workout experience.maximize their workout experience.
8 bit MCU running at 16 MHZ with 8 bit MCU running at 16 MHZ with XTALXTAL
Serial Communication via UART, I2C, Serial Communication via UART, I2C, SPISPI
6 channel 10 bit Analog to Digital 6 channel 10 bit Analog to Digital ConverterConverter
3 Timers, 6 PWM channels3 Timers, 6 PWM channels Free C Compiler and Development Free C Compiler and Development
ToolsTools
Analog to Digital Analog to Digital ConversionConversion
Using highest possible Sampling Using highest possible Sampling Frequency 125kHzFrequency 125kHz
Approximate resolution is 4.9 mVApproximate resolution is 4.9 mV
The free running mode allows the The free running mode allows the control unit to continuously update control unit to continuously update the voltage received off the sensor the voltage received off the sensor and provide the user with a and provide the user with a measurable output of intensity. measurable output of intensity.
Development Development EnvironmentsEnvironments
AVR Studio is an Integrated Development AVR Studio is an Integrated Development Environment for writing, compiling, Environment for writing, compiling, simulating, and debuggingsimulating, and debugging
AVRDUDE is an open source utility to AVRDUDE is an open source utility to download/upload/manipulate the ROM download/upload/manipulate the ROM and EEPROM and EEPROM
AVRlibc and AVRlibAVRlibc and AVRlib
AVRlibc is the Standard C Library AVRlibc is the Standard C Library for AVR microcontrollers and for AVR microcontrollers and provides basic functions like printf, provides basic functions like printf, stdio calls, math functions, plus stdio calls, math functions, plus some AVR-specific functionssome AVR-specific functions
AVRLib provides functions for AVRLib provides functions for conventional tasks such as writing to conventional tasks such as writing to LCD’s and SD cardsand reading LCD’s and SD cardsand reading from buttons and encoders from buttons and encoders
Getting User Input – Getting User Input – Rotary EncoderRotary Encoder
3 Terminal Device to get sequential input3 Terminal Device to get sequential input 2 bit grey code provides 4 states for MCU 2 bit grey code provides 4 states for MCU
to readto read MCU must keep track of previous state.MCU must keep track of previous state. Debouncing via software delays or Debouncing via software delays or
hardware LPF’shardware LPF’s Triggering via Interrupts or PollingTriggering via Interrupts or Polling
Color LCD 128x128 Color LCD 128x128 Nokia Clone Nokia Clone
LCD Logic - 3.3V @ 2-3mALCD Logic - 3.3V @ 2-3mA LED Backlight - 7V @ 40-50mA (very bright)LED Backlight - 7V @ 40-50mA (very bright) Full 4,096 Color DisplayFull 4,096 Color Display Uses the Epson S1D15G10 or Philips PCF8833 Uses the Epson S1D15G10 or Philips PCF8833
Controller Controller Active Display Dimensions: 1.2"x1.2”Active Display Dimensions: 1.2"x1.2” Two-wire serial SPI interface (clock and data) Two-wire serial SPI interface (clock and data)
Setting the Processor Setting the Processor SpeedSpeed
The clock must be at a specific The clock must be at a specific frequency in order to set the correct frequency in order to set the correct sampling rate to sample data from sampling rate to sample data from the EMG sensor. The clock value the EMG sensor. The clock value was chosen to ensure the highest was chosen to ensure the highest sampling resolution possible that the sampling resolution possible that the Atmega 168 can support. Atmega 168 can support.
Model: ANT-916-SP Model: ANT-916-SP Price: $2.08 from DigikeyPrice: $2.08 from Digikey
SD CARD MODULEFor 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-atmega8-fat32.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 PartsLayout of Parts Sensor UnitSensor Unit
Data from the Data from the accelerometer accelerometer and sensor units and sensor units are fed into the are fed into the ATmega328p ATmega328p MCU.MCU.
This data is This data is streamed to the streamed to the control unit via control unit via transmitter at transmitter at 9600bps.9600bps.
DATA
Layout of Parts Layout of Parts Control UnitControl Unit
Data will be received by Data will be received by the receiver and fed the receiver and fed into the ATmega328p into the ATmega328p MCU.MCU.
Data is then saved to Data is then saved to the SD card in the the SD card in the FAT32 file system FAT32 file system architecture. It will architecture. It will become a CSV file. become a CSV file. (Comma-separated (Comma-separated values)values)
The SD card can now be The SD card can now be removed from the removed from the device and read on a device and read on a computer .computer .
9V
10nF
On/Off
HP3RXM900
192021222324252627
282930313233343536
Splatch
1 2 3 4 5 6
1uF
AtmelAtmega
328
2918
462078
5321
22pF
22pF
2324252627281922303132129
1011121314151617
uSDSocket
12345678
CD1CD2D1D2
330 330
RotEnc
330
330
330
330
ISPProg
Reset
330Reset
Nokia Display
LP8345
DATA
DATA
CSV fileCSV file The CSV file saved on the SD card can be The CSV file saved on the SD card can be
opened and read.opened and read. The SD card will contain from each The SD card will contain from each
workout:workout: X-axisX-axis # of repetitions# of repetitions Z-axisZ-axis EMG signalEMG signal
Used to keep track of the effectiveness of the Used to keep track of the effectiveness of the user’s workouts. user’s workouts.
CSV file (Excel)CSV file (Excel)
Opening the CSV file in Excel Graphing the data in Excel
0
50
100
150
200
250
300
1 3 5 7 9 11 13 15 17 19 21
Series1
Series2
Series3
Series4
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.
Power SystemPower SystemSensor CircuitSensor Circuit
RequirementsRequirements Generate sufficient electricity to keep the Generate sufficient electricity to keep the
unit running for 3 hours.unit running for 3 hours. Environmentally friendlyEnvironmentally friendly Length of chargeLength of charge Motivating factors: Availability, capacityMotivating factors: Availability, capacity
Power SystemPower SystemSensor CircuitSensor Circuit
Operating VoltagesOperating Voltages (1) MMA7260Q – 3.6V(1) MMA7260Q – 3.6V (1) Atmel ATmega328 – 3.6V(1) Atmel ATmega328 – 3.6V (1) TXM-900-HP3 – 3.6V(1) TXM-900-HP3 – 3.6V (2) INA122 Instrumentation amplifier – 3.6V(2) INA122 Instrumentation amplifier – 3.6V Total Power Consumed: 360mWTotal Power Consumed: 360mW CR2032 3V lithium button cell battery was used CR2032 3V lithium button cell battery was used
initially, but the accelerometer did not function initially, but the accelerometer did not function properly due to a dropout voltage across the properly due to a dropout voltage across the battery of 500mV.Minimum voltage for the battery of 500mV.Minimum voltage for the accelerometer is 2.7Vaccelerometer is 2.7V
Power SystemPower SystemSensor CircuitSensor Circuit
Powered by a rechargeable 3.7V polymer Powered by a rechargeable 3.7V polymer lithium-ion battery. lithium-ion battery. Has a capacity of 650mAh.Has a capacity of 650mAh.
Sensor system Sensor system
Power SupplyPower Supply
Display moduleDisplay module Demands 340mADemands 340mA Total power consumption of 1.112 WTotal power consumption of 1.112 W Powered by the Ultra life 9V batteryPowered by the Ultra life 9V battery
Chemistry: LithiumChemistry: Lithium Capacity: 1.2 A*hCapacity: 1.2 A*h Can run the module for 4 hours before Can run the module for 4 hours before