Homework 6: Circuit Design and Theory of Operation

Gennady Vayl

Group 11

February 26, 2004

Introduction

The GPS Personal Trainer is an apparatus that will be the ultimate exercise companion. This device is specifically designed for runners, but will work for cyclists too. With the GPS Personal Trainer, runners and cyclists will be able to get balanced workouts, all controlled by the device. The GPS Personal Trainer will be responsible for tracking the users distance, speed, time, and heart rate. The user interface will be highly intuitive. There will be a custom mode where the user will be able to select what parameters he wants the device to track and whether he wants to store this run in his history. The second mode will have a set workout for beginners that would gradually increase their running or cycling abilities. This mode will have a preset number of exercises that would slowly convert a regular jogger into a runner.

Theory of Operation

Brief Description of Major Devices

Garmin GPS Receiver & Antenna

The theory behind GPS is as follows. Satellites in orbit around the earth send signals down to ground level. These signals must be sent at exactly the same time so that proper positioning could be determined. For this reason, each satellite has an embedded atomic clock. The satellites send time and their location data to the GPS receiver. Since the satellites are all in different locations around the Earth, the data from each satellite is received at different times. Using the theory of relativity, the GPS receiver calculates its exact location based on the data that it receives from the satellites and the time it receives this data. The more satellites that the GPS receiver gets data from, the more accurate the triangulation will be. Average receivers are able to track 8-12 satellites. High end ones are capable of 16 and more. For position and altitude the GPS receiver needs data from at least four satellites. GPS is a tool for outside use only. GPS receivers are unable to receive satellite data indoors, and may not work accurately near high buildings.

The GPS receiver used for the GPS Personal Trainer, Garmin GPS 15L,is a fairly accurate device with anerror of less then 15 meters. This device works on 3.3V and 85mA-100mA of current. The Garmin is capable of running at a baud rate of 4800.This unit is also very small. Its under 2 inches in length and less then 1.5 inches wide, it will work very well in hand held devices such as the GPS Personal Trainer.

The antenna for this receiver is the Gilsson Technologies GA26C which was recommended by Garmin. It is an active antenna which will give us more accurate readings according to the sales representative. The antenna is very durable and waterproof.

Figure 1. Garmin GPS Receiver.

Atmel MP

The Atmel ATmega8L microcontroller is a low power 32 pin 8 Mhz microcontroller. Running at 4 Mhz it requires 3 Volts and 3.6 mA of current. This microcontroller has 512 bytes of EEPROM and 1K byte of SRAM. The microcontroller will be primarily responsible for processing data coming from the sensors, reading user input, and providing output via LCD and piezo speaker. The microcontroller will also receive data from the GPS receiver and calculate the distance and speed of the device.

Imagesco LCD Screen

Images SL Inc. has a LCD product that met our specifications. It is fully TTL/CMOS compatible. Therefore only a single serial pin from the microprocessor will be necessary for interfacing purposes. The input is 300, 1200, 2400, or 9600 baud selectable. The LCD screen has a fairly simple interface. It accepts single byte input which it interprets as ASCII text and outputs it to the screen. Furthermore, there are codes for erasing characters and clearing the screen. The LCD screen operates at 4.8V to 5.2V and uses approximately 40mA of current.

The LCD screen will be a major component in the user-device interface. Through the help of the LCD screen the user will be able to select settings of the device to achieve his best workout. During the actual workout the LCD screen will output the user’s heart rate, distance covered, speed, and time since start of run.

Heart Rate Monitor

The heart rate monitor has two parts. The chest strip of the heart rate monitor, monitors the heart rate and outputs an RF signal every heart beat,. The receiver is going to be implemented on a circuit board. Its major components include a magnetic pickup resonator which will sense the signal coming from the heart rate monitor. Then this signal is going to be filtered and amplified with a series of band pass filters.The output will consist of analog pulses that will be sampled by the A/D port of our Atmel microcontroller. The receiver needs to have 5V power supply.

Figure2. Signal from Heart Rate Monitor. Figure 3. Signal from Receiver to be sent to MP.

Input

The input to the GPS Personal Trainer will consist of one rotary pulse generator and two single pole single throw pushbuttons. The pushbuttons will be connected to a MAX6817 debouncer chip which will then be connected to the microcontroller. The RPG will be connected to 4 input ports of the ATmega8L microcontroller.

Power Supply

The power requirements of the device range from 3V to 5V. Since the device has to be mobile, the power will come from a battery. The battery of choice are 4 AA cells. These batteries should, according a calculation of ~250mA of current drawn by the device, last for 8 hours. The power supply will supply both the 5V and the 3V ranges by using LM7805 voltage regulators. These regulators can source up to .5A of current.

Description of GPS Personal Trainer operation

When turned on by pressing the RPG button,the GPS Personal Trainer will askthe user to enter the mode of operation. The two basic modes are Custom and Preset. In the Custom mode the user will be able to define various variables such as how long they want to run, and the distance that they want to cover. The Preset mode will have a set of predefined exercises that the user can follow. After setting the mode of operation the user will be asked to select start, to begin his exercise. From there on the GPS Personal Trainer starts tracking the user through its onboard sensors such as the GPS, heart rate, and temperature tracking.

The GPS tracking functions as follows. The GPS signal from satellites around the earth read by the Gilsson antenna and received by the Garmin GPS receiver. The receiver will triangulate its position and will output this data in NMEA 0182 standard. This format outputs 37 bytes of data. Bytes 14-34 deliver the latitude and longitude information. Unavailable data is null. This data will be interfaced with the ATmega8L microcontroller. The ATmega will process the NMEA data and will determine the speed and distance covered of the GPS Personal Trainer. Then this data will be sent to the LCD screen and updated with a 300 baud signal rate.

The heart rate sensor is comprised of two main devices. The transmitter, which will be worn on the user’s chest, and the receiver, located on the user’s arm. The receiver will output analog data to the A/D port of the ATmega8L. This data will be digitized and the heart rate will be calculated by the microcontroller. The heart rate will be then sent to the LCD screen and updated for the user to view.Finally the temperature sensor will output data to the microcontroller which will then send the temperature to the LCD screen.

Throughout the run the user will be informed by the device of their progress via a small speaker. This speaker will be connected to a PWM of the microcontroller and will output a sequence of beats to tell the user that they are half way done with the race, or that they have completed their program.

Once the exercise program is complete, the GPS Personal Trainer will store the data about the exercise in memory and will continue displaying the exercise’s statistics until user input has been selected which will take the user back to the main menu. After two minutes have passed with out use input, the microcontroller will turn off all unnecessary functions and go into power save/sleep mode.

References

(1)Theory behind GPS

(2)Heart Rage Monitor/Receiver

(3)NMEA FAQ

(4)Atmel ATmega8L

or

(5)Garmin GPS Receiver

or

(6)Thermometer

or

(7)Debouncer

or

(8)Voltage Regulator 5Volt

(9)Piezo speaker

(10) Level Translator