SlideShare a Scribd company logo
1 of 10
Wireless Internet Enabled Device for the
Recording of Exercise Performance on
Home Fitness Equipment
Overview
This describes the use and operation of a device that connects a slightly modified plate
selectorized type of home gym equipment via a wireless home network to a remote web
host. The idea is that the device records important workout parameters such as weight
used, reps performed, time spent exercising and detailed range-of-motion data for the
exercises being performed on the fitness machine while guiding the user through a
custom designed workout. The device is connected to the user’s wireless router via its
own built-in wireless web-server and communicates with a remote web server over the
Internet via the TCP/IP protocol.
The remote web host functions as an information/service hub for the exercise
equipment user by providing web based applications to manage and design their
workouts, graphically view the completed workout data, view all previous workouts and
receive guidance and help from online personal trainers.
The device employs an 8-bit microcontroller to monitor and store data from an 8-
bit incremental magnetic rotary encoder that reads the main weight stack pulley, and an
IR emitter/detector combo positioned just above the weight stack. The rotary encoder is
used to track the position of the weight stack, while the IR sensors are used to determine
how much weight is being moved during the performance of an exercise.
The data is collected during the entirety of the workout session, and then sent over
the internet via a wireless/wired embedded web server. The embedded web server is
DHCP capable so that it will work with most home WiFi networks, or can employ the use
of a Cat-5 cable to connect to a home router. Broadband service is required for this
system to work.
The typical use and operation of the system
would be as follows:
The user logs into the website and creates an online profile for their device. This only
needs to be done once.
The user creates one of up to 4 custom workout files using the Workout Designer
software app. These workout files contain the exercises, weights and repetitions that the
user wishes to perform for their workouts. This could also be done by a certified online
personal trainer as an additional service.
The user’s profile residing on the remote web host will track their completed workouts
and their custom workouts to be downloaded to their fitness machine device.
The user logs off and turns on the fitness machine device in preparation for a workout.
The fitness machine device connects to the user’s home wireless router and logs on to the
remote web host.
The fitness machine downloads up to 4 profiles stored on the remote web server and
displays them to the user.
The user selects the appropriate profile, at which time the device “looks” for custom
workout files stored in the user’s directory and downloads any custom workout files
present for that user profile.
The device disconnects from the remote web server.
The user selects which workout they wish to perform using the fitness machine device.
The exercise to be performed, how many reps and how much weight to use is displayed
on a large 80 character LCD screen.
As soon as exercise is initiated the fitness device begins tracking and recording the
weight, the range of motion and calculates the number of reps performed.
On completion of the workout, the fitness device automatically re-connects to the remote
web server and downloads all the recorded exercise parameters to a data file in the user’s
directory.
The data file is then automatically converted to an XML formatted file for reading by the
FitView Software.
The device disconnects from the remote web server and the user can now power down
the device.
The user can now log onto the remote web server with his/her home computer and view
charts and graphs of his/her completed workout, past workouts, goals etc.
The completed workout can also be viewed and analyzed by a qualified fitness trainer to
help guide their client’s progress.
Fitness Device Features
Designed to be fitted to most single weight stack home multi-gyms with minimal
modification of the equipment’s design
System has built-in wireless 11mpbs networking capability with full data encryption
capability (WPA, WEP) as well as DHCP for compatibility with most home wireless
routers.
Device can track range of motion accurately to within a degree, depending on the
exercise performed - suitable for physical therapy.
Device accurately counts repetitions after each set and has a set time-out feature.
Device uses low cost components to minimize costs. No expensive processors or flash
memory are used.
High quality, large LCD display used to view and control device. Custom characters and
graphics can be easily developed for the device.
Use of XML files allows completed workout data to be ported to other applications for
viewing.
Theory of Operation
The device is essentially an 8-bit microcontroller data acquisition system that uses an
embedded wireless device server to provide TCP/IP communications. The embedded
server used for the prototype is a Lantronix WiPort. The device monitors the various
sensors in real-time at a rate of 2 KHz while driving an intelligent serial LCD display.
The microcontroller communicates via RS232 with the LCD and WiPort at a rate of 19.2
K Baud.
The device uses an 8-bit magnetic rotary encoder that reads the position of the main
weight stack pulley and an IR emitter/receiver pair that reads the number of plates being
used for exercise. The sensors are interfaced to the port pins of an Atmel 89s8252 8-bit
microcontroller. The microcontroller uses these sensors to compute the range-of-motion,
weight used, repetitions performed and the initiation and completion of each set. The
data is recorded in an external 64kbyte (32kbyte used in prototype) SRAM IC. The
microcontroller uses an 8-bit bidirectional data/addressing bus tied to a ‘373 type latch to
address/read/write data to the SRAM.
For the prototype system, the WiPort is mounted on a separate board (evaluation board)
that has its own 3.3vdc power supply. To communicate with the WiPort board, the
microcontroller requires an RS232 level converter chip, such as the MAX202. A
production system would house all components on the same board, probably using 3.3vdc
power for all components. The RS232 Transceiver should not be required at that point.
The prototype currently uses a 16 character by 2 line intelligent serial LCD display to act
as the fitness machine information display. This display is capable of displaying
alphanumeric information as well as some crude graphics. It is currently planned that a
larger 20 character by 4 line LCD would be used in a production device.
Software
The microcontroller controls all functions of the device except for the TCP/IP Wireless
communications. This includes sending characters to the LCD, controlling the external
SRAM, reading the sensors and keypad, and performing the necessary calculations.
The microcontroller software is written in assembly because of the limited program
memory of the 8051 architecture chip. The program operates as follows:
Perform check of external SRAM by writing 55h to every address and then reading it
back
Command the WiPort to connect to WLAN and to remote internet host
Query the remote host for all profiles associated with device and store the profiles in
SRAM.
Display profile names on LCD and read keyboard so user can select proper profile
Download the applicable custom workout from remote internet host
Disconnect from remote host.
Sensors
There are currently two main types of sensors used for reading data from the exercise
machine:
 Austria Microsystems AS5305 8-bit incremental magnetic rotary encoder for the
main weight stack pulley.
 IR Emitter/Receiver pair is used to read the number of weight stack plates.
Reading Position of the Pulley
The magnetic rotary encoder is read at a rate of approximately 2000 Hz through two port
pins of the micro. The port pins are read at all times in order to determine whether a set
has commenced. Once the encoder count has exceeded a set threshold the micro software
enters into the main encoder read routine. At this point the LED control port pin is
brought LOW, which turns on the IR LED for the weight stack plate reader (explained
later.)
The encoder read routine reads the encoder inputs and increments, decrements or does
nothing to the 16 bit counter. This is accomplished at a rate of 2000 Hz. While this is
occurring, another count tracks how many encoder reads take place. Once 75 read loops
take place, the 16 bit counter is divided by 6 and the result is stored in the external
SRAM. This results in a stored sample rate of 27Hz.
During the encoder read routine the 16 bit counter is checked after every read to see if it
is under the timeout threshold count. If the count is under the threshold a timeout count
is initiated in the timeout loop. The timeout count currently lasts 4 seconds, that is if the
weight stack is at rest for 4 seconds, the set is considered over. If the 16 bit counter count
exceeds the threshold count during the timeout period, the timeout routine is exited and
the main encoder read routine is re-entered.
Reading Number of Plates
During the encoder read routine the IR LED is used along with the IR Detector to read
the number of plates in motion. The plates are only scanned once during each set. At the
beginning of the encoder read routine when the IR LED is turned on by clearing the port
pin connected to the base of the PNP transistor. The IR LED is aimed at the IR detector
positioned on the other side of the plates. This causes the detector to conduct and put a
low on the micro port pin. As the plates move up, the detector is blocked from the IR
source and turns off, putting a high on the port pin. During the time the port pin is high,
the encoder count is stored in a temp register until the port pin is again low (the plates
have passed the IR emitter/detector, unblocking the IR beam.)
A flag is set to prevent the plates from being read more than once during a set. The
count in the temp register is then divided by 2 to ensure an 8-bit result and stored in
SRAM as the weight plate index used to later compute the amount of weight used for that
set. The IR LED is turned off after the plates are read by bringing the micro port pin
going to the PNP transistor high.
The 8 bit value that results from the weight stack read will typically fall into a range of
numbers for a given number of plates. For example, for one set two plates may give a
value of 31. For the next set a value of 30 may result. This requires that a lookup table
be used in the microcontroller software that converts these ranges of numbers into
consistent plate values of 1, 2, 3 and so on. Thus for a 15 plate system, a 15 would be the
value stored in SRAM if all plates are used for a set. This way the web based software
can be tailored to give an actual weight value (i.e. say 225 lbs) based on how much a
plate weighs for that specific machine. Thus, the data sent by the fitness machine simply
states how many plates were used; it is up to the web based software to figure out how
much weight that translates to.
Next Steps
New Pulley / Encoder System
The problem with the pulley/encoder setup used in the development system is that a
complex arrangement of a pulley keyed to a rotating shaft must be used in order for the
Austria Microsystems magnetic encoder to be used. The keyed pulley/shaft also requires
expensive roller bearing blocks and shaft collars to keep everything stationary in the
horizontal plane. A much better setup would be to use a typical exercise machine pulley
rotating on a bolt so that a minimum of modification is required to the exercise machine.
In order to make the standard pulley setup possible, metallic strips must be glued to the
pulley, and two inductive sensors placed near the pulley. The inductive sensors must be
positioned in such a way as to cause a 90 degree phase difference in the readings of the
two sensors. This is allows the system to function as an incremental rotary encoder using
quadrature and is easy to integrate into the current fitness device system.
Pictures/Diagrams:
Figure 1: Machine in development of device
Figure 2: New main pulley with magnetic rotary encoder on right
Figure 3: Example of small LCD display
Figure 4: Development machine
Figure 5: Breadboard and LCD/Keypad box
Figure 6: Schematic 1 of device main board

More Related Content

What's hot

SOCIAL NETWORK FOR SMART DEVICES USING EMBEDDED ETHERNET
SOCIAL NETWORK FOR SMART DEVICES USING EMBEDDED ETHERNETSOCIAL NETWORK FOR SMART DEVICES USING EMBEDDED ETHERNET
SOCIAL NETWORK FOR SMART DEVICES USING EMBEDDED ETHERNET
cseij
 

What's hot (20)

SOCIAL NETWORK FOR SMART DEVICES USING EMBEDDED ETHERNET
SOCIAL NETWORK FOR SMART DEVICES USING EMBEDDED ETHERNETSOCIAL NETWORK FOR SMART DEVICES USING EMBEDDED ETHERNET
SOCIAL NETWORK FOR SMART DEVICES USING EMBEDDED ETHERNET
 
basic embedded system presentation
basic embedded system presentationbasic embedded system presentation
basic embedded system presentation
 
Serial Communication & Embedded System Interface
Serial Communication & Embedded System InterfaceSerial Communication & Embedded System Interface
Serial Communication & Embedded System Interface
 
Automatic Railway Gate Control System with Arduino
Automatic Railway Gate Control System with ArduinoAutomatic Railway Gate Control System with Arduino
Automatic Railway Gate Control System with Arduino
 
Hp embedd and_robotics
Hp embedd and_roboticsHp embedd and_robotics
Hp embedd and_robotics
 
Embedded systems and robotics by scmandota
Embedded systems and robotics by scmandotaEmbedded systems and robotics by scmandota
Embedded systems and robotics by scmandota
 
digital clock atmega16
digital clock atmega16digital clock atmega16
digital clock atmega16
 
Fpga based heart rate monitoring system using gsm
Fpga based heart rate monitoring system using gsmFpga based heart rate monitoring system using gsm
Fpga based heart rate monitoring system using gsm
 
Customized Monitoring and Assessment of Circuit Breaker Operations in Differe...
Customized Monitoring and Assessment of Circuit Breaker Operations in Differe...Customized Monitoring and Assessment of Circuit Breaker Operations in Differe...
Customized Monitoring and Assessment of Circuit Breaker Operations in Differe...
 
Project Report on Embedded Systems
Project Report on Embedded Systems Project Report on Embedded Systems
Project Report on Embedded Systems
 
International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)
 
Network Based Data Acquisition and Logging System using PIC Microcontroller
Network Based Data Acquisition and Logging System using PIC MicrocontrollerNetwork Based Data Acquisition and Logging System using PIC Microcontroller
Network Based Data Acquisition and Logging System using PIC Microcontroller
 
Microprocessor project
Microprocessor projectMicroprocessor project
Microprocessor project
 
avr-web-server
avr-web-serveravr-web-server
avr-web-server
 
Bioinstrumentation Deploying AMS Technology
Bioinstrumentation Deploying AMS TechnologyBioinstrumentation Deploying AMS Technology
Bioinstrumentation Deploying AMS Technology
 
Training report on embedded sys_AVR
Training report on embedded sys_AVRTraining report on embedded sys_AVR
Training report on embedded sys_AVR
 
Unit 3 devices&buses
Unit 3 devices&busesUnit 3 devices&buses
Unit 3 devices&buses
 
E044081720
E044081720E044081720
E044081720
 
Biomedical Instrumentation Presentation on Infrared Emitter-Detector and Ardu...
Biomedical Instrumentation Presentation on Infrared Emitter-Detector and Ardu...Biomedical Instrumentation Presentation on Infrared Emitter-Detector and Ardu...
Biomedical Instrumentation Presentation on Infrared Emitter-Detector and Ardu...
 
ArduinoBased Head GestureControlled Robot UsingWireless Communication
ArduinoBased Head GestureControlled Robot UsingWireless CommunicationArduinoBased Head GestureControlled Robot UsingWireless Communication
ArduinoBased Head GestureControlled Robot UsingWireless Communication
 

Viewers also liked (9)

Blackboar dgabiyaz
Blackboar dgabiyazBlackboar dgabiyaz
Blackboar dgabiyaz
 
Aesthetics of youth scenes vitor sergio ferreira
Aesthetics of youth scenes   vitor sergio ferreiraAesthetics of youth scenes   vitor sergio ferreira
Aesthetics of youth scenes vitor sergio ferreira
 
Estructuradelatesis 120527192040-phpapp01
Estructuradelatesis 120527192040-phpapp01Estructuradelatesis 120527192040-phpapp01
Estructuradelatesis 120527192040-phpapp01
 
IYEF Brochure
IYEF BrochureIYEF Brochure
IYEF Brochure
 
Presentación romvaz
Presentación romvazPresentación romvaz
Presentación romvaz
 
Bodies, identities, subculteres and participation paul sweetman
Bodies, identities, subculteres and participation   paul sweetmanBodies, identities, subculteres and participation   paul sweetman
Bodies, identities, subculteres and participation paul sweetman
 
IC Engine parts
IC Engine parts IC Engine parts
IC Engine parts
 
TaTo Cake Business Plan
TaTo Cake Business PlanTaTo Cake Business Plan
TaTo Cake Business Plan
 
PLEG Portolio Project Final
PLEG Portolio Project FinalPLEG Portolio Project Final
PLEG Portolio Project Final
 

Similar to Internet Enabled Device For The Recording of Exercise Performance on Home Fitness Equipment

REPORT texto braillefinal
REPORT texto braillefinalREPORT texto braillefinal
REPORT texto braillefinal
ASWATHI K
 
ACCIDENT AVOIDANCE WITH DYNAMIC SPEED GOVERNOR
ACCIDENT AVOIDANCE WITH DYNAMIC SPEED GOVERNORACCIDENT AVOIDANCE WITH DYNAMIC SPEED GOVERNOR
ACCIDENT AVOIDANCE WITH DYNAMIC SPEED GOVERNOR
akbarsaleemtakkasila
 
Real Time Atomization of agriculture system for the modernization of indian a...
Real Time Atomization of agriculture system for the modernization of indian a...Real Time Atomization of agriculture system for the modernization of indian a...
Real Time Atomization of agriculture system for the modernization of indian a...
SHAMEER C M
 
Microprocessors and-microcontrollers (1)
Microprocessors and-microcontrollers (1)Microprocessors and-microcontrollers (1)
Microprocessors and-microcontrollers (1)
Nagarjun singh
 

Similar to Internet Enabled Device For The Recording of Exercise Performance on Home Fitness Equipment (20)

WiCAR
WiCARWiCAR
WiCAR
 
Current System
Current SystemCurrent System
Current System
 
Wireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculationWireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculation
 
Introduction to Microcontrollers
Introduction to MicrocontrollersIntroduction to Microcontrollers
Introduction to Microcontrollers
 
REPORT texto braillefinal
REPORT texto braillefinalREPORT texto braillefinal
REPORT texto braillefinal
 
DSP Processor
DSP Processor DSP Processor
DSP Processor
 
Biomedical Parameter Transfer Using Wireless Communication
Biomedical Parameter Transfer Using Wireless CommunicationBiomedical Parameter Transfer Using Wireless Communication
Biomedical Parameter Transfer Using Wireless Communication
 
Report11402
Report11402Report11402
Report11402
 
ACCIDENT AVOIDANCE WITH DYNAMIC SPEED GOVERNOR
ACCIDENT AVOIDANCE WITH DYNAMIC SPEED GOVERNORACCIDENT AVOIDANCE WITH DYNAMIC SPEED GOVERNOR
ACCIDENT AVOIDANCE WITH DYNAMIC SPEED GOVERNOR
 
Introduction to 8085 Microprocessor.pptx
Introduction to 8085 Microprocessor.pptxIntroduction to 8085 Microprocessor.pptx
Introduction to 8085 Microprocessor.pptx
 
Health Monitoring System of Elderly using Wireless Sensor NetworkIjcatr04031005
Health Monitoring System of Elderly using Wireless Sensor NetworkIjcatr04031005Health Monitoring System of Elderly using Wireless Sensor NetworkIjcatr04031005
Health Monitoring System of Elderly using Wireless Sensor NetworkIjcatr04031005
 
INSTRUCTION TYPES
INSTRUCTION TYPESINSTRUCTION TYPES
INSTRUCTION TYPES
 
The Design of Multi-Platforms Rail Intelligence Flatness Detection System
The Design of Multi-Platforms Rail Intelligence Flatness Detection SystemThe Design of Multi-Platforms Rail Intelligence Flatness Detection System
The Design of Multi-Platforms Rail Intelligence Flatness Detection System
 
An 706
An 706An 706
An 706
 
Real Time Atomization of agriculture system for the modernization of indian a...
Real Time Atomization of agriculture system for the modernization of indian a...Real Time Atomization of agriculture system for the modernization of indian a...
Real Time Atomization of agriculture system for the modernization of indian a...
 
Real time atomization of agriculture system for the modernization of indian a...
Real time atomization of agriculture system for the modernization of indian a...Real time atomization of agriculture system for the modernization of indian a...
Real time atomization of agriculture system for the modernization of indian a...
 
Microprocessors and-microcontrollers (1)
Microprocessors and-microcontrollers (1)Microprocessors and-microcontrollers (1)
Microprocessors and-microcontrollers (1)
 
GhostRunnerFinalReport
GhostRunnerFinalReportGhostRunnerFinalReport
GhostRunnerFinalReport
 
Boimetric using 8051
Boimetric  using 8051 Boimetric  using 8051
Boimetric using 8051
 
New Microsoft Office Word Document
New Microsoft Office Word DocumentNew Microsoft Office Word Document
New Microsoft Office Word Document
 

Internet Enabled Device For The Recording of Exercise Performance on Home Fitness Equipment

  • 1. Wireless Internet Enabled Device for the Recording of Exercise Performance on Home Fitness Equipment Overview This describes the use and operation of a device that connects a slightly modified plate selectorized type of home gym equipment via a wireless home network to a remote web host. The idea is that the device records important workout parameters such as weight used, reps performed, time spent exercising and detailed range-of-motion data for the exercises being performed on the fitness machine while guiding the user through a custom designed workout. The device is connected to the user’s wireless router via its own built-in wireless web-server and communicates with a remote web server over the Internet via the TCP/IP protocol. The remote web host functions as an information/service hub for the exercise equipment user by providing web based applications to manage and design their workouts, graphically view the completed workout data, view all previous workouts and receive guidance and help from online personal trainers. The device employs an 8-bit microcontroller to monitor and store data from an 8- bit incremental magnetic rotary encoder that reads the main weight stack pulley, and an IR emitter/detector combo positioned just above the weight stack. The rotary encoder is used to track the position of the weight stack, while the IR sensors are used to determine how much weight is being moved during the performance of an exercise. The data is collected during the entirety of the workout session, and then sent over the internet via a wireless/wired embedded web server. The embedded web server is DHCP capable so that it will work with most home WiFi networks, or can employ the use of a Cat-5 cable to connect to a home router. Broadband service is required for this system to work. The typical use and operation of the system would be as follows: The user logs into the website and creates an online profile for their device. This only needs to be done once. The user creates one of up to 4 custom workout files using the Workout Designer software app. These workout files contain the exercises, weights and repetitions that the
  • 2. user wishes to perform for their workouts. This could also be done by a certified online personal trainer as an additional service. The user’s profile residing on the remote web host will track their completed workouts and their custom workouts to be downloaded to their fitness machine device. The user logs off and turns on the fitness machine device in preparation for a workout. The fitness machine device connects to the user’s home wireless router and logs on to the remote web host. The fitness machine downloads up to 4 profiles stored on the remote web server and displays them to the user. The user selects the appropriate profile, at which time the device “looks” for custom workout files stored in the user’s directory and downloads any custom workout files present for that user profile. The device disconnects from the remote web server. The user selects which workout they wish to perform using the fitness machine device. The exercise to be performed, how many reps and how much weight to use is displayed on a large 80 character LCD screen. As soon as exercise is initiated the fitness device begins tracking and recording the weight, the range of motion and calculates the number of reps performed. On completion of the workout, the fitness device automatically re-connects to the remote web server and downloads all the recorded exercise parameters to a data file in the user’s directory. The data file is then automatically converted to an XML formatted file for reading by the FitView Software. The device disconnects from the remote web server and the user can now power down the device. The user can now log onto the remote web server with his/her home computer and view charts and graphs of his/her completed workout, past workouts, goals etc. The completed workout can also be viewed and analyzed by a qualified fitness trainer to help guide their client’s progress.
  • 3. Fitness Device Features Designed to be fitted to most single weight stack home multi-gyms with minimal modification of the equipment’s design System has built-in wireless 11mpbs networking capability with full data encryption capability (WPA, WEP) as well as DHCP for compatibility with most home wireless routers. Device can track range of motion accurately to within a degree, depending on the exercise performed - suitable for physical therapy. Device accurately counts repetitions after each set and has a set time-out feature. Device uses low cost components to minimize costs. No expensive processors or flash memory are used. High quality, large LCD display used to view and control device. Custom characters and graphics can be easily developed for the device. Use of XML files allows completed workout data to be ported to other applications for viewing. Theory of Operation The device is essentially an 8-bit microcontroller data acquisition system that uses an embedded wireless device server to provide TCP/IP communications. The embedded server used for the prototype is a Lantronix WiPort. The device monitors the various sensors in real-time at a rate of 2 KHz while driving an intelligent serial LCD display. The microcontroller communicates via RS232 with the LCD and WiPort at a rate of 19.2 K Baud. The device uses an 8-bit magnetic rotary encoder that reads the position of the main weight stack pulley and an IR emitter/receiver pair that reads the number of plates being used for exercise. The sensors are interfaced to the port pins of an Atmel 89s8252 8-bit microcontroller. The microcontroller uses these sensors to compute the range-of-motion, weight used, repetitions performed and the initiation and completion of each set. The data is recorded in an external 64kbyte (32kbyte used in prototype) SRAM IC. The microcontroller uses an 8-bit bidirectional data/addressing bus tied to a ‘373 type latch to address/read/write data to the SRAM. For the prototype system, the WiPort is mounted on a separate board (evaluation board) that has its own 3.3vdc power supply. To communicate with the WiPort board, the
  • 4. microcontroller requires an RS232 level converter chip, such as the MAX202. A production system would house all components on the same board, probably using 3.3vdc power for all components. The RS232 Transceiver should not be required at that point. The prototype currently uses a 16 character by 2 line intelligent serial LCD display to act as the fitness machine information display. This display is capable of displaying alphanumeric information as well as some crude graphics. It is currently planned that a larger 20 character by 4 line LCD would be used in a production device. Software The microcontroller controls all functions of the device except for the TCP/IP Wireless communications. This includes sending characters to the LCD, controlling the external SRAM, reading the sensors and keypad, and performing the necessary calculations. The microcontroller software is written in assembly because of the limited program memory of the 8051 architecture chip. The program operates as follows: Perform check of external SRAM by writing 55h to every address and then reading it back Command the WiPort to connect to WLAN and to remote internet host Query the remote host for all profiles associated with device and store the profiles in SRAM. Display profile names on LCD and read keyboard so user can select proper profile Download the applicable custom workout from remote internet host Disconnect from remote host. Sensors There are currently two main types of sensors used for reading data from the exercise machine:  Austria Microsystems AS5305 8-bit incremental magnetic rotary encoder for the main weight stack pulley.  IR Emitter/Receiver pair is used to read the number of weight stack plates.
  • 5. Reading Position of the Pulley The magnetic rotary encoder is read at a rate of approximately 2000 Hz through two port pins of the micro. The port pins are read at all times in order to determine whether a set has commenced. Once the encoder count has exceeded a set threshold the micro software enters into the main encoder read routine. At this point the LED control port pin is brought LOW, which turns on the IR LED for the weight stack plate reader (explained later.) The encoder read routine reads the encoder inputs and increments, decrements or does nothing to the 16 bit counter. This is accomplished at a rate of 2000 Hz. While this is occurring, another count tracks how many encoder reads take place. Once 75 read loops take place, the 16 bit counter is divided by 6 and the result is stored in the external SRAM. This results in a stored sample rate of 27Hz. During the encoder read routine the 16 bit counter is checked after every read to see if it is under the timeout threshold count. If the count is under the threshold a timeout count is initiated in the timeout loop. The timeout count currently lasts 4 seconds, that is if the weight stack is at rest for 4 seconds, the set is considered over. If the 16 bit counter count exceeds the threshold count during the timeout period, the timeout routine is exited and the main encoder read routine is re-entered. Reading Number of Plates During the encoder read routine the IR LED is used along with the IR Detector to read the number of plates in motion. The plates are only scanned once during each set. At the beginning of the encoder read routine when the IR LED is turned on by clearing the port pin connected to the base of the PNP transistor. The IR LED is aimed at the IR detector positioned on the other side of the plates. This causes the detector to conduct and put a low on the micro port pin. As the plates move up, the detector is blocked from the IR source and turns off, putting a high on the port pin. During the time the port pin is high, the encoder count is stored in a temp register until the port pin is again low (the plates have passed the IR emitter/detector, unblocking the IR beam.) A flag is set to prevent the plates from being read more than once during a set. The count in the temp register is then divided by 2 to ensure an 8-bit result and stored in SRAM as the weight plate index used to later compute the amount of weight used for that set. The IR LED is turned off after the plates are read by bringing the micro port pin going to the PNP transistor high. The 8 bit value that results from the weight stack read will typically fall into a range of numbers for a given number of plates. For example, for one set two plates may give a value of 31. For the next set a value of 30 may result. This requires that a lookup table be used in the microcontroller software that converts these ranges of numbers into consistent plate values of 1, 2, 3 and so on. Thus for a 15 plate system, a 15 would be the
  • 6. value stored in SRAM if all plates are used for a set. This way the web based software can be tailored to give an actual weight value (i.e. say 225 lbs) based on how much a plate weighs for that specific machine. Thus, the data sent by the fitness machine simply states how many plates were used; it is up to the web based software to figure out how much weight that translates to. Next Steps New Pulley / Encoder System The problem with the pulley/encoder setup used in the development system is that a complex arrangement of a pulley keyed to a rotating shaft must be used in order for the Austria Microsystems magnetic encoder to be used. The keyed pulley/shaft also requires expensive roller bearing blocks and shaft collars to keep everything stationary in the horizontal plane. A much better setup would be to use a typical exercise machine pulley rotating on a bolt so that a minimum of modification is required to the exercise machine. In order to make the standard pulley setup possible, metallic strips must be glued to the pulley, and two inductive sensors placed near the pulley. The inductive sensors must be positioned in such a way as to cause a 90 degree phase difference in the readings of the
  • 7. two sensors. This is allows the system to function as an incremental rotary encoder using quadrature and is easy to integrate into the current fitness device system. Pictures/Diagrams: Figure 1: Machine in development of device
  • 8. Figure 2: New main pulley with magnetic rotary encoder on right Figure 3: Example of small LCD display
  • 9. Figure 4: Development machine Figure 5: Breadboard and LCD/Keypad box
  • 10. Figure 6: Schematic 1 of device main board