Costa


Fitness unit.

Fitness Unit Wiki

Fitness Unit Wiki

Welcome to the Fitness Unit wiki page. The Fitness Unit helps monitor and track workouts. Capabilities include noting acceleration, counting reps, and timing exercises. The Fitness Unit has three main components:

  • The Main Unit
  • Tracking Unit
  • Body Unit

Each of these components use mbed KL25Z microcontrollers with ESP8266 WiFi chips attached. They work together over a wireless internet connection to communicate and aggregate information.


Units

Each unit performs a vital task to the operation of the complete device and communicate together for end-user ease.

Main Unit

The Main Unit of the Fitness Unit allows the user to customize and monitor their exercise. Exercise options like running and press-ups can be chosen from a color LCD screen and the accompanying buttons. Features included on the screen based on the selected exercise include a countdown, timing, and messages. For example, for press-ups, a knob changes the maximum number of reps desired and a button resets the timer. During the session, the main screen will also display a number of reps left to complete. The Main Unit acts as the central hub for the other two units in the Fitness Unit set.
Main Unit

The Main Unit is set up with a program. The program connects the board to the router and sets it up as a server by running through a series of AT commands. When necessary, a message is sent to the other boards (clients) by using an AT+CIPSEND command.

The complete program can be found below.

Import programMBED_SERVER

Program to start up the server mbed.

Tracking Unit

The Tracking Unit uses a range finder to detect the distance the user is from the board. When the distance between the two is that of a proper press-up, the unit gives both a visual and auditory indication when reps are being completed. The red LED screen counts down and a buzzer gives a notification sound, allowing the user to focus on the exercise, rather than checking how much they've done. When the countdown reaches zero, a message is scrolled across the screen. If the user has not completed a push up in a certain period of time, the screen displays a sleep message.
Tracking Unit

Body Unit

The Body Unit is worn by the user and has an accelerometer attached. The accelerometer tracks the movement of the user in the vertical driection. This allows the Body Unit to be extremely versatile. It can be used for a variety of exercises, such as running and jumping. It keeps track of the number of steps/jumps you have taken and relays that information to the server.
Body Unit

Import programmbed_Pedometer

Running for Fitness Unit


Wireless Communication

Wireless Communication Links

The boards communicate over a wireless network. They send information through a router, with the Main Unit acting as a server. For counting press-ups, the Main Unit first sends out the total number to the Tracking Unit. The Tracking Unit then relays back to the Main Unit when a rep is completed. This two-way communication allows for ease of access - the information can be displayed on a LCD - and streamlined units.

The scripts for the server can be found on the team page for more information.

A schematic of the connections is shown on the right.


Preview

The Fitness Unit is shown in action.





All wikipages