Docstoc

SD Document

Document Sample
SD Document Powered By Docstoc
					                                                                                  EEL4919-SU07-03 v1.0
                                                                                        06 August 2007



                           PROJECT DOCUMENTATION
                                DIGI-CYCLE PROJECT


                                            EEL4914
                                    SENIOR DESIGN 1
                                          Spring 2007


                                     06 August 2007
                                  EEL4919-SU07-03 v1.0




                                        UCF


                                            GROUP 1

John Baker____      :     _____________________________                           Date   :   __________

Jennifer Clifford   :     _____________________________                           Date   :   __________
                                                                                             __________
Roberto Reyes__     :     _____________________________                           Date   :
                                                                                             __________
Jose Rodriguez_     :     _____________________________                           Date   :




                        Approved for public release; distribution is unlimited.
                                                                          EEL4919-SU07-03 v1.0
                                                                                06 August 2007



                         Document Changes
Revision   Date           Change Description
1.0        06 August 2007 Initial document release




                Approved for public release; distribution is unlimited.
                                         ii
                                                                                              EEL4919-SU07-03 v1.0
                                                                                                    06 August 2007



                                         TABLE OF CONTENTS
SECTION                                                                                                               PAGE
1.0   EXECUTIVE SUMMARY ......................................................................................1
  1.1     SCOPE .................................................................................................................1
  1.2     APPLICABILITY ................................................................................................1
  1.3     SYSTEM CONCEPT ...........................................................................................1
  1.4     RATIONALE .......................................................................................................1
  1.5     MOTIVATION ....................................................................................................2
  1.6     CHALLENGE .....................................................................................................2
  1.7     SOLUTION ..........................................................................................................2
  1.8     SYSTEM REQUIREMENTS & SPECIFICATIONS ........................................3
     1.8.1    Shifting Subsystem ......................................................................................3
     1.8.2    Data Delivery Subsystem .............................................................................4
     1.8.3    User Interface (UI) Subsystem.....................................................................4
     1.8.4    Power Manager Subsystem ..........................................................................5

2.0   RESEARCH AND INVESTIGATIONS .................................................................5
  2.1     MICROCONTROLLER ......................................................................................6
     2.1.1      Requirements and Considerations................................................................6
        2.1.1.1 I/O Pins .....................................................................................................6
        2.1.1.2 Features .....................................................................................................7
        2.1.1.3 Power Consumption and Supply...............................................................8
        2.1.1.4 Coding Support Base ................................................................................8
        2.1.1.5 Development Tools and Environment ......................................................8
     2.1.2      Devices Considered .....................................................................................9
        2.1.2.1 Microchip ................................................................................................10
           2.1.2.1.1 PIC 16F877A ...................................................................................10
           2.1.2.1.2 PIC 18F452 ......................................................................................10
        2.1.2.2 Atmel.......................................................................................................10
        2.1.2.3 Texas Instruments ...................................................................................11
        2.1.2.4 FreeScale Semiconductors ......................................................................11
        2.1.2.5 Multi-Processor Approach ......................................................................11
     2.1.3      Microcontroller Comparison and Summary ..............................................12
  2.2     RPM SENSORS .................................................................................................12
     2.2.1      Hall Effect Sensors ....................................................................................13
        2.2.1.1 Types of Hall Effect Sensors ..................................................................14
        2.2.1.2 Variable Reluctance Sensors with Zero Cross Detection .......................14
        2.2.1.3 Single-Element Hall Effect Sensor with Zero Cross Detection ..............15
        2.2.1.4 Zero Speed, Differential Hall Effect Sensors .........................................16
        2.2.1.5 Advantages and Disadvantages...............................................................17

                                  Approved for public release; distribution is unlimited.
                                                           iii
                                                                                            EEL4919-SU07-03 v1.0
                                                                                                  06 August 2007


   2.2.2      Photo-Reflective ........................................................................................17
   2.2.3      Advantages and Disadvantages..................................................................18
   2.2.4      Inductive Sensors .......................................................................................18
2.3     ACTUATORS ....................................................................................................19
   2.3.1      Solenoids ....................................................................................................19
      2.3.1.1 Push/Pull Solenoids ................................................................................20
      2.3.1.2 Rotary Solenoids .....................................................................................20
   2.3.2      Servo Motors ..............................................................................................20
      2.3.2.1 Angular Output Servos ...........................................................................22
      2.3.2.2 Linear Motion Servos .............................................................................22
   2.3.3      Standard DC Motors ..................................................................................22
      2.3.3.1 Feedback Control ....................................................................................23
      2.3.3.2 Freestyle Timing and Metering ...............................................................23
   2.3.4      Stepper Motors ...........................................................................................23
   2.3.5      Muscle Wire ...............................................................................................25
   2.3.6      Actuator Implementations ..........................................................................25
      2.3.6.1 Direct Connect to Shift Cable .................................................................25
      2.3.6.2 Direct Connect to Derailleur ...................................................................26
2.4     DISPLAY ...........................................................................................................26
   2.4.1      Overview of LEDs .....................................................................................26
   2.4.2      Overview of LCDs .....................................................................................27
   2.4.3      Programming..............................................................................................28
      2.4.3.1 7-Segment ...............................................................................................28
      2.4.3.2 Alphanumeric LED Display ...................................................................29
         2.4.3.2.1 ASCII to Text Translator .................................................................29
      2.4.3.3 Parallel LCD Display ..............................................................................30
      2.4.3.4 Serial LCD Display .................................................................................31
      2.4.3.5 Graphical LCD Display ..........................................................................31
   2.4.4      Cost Analysis .............................................................................................31
      2.4.4.1 Cost Analysis of LED .............................................................................32
      2.4.4.2 Cost Analysis of LCD .............................................................................32
   2.4.5      Color LCD Display ....................................................................................33
      2.4.5.1 Possible Need for a Color LCD ..............................................................33
      2.4.5.2 Cost Difference of a Color LCD .............................................................33
      2.4.5.3 Complexity of programming...................................................................34
   2.4.6      Backlight ....................................................................................................34
2.5     POWER SUPPLY ..............................................................................................34
   2.5.1      Battery ........................................................................................................37
   2.5.2      Alternator ...................................................................................................41
   2.5.3      Generator....................................................................................................46
   2.5.4      Power Supply Circuits ...............................................................................46
2.6     HEART-RATE SENSORS ................................................................................49
   2.6.1      Heart-Rate Systems and Functions ............................................................50
   2.6.2      Different Heart-Rate Detection Technologies ...........................................51

                                Approved for public release; distribution is unlimited.
                                                         iv
                                                                                            EEL4919-SU07-03 v1.0
                                                                                                  06 August 2007


     2.6.3     Detection by Blood Flow in the Capillaries ...............................................51
     2.6.4     Detection by Electrical Heart EKG Signals with Hand Grips ...................52
     2.6.5     Detection by Electrical EKG Signals in the Chest Area ............................53
     2.6.6     Wireless Heart-Rate Monitors ...................................................................53
     2.6.7     Accuracy ....................................................................................................54
     2.6.8     Reliability...................................................................................................54
     2.6.9     Resistance to Water....................................................................................54
  2.7     TEMPERATURE SENSORS............................................................................54
     2.7.1     Types of Sensors ........................................................................................55
        2.7.1.1 Silicon Bandgap Temperature Sensors ...................................................55
        2.7.1.2 Thermistor ...............................................................................................57
        2.7.1.3 Thermocouple .........................................................................................58
        2.7.1.4 Resistance Temperature Detector ...........................................................59

3.0   COMPONENT SELECTION ................................................................................60
  3.1     MICROCONTROLLER ....................................................................................60
  3.2     RPM SENSORS .................................................................................................61
  3.3     DISPLAY DEVICE ...........................................................................................63
  3.4     ACTUATORS ....................................................................................................65
     3.4.1    Feedback Control .......................................................................................66
     3.4.2    Actuator Implementation ...........................................................................67
  3.5     POWER SUPPLY ..............................................................................................67
     3.5.1    Assortment of Power Supply .....................................................................68
     3.5.2    Primary Source Battery ..............................................................................68
     3.5.3    Primary Source Battery and Alternator Secondary Source........................69
     3.5.4    Primary Source Battery and Generator Secondary Source ........................70
     3.5.5    Chosen Circuit Type ..................................................................................70
  3.6     HEART RATE MONITOR ...............................................................................71
     3.6.1    Infrared Sensor Approach ..........................................................................71
     3.6.2    EKG Chest Area Approach ........................................................................72
     3.6.3    EKG Hand Grip Approach.........................................................................72
     3.6.4    Wireless Heart Rate Monitors ....................................................................72
     3.6.5    Conclusion .................................................................................................72
  3.7     TEMPERATURE SENSOR ..............................................................................73

4.0   EXPLICIT DESIGN SUMMARY.........................................................................74
  4.1     SYSTEM DIAGRAM .........................................................................................74
     4.1.1    System Hardware Overview ......................................................................74
     4.1.2    Power Supply & UI Subsystems ................................................................75
     4.1.3    Shifting Subsystem ....................................................................................76
     4.1.4    UI Subsystem .............................................................................................77
  4.2     DISPLAY DEVICE .................................................................................................77


                                 Approved for public release; distribution is unlimited.
                                                          v
                                                                                            EEL4919-SU07-03 v1.0
                                                                                                  06 August 2007


     4.2.1     Microcontroller to Display Hardware Interface .........................................78
        4.2.1.1 Microcontroller to Display Output Logic ...............................................79
  4.3     USER INTERFACE ..................................... ERROR! BOOKMARK NOT DEFINED.84
     4.3.1     Hardware Integration ............................. Error! Bookmark not defined.84
     4.3.2     User Interface Device Layout ................ Error! Bookmark not defined.85
     4.3.3     Menu Navigation Layout ....................... Error! Bookmark not defined.86
  4.4     RPM SENSORS .................................................................................................87
  4.5     ACTUATORS ....................................................................................................89
     4.5.1     Electrical Implementation ..........................................................................90
     4.5.2     Software Implementation ...........................................................................92
     4.5.3     Mechanical Implementation.......................................................................94
  4.6     POWER SUPPLY ..............................................................................................96
  4.7     HEART RATE MONITOR ...............................................................................97
     4.7.1     Detection by Hand Grip .............................................................................99
     4.7.2     Differential Amplifier ..............................................................................100
     4.7.3     Filtering and Further Amplification .........................................................102
     4.7.4     Comparator, Microcontroller and LCD Interfacing .................................103
        4.7.4.1 Analog to Digital Converters ................................................................103
        4.7.4.2 Microcontroller and Display Interfacing ..............................................105
     4.7.5     Heart Rate Monitor Schematic and Overall Design ................................105
  4.8     TEMPERATURE SENSOR ............................................................................106
     4.8.1     Microcontroller to Display Hardware Interface .......................................107
     4.8.2     Interpreting Temperature Sensor Outputs ................................................107

5.0   SYSTEM INTEGRATION AND TESTING ......................................................107
  5.1     TESTING INDIVIDUAL MODULES ............................................................108
     5.1.1     Microcontroller ........................................................................................108
        5.1.1.1 I/O Ports and Computation Accuracy ...................................................108
        5.1.1.2 A/D Converter Accuracy ......................................................................108
     5.1.2     Actuators ..................................................................................................109
        5.1.2.1 Control ..................................................................................................109
        5.1.2.2 Accuracy ...............................................................................................109
     5.1.3     Display .....................................................................................................110
     5.1.4     RPM/Velocity Sensors .............................................................................110
     5.1.5     User Interface ...........................................................................................111
     5.1.6     Temperature Sensors ................................................................................111
     5.1.7     Heart Rate Sensors ...................................................................................111
     5.1.8     Charging Circuit.......................................................................................112
  5.2     INTEGRATING THE SYSTEM .....................................................................112
     5.2.1     Actuators and Display Integration ...........................................................112
     5.2.2     Temperature Sensor Integration ...............................................................113
     5.2.3     Temperature Sensor Integration ...............................................................113
     5.2.4     Heart Rate Sensor Integration ..................................................................113

                                 Approved for public release; distribution is unlimited.
                                                          vi
                                                                                           EEL4919-SU07-03 v1.0
                                                                                                 06 August 2007


     5.2.5   User Interface Integration ........................................................................114
     5.2.6   Charging Circuit Integration ....................................................................114
  5.3     TESTING THE FULLY INTEGRATED SYSTEM .......................................114
  5.4     FINAL SYSTEM TEST ...................................................................................116

6.0   ADMINISTRATIVE CONTENT ........................................................................117
  6.1       PERSONNEL ..................................................................................................117
  6.2       EQUIPMENT & FACILITIES .......................................................................118
  6.3       VENDORS & ACQUISITION ........................................................................118
  6.4       BUDGET .........................................................................................................119
  6.5       FINANCING ...................................................................................................119
  6.6       MILESTONE CHART ....................................................................................119

7.0   CONCLUSIONS ...................................................................................................121
  7.1     RESEARCH SUMMARY ................................................................................121
     7.1.1   Microcontroller ........................................................................................121
     7.1.2   Display .....................................................................................................122
     7.1.3   Heart Rate Sensor ....................................................................................122
     7.1.4   Temperature Sensor .................................................................................122
     7.1.5   RPM/Velocity Sensors .............................................................................122
     7.1.6   Actuators ..................................................................................................123
     7.1.7   Power Supply ...........................................................................................123
  7.2     PROJECT SUMMARY ...................................................................................123

APPENDIX A - SYSTEM REQUIREMENTS ........................................................ A-1

APPENDIX B - ACRONYMS, ABBREVIATIONS, & UNITS ..............................B-1

APPENDIX C - INDEX OF REFERENCES ........................................................... C-1




                                 Approved for public release; distribution is unlimited.
                                                          vii
                                                                                      EEL4919-SU07-03 v1.0
                                                                                            06 August 2007


                                      LIST OF FIGURES
FIGURE                                                                                             PAGE
Figure 2-1: PIC Development Equipment ...........................................................................9
Figure 1-1: A digital Hall Effect sensor .............................................................................14
Figure 2-3: 2 V/R Sensor block diagram ...........................................................................15
Figure 2-4: Single-element Hall Effect sensor block diagram...........................................16
Figure 2-5: Differential Hall-Effect sensor block diagram7 ..............................................16
Figure 2-9: Servo to MCU Interface ..................................................................................21
Figure 2-10: Stepper to MCU interface using UCN5804 Motor Controller ......................24
Figure 2-11: Stepper to MCU Interface using NPN Transistors........................................25
Figure 2-12: Parallel vs. Serial I/O Pin Layout..................................................................28
Figure 2-13: Pin layout of a single character 7-Segment LED display .............................29
Figure 2-14: ASCII to Text Translator Algorithm .............................................................30
Figure 2-15: Parallel LCD interface pin outs .....................................................................30
Figure 2-16: Parallel Graphic LCD interface pin outs .......................................................31
Figure 2-17: Cell Diagram of NiMH16........................... Error! Bookmark not defined.41
Figure 2-18: Cell Diagram of Lithium –Ion Battery ...... Error! Bookmark not defined.43
Figure 2-19: Internal Circuit of Li-Ion Battery .............. Error! Bookmark not defined.43
Figure 2-20: Rotor Assembly Of Alternator ......................................................................42
Figure 2-21: Stator Assembly of Alternator ......................................................................43
Figure 2-22: Produced Current Flow from Stator ..............................................................44
Figure 2-23: Power Supply Primary Source is a Battery ...................................................47
Figure 2-24: Power Supply Primary Source Battery & Secondary Source Alternator ......48
Figure 2-25: Power Supply Primary Battery & Secondary Generator ..............................49
Figure 2-27: EKG Hand Grip Style Heart Sensors ............................................................52
Figure 2-29: Typical Silicon Bandgap Temp Sensor .........................................................55
Figure 2-30: Basic Temperature Sensor Setup (+5 o F to + 300o F).................................56
Figure 2-31: Full Range Temperature Sensor Setup (-50 o F to +300 o F) .......................56
Figure 2-32: Example of thermoelectric effect ..................................................................58
Figure 3-1: Power Supply .................................................................................................71
Figure 4-1: System Hardware Overview ...........................................................................75
Figure 4-2: UI Hardware ....................................................................................................76
Figure 4-3: Power Supply Hardware System.....................................................................76
Figure 4-4: Shifting Subsystem .........................................................................................77
Figure 4-5: UI Subsystem ..................................................................................................77
Figure 4-6: Display to MCU Pin Layout ...........................................................................78
Figure 4-7: Display to MCU Alternate Pin Layout ...........................................................78
Figure 4-8: Algorithm Flow Chart for Microcontroller to Display Control ......................79
Figure 4-9: Assembly template for initializing port A.......................................................80
Figure 4-10: Logic Flow Chart on Controlling Position of Text on the Display ...............81
Figure 4-11: Hardware Connection Layout of I/O Pins for the User InterfaceError! Bookmark not defined.85
Figure 4-12: End-User Interface and Control ................ Error! Bookmark not defined.85
Figure 4-13: User Interface Menu System ..................... Error! Bookmark not defined.89
Figure 4-14: Actuator Circuit Schematic ...........................................................................91
Figure 4-15: Motor Control Subroutine Process Diagram .................................................93

                            Approved for public release; distribution is unlimited.
                                                    viii
                                                                                            EEL4919-SU07-03 v1.0
                                                                                                  06 August 2007


Figure 4-16: Gear Increment Subroutine Process Diagram ...............................................94
Figure 4-17: Connecting the Actuator to the Derailleur ....................................................95
Figure 4-18: Power Circuit ................................................................................................97
Figure 4-19: Block diagram of heart rate processing.........................................................98
Figure 4-20: Typical EKG Signal ................................ Error! Bookmark not defined.103
Figure 4-21: Typical Differential Amplifier Schematic37 ................................................101
Figure 4-24: Temperature Sensor to MCU Interface .......................................................107




                                              LIST OF TABLES
TABLE                                                                                                            PAGE
Table 2-1: Number of GPIO Pins Required Per Device ......................................................7
Table 2-2: 8-Bit MCU Comparison ...................................................................................12
Table 2-3: 7-Segment Displays vs. Alphanumeric LED Display Cost Comparison .........32
Table 2-4: Serial LCD Display vs. Parallel LCD Display Cost Comparison ....................33
Table 2-5: Backlight vs. No-Backlight for Parallel and Serial devices Cost Comparison 34
Table 2-6: Expected Component Power Consumption......................................................35
Table 2-7: Comparison of common silicon band gap temperature sensors .......................57
Table 2-8: Comparison of common thermistors ................................................................58
Table 2-9: Comparison of common thermocouples...........................................................59
Table 2-10: Comparison of common Platinum Resistance Thermometers .......................60
Table 5-1: Input/Output and Calculation Performance Test Sequence ...........................108
Table 5-2: Analog to Digital Converter Performance Test Sequence .............................109
Table 5-3: Microcontroller Voltage to Actual Actuator Position Test Sequence ............110
Table 5-4: Display Test Sequence ...................................................................................110
Table 5-5: Temperature Sensor Test Sequence ...............................................................111
Table 5-6: Microcontroller/Actuator/Display Integration Test Sequence .......................112
Table 5-7: RPM/Velocity/Pattern to Gear Test Sequence ...............................................114
Table 5-8: Final System Test Sequence ...........................................................................117
Table 6-1: Digi-Cycle Part Cost ......................................................................................119
Table 6-2: Program Mission and Milestone Schedule .....................................................120




                                  Approved for public release; distribution is unlimited.
                                                           ix
                                                                                           EEL4919-SU07-03 v1.0
                                                                                                 06 August 2007



                                         LIST OF EQUATIONS
EQUATION                                                                                                       PAGE
Equation 2-1: Determining Power Consumption...............................................................36
Equation 2-2: Battery Voltage ...........................................................................................37
Equation 2-3: Battery Capacity..........................................................................................38
Equation 2-4: Cell Reaction ........................................... Error! Bookmark not defined.40
Equation 2-5: Li-Ion Cell Reaction................................ Error! Bookmark not defined.42
Equation 4-1: Calculating velocity from RPM ..................................................................87
Equation 4-2: Calories burned from Energy Equation ......................................................88
Equation 4-3: Adjusted Calorie Equation ..........................................................................88
Equation 4-4: Calculating Motor Position .........................................................................92
Equation 4-5: Voltage output for differential amplifier ...................................................101
Equation 4-6: Common mode rejection ration characteristics .........................................101
Equation 4-7: Equation for resolution..............................................................................103




                                 Approved for public release; distribution is unlimited.
                                                          x
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007



1.0 EXECUTIVE SUMMARY
1.1 SCOPE
This document has been created to serve as an introduction to the Digi-Cycle
system concept and group organizational structure. It proposes an initial and
general series of system requirements, block diagrams, and other preliminary
design specifications, as well as a planned budget and an estimated program
schedule.

1.2 APPLICABILITY
This document applies only to the early stages of system design for the Digi-
Cycle project. The specifications listed here are subject to change, and will be
improved upon in subsequent documents and versions.

1.3 SYSTEM CONCEPT
Digi-Cycle is an advanced electronic onboard diagnostic system for a standard
varying-speed bicycle, designed to give cycle enthusiasts a smoother, more
convenient ride. Digi-Cycle integrates many features common on today’s more
advanced stationary bikes, along with several intuitive components and a friendly
User Interface (UI) with the avid cyclist in mind. These features include, but are
not limited to:

          a. Automatic and/or manual electronic gear shifting

          b. Environment data reporting

          c. Health status and characteristic reporting

1.4 RATIONALE
Digi-Cycle is being developed in response to a perceived need for advancement
in bicycle equipment and technology. Over the past few decades, computers
and electronics have been developing exponentially, and are currently integrated
into a wide range of devices and applications that would have been considered
science fiction just forty years ago. This industry boom has made possible the
enhancement of many machines, and has vastly improved their efficiency and
productivity. Bicycles, however, have not kept pace with the new technology.
Despite the limited number of simple and highly targeted electronic gadgets
performing only the simplest of tasks, bicycles have remained virtually the same
functionally since the adoption of pneumatic tires and chain derailleurs, both of
which have existed for over a century. The Digi-Cycle project aims to break this
trend. Through the addition of embedded micro- processing systems, coupled
with a range of sensors and actuators, bicycles will have the capability to provide
an improved riding experience to the cyclist with automatic shifting, as well as the

                       Approved for public release; distribution is unlimited.
                                                1
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


freedom to select between manual and automatic shifting of gears. Now, a rider
can monitor several conditions and select from a variety of options to get the
most from their ride or workout. In addition to the feature set already planned for
Digi-Cycle, the system will be easily expandable to incorporate future features
due to a robust system design and powerful microprocessor. Simply put, Digi-
Cycle will bring the bicycle into the 21st century.

1.5 MOTIVATION
The Digi-Cycle project has been unanimously selected by the group from a list of
proposed projects due to its ideal attributes. Digi-Cycle requires a good balance
of both hardware and software design, making it a great candidate for Group 1,
as it consists of both computer and electrical engineers, with only a limited
mechanical design necessary. In addition to Digi-Cycle being an ideal match to
the group's skill sets, the project selected also must adhere to a modest budget,
as the entire project will be funded by the group, not a sponsor. Digi-Cycle will
be relatively low in development costs, as there are no complex or extravagant
parts necessary. The final factor which made Digi-Cycle the winning candidate is
expandability. Digi-Cycle is expected to include a rich feature set, with a list of
additional features that can be added later. Though it will be no small task itself,
Digi-Cycle will be relatively simple to design and implement at its core. Although
all auxiliary features will add a level of complexity to the system, none of them
are expected to be so complicated that they will be difficult to complete within the
allotted time. Overall, Digi-Cycle is a good fit to the group's skills and budget,
with elaborate yet achievable requirements and goals.

1.6 CHALLENGE
The Digi-Cycle project must produce a supplemental bicycle-mounted electronic
system capable of automatically and electronically shifting gears for the cyclist.
This must be achieved through the use of electromechanical and electronic
systems with an active logic implemented, mandating the development of both
hardware and software systems. The system should be easy to use, friendly to
interact with, and accurate in its methods. More specifically, the system should
be useful to the cyclist, assisting them on their ride rather than impeding their
efforts.

1.7 SOLUTION
Digi-Cycle requires an embedded computing or micro processing system,
capable of interfacing and interacting with a series of sensors and actuators to
control shifting. The system must analyze varying types of environment data
collected from the sensors, and make a decision regarding the appropriate time
to shift through program logic. The system then relays a signal to a series of
actuators, which will execute the physical mechanical gear shift. Digi-Cycle also
incorporates a power system capable of sustaining the system for prolonged
periods of use.

                       Approved for public release; distribution is unlimited.
                                                2
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


1.8 SYSTEM REQUIREMENTS & SPECIFICATIONS
The Digi-Cycle system monitors a series of environmental conditions, relay
relevant data to the user, and make appropriate corrections to the bicycle’s
current gear ratio to provide for improved riding or workout performance. To
achieve this, Digi-Cycle must incorporate a series of integrated subsystems
which performs the tasks necessary to attain system success. This section
describes the roles, requirements, and specifications of each subsystem, as well
as the interaction between the subsystems.

In an attempt to focus efforts on the project, a series of requirements and
specifications has been defined. These requirements shall be the foundation for
all development of the system, and dictates to what level the system must
mature. For convenience, these requirements have been segregated into four
subsections based on the subsystem that they describe.

1.8.1 Shifting Subsystem
The Digi-Cycle system’s primary objective is to provide an intelligent, seamless,
integrated electronic gear shifting subsystem.            The requirements and
specifications necessary to reach this target are outlined below.

          a. Digi-Cycle must automatically shift gears on a bicycle.

          b. Digi-Cycle must measure pedal Revolutions per Minute (RPMs)
             ranging from 0 to +250 RPM (+- 2%)

          c. Digi-Cycle must measure/calculate ground speed from 0 to 50
             Miles per Hour (MPH) (+- 2%)

          d. Digi-Cycle must interface electromechanically to the existing bicycle
             gear system

          e. Digi-Cycle must detect when the bike is coasting and respond
             accordingly

          f. Digi-Cycle must detect when the bike is stopped and respond
             accordingly

          g. Digi-Cycle must detect increased pedal speed and respond
             accordingly

          h. Digi-Cycle must detect decreased pedal speed and respond
             accordingly

          i.   Digi-Cycle must detect and respond to change in ground speed

          j.   Digi-Cycle must include a manual electronic shift option

                       Approved for public release; distribution is unlimited.
                                                3
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


1.8.2 Data Delivery Subsystem
Another important feature of the Digi-Cycle project is to relay important and
useful information to the cyclist so he or she can respond accordingly to make
the most of the trip or workout. Such environmental data includes ground speed,
RPMs, distance traveled, heart rate, a calorie counter, and a general
configurable timer. The following list outlines several of the requirements and
specifications necessary for this subsystem.

          a. Digi-Cycle must include a display

          b. Digi-Cycle must output ground speed with a refresh rate of no
             greater than 1 second

          c. Digi-Cycle must output pedal RPMs with a refresh rate of no
             greater than 1 second

          d. Digi-Cycle must measure/output heart rate with a refresh rate of no
             greater than 1 second

          e. Digi-Cycle must output distance traveled

          f. Digi-Cycle must measure/output ambient temperature

          g. Digi-Cycle must display a configurable timer with a refresh rate of 1
             second

          h. Digi-Cycle must display current gear

          i.   Digi-Cycle must display estimated calories burned

          j.   Digi-Cycle must display average speed, RPMs, heart rate

          k. Digi-Cycle must display Max speed, RPMs, heart rate

1.8.3 User Interface (UI) Subsystem
The Digi-Cycle project has several different features and settings, making it
unable to display all data at once. In addition, Digi-Cycle has some configurable
modes and options which require user input. In order to maximize the usefulness
of the system, Digi-Cycle needs a UI which is simple and user friendly so as not
to impede the user.

          a. Digi-Cycle must have a user friendly UI

          b. Digi-Cycle must include multi-function buttons

          c. Digi-Cycle must include a menu series


                       Approved for public release; distribution is unlimited.
                                                4
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


          d. Digi-Cycle must have configuration options

1.8.4 Power Manager Subsystem
The Digi-Cycle system must be able to run on for an extended period of time
without the need to charge or replace its power source. This stresses the need
for a power conscience, low draw system. In addition, features like rechargeable
batteries and likely the use of a generator/alternator will be required to ensure the
system can run unassisted for lengthy periods.

          a. Digi-Cycle must run on low power

          b. Digi-Cycle must run on a rechargeable battery

          c. Digi-Cycle must include an alternator or generator to recharge the
             battery

          d. Digi-Cycle must have a tool-less adjustment procedure

2.0 RESEARCH AND INVESTIGATIONS
The Digi-Cycle team members have performed research before starting to
design. If research is done, many mistakes can be avoided, and many different
areas in the design will be discovered. Research lets the designer know what
paths and options are open; and furthermore what opportunities there are if
mistakes or problems arise. The best components and procedures can be found
if time is taken to thoroughly research all available options.

Research is broken in to different areas of the design. Each member has a
particular section of the design to research. Many segments of Digi-Cycle need
to be researched. The segments are: microcontrollers, led interface, temperature
sensors, heart rate monitor, RPM sensors, power supply and the actuators.
Many questions and concerns can be answered through research, such as:

   a. How parts are rated?

   b. How does each part function?

   c. What hazards need to be taken in to consideration?

   d. How does each part fit into the overall picture?

   e. What is the cost of each item and the overall project?

   f. What are the advantages and disadvantages of each procedure or part?

   g. What is the estimated time of project completion?


                       Approved for public release; distribution is unlimited.
                                                5
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


   h. When should the Statistics be done?

Websites on the internet are material being used to research. Permission has
been given for all the material used for research off the websites. A Works Cited
section, attached as Appendix C - INDEX OF REFERENCES, and all research
has been documented on which website it came from.

2.1 MICROCONTROLLER
The Micro Controller Unit (MCU) is the brains of the Digi-Cycle system. All other
devices used in the project interface to the MCU to either send or receive data.
Without this crucial part, the system could still function, but this would require the
use of copious other devices such as timers, logic gates, and memory modules,
and would thus increase the design time as well as the physical size of the
system. The MCU is particularly helpful when determining shift points and/or
developing shift logic, allowing the system to simply be reprogrammed when a
change is necessary instead of performing any serious modifications to the
hardware.

2.1.1 Requirements and Considerations
When selecting a microcontroller for any project, many issues need to be taken
into consideration, and will depend greatly on the needs of the system. Some
details to consider, strictly from a hardware aspect, include the number of
Input/Output (I/O) pins necessary, power consumption and supply, interfaces and
protocols, peripheral hardware support, processing power, and memory.
Additional considerations need to be made for the development of the system,
including the availability, cost, and difficulty in obtaining and using the
development hardware and software required to program and interface with the
device. The details of such considerations are discussed in the subsequent
sections.

2.1.1.1 I/O Pins
The number of I/O pins available for use on the MCU is perhaps the single most
important criteria for MCU selection. In order for the MCU to interact with any
device, a certain number of I/O pins will be necessary. Although this number
might be expandable through the use of separate address decoders and similar
devices, this will only further increase the complexity of the hardware as well as
the code required, as devices must now compete for use of a port in addition to
Central Processing Unit (CPU) time. MCUs are digital devices and thus the
GPIO pins will be anticipating digital signals. In many situations, the MCU will be
required to accept input from analog devices, which will require an Analog to
Digital Conversion (ADC). ADCs are available in external stand-alone packages
that may be connected to an MCU, but once again it is beneficial to procure an
MCU with an integrated ADC to reduce hardware complexity and size. In order
to ensure an adequate MCU is selected for use in the Digi-Cycle project, a list of

                       Approved for public release; distribution is unlimited.
                                                6
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


devices and their number of I/O pins has been assembled and may be seen in
Table 2-1.



              Table 2-1: Number of GPIO Pins Required Per Device
                                           Analog              Digital              External
                   Device                   Pins                Pins               Interrupts
                                          Required            Required              Required
        Motors                                  2                   4                  0
        Heart Rate Monitors                     0                   1                  1
        RPM / Speed Sensors                     0                   3                  2
        LCD                                     0                  13                  0
        Temperature Sensor                      1                   0                  0
        Buttons                                 0                   5                  1
        TOTAL                                   3                  26                  4



An MCU should be selected based on “worst case” maximum expected pin count
to protect against having to replace the MCU, and possibly redesign the entire
hardware and/or software system(s) should a device need to be changes later.

2.1.1.2 Features
MCUs often come bundled with a list of devices and features integrated into the
unit. In addition to inherent features such as memory, clock speed, and interrupt
sources, there are also peripheral features to consider. Some of these features
required for the Digi-Cycle system are timers, ADCs, interrupts, and brown-out
protection, all of which are necessary for Digi-Cycle. In addition, internal
comparators and oscillators are useful, though not necessary. The selected
MCU should have an adequate amount of program memory to store the program
code, as well as a sufficient amount of Random Access Memory (RAM) to store
any data in use. It is also important for Digi-Cycle to have a reasonably high
clock speed to ensure that both calculation times and sampling rates are fast
enough to keep pace with the crucial RPM, speed, and motor feedback sensors
in real time, as well as to sufficiently sample auxiliary data from the temperature
and heart rate sensors.

As many of the processes and devices are time sensitive and will be competing
for CPU time, timers and interrupts will be crucial in ensuring that all processes
are executed and all data is analyzed by priority in a timely fashion. Interrupts
can be implemented through software flags, which is common in most MCUs,
and also through hardware interrupt pins. Hardware interrupt pins are necessary
for Digi-Cycle, especially for devices such as the RPM and speed sensors.
Timers are used for nearly all subroutines in the project, and are especially
necessary for use in calculating speed and RPMs. In addition, another special

                       Approved for public release; distribution is unlimited.
                                                7
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


timer known as a Watchdog Timer may be necessary to ensure that no process
falls into an uncontrolled loop, and can be used to maintain system stability by
breaking from any such process.

2.1.1.3 Power Consumption and Supply
In self-powered systems with such demanding power needs such as Digi-Cycle,
keeping power consumption on each device as low as possible can ensure that
the system will have power for very long continuous time intervals without the
need to replace or recharge the battery or power cell(s). Although MCUs draw
relatively low power amounts, and are practically dwarfed by the consumption
needs of the Digi-Cycle actuators, it is still important to select an MCU with lower
power consumption. Some MCUs also include sleep functions, which assists in
further reducing power consumption while the MCU is idle.

Another consideration to make is the amount of current an I/O pin on the MCU
can sink/supply. The greater this number is, the more devices the MCU will be
capable of controlling without the need for additional hardware such as
transistors. Although not as crucial of a consideration, eliminating the need for
additional hardware will, once again, reduce system size, cost, and complexity.

2.1.1.4 Coding Support Base
Although not entirely an essential point, it is still important to note what
languages the available compilers for each device will support. MCU compilers
most frequently support an assembly language, which is very efficient in terms of
memory usage, but is not as easy or time efficient to program in. Many
compilers now support higher level languages such as C. This would be the
ideal language to develop the project software in, as the C language is easier to
write code in, as well as better known than assembly and more widely used for a
variety of applications. It is for this reason that the language of choice for the
Digi-Cycle project.

Another point to consider when selecting an MCU is how widely the device is
used, and for what kind of applications. A chip that sees more use for do-it-
yourself kind of projects will typically have more code already developed. This
code would likely be open source, and might be adapted or re-used within the
project, or could also be used as an example for developing new code to achieve
a related objective.

2.1.1.5 Development Tools and Environment
In order to get the developed code onto the MCU, a programmer is required.
Although a programmer can be as simple as just a few resistors and capacitors
connected to a serial or parallel cable, these homemade devices will take time to
build and find software for, and can be more prone to failure than commercial
packages.     Commercial MCU programming packages often come pre-


                       Approved for public release; distribution is unlimited.
                                                8
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


assembled, can support a variety of devices, and may even include the
programming interface software. These devices are preferred over their
homemade counterparts with respect to reduction in programming effort, but are
often considerably expensive.

In addition to programmers, test and prototyping boards are also useful in
developing good working code. Having a pre-made proto board saves the time
of having to set up a test circuit since provisions have already been made for the
essentials of the circuit, as well as common peripherals devices. This will greatly
reduce the time it takes to produce working code, and the resulting code can be
used in the final product with only minor modifications needed to port to the new
system. An example of a programmer and proto board can be seen in Figure
2-1. The device pictured on top is the P16PRO40 PIC programmer, capable of
programming multiple 8, 18, 28, and 40 pin PIC microcontrollers. The device
seen at the bottom of the picture is a proto board for the PIC 18F452 MCU,
called a QuikFlash board. It incorporated a Liquid Crystal Display (LCD),
temperature sensor, buttons, Light Emitting Diodes (LEDs), a temperature
sensor, a potentiometer and Rotary Pulse Generator (RPG), and several unused
GPIO pins.




                     Figure 2-1: PIC Development Equipment


2.1.2 Devices Considered
The search for a suitable MCU to be used in the Digi-Cycle project has been
narrowed to a handful of candidates from several different manufacturers. The

                      Approved for public release; distribution is unlimited.
                                               9
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


manufacturers considered include Microchip, Atmel, Texas Instruments, and
FreeScale Semiconductors (formerly known as Motorola). Although many of
these companies produce quick development MCU boards, these devices were
not considered due to lack of scalability. Instead, the target for the desired
device is a Plastic Dual-In-line Package (PDIP) with a pin count of roughly 40.
This should restrict the search to only devices with a suitable number of GPIOs.

2.1.2.1 Microchip
Microchip Technology Incorporated manufactures a wide variety of 8-bit PIC
microcontrollers. Their MCUs come in nearly every flavor between available
packages, features, and pin counts. PICs are used in a large number of
applications, both commercial and private, so finding code examples and
development tools will not be difficult, especially for the more commonly used
models. Due to the popularity and list of features available in the PIC 16 and PIC
18 series of MCUs, one model from each series has been evaluated.

2.1.2.1.1 PIC 16F877A

The PIC 18F877A microcontroller has been a very popular MCU, seeing use in a
wide variety of projects and consumer electronics. It is a feature rich and
powerful device, powered by a high-performance Reduced Instruction Set
Computer (RISC) CPU, is simple to develop, and has strong support and code
base. The PIC 16F877A is capable of being programmed in C using the MPLAB
18 C compiler, though support for this is somewhat rough. Overall, the MCU
meets all other necessary criteria, and includes an 8 channel 10-bit ADC, three
timers, Brown-Out Reset (BOR) circuitry, a power saving sleep mode, and
several other features which would be helpful in developing Digi-Cycle, though
not necessary.

2.1.2.1.2 PIC 18F452

The PIC 18F452 microcontroller expands even further on the performance
characteristics and feature list set by the PIC 16F877A. The 18F452 can operate
at twice the clock speed of its PIC16 series counterpart, and has more RAM and
a larger program memory. In addition being more powerful and sharing the same
features, the PIC 18F452 is also better supported by the MPLAB 18 compiler,
guaranteeing the possibility of coding in the C language. The main drawbacks to
this MCU is that it is not as widely used or as well supported as the 16F877A,
though code can be easily re-ported from PIC16 series MCUs to a comparable
18 series. Also, this device is no longer in production, though samples are still
available from Microchip.

2.1.2.2 Atmel
The Atmel Corporation is another advanced semiconductor manufacturer,
producing several popular and well equipped microcontrollers, among many

                       Approved for public release; distribution is unlimited.
                                                10
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


other devices. Atmel MCUs are known for their reliability and ease of coding in
addition to their rich set of features, and have also been well developed and used
in a variety of applications. The two devices evaluated here are the AT89C51RC
and the AT89C51AC2 MCUs. Both devices are equipped and powered
reasonably enough for use in the Digi-Cycle system. However, the AT89C51RC
does not include an ADC and would require the use of an external unit to handle
analog signals, making the AT89C51AC2 the stronger of the two candidates.
One drawback to these two devices is that they are not available in PDIP
packages. Though this is a relatively minor issue, PDIPs are preferred, so no
special mounting provisions will need to be made.

2.1.2.3 Texas Instruments
The device that has been evaluated from Texas Instruments is the
MSP430F2272 MCU, and is the only 16-bit MCU that has been evaluated. This
device meets all feature criteria for the Digi-Cycle project, has an impressive
amount of interrupt sources, and is inexpensive. However, this device is also not
available in PDIP packages, and its clock speed is somewhat low which may
impede calculation times and sampling rates.

2.1.2.4 FreeScale Semiconductors
Due to its long standing popularity and history for use in educational and
commercial applications, the 68HC11 based MCU is a veteran. The specific
MCU evaluated here is the 68HC11E1CPBE2. This MCU is the closest match to
the selection criteria for Digi-Cycle. Although this MCU is reasonably equipped, it
lacks in clock speed, and is only available in a 52 pin Low-profile Quad Flat
Package (LQFP).

2.1.2.5 Multi-Processor Approach
Digi-Cycle will include several sensors that will require extensive CPU time to
collect and evaluate all of the real-time data that they produce. The possibility
that no single MCU evaluated here may have sufficient power to handle all of
these concurrent functions has been considered. To circumvent this issue
without having to lose crucial data by reducing sampling rates, it may be
beneficial to use additional MCUs to handle the polling of certain sensor groups,
and perform the calculations on that data as required. Such a design might
include a small 8-pin MCU to evaluate RPM data for example. This would
ensure that the RPM sensor data could receive the CPU’s undivided attention,
making data and calculations more accurate, and alleviating strain from the main
CPU. This data could then be reported to the main MCU in regulated intervals,
where the data could then be processed and calculations for a gear shift can
then be made. Another instance where this setup may be beneficial would be to
connect smaller MCUs to the actuators and their corresponding position sensors.
This would free the main MCU from having to poll the sensors and adjust the


                      Approved for public release; distribution is unlimited.
                                               11
                                                                                   EEL4919-SU07-03 v1.0
                                                                                         06 August 2007


 actuators, and the only data transaction between the MCUs would simply be a
 desired gear number.

 2.1.3 Microcontroller Comparison and Summary
 The single most important factor in determining which MCU should be used for
 Digi-Cycle whether or not the MCU meets the requirements of the system. If the
 MCU will be able to keep up with the demanding needs of the system, all other
 considerations are secondary. Of the MCUs evaluated, all should be able to
 properly function in the system, though some are better adapted than others.
 Table 2-2 presents Key Performance Parameter (KPP) data for the MCUs
 evaluated.



                              Table 2-2: 8-Bit MCU Comparison
                                                                                       Max.    Current
                        GPIO    ADC    Memory       RAM       Interrupt
      Device    Pins                                                      Timers      Clock     Sink /   Cost
                        pins    Pins    Size       (bytes)    Sources
                                                                                      Speed    Source

Microchip:
                 40
PIC18F452       PDIP     34      8        32k       1536         18          4        40 MHz   25mA      $6.82
                 40
PIC16F877A      PDIP     33      8        14k        368         15          3        20 MHz   25mA      $4.59
Atmel:
                 40
AT89C51RC       PDIP     32      0        32k        512          8          3        33 MHz   15mA      $3.51
                 44
AT89C51AC2      LQFP     34      8        32k       1280         14          3        40 MHz   15mA      $8.28
TI:
                  38
MSP430F2272     TSSOP    32      12       32k       1024         23          3        16 MHz   25mA      $3.10
FreeScale:
                 52
68HC11E1CPBE2   LQFP     38      8        20k        512         22          8        2 MHz    25mA      $5.90




 Additional considerations should be made for development costs in terms of both
 money and labor. Development tools such as programmers cost on average
 approximately $150, and that often excludes a compiler which must be obtained
 or purchased separately, though some development kits are less expensive than
 others. Ease of programming and availability of source and example code
 should also be taken into consideration when selecting an MCU, as this can
 greatly reduce the time and effort spent developing the project’s software.

 2.2 RPM SENSORS
 Digi-Cycle uses a particular type of sensor that allows the microcontroller to
 calculate and output the speed and distance at which Digi-Cycle is traveling to
 the LCD. This sensor is involved with the automatic gear shifting that is

                         Approved for public release; distribution is unlimited.
                                                  12
                                                                                       EEL4919-SU07-03 v1.0
                                                                                             06 August 2007


implemented on the bike. In deciding what type of sensor was most appropriate
for Digi-Cycle, a closer look at various types of sensors was necessary. In
general, a type of inductive or Hall Effect sensor was most appropriate in this
application since the sensor would allow the microcontroller to measure the
number of revolutions per minute by detecting each time a metallic or magnetic
object comes within a certain proximity of the sensor. The microprocessor would
then perform various calculations accordingly. RPM sensors are used in many
fitness equipment applications such as treadmills, recumbent bikes, and elliptical
cross trainers for measuring speed, distance, and calories burned. The fact that
certain types of RPM sensors either output digital or analog signals must also be
taken into account. A digital RPM sensor was preferable in that no analog to
digital conversion would be necessary, and it can be applied directly to the
microcontroller, although some microcontrollers already have an ADC built in.
The sensor must also be durable enough to withstand the severity of outside
weather conditions. Factors such as sensitivity to oil, dirt, humidity, dust,
vibrations, perspiration and oxidation must also be taken into account as this
would be the typical environment of Digi-Cycle. Among the types of RPM
sensors that were investigated are the Hall Effect, photo-reflective and inductive
sensors.

2.2.1 Hall Effect Sensors
We first looked at the proximity and Hall Effect sensors. These types of sensors
provide an indication of motion by sensing the presence of an object, usually a
metal, or a magnet. A typical digital Hall Effect sensor is shown in Figure 1-2.
There are many other variations of Hall Effect sensors. For Digi-Cycle, the Hall
Effect sensor, which is also a type of proximity sensor, would be attached to the
frame of the bike within a close distance to the wheel where a single magnet or
several magnets would be placed for proper detection. As the wheel spins, the
magnet will come within a close proximity of the Hall Effect sensor. Gear teeth
could also serve as a stimulant to the sensor. The sensor is a transducer that
varies its output voltage due to the presence of the magnet. It is an integrated
circuit device that contains a latching circuit inside the sensor, which in turn
transmits a square-wave pulse1. This pulse would then be transmitted to the
microcontroller. A Hall Effect sensor, in its simplest form, produces an analog
signal, although digital variations of the device are widely available as well. The
basis of the Hall Effect is that the moving of charge carriers in an electrical
current are deflected at right angles to both their original trajectory and an
externally imposed magnetic field2. In metals, this effect can be very small and
difficult to measure and, since the sensitivities of Hall Effect and proximity
transducers are low, an amplifier might have to be incorporated into the circuitry.



1
    http://www.euclidres.com/motionSensors/motionSensors.html
2
    www.cherrycorp.com/cherry/Hall_effect_severe_environment.pdf

                             Approved for public release; distribution is unlimited.
                                                      13
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


Fortunately, most semiconductor manufacturers provide an internal amplifier and
threshold detector built into the sensor.




                              Figure 1-2: A digital Hall Effect sensor


2.2.1.1 Types of Hall Effect Sensors
There are many types of Hall Effect sensors out in the market that could be used
for our design. Among the many types of these sensors we will focus on are the
Variable reluctance sensors with zero cross detection, single-element Hall Effect
sensors with zero cross detection and Zero speed, and differential Hall Effect
sensors with offset level detection. Each of these sensors has different internal
circuitry behavior characteristics that need to be examined before we can utilize
the sensor with our design. Timing, accuracy and precision of the Hall Effect
sensors will also need to be considered as the microcontroller will need accurate
feedback from the sensor being used. Recent advancements in sensor
technology have improved the accuracy and reliability of sensors while also
reducing the cost. There are many sensors, which are widely available, that
integrate the sensor and signal conditioning circuitry into a single unit.

2.2.1.2 Variable Reluctance Sensors with Zero Cross Detection
A variable reluctance sensor is, in general, a tiny generator that produces an
analog voltage which is proportional to the size and speed of a ferromagnetic
object passing in front of the sensor. The output voltage has an inherent
characteristic that is ideal for certain types of timing applications. The variable
reluctance sensor consists of a coil, a pole piece, and a magnet3.




3
    http://www.sensorsmag.com/sensors/article/articleDetail.jsp?id=327274

                               Approved for public release; distribution is unlimited.
                                                        14
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


The variable reluctance sensor is comprised of a voltage generator, an
inductance coil, and the resistance of the coil wire. The output is an Alternating
Current (AC) voltage with amplitude and frequency proportional to the speed at
which the object passes the sensor. In this type of system, the AC voltage is
converted to a digital signal using a zero cross detection circuit and passed to the
microcontroller. For timing applications where the tooth size can be kept close to
that of the sensor pole piece diameter, the variable reluctance sensor with zero
cross detection is an excellent choice. It is not suitable, however, for applications
requiring complex or multiple-width target profiles4. A block diagram of the
electrical characteristics of the variable reluctance sensor is shown in Figure 2-3.




                             Figure 2-3: 2 V/R Sensor block diagram5


2.2.1.3 Single-Element Hall Effect Sensor with Zero Cross Detection
This type of Hall Effect sensor produces a digital output signal that closely
resembles the intensity of the magnet. This type of sensor has a Hall Effect
region in the front of the sensor which is also back biased with a permanent
magnet. The hall element will generate a tiny electrical voltage that is
proportional to the varying flux. This signal is superimposed on the large Direct
Current (DC) voltage created by the fixed field from the magnet and must be
passed through a high-pass filter to remove the large DC offset.

The comparator then converts that voltage into a digital signal that closely
resembles the intensity of the magnetic field4. A block diagram of this
configuration is shown in Figure 2-4. This type of sensor has a significant
advantage in applications where unique target profiles provide different types of
positioning information to a microcontroller4.




4
    http://www.sensorsmag.com/sensors/article/articleDetail.jsp?id=327274
5
    Reprint Permission granted from Sensors

                               Approved for public release; distribution is unlimited.
                                                        15
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007




                 Figure 2-4: Single-element Hall Effect sensor block diagram6

2.2.1.4 Zero Speed, Differential Hall Effect Sensors
This type of sensor is widely used for RPM and speed applications, which
seemed to be a good candidate for inclusion in Digi-Cycle. This sensor is also
referred to as a zero speed gear tooth sensor. This device incorporates dual Hall
Effect sensing elements configured in a differential mode. Although extremely
effective when counting teeth is the primary objective, converting the differential
output from the Hall elements to a digital output can create unpredictable results
for some timing applications7. The zero speed Hall Effect sensor incorporates
two linear Hall generators whose outputs are subtracted from each other to
provide a differential signal that eliminates the DC bias offset effects. A
differential output signal is created when the target passes by the two elements 7.
A block diagram of this system is shown in Figure 2-5.




                  Figure 2-5: Differential Hall-Effect sensor block diagram6




6
    Reprint permission granted from Sensors
7
    http://www.sensorsmag.com/sensors/article/articleDetail.jsp?id=327274

                               Approved for public release; distribution is unlimited.
                                                        16
                                                                                       EEL4919-SU07-03 v1.0
                                                                                             06 August 2007


2.2.1.5 Advantages and Disadvantages
An added benefit towards using these types of sensors was that since they
operate on the principle of sensing magnetic fields, they are essentially
invulnerable to many outdoor, mechanical and body contaminations such as:

               a. Dust

               b. Oil

               c. Dirt

               d. Humidity

               e. Vibrations

               f. Perspiration

               g. Oxidation

This is crucial for Digi-Cycle as there are many environments it can be exposed
to. In addition, since strong magnetic fields are not commonly found outside and
in rugged terrains, using this type of sensor seems, currently, to be the most
appropriate choice for Digi-Cycle. Another advantage in selecting Hall Effect and
other types of proximity sensing technology is that silicon Hall effect transducers
are fabricated on standard Complimentary Metal Oxide Semiconductor (CMOS)
integrated circuit processes which are why they are cost efficient.
A disadvantage of using the Hall Effect sensor is that it does not provide any
indication of direction which did pose some concerns towards the design of the
Digi-Cycle project with respect to the automatic gear shifting. We also would
preferably not want to use an analog Hall Effect sensor in that it would eliminate
the need for analog to digital conversion. However, many microcontrollers, such
as the 68HC11 and 68000, have ADC ports built into the architecture.

2.2.2 Photo-Reflective
Another type of sensor that would be useful is the photo-reflective sensor.
Although these sensors do not indicate direction they are very useful towards our
application in that they provide simple non-contact sensing of shafts and rotating
objects. Photo-reflective sensors are digital and provide a single digital output
pulse in response to an incremental movement of an object8. Like the Hall Effect
sensor, these sensors obtain position information which is obtained by counting
the pulses and knowing the equivalent distance between the two pulses. Photo-
reflective sensors are used in many applications such as copy machines,


8
    http://www.euclidres.com/motionSensors/motionSensors.html

                             Approved for public release; distribution is unlimited.
                                                      17
                                                                                       EEL4919-SU07-03 v1.0
                                                                                             06 August 2007


printers, scanners, fax machines and all other related types of applications. In
general, these sensors generate a digital pulse whenever the sensor receives
reflected light.

These types of sensors provide an indication of the motion of an object by
sensing light. They operate by detecting a type of reflective tape that can be
attached to a shaft or wheel. As the wheel spins the photo sensor can detect the
reflective tape every time it comes within a close proximity. The photo-reflective
sensor receives reflective light from the tape to generate the pulse which would
then go to the microcontroller. These sensors generate a square wave pulse
whenever the sensor receives reflected light9.

2.2.3 Advantages and Disadvantages
Reflective sensors operate in like manner to various proximity and Hall Effect
sensors except that it indicates a reflective stimulation when the sensor comes
within a close range of a reflective tape. Objects that are very shiny or that are
highly reflective like a mirror, or a polished metal can provide a challenge to a
photo sensor. These objects can reflect just enough light to give false readings to
the sensor. Since a significant amount of light could be reflected from an object,
the receiver may not realize that the laser beam has been interrupted and the
sensor doesn’t properly identify that the target, the reflective tape, has passed.
Some manufacturers have dealt with this problem and have incorporated a
polarization filter, which allows only light reflected to a specially designed
reflector to be received, and not false reflections from the object10. An added
disadvantage to this type of sensor technology, is that since Digi-Cycle is used
primarily outdoors, this technology does not seem to be quite suitable for our
purposes since the environment can be very rugged and Digi-Cycle will inevitably
collect a considerable amount of dust and other sorts of contaminations.

2.2.4 Inductive Sensors
Another type of RPM sensor that was a possibility to be used in our design was
an inductive proximity sensor. These sensors are a type of proximity sensor
which contains a coil, which is also referred to as an induction loop, to detect
motion. Unlike hall-effect sensors which are used to detect a magnetic field from
a magnet, inductive sensors are primarily used to detect the presence of a metal.
They are non-contact devices that set up a radio frequency field with an oscillator
and a coil. An inductive proximity sensor has an inductive-capacitive (LC)
oscillating circuit, a signal evaluator, and a switching amplifier. The coil of this
oscillating circuit generates a high-frequency electromagnetic alternating field.
This field is emitted at the sensing face of the sensor. If a metallic object comes
within a close range of the sensing area, eddy currents are generated. The


9
    http://www.euclidres.com/motionSensors/motionSensors.html
10
     www.cherrycorp.com/cherry/Hall_effect_severe_environment.pdf

                             Approved for public release; distribution is unlimited.
                                                      18
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


resulting losses draw energy from the oscillating circuit and reduce the
oscillations. The signal evaluator behind the LC oscillating circuit converts this
information into a clear signal11. Several important specifications to consider
when choosing an inductive sensor include the operating distance, repeatability,
field adjustability, and minimum target distance. This information was important
during the design of our project.

2.3 ACTUATORS
In order for Digi-Cycle to have the capability of shifting gears for the rider, a set of
actuators is necessary to interface the digital control board to the mechanical
shifting system of the bicycle. Although the need for an actuator is obvious, the
selection and implementation of a suitable device to perform this action is not
quite as simple. There are several different technologies and devices available
which may satisfy the requirements for Digi-Cycle.              Any actuator being
considered for use in the project must have some way of strictly controlling its
motion by means of either feedback monitoring, or even more simply, a naturally
limited range of motion. The devices which were investigated by this study are
Solenoids, Servo Motors, Standard DC Motors, Stepper Motors, and Muscle
Wire. In addition to determining the type of device to use for the Digi-Cycle
Project, the method of implementation (as pertains to mounting and interfacing)
must also be determined. This part of the design may be the most difficult, as
each possible device evaluated will present its own set of issues in this area.
The actuator must also be able to handle a reasonably high torque output to
move the cycle’s derailleur, as the project may demand anywhere from 10 inch-
pounds (in-lbs) to an estimated 50 in-lbs. The following sections will attempt to
explain the options available within these aspects of the design, as well as the
issues they will present and possible solutions.

2.3.1 Solenoids
An electromechanical solenoid is a transducer which converts electrical energy
into linear motion. Electromechanical solenoids consist of a coil of wire wrapped
around a ferrous armature. When a current is applied to the inductive coil, the
electromagnetic field generated reacts with the armature causing motion. This
motion may be harnessed by Digi-Cycle to shift gears. Solenoids would have a
tendency to be a relatively compact and cost effective solution, and are
manufactured in a variety of styles. Although only a few styles have been
evaluated here, the fundamentals of operation for each of them are nearly the
same.




11
     http://sensors-transducers.globalspec.com/learnmore/sensors_transducers_detectors/velocity_sensing/

                               Approved for public release; distribution is unlimited.
                                                        19
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


2.3.1.1 Push/Pull Solenoids
The most popular style of solenoid (a push/pull solenoid) has only two positions,
although certain push/pull solenoids may have more. This type of solenoid would
restrict the number of gears that it can manage to a low number unless it had
some additional mechanical assistance. One possible solution to this would be
to interface the solenoid to a ratcheting type shift lever. This method would
require two solenoids in order to operate properly, one to up-shift and another to
down-shift. Although having two solenoids per shifter would double the number
of I/O pins needed to connect to the MCU, it would reduce the demands on the
power supply since the any solenoid would only have to be activated for a brief
period to shift a gear.

Another possible solution is to connect the solenoid directly to either the shift
cable or the derailleur. This method would reduce the mechanical engineering
process and design necessary for the project, but would have other serious
limitations. In order for the solenoid to maintain a set gear in this configuration, it
must have a constant current applied to it, increasing the demands on the power
supply. In addition, the solenoid would be limited to a small number of gears that
it could accommodate, as it has few possible positions. Finally, solenoids have a
relatively small and fixed range of motion, which would make it difficult to
correctly calibrate and position the solenoid to achieve correct derailleur motion
while shifting.

2.3.1.2 Rotary Solenoids
Rotary solenoids (also called Rotary Voice Coils) operate similarly to Push/Pull
solenoids with one distinct difference, which is that their axis of motion is
rotational about an axis rather that in a motion parallel to the coil. When
activated, the solenoid will rotate a set angle, usually about 45° in a given
direction. Some rotary solenoids, like the ones used in hard disk drives, are
capable of moving into many positions within an angle range. Unlike push/pull
solenoids, rotary solenoids typically do not have a set resting position to return to
once the power applied to it has been removed, requiring an input power for the
solenoid to hold any position. Despite this, rotary solenoids have a key
advantage, which is that the rotational motion is easier to manipulate by gearing
or other mechanical means to alter the overall torque or range or motion
produced by the unit. This would provide for greater freedom in actuator
selection at the expense of an increase in mechanical parts, design, and
complexity required for the project.

2.3.2 Servo Motors
Servo motors are commonly used in Radio Control (RC), robotics, and industrial
applications, and have ideal characteristics for motion control. Servo motors are
electromechanical motor packages which give a positional control. Servos are
typically small DC motors packaged with a control system (a mechanically linked

                       Approved for public release; distribution is unlimited.
                                                20
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


potentiometer) and a gearing system. The control system of a servo typically has
three inputs; one for power, one for signal input, and one for ground. The servo
monitors motor positioning by means of a potentiometer mechanically linked to
the output shaft. This reading is then compared with the signal input to
determine how far the motor must move to achieve the desired position. Servos
can thus achieve virtually any position within a fixed range of motion, and returns
to a natural resting position when no input signal is present. Servo motors
expect a pulse per fixed time period on the signal line to determine the motor’s
desired position, typically around one pulse every 20ms in an average servo.
Microcontrollers can control a servo’s position simply by varying a pulse-width
sent to the servo’s control input, reducing the need for alternate hardware (see
Figure 2-6). Achieving and maintaining an accurate signal pulse could prove to
be a challenge, since it is likely that the pulse subroutine needs to run in series
with other system subroutines of varying length, and may also tie up the MCU
while the pulse timer is running. This may be alleviated through the use of
interrupts, provided that the MCU can accommodate a sufficient number of
interrupts for the application.



                                      0
                          1                    5
                              a1   Vcc1   b1
                          2                    6
                              a2          b2
                          3
                              a3
                                   MCU    b3
                                               7

                          4                    8
                              a4          b4
                          1                    5

                          2
                              a1          b1
                                               6
                                                                Servo Motor
                              a2          b2
                          3                    7
                              a3          b3                     0
                                                    1                       5
                          4                    8        a1    Vcc1     b1
                              a4          b4
                                                    2                       6
                                                        a2             b2
                                                    3        Control        7
                                                        a3             b3
                                                    4                       8
                                                        a4    GND      b4
                                                                 0




                        Figure 2-6: Servo to MCU Interface


Servos come in a variety of sizes and packages, and can be compact or have
high torque properties. In addition, servos typically have lower power needs than
many other actuator solutions, and typically operate on 4.8V to 6.0V. Unit cost
varies accordingly, but is typically high in comparison to other actuator solutions,
especially for packages with higher torque motors. Some common servo styles
are explained in greater detail in the subsequent sections.




                       Approved for public release; distribution is unlimited.
                                                21
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


2.3.2.1 Angular Output Servos
Angular output (rotational) servo motors are the most common type of servos
available, and are especially popular in the RC community. Use of an angular
output servo would require some additional mechanical linkage, such as a rod or
lever arm, to operate the bicycle’s derailleur, although such a setup is relatively
simple to implement. Angular output servos typically have a total range of motion
of around 180° to 220° depending on the model, with a typical standard range of
210°. Such a wide range of motion would easily accommodate Digi-Cycle’s
needs, especially if the motor’s torque arm were to be lengthened. The single
largest drawback to angular output servos is that because of their typically
intended applications in hobbies such as RC vehicles, their torque output is very
low per unit price, with an average output of around just 25 ounce-inches (oz-in)
for a $30 motor, and some of the strongest hobbyist motors having a torque
rating of about 200 oz-in for an estimated $100. Although the stronger hobbyist
servos could have enough torque to move the derailleur, the unit cost of the
motor is rather steep. Stronger industrial angular output servos would certainly
meet the torque demands of Digi-Cycle, but with an average unit costs ranging
from $700 to $3000, purchasing a unit new would break the project budget
several times over, and therefore are not being considered as an option.

2.3.2.2 Linear Motion Servos
Linear motion servos are servo motor packages which are geared to produce
motion in a direction parallel to the work rather than in a rotational motion.
Instead of delivering a torque, linear motion servo packages produce a force.
This is advantageous in the fact that it can reduce or even remove the need for
additional mechanical gearing or linkage. However, linear motion servos are
uncommon as consumer and hobbyist products, mainly seeing use in industrial
applications. As a result, linear servos would not fit the size, weight, and
budgeting constraints set forth within the Digi-Cycle project.

2.3.3 Standard DC Motors
DC motors are perhaps the most common, simplest, and cost effective device
being evaluated for this project. Standard DC motors are used in a wide variety
of applications and are mass produced, making them both inexpensive and easy
to obtain, with better chances of finding a motor to meet size, weight, and power
constraints of the project.

However, standard DC motors have one serious drawback which is a lack of a
sufficient control method built into the motor. Unlike the other solutions being
considered for the project, DC motors have no linear control loops to check the
motor’s position, as are seen in servo motors, nor do they have a limited range of
motion, as they can achieve full and unrestricted revolutions. This characteristic
makes controlled motion, as is needed in this project, very difficult to achieve.
Although there are various DC motor control packages available for purchase,

                      Approved for public release; distribution is unlimited.
                                               22
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


such an option would increase design complexity as well as driving up costs.
Some possible solutions detailed in the following sections are to add feedback
control to the motor, or to attempt to precisely time and meter the motor to
achieve the desired result.

2.3.3.1 Feedback Control
There are several methods to adding feedback control to a standard DC motor
ranging from inductive methods to opto-coupling, as well as mechanically linked
electronic devices such as potentiometers or micro-switches, the latter two
methods being more promising than the former two. It may be possible to place
micro-switches at physical stop points on the bicycle, such that when the motor
reaches a new gear, a report can be sent to the MCU which then stops the
motor. Although simplistic in design, the practical application would not be as
straightforward, as there must be at least one switch for every possible position,
and each mush be placed precisely in tight tolerances on the bike.

Feedback control using a potentiometer is perhaps the most effective method,
effectively converting the standard DC motor into a servo motor. Despite the
additional work involved in this method versus using a Commercial-off-the-Shelf
(COTS) servo, converting a DC motor to a servo has a significant advantage. If
a reasonably high torque DC motor can be obtained, it can be converted into a
high torque servo at a fraction of the cost of a COTS high torque servo.
However, achieving this design would be no small feat, as it would require
additional mechanical design to link the potentiometer to the motor, along with
the need for the control system to be designed and coded. Another option may
be to purchase an inexpensive servo and swap its DC motor out for a similarly
sized, but higher torque replacement motor.

2.3.3.2 Freestyle Timing and Metering
This method calls for a guess and check approach to controlling the DC motor,
which would attach to the derailleur by means of worm and pinion gears.
Essentially, the MCU activates the motor, pause a pre-defined amount of time,
and then stop the motor. Although the hardware and software interfaces would
be rather simple to implement, selecting accurate motor delay times would be
exceptionally difficult. There are too many variables to account for, including
wind-up and wind-down times of the motor, force needed to move the derailleur
versus moving the derailleur and chain, etc., which would increase the risk of
missing shift points, and consequently have adverse effects on system
performance.

2.3.4 Stepper Motors
Stepper motors are yet another solution popular in robotics and industrial work
applications. Steppers typically DC motors which contain multiple (most
commonly four) coils, as opposed to a single coil as in standard DC motors.

                      Approved for public release; distribution is unlimited.
                                               23
                                                                                          EEL4919-SU07-03 v1.0
                                                                                                06 August 2007


Steppers are not very accomplished at achieving a fast or fluid motion, but are
very well suited at creating a precise controlled motion. By powering just a single
coil at a time in sequence, the motor can “step” in a given direction, rotating the
output shaft by just a few degrees each step. In addition, many motors are
capable of half steps by turning on two adjacent coils, turning one off, and then
turning on the next adjacent coil, and so on, giving the motor even a greater level
of precision.

Steppers are a relatively high torque style of motor, although several of the
smaller packages still may not meet the demands for the project. Steppers have
two types of torque ratings; standard torque, which is the torque provided for
motion, and holding torque, which is the torque provided to maintain a position.
Steppers typically have a high holding torque, which can be amplified by the
inductive effects in the windings if opposing coils are connected together.
Although finding a stepper motor with enough torque may not be difficult, higher
torque steppers tend to be larger, heavier, and more expensive. Also, interfacing
a stepper to the MCU requires a significant amount of additional electronic
hardware, as the I/O pins on the MCU cannot keep up with the current demands
of the stepper (see Figure 2-7 and Figure 2-8). With this aside, implementing
subroutines to control the stepper would be rather simple, as well as calibrating
the stepper to correct shift points, making the stepper motor another strong
candidate for the Digi-Cycle actuator.




                            0                            0
                1                      5     1                    5
                    a1   Vcc1     b1             a1   Vcc1   b1
                2                      6     2                    6
                    a2            b2             a2          b2
                3
                    a3
                         MCU      b3
                                       7     3    UCN5804b3
                                                 a3
                                                                  7

                4                      8     4                    8
                    a4            b4             a4          b4
                1                      5     1                    2
                    a1            b1             a1   GND    b1
                2                      6
                    a2            b2                     0
                3                      7
                    a3            b3
                4                      8
                    a4            b4




                                                                           Stepper Motor




      Figure 2-7: Stepper to MCU interface using UCN5804 Motor Controller




                                Approved for public release; distribution is unlimited.
                                                         24
                                                                                                EEL4919-SU07-03 v1.0
                                                                                                      06 August 2007




                         0                            0
             1                    5      1                      5
                 a1   Vcc1   b1              a1    Vcc1    b1
             2                    6      2                      6
                 a2          b2              a2   Output   b2
             3
                 a3
                      MCU    b3
                                  7      3
                                             a3   Buffer   b3
                                                                7

             4                    8      4                      8
                 a4          b4              a4    GND     b4
             1                    5
                 a1          b1                       0
             2                    6
                 a2          b2
             3                    7
                 a3          b3
             4                    8
                 a4          b4




                                                                                     Stepper Motor




           Figure 2-8: Stepper to MCU Interface using NPN Transistors


2.3.5 Muscle Wire
Muscle wire is the nickname given to a titanium nickel alloy which significantly
alters its shape in response to changes in temperature. Muscle wire is a
relatively new technology, which is already gaining popularity in robotics. When
an electrical current is applied to the wire it begins to produce heat, causing the
crystalline structure of the alloy to temporarily deform. The direct result of this
reaction is the contracting of the wire. As the current is removed and the wire
begins to cool, it will relax, returning to its normal length. Although it is appealing
due to its simple operation, muscle wire is not likely to be a strong candidate for
the Digi-Cycle actuator simply because it is relatively weak, and may not be able
to apply enough force to the derailleur. In addition to this, muscle wire is
intended to pull only, so two pieces will be needed for each derailleur, making
mounting and coordinating the wires more difficult. Also, no data was found
describing the cooling rate of the wire. If the wire takes any significant time to
cool, it could prevent the bicycle from shifting gears accurately and at the
appropriate times, which would cripple the system.

2.3.6 Actuator Implementations
There are a few ways in which the actuators can be connected to the mechanical
systems on the bike. One such way would be to connect the actuator to the shift
levers or shift cables on the handlebars, and the other would be to connect the
actuator directly to the derailleurs on the bicycle. The following sections will
attempt to explain the implementations and benefits of each method.

2.3.6.1 Direct Connect to Shift Cable
Directly connecting the actuators to each of the shift cables or shift levers
seemed like the more obvious solution, as it would reduce the amount of
mechanical linkage required to interface the actuators to the bike. The flexibility

                                      Approved for public release; distribution is unlimited.
                                                               25
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


of the cables would allow the actuators to be mounted virtually anywhere on the
bicycle. Although this method is idealistically simple, it has a key drawback,
which is force. Most of the force required to shift gears on a bicycle is actually
expended on working against the return spring for the cable, as well as friction of
the cable against its own sheathing. Removing the return spring would be largely
beneficial in reducing this required force, but the cable system would not function
properly since a cable can pull but not push. In short, although this method
simplifies mechanical design of the system, it is more demanding on the actuator.

2.3.6.2 Direct Connect to Derailleur
This method calls for the removal of the shift levers and cables, and linking the
actuator directly to the derailleur with gears, pushrods, or some other mechanical
linkage. This would allow more freedom in actuator selection by lowering the
physical demands placed on the actuator, thus potentially reducing system cost
since smaller more cost effective actuators may be used. However, this method
is not without fault either. The placement of the actuators would be highly
restricted, and the actuators would need to stay in close proximity of each
derailleur. In addition, the actuators must me linked to each derailleur, which
would likely require some gearing or lever and pushrod system, depending on
the actuator that is selected.

Another possibility would be to link the actuator to the derailleur using a screw
and threaded fitting. This method would work best with a DC motor instead of a
stepper motor since DC motors can spin at a faster rate. It may also be ideal to
use a screw made of nylon or Teflon to improve performance by reducing binding
or the need for additional lubrication. This method would also provide reasonably
high torque, but would sacrifice speed to achieve this.

2.4 DISPLAY
For our purposes, the display module is only required to show a set number of
alphanumeric characters. Since images are not required, this leaves us with the
flexibility to choose between different technologies. Two technologies have been
chosen to be analyzed further, the LED and the LCD technologies. This section
will discuss the advantages and disadvantages of both technologies, and will
look deeper into the specifics of each and their possible complexities of use.

2.4.1 Overview of LEDs
Through investigation into the LED display technology, we find that there are two
highly common types of LED display devices in use: the 7-segment display and
the alphanumeric display, also known as the dot-matrix LED display. There are
several other types of LED display devices in existence that are not discussed in
this report which potentially could fit our needs. However, since looking into
every device thoroughly could be very time consuming, we decided to focus on
the two that are used most commonly.

                      Approved for public release; distribution is unlimited.
                                               26
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


The 7-Segment LED display is a very simple device and as shown in Table 2-3,
is also relatively cheap to acquire. This device does not have a built in American
Standard Code for Information Interchange (ASCII) interpreter (logic to display a
character given an 8 bit ASCII value) and does not have the ability to display any
non-numeric characters. Although the amount of code required to make an ASCII
to pin out translator for the device would be relatively small, it may prove to be
time consuming to develop and test.

The Alphanumeric LED display or dot-matrix LED display is very similar in
application to the 7-Segment LED display only it contains several more segments
which allow the device to display a wider variety of characters. As its name
implies, the Alphanumeric LED device has the ability to display any letter in the
Standard English alphabet, and any number ranging from zero to nine. For the
smaller, cheaper alphanumeric LEDs, it is similar to the 7-Segment LED displays
in that they do not have an ASCII to pin out translator.

2.4.2 Overview of LCDs
Upon investigating the LCD display technology, we find that there are two largely
common LCD types; the Serial LCD display and the Parallel LCD display. There
are several specifics of an LCD display which can make it appear different from
others, but they are considered to be added features rather than different types
of LCDs. Examples of this are the LCD backlighting ability, which helps
illuminate the text on the screen in low lighting, or the choice to have either color
pixels or black and white pixels in the display. Also worth noting is that the
difference between the two types of LCD is an implementation of logic and not
the way the user sees the display.

The parallel LCD display device gets its name from the way it communicates to a
processor device (microcontroller, microprocessor, etc). The parallel LCD
display connects to the processor device in parallel. This means that the
communication speed between the display device and the processor device is
very fast. Although it is very fast, in most cases the parallel LCD displays
connects to the processor device with eight pins. As shown in Figure 2-9, the
parallel LCD display device (left-most diagram) uses 8 data pins and has n
number of control pins to interpret the data. The need for eight data pins can
prove to be a problem in cases where you have limited I/O pins.

The serial LCD display, much like the parallel LCD display, gets its name from
the way it communicates. In this case, the communication is done in serial over
one pin. The Serial LCD display device shown in Figure 2-9 (right-most diagram)
uses only one I/O pin and transmits all of its data in a series of pulses. As you
could imagine, the communication time for a serial LCD display is not as fast as
that of a parallel display. However, the difference in time is in milliseconds,
which is undetectable for humans so long as the amount of data being
transmitted is of reasonable length. The communication speed for a serial LCD


                       Approved for public release; distribution is unlimited.
                                                27
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


display would be sufficient for our purposes. A great advantage to using a serial
is that it requires only one I/O pin. In addition, some manufacturers include LCD
side logic to facilitate interpreting input logic. One example of this is “The
Backpack” which is included in several Serial LCD display devices. The
Backpack is an on-board microcontroller that accepts a 2 byte word and
interprets the command and displays to the screen. Using something of this
manner can save a lot of time in development.

For both the serial and the parallel LCD communication types there is a second
logic or input type. The types previously mentioned take in alphanumeric
characters in ASCII as inputs. This second logic type of LCD is the graphical
black and white LCD and takes in pre-defined commands as its input. This
graphical type uses a display very similar to the LED dot-matrix for larger dot-
matrix devices. The graphical LCD type has an interface which controls the
display that simplifies the use of this device a little. This LCD logic type is harder
to program than the simpler alphanumeric type, but has more flexibility in terms
of what can be displayed on the screen.




                    Figure 2-9: Parallel vs. Serial I/O Pin Layout


2.4.3 Programming
One of the biggest factors in the decision making process for choosing                           the
components of a system other than cost is their ease of use. The way                             you
program and implement every device in the system will vary upon which                            you
choose. It is also very important to make note of the amount of time you                         can
expect it take to learn how to use a device.

2.4.3.1 7-Segment
For the case where there is only one digit, the device has 10 pins. Eight of these
pins are data pins controlling the display and the other two are common ground,
of which only one needs grounded to function. Seven of the eight data pins


                       Approved for public release; distribution is unlimited.
                                                28
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


control the seven segments of the display and the eighth controls the decimal
point. For simplicity, we look at a single digit 7-Segment LED. Figure 2-10
shows the relationship between each pin and its corresponding segment. To set
any segment to the “on” state, the pin has to be set to logic 1, and respectively to
set the state to “off”, the pin has to be set to logic 0.




        Figure 2-10: Pin layout of a single character 7-Segment LED display


2.4.3.2 Alphanumeric LED Display
The alphanumeric LED or dot-matrix LED display is very similar in use to the 7-
Segment LED except that the alphanumeric LED will have several rows and
columns of individual round segments which make a matrix of dots or a “dot
matrix”. For simplicity we will look at a four by five dot-matrix. This particular
device will have twenty I/O pins controlling its own dot in the matrix, much like the
7-Segment LED display. For models bigger than the one we discuss here, there
is a logic board that interacts with the display. This logic board acts as an ASCII
to pin out translator between the main processing unit and the actual LED
display.

2.4.3.2.1 ASCII to Text Translator

If an LED device covered above is used and does not have a built in ASCII to
text translator, one will need to be created. This translator will have only one
task, which will be to receive the eight bit ASCII character from the main
processing unit and interpret which combination of segments will need to be
illuminated and then set the pins representing those segments to logic 1. Figure
2-11 shows a basic algorithm that will be needed in the translator. The algorithm
would essentially use a look up table with static constant values that will be
returned when a bit pattern is received.




                       Approved for public release; distribution is unlimited.
                                                29
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007




                 Figure 2-11: ASCII to Text Translator Algorithm


2.4.3.3 Parallel LCD Display
The parallel LCD display takes in a full ASCII character at one time across eight
data pins. Another pin lets the LCD display know when the eight data pins are
ready to be read, and another pin lets the LCD display know that it should be
listening for characters. In order to program the LCD, you will need to set the
read pin to a login 1, then for every character added to the display you will need
to set all the data pins in the correct configuration for the ASCII. Once all the
data pins are set correctly, pulse the character read pin to logic 1 for a few micro
seconds. There are a couple of other pins which are optional for use which are
the character location. Those location pins choose which character slot to place
the ASCII character that is being read in. If no data is sent to those pins, the
characters are placed in sequential order of which they are inputted. Figure 2-12
shows the data pins zero through seven which represent the character to be sent
or read from the LCD and the control pins. Figure 2-12 also shows how the end
user does not interact directly with the LCD Panel but interacts with the LCD
Controller and that controller communicates directly to the LCD Panel.




                   Figure 2-12: Parallel LCD interface pin outs




                       Approved for public release; distribution is unlimited.
                                                30
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


2.4.3.4 Serial LCD Display
The serial LCD display has to send the ASCII character one bit at a time serially
because it only has only one data pin. In this communication system, both the
main processing unit and the LCD need to use the same transmission frequency
so that the instructions are interpreted correctly. The pin layout for a serial LCD
would look similar to that seen in Figure 2-12 with the exception that there aren’t
eight data pins. Programming complexity for this system will vary depending on
the length of time it takes to get acquainted with the frequency transmission
system. I predict that using such a system will not have too heavy of a learning
curve and should be sufficiently simple enough to use.

2.4.3.5 Graphical LCD Display
As mentioned above, the graphical LCD display can communicate in either serial
or parallel. In either case, the graphical LCD will interface with the main
processing unit the same as the textual counterpart. Figure 2-13 illustrates how
a parallel graphical LCD display interfaces the same on the user end, but
performs different operations internally. The graphical LCD will accept
commands from the eight data pins as well as ASCII characters because the
graphical LCD has the ability to draw on the screen to create shapes. This can
prove to be complicated in both the learning stages as well as the
implementation stages. However, this does demonstrate a much more intricate
look at the user end.




               Figure 2-13: Parallel Graphic LCD interface pin outs


2.4.4 Cost Analysis
As in most system designs, cost is a very important factor in the decision making
process when selecting which parts will be used in a design. A separate price


                      Approved for public release; distribution is unlimited.
                                               31
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


comparison is made for the overall technologies first. After which a comparison
of the two technologies is made. These comparisons deal only with the benefit
per cost and not the overall usefulness of the device which is likely to be the
biggest influence in the decision making process.

2.4.4.1 Cost Analysis of LED
In making a decision between types of technology cost is always an issue. Table
2-3 shows a price comparison between the 7-Segment LED display and the
Alphanumeric LED display. In this comparison it is obvious that the 7-Segment
LED displays, the simpler of the two, is the cheapest overall. The difference in
cost between the alphanumeric and the 7-Segment displays is not very
significant until the alphanumeric devices begin to contain four characters or
more. The price for alphanumeric devices in that range is over eight times more
than for the other.



           Table 2-3: 7-Segment Displays vs. Alphanumeric LED Display Cost
                                  Comparison
      LED Displays
      Type                            Price            Type                       Price
      7 Segment Displays                               Alphanumeric LED Display (dot matrix)
      1 Digit                         $0.72            1 Character                $2.19
      2 Digits                        $1.20            2 Characters               $3.15
      3 Digits                        $2.16            4 Characters               $16.76
      4 Digits                        $2.40            6 Characters               $36.26



2.4.4.2 Cost Analysis of LCD
A similar cost comparison is made for the two types of LCDs and the Graphical
LCDs. Table 2-4 shows a price comparison between several of both the Serial
LCD display and the Parallel LCD display for text and graphical formats. The
parallel LCD display is seen to have a lower price than the Serial LCD display in
all types shown. The difference in price between the Serial and Parallel LCD is
substantial for each individual device. Although the prices are generally higher
for the serial, the added usage of the onboard interpreter and the fact that it only
requires one I/O pin makes the difference in price seem insignificant. The prices
for the larger Serial LCD and the parallel Graphical LCD displays are not actually
averages, as only one of each of these devices could be found at the website
where this information was obtained.




                       Approved for public release; distribution is unlimited.
                                                32
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


      Table 2-4: Serial LCD Display vs. Parallel LCD Display Cost Comparison
LCD Displays
Type                  Price    Type                        Price        Type                     Price
Serial LCD Displays            Parallel LCD Displays                    Graphical LCD Displays
16x2 (Chars)          $50      16x2 (Chars)                $13          Parallel
16x4 (Chars)          $60      16x4 (Chars)                $23          240x64                   $60
20x4 (Chars)          $70      20x4 (Chars)                $25          Serial
40x4 (Chars)          $150     24x2 (Chars)                $20          122x32                   $70
40x8 (Chars)          $170     40x4 (Chars)                $40          240x64                   $170



The prices shown in both Table 2-3 and Table 2-4 are averages for their specific
devices and the exact prices may vary from company to company. The average
prices shown are computed from price lists obtained from the online store
Jameco, whose web address is http://www.jameco.com.

2.4.5 Color LCD Display
The LCD technology has matured enough such that small color LCD display
devices are available to the consumer at more affordable prices. In order to
decide whether the idea of using a color LCD in place of a standard black and
white LCD is a reasonable idea, we will need to analyze the details of color LCDs
compared to those of a black and white LCD.

2.4.5.1 Possible Need for a Color LCD
One of the first topics to consider in analyzing the idea of color versus black and
white is the possible uses of the more advanced technology. The main purpose
of the LCD display is to present to the user a set of values which represent the
current ride environment. Aside from displaying that set of information, possible
graphs could be displayed on the screen describing the changes in environment
over time. Both of these needs can be easily resolved in both a black and white
LCD display as well as a color display. The only differences would be the added
possibility of displaying color images and additional aesthetics, both of which are
not necessary.

2.4.5.2 Cost Difference of a Color LCD
The second most important topic to consider is the price difference between the
two technologies. Although the prices of color LCDs are more affordable to the
general public now than in the past, there still will be an increase of cost in
comparison to the older technology. After some investigation into cost of color
LCDs it is apparent that color LCDs are not all that common in the big electronic
stores, however still obtainable. We found that color LCDs vary greatly in price
but on average cost nearly one hundred dollars more than their serial black and
white counterparts.


                       Approved for public release; distribution is unlimited.
                                                33
                                                                                  EEL4919-SU07-03 v1.0
                                                                                        06 August 2007


2.4.5.3 Complexity of programming
The color LCD is comparable in programming to a graphical black and white
LCD. The only exception to that is that the color LCD adds one more parameter
to the equation. The color LCD requires each dot to be given three values which
represent its color hue for red, green, and blue usually in that order.
Programming a color LCD in comparison to a black and white one will naturally
be with added difficulty but it wouldn’t be expected to be much more, however
added time for development and testing will be required.

2.4.6 Backlight
Many LCDs on the market optionally include a backlight feature. This feature
illuminates the surroundings of the LCD making it easier to be seen in low
lighting areas. Having this feature present adds one more I/O pin controlling the
backlight having logic one representing the on state and logic zero representing
off state. This extra pin is very simple to handle and does not significantly
increase the programming complexity of the device it is on. As seen in Table 2-3
and Table 2-5, the price differences between devices with backlights versus
those without backlights are on average, within ten dollars. This is an acceptable
difference in price as it does allow for the user to see the display clearly in low
lighting areas.



     Table 2-5: Backlight vs. No-Backlight for Parallel and Serial devices Cost
                                   Comparison
      LED Displays – Backlight price comparison
      Type                            Price             Type                              Price
      Without Backlight                                 With Backlight
      Parallel 16x2                   $13               Parallel 16x2                     $17
      Parallel 40x2                   $25               Parallel 40x2                     $33
      Serial 16x2                     $50               Serial 16x2                       $64
      Serial 20x4                     $70               Serial 20x4                       $75



2.5 POWER SUPPLY
Power is a measure of electricity that takes into consideration both voltage and
amperage at the same time. POWER = VOLTS x AMPS, and is measured in
watts. It can also be expressed in terms of horse-power (hp), where 1hp = 746
watts. To gain an intuitive understanding of how power, voltage and amperage
relate, it is useful to use the analogy of a stream of flowing water. The volume
(depth and width) of the water is analogous to the amperage and the speed of
the water is analogous to the voltage. A pond or lake is analogous to electricity
with low voltage and a waterfall is similar to electricity with high voltage.


                        Approved for public release; distribution is unlimited.
                                                 34
                                                                                  EEL4919-SU07-03 v1.0
                                                                                        06 August 2007


Furthermore, a single falling drop of water is similar to electricity with high voltage
but low amperage. A waterfall is similar to electricity having both high voltage
and high amperage.

A power supply is a device that supplies electrical and mechanical energy to an
output load. The regulation of power supplies is done by incorporating circuitry to
tightly control the output voltage and/or current of the power supply to a specific
value. The specific value is closely maintained despite variations in the load
presented to the power supply's output, or any reasonable voltage variation at
the power supply's input. This kind of regulation is commonly categorized as a
stabilized power supply.

To stabilize the power supply need to know the correct measurements of the
components and that are going to be powered. (Table 2-6) The components
being powered are a microcontroller, RPM sensor, temperature sensor, and a
heart rate monitor.



               Table 2-6: Expected Component Power Consumption
                                       V= Voltage                                  V*I =Power
              Component                  Range               I=Current               Range
             Microcontroller            0.3V- 7.5V             250mA              0.75W-1.875W
              RMP Sensor                 0.5V - 7V              10mA              0.005W-0.07W
          Temperature Sensor             0.5V - 7V              10mA              0.005W-0.07W
           Heart Rate Monitor            0.5V - 7V              10mA              0.005W-0.07W
               Actuators                 4.8V - 6V              0.9 A              4.32W- 5.4W



A power system can be assembled in many different ways. There are key
factors in a selecting this system and the data specs (from chart above) are a
part of those factors. Quantity of power delivered, time span, stable output
current and voltage under load conditions, dimensions and measurements, and
funding are several key factors in selecting a functional powers supply.

The quantity of power delivered by the power supply is a very important factor
when deciding what type of power to use. This power has to be greater than the
quantity of power being consumed to obtain continuous energy in the circuit.
Consumed power can be calculated by adding the input power of each
component       times       by      the   amount       of      time      used.
Consumed Power = (Voltage * Current) time

Equation 2-1 for consumed power is:


                        Approved for public release; distribution is unlimited.
                                                 35
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007




                    Consumed Power = (Voltage * Current) time
                 Equation 2-1: Determining Power Consumption


The temperature sensor, RMP sensor, heart rate monitor, actuators, and the
microcontroller’s input power range from 5.085 watts to 7.485 watts. The amount
of power supplied for one hour must be greater than 7.5 watts (the power
consumed).

The time span, or duration of the power supplied is another factor when
designing a power system. Parts chosen in to power the system must be taken
into consideration when determining the time span of the system. These parts
must be able to supply stable energy for long periods of time. The main and
secondary power sources are items of concern when deciding the time span.
However, small components might also want to be added to raise or lower the
power for a certain amount of time.

The next concern is how stable output current and voltage is under load
conditions in the circuit. Some loads require a great amount of current and
voltage. The circuit must create a greater input voltage and current than the load
produces. The circuit must be able to obtain a constant flow of current and
voltage while the load is being powered. The components chosen to power the
bike must be able to supply enough current and voltage to each load. A steady
output will keep the components working continuously on the bike.

The dimensions, measurements and specs are necessary when selecting any
parts on the bike. Seeing that, bike frames are designed in the shape of a
diamond to help balance the rider, symmetry is an issue when selecting
components for the power supply. The parts must be light in weight, and small
enough to fit on the frame of the bike. Also, since bikes are used for physical
activity and are kept outdoors, weather conditions must also be considered when
selecting a component.

The key factors in a selecting a power system are quantity of power delivered,
time span, stable output current and voltage under load conditions, dimensions
and measurements. Another key factor when selecting a power system is the
funding. The components on the bike must be cost effective. After researching
the key factors of the power supply, there are several types of power supplies
considered for this project.

All power supplies have a primary source (main source of power) this is the
source that runs power to the entire circuit. This power needs to be able to
spread throughout the entire circuit continuously, therefore the source power


                      Approved for public release; distribution is unlimited.
                                               36
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


generated must be greater then the power in take of the entire circuit. However,
if the source power is significantly higher than the power intake, extra
components are needed to use the power that was generated, given that the
energy created has to be consumed. If the source power does not have enough
energy to run the entire circuit continuously, a secondary power supply may be
used to help operate the circuit. The supply may be connected to the
components that need the additional power, or can be connected in
series/parallel to the primary source (which creates the additional power).

There are many advantages of having a secondary power source. One benefit is
a second circuit can be used with the secondary source. Also, voltage and
current range can have different variance levels on each circuit. Last and most
obvious, more power is created with the extra source. The disadvantages of
using the extra source are the designs are usually more complicated, and there
are more components in the design.

There are many different parts that can be used for a primary and secondary
source in the Digi-Cycle. To design the appropriate circuit for the power supply
research has to be done on each part to see if it is compatible with the circuit.
The following parts considered for the primary or secondary source are
researched in the paragraphs following: battery, generator, and an alternator.

2.5.1 Battery
A battery is a device that stores chemical energy and makes it available in the
form of electricity. It has two terminals a positive terminal and a negative
terminal. Electrons collect on the negative terminal, yet when a load is
connected between the terminals of the battery the electrons will flow from the
negative to the positive terminal which produces a current and voltage
(electricity). The chemistry inside the battery controls the voltage and a chemical
reaction produces electrons. The speed of the electron production by this
chemical reaction controls how many electrons can flow between the terminals
this is the internal resistance.

There are a number of features that need to be examined when selecting a
battery for the power supply. Those features are voltage, capacity, and the
current. The voltage source depends mainly on ingredients and chemistry of the
battery. The voltage is marked on the battery is the steady state voltage (the
voltage when reached a constant pace). This voltage (Vt) can also be calculated
by using Equation 2-2. Voc is the open-circuit voltage of the battery, R is the
battery's internal resistance, and I is the current flowing through the battery.



                                      Vt = Voc - R * I



                      Approved for public release; distribution is unlimited.
                                               37
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


                            Equation 2-2: Battery Voltage


The open circuit voltage is the voltage on the battery when it is not being charged
or discharged. After being fully charged the battery will have a larger open circuit
voltage then the voltage marked on the battery. As the battery discharges the
voltage will slowly decline.

The internal resistance of a battery is defined as the opposition to the flow of
current. This resistance is caused by the current flowing through the material
inside the battery. Resistivity will rise during discharge due to the active
materials being used within the battery. Battery chemistry, depth of discharge,
drain rate, and the age of the battery can all impact the internal resistance. Due
to discharging of the battery and to keep a steady power rate, the battery voltage
must be forty percent greater than the total intake voltage of the circuit.

A very important feature in selecting a battery is the battery’s capacity. The
capacity of a battery is defined as the electrical charge effectively stored in a
battery and available for transfer during discharge. The capacity is determined
by the amount of energy the battery can deliver over a certain period of time and
is measured in Ampere hours (Ah). Ampere hours are calculated by multiplying
the current (in amperes) by time (in hours) the current is drawn. Ah=I*HR. The
current discharge is a function of the capacity. Because of the chemical
reactions within the cells, the capacity of a battery depends on the current
discharge. For example, If the battery is in a fully charged (100% capacity) and a
load is applied (battery is used) then the battery will start to discharge, (lose
capacity) some, if not all, of its charge. Furthermore, if a battery is discharged at
a relatively high rate, the available capacity will be lower than expected. Battery
capacity depends on how long you need to run your device (hours) in conjunction
with the power your device will consume per unit time, which can be calculated in
 (Ah) = Device's Wattage (W) x Time to run (Hours) / Battery Voltage (V)

Equation 2-3.



        (Ah) = Device's Wattage (W) x Time to run (Hours) / Battery Voltage (V)
                           Equation 2-3: Battery Capacity


The last feature to look at when selecting a battery is the current. The current
keeps the power in the circuit steady. If the current is in steady state then the
energy will be supplied continuously. The current is determined by the chemistry
of the battery, but also can be increased by arranging the battery cells in parallel
with one another.

                       Approved for public release; distribution is unlimited.
                                                38
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


There are several different types of batteries, each with its own performance
traits. Below are the list of battery types and the advantages and disadvantages
of each type. Batteries are usually divided into two broad classes:

   a. Primary batteries irreversibly transform chemical energy to electrical
      energy. Once the initial supply of reactants is exhausted, energy cannot
      be readily restored to the battery by electrical means. (disposable)

   b. Secondary batteries can have the chemical reactions reversed by
      supplying electrical energy to the cell, restoring their original composition.
      (rechargeable)

A secondary battery will be selected for use in the Digi-Cycle project if a battery
is chosen for use in the power supply.

The oldest form of rechargeable battery is the lead acid battery, also called a
traction battery because it is high powered. A lead-acid battery is an electrical
storage device that uses a reversible chemical reaction to store energy. It uses a
combination of lead plates or grids and an electrolyte consisting of a diluted
sulphuric acid to convert electrical energy into potential chemical energy and
back again. There various reasons this battery would be a good choice for Digi-
Cycle. First, a lead acid battery can create a large amount of power in a short
period of time. This is convenient for the motors on the bicycle, since they take a
lot of power when the gears shift. Second the advantage of choosing this battery
type is the voltage per cell. The voltage per cell on the battery is 2.12 volts when
full and 1.75 when empty. The lead acid battery produces the most energy per
cell than any other battery. Also, the voltage difference is very low on this type of
battery and the capacity range (per battery cell) for 20 hours at constant current
is 0.5Ah to 200Ah. These specifications are suitable for long traveled distances
on the powered bicycle. Other advantages are its low manufacturing cost and its
varying rates of production worldwide.

The lead acid battery also has several disadvantages as well, including a low
cycle life, which is about 50-100 cycles for the average lead-acid battery. Other
drawbacks are poor charge retention and it is difficult to make in small sizes.

Another type of rechargeable battery is the Nickel Metal Hydride battery (NiMH).
The compounds used for positive active materials (especially oxides) in the
batteries are not good electrical conductors and therefore must be mixed with or
supported by conductive compounds or networks. The conductive compounds
include electrode material additives and the plate structure of the electrode made
from material nickel. This material builds up the two basic components in the
NiMH battery, which are the anode and the cathode.

The anode is the electrode where oxidation takes place and the electrons are fed
out of the cell into the external circuit. The cathode is the electrode where


                       Approved for public release; distribution is unlimited.
                                                39
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


reduction takes place and the electrons from the external circuit return to the cell.
When on charge the negative electrode becomes the cathode and the positive
electrode becomes the anode.

There are many advantages of using a NiMH battery in Digi-Cycle. First, the
electrolyte, which is an aqueous solution of potassium hydroxide, has a very high
conductivity and usually does not enter into the cell reaction to any significant
extent. Therefore, the electrolyte concentration (a major component of cell
resistance) remains fairly constant over the entire range of state of charge or
discharge. These factors lead to a battery with high power performance. The
typical power range can manage from 200 W/kg to 1000 W/kg. The high power
will provide significant current to the motors that shift the gears on the bike.
Second, the nickel active material is insoluble in the electrolyte which leads to
longer life and better abuse tolerance.

Since the bicycle will operate outside under mild conditions, a large tolerance
level and life cycle are needed on all components. Third, The NiMH battery has
over-charge and over-discharge reactions that allow the battery to handle abuse
without adverse effects. In an extreme case of overcharge the cell will become
pressurized enough to cause the safety vent to open and release the excess
pressure, thus avoiding the danger of cell rupture. This is called the oxygen
cycle for overcharge. This an excellent safety issue when considering the design
on the bicycle.

A disadvantage when selecting the NiMH battery type is the self discharge rate is
high. This is due the energy used by the oxygen cycle at high states of charge.
The contribution to self discharge from the oxygen cycle is around 70% state of
charge. Other disadvantages are the expensive price of the battery and the
technology of the battery is new to the industrial market.

Lithium Ion is another type of battery considered a source for the power supply.
The cell of this battery is a metal case that compresses a long spiral of thin
sheets containing a positive electrode (Anode), negative electrode (cathode), and
a separator. These sheets are submerged in an organic solvent that acts as an
electrolyte. An electrolyte is a substance that behaves as an electrically
conductive medium. Ions are allowed to pass through separator but the positive
and negative electrodes are divided from each other. The positive electrode is
made of Lithium cobalt oxide (LiCoO2) and the negative electrode is made of
carbon. First, the battery charges and ions of lithium move through the electrode.
Ions start with the positive electrode and merge to the negative electrode then
they attach themselves to the carbon in the cell. An electric charge is then
generated throughout the cell.

Li-Ion cells are very flammable, and are only available in packaged cells. This
cell package contains a small circuit, which manages the conditions of the cells.
The internal circuit contains a temperature sensor, voltage converter, regulator

                       Approved for public release; distribution is unlimited.
                                                40
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


circuit, connector, voltage tap, and a charge monitor. The temperature sensor
supervises the battery temperature, and shuts down the power supply if the
battery becomes overheated. The voltage converter and a regulator circuit
maintain safe levels of voltage and current. The shielded connector lets the
power flow in and out of the battery pack. A voltage tap monitors the energy
capacity of the individual cells in the pack. Last, the charge state monitor, which
is a small computer, handles the whole charging process to make sure the
batteries charge quickly and fully.

There are many advantages of using this battery type in the power supply.
Lithium is lightweight and is a highly reactive element which means a lot of
energy (the amount of energy produced) can be stored in its ionic bonds.
Therefore, the energy density is very high for lithium ion batteries. The battery
can store 150 watt-hours of electricity in 1 kilogram of battery. Furthermore, the
high cell voltage is 3.6 volts which allows battery packs to be designed with just
one cell. A battery that creates a lot of energy and is light weight is plus for the
bicycle. The bike will be balanced and able to operate for long periods. Another
advantage is the battery packs are often smart; they can be programmed to
control settings, and to display information. This would be helpful, if the user got
a sign when the battery is almost discharged. Other advantages are low self
discharge and no memory effect. The discharge on this battery type is only
about 5 percent per month. Other batteries lose around 20 percent charge per
month. Also, the battery does not have to be completely discharged before
recharging due to the memory effect.

One disadvantage of using this battery in the power circuit is that it has to have a
charger built just for the battery. The circuit inside the battery pack is the cause
for the individual charger. Another disadvantage is the voltage is not constant,
and can vary within 2 volts. If the battery type is used as a primary source this
could be a problem, since some of the components only take a maximum of 2
volts. The price of this battery type is another concern. The price of Li-Ion
battery is 3 times more then the price of other types of batteries.

In conclusion, the battery is a device that stores chemical energy and transfers it
to electrical form, which can be used on the Digi-Cycle as a primary or secondary
source. Another part that can be used as primary or secondary source in the
power circuit is an alternator.

2.5.2 Alternator
An alternator is an electromechanical device that converts mechanical energy to
alternating current electrical energy. There are three major components in an
alternator:

   a. The rotor assembly (rotor shaft, slip rings, claw poles and field windings)



                       Approved for public release; distribution is unlimited.
                                                41
                                                                                   EEL4919-SU07-03 v1.0
                                                                                         06 August 2007


     b. The stator assembly (three stator windings or coils, output wires, and
        stator core)

     c. The rectifier assembly (heat sink, diodes, diode plate, and electrical
        terminals)

The rotor assembly consist of a rotor with field windings (wire wound into a coil
placed over an iron core) mounted on the rotor shaft. Two claw-shaped pole
pieces surround the field windings to increase the magnetic field. The fingers on
one of the claw-shaped pole pieces produce south (S) poles and the other
produces north (N) poles. As the rotor rotates inside the alternator,
alternating N-S-N-S polarity, and AC current is produced. Slip rings are
mounted on the rotor shaft to provide current to the rotor windings. Each end of
the field coil connects to the slip rings. The layout of the rotor assembly can be
analyzed in the Figure 2-14.




                     Figure 2-14: Rotor Assembly Of Alternator12


The stator assembly produces the electrical output of the alternator. The stator,
which is part of the alternator frame when assembled, consists of three
groups of windings or coils which produce three separate AC currents. This is
known as three-phase output. One end of the windings is connected to the stator
assembly and the other is connected to a rectifier assembly. The windings are
wrapped around a soft laminated iron core that concentrates and strengthen the
magnetic field around the stator windings.

There are two types of stators, the Y type stator and Delta type stator. The Y
type stator has the wire ends from the stator windings connected to a neutral
junction. The circuit looks like the letter Y. The Y-type stator provides good


12
  Intergrated Publishing,Construction Mechanic Basic Volume 02
http:/www.tpub.com/content/construction/14273/css/14273 48.htm

                         Approved for public release; distribution is unlimited.
                                                  42
                                                                                   EEL4919-SU07-03 v1.0
                                                                                         06 August 2007


current output at low engine speeds. The delta-type stator has the stator wires
connected end-to-end. With no neutral junction, two circuit paths are formed
between the diodes. A delta-type stator is used in high output alternators. The
stator assembly is pictured in Figure 2-15.




                     Figure 2-15: Stator Assembly of Alternator13


The rectifier assembly, also known as a diode assembly, consists of six diodes
used to convert stator AC output into DC current. The current flowing from the
winding is allowed to pass through an insulated diode. As the current reverses
direction, it flows to ground through a grounded diode. The insulated and
grounded diodes prevent the reversal of current from reaching the rest of
the charging system. By this switching action and the number of pulses
created by motion between the windings of the stator and rotor, a fairly even
flow of current is supplied to the battery terminal of the alternator. The rectifier
diodes are mounted in a heat sink (metal mount for removing excess heat from
electronic parts). Three positive diodes are press-fit in an insulated frame.
Three negative diodes are mounted into an un-insulated or grounded frame.
When an alternator is producing current, the insulated diodes pass only out
flowing current to another source. The diodes provide a block, preventing
reverse current flow from the alternator. Figure 2-16 shows the flow of current
from the stator to the battery.




13
  Intergrated Publishing,Construction Mechanic Basic Volume 02
http:/www.tpub.com/content/construction/14273/css/14273 48.htm

                         Approved for public release; distribution is unlimited.
                                                  43
                                                                                   EEL4919-SU07-03 v1.0
                                                                                         06 August 2007




                  Figure 2-16: Produced Current Flow from Stator14


An alternator has a rotating magnet (rotor) which causes the magnetic lines of
force to rotate with it. These lines of force are cut by the stationary (stator)
windings in the alternator frame, as the rotor turns with the magnet rotating the N
and S poles to keep changing positions. When S is up and N is down, current
flows in one direction, but when N is up and S is down, current flows in the
opposite direction. This is called alternating current as it changes direction twice
for each complete revolution. If the rotor speed were increased to 60 revolutions
per second, it would produce 60-cycle alternating current.

A voltage regulator controls alternator output by changing the amount of current
flow through the rotor windings. Any change in rotor winding current changes the
strength of the magnetic field acting on the stator windings. In this way, the
voltage regulator can maintain a preset charging voltage. The three basic types
of voltage regulators are as follows:

     a. Contact point voltage regulator, mounted away from the alternator in the
        engine compartment

     b. Electronic voltage regulator, mounted away from the alternator in the
        engine compartment




14
  Intergrated Publishing,Construction Mechanic Basic Volume 02
http:/www.tpub.com/content/construction/14273/css/14273 48.htm

                         Approved for public release; distribution is unlimited.
                                                  44
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


   c. Electronic voltage regulator, mounted on the back or inside the alternator

The contact point voltage regulator uses a coil, set of points, and resistors that
limits system voltage. The electronic or solid-state regulators have replaced the
electronic voltage regulators, and use an electronic circuit to control rotor field
strength and alternator output. It is a sealed unit, and thus is not repairable. The
electronic circuit must be sealed to protect against damage from moisture,
excessive heat, and vibration. A rubber-like gel surrounds the circuit for
protection.

An integral voltage regulator is mounted inside or on the rear of the alternator.
This is the most common type used on modern vehicles. It is small, efficient,
dependable, and composed of integrated circuits. An electronic voltage regulator
performs the same operation as a contact point regulator, except that it uses
transistors, diodes, resistors, and capacitors to regulate voltage in the system.
To increase alternator output, the electronic voltage regulator allows more
current into the rotor windings, thereby strengthen the magnetic field around
the rotor. More current is then induced into the stator windings and out
of the alternator. To reduce alternator output, the electronic regulator increases
the resistance between the battery and the rotor windings. The magnetic field
decreases, and less current is induced into the stator windings. Alternator speed
and load determines whether the regulator increases or decreases charging
output. If the load is high or rotor speed is low the regulator senses a drop in
system voltage. The regulator then increases the rotors magnetic field current
until a preset output voltage is obtained. If the load drops or rotor speed
increases, the opposite occurs.

There are many advantages of using an alternator as a primary or secondary
source in the power system. The first advantage of using an alternator as a
source is that the voltage can be accurately controlled with a solid state
regulator. Since a lot of the components in the power system operate on low
power, the voltage must be stable and synchronized. A bike will operate at low
to medium speed; therefore another advantage of the alternator is its output
current is produced at low revolutions per minute. Next, an alternator can
produce charging current to other sources at low revolutions per minute. Other
advantages of having alternators in the power supply are that they need little
repair, can survive harsh conditions, and are economical to manufacture.

There are a couple of disadvantages of having an alternator as a source in the
power circuit. One disadvantage is additional parts may be needed to change
the output power of the alternator from AC to DC. Another disadvantage is the
ability to locate a small size and light weight alternator to fit on the bicycle.

In summary, the field current in an alternator goes through the rotor coils
produces a magnetic field, which couples over to the stator coils to produce an


                       Approved for public release; distribution is unlimited.
                                                45
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


AC voltage. The AC voltage is then converted by the output diodes into a DC
voltage.

2.5.3 Generator
The last source that will be considered for the power system is the generator.
The generator is very similar to the alternator. It is a device that applies the
principle of electromagnetic induction to convert mechanical energy, supplied into
electrical energy. The generator consists of an armature, a field frame, field
coils, and a commutator with brushes to establish electrical contact with the
rotating element. The magnetic field is produced by poles magnetized by current
flowing through the field coils. The current is collected from the armature coils by
brushes that make friction with a commutator. The commutator consists of a
series of insulated copper segments mounted on one end of the armature, each
segment connecting to one or more armature coils. The armature coils are
connected to the external circuits through the commutator and brushes.

The generators are ranked by four ratings types of ratings. The ratings need to
be taken into consideration when choosing a generator. First, the voltage rating
is based on the insulation type and design of the machine. The second rating is
current, which is based on the size of the conductor and the amount of heat that
can be dissipated in the generator. The third is power rating is based on the
mechanical limitations of the device that is used to turn the generator and the
thermal limit of conductors, bearing, and other parts of the generator. The fourth
rating is the speed; this rating is determined by the speed at which mechanical
damage is done to the machine.

There are a couple advantages of choosing a generator as a major power
source. The first advantage is that the voltage and current can be controlled and
regulated. The second advantage is that a generator can produce high current
and high voltage. The third is the current is a true DC source.

The disadvantages of having a generator as a power source is there are many
internal losses. There are copper losses, Eddy current losses, and mechanical
losses. Having many losses means there might not be a steady output.

In summary, the generator is a device that applies the electromagnetic induction
to convert mechanical energy, into electrical energy. Also, the generator consists
of an armature, a field frame, field coils, and a commutator.

2.5.4 Power Supply Circuits
Digi-Cycle must determine which type of power supply to use. The components
that need to be powered by the source are: a microcontroller, temperature
sensor, heart rate monitor, RMP sensor, LED interface, and two step motors.
The circuit can be conducted three different ways: a primary source battery, a



                       Approved for public release; distribution is unlimited.
                                                46
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


primary source battery and secondary source generator, and primary source
battery and secondary source alternator.

The first approach to create the circuit is to use a battery as a primary source,
displayed in Figure 2-17. The battery will connect to each component in the
circuit, using resistors and Zener diodes to regulate the voltage and current
entering each component. Furthermore, for safety there will be a Zener diode
along with a fuse placed between the microcontroller and the battery, to stop
current and voltage back up.



                     Power
                    Regulator



                                                                     LCD
                                               R1
                                                                 Actuator 1
                                               R2

                                                                 Actuator 2
                                               R3

                                                               Temp. Sensor
                                               R4

                                                                RPM Sensor
                                               R5

                                                                RPM Sensor
                                               R6

                                                                Heart Sensor
                                               R7

                                                                   Microcontroller
                                               R8




             Figure 2-17: Power Supply Primary Source is a Battery


The second way to create the power circuit is to use the battery as the primary
source and use an alternator as the secondary source to charge up the battery,
displayed in Figure 2-18. The battery will power all the components that need to
be powered, and the alternator already has a converter built inside) will be
connected to a regulator, which will then be connected to the battery. The
regulator will let the generator know when the battery is completely charged.




                      Approved for public release; distribution is unlimited.
                                               47
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007




                                     Power Regulator




                                     +     -       +



                                                                                 Fuse
                                                                                        Microcontroller

                                                                                          Actuator 1

                                                                                          Actuator 2


                                      C1                   C2                            RPM Sensor
                                +                      +        Batt
AC
                                 -                     -
                                                                                        Speed Sensor

                                                                                        Temp Sensor

                                                                                         H.R. Sensor

                                                                                           Display




Figure 2-18: Power Supply Primary Source Battery & Secondary Source Alternator


The third way a circuit can be powered is having the battery as a primary source
and a generator as a secondary source, displayed in Figure 2-19. The battery will
be connected to all components that need power and the generator will be
connected to a regulator which connects to the battery. The generator’s purpose
is to charge the battery.




                      Approved for public release; distribution is unlimited.
                                               48
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007




                                     Power Regulator




                                     +     -       +

            DC
                                                                                 Fuse
                                                                                        Microcontroller

                                                                                          Actuator 1

                                                                                          Actuator 2


                                      C1                   C2                            RPM Sensor
                                +                      +        Batt
DC
                                 -                     -
                                                                                        Speed Sensor

                                                                                        Temp Sensor

                                                                                         H.R. Sensor

                                                                                           Display




       Figure 2-19: Power Supply Primary Battery & Secondary Generator


In summary, the advantages and disadvantages of the component in the power
supply are known when selecting the appropriate circuit for the bicycle.

2.6 HEART-RATE SENSORS
A heart-rate monitoring system was incorporated into Digi-Cycle so that the rider
can view his or her current heart-rate which is viewed as a heart-beat per minute
rate. In researching the various technologies that are used for heart monitoring,
there seemed to be many alternative approaches towards implementing this
sensor detecting system. There are many types of heart-rate monitoring systems
out in the market today each having different methods for detecting the pulse or
heart signal. Some heart rate monitoring systems detect the blood flow in the
capillaries of a finger while others detect the blood flow from the ear lobe.
Usually, the sensors that detect pulses from these regions are infrared. Electrical
detection of heart signals can be taken from the hand or the chest area. This
electrical detection is also known as the Electrocardiogram (EKG) signal. The
chest area gives out a stronger heart beat pulse, but it was unlikely to implement
this for Digi-Cycle as it would need to be more user-friendly like the handgrip
style heart-rate sensor approach found on treadmills, recumbent and upright
bicycles in sports health clubs where the users would place their hands on two
contact metal plates and a heart rate monitor would sense the electrical signal
that triggers the heart muscle. We investigated the different technologies used

                      Approved for public release; distribution is unlimited.
                                               49
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


for heart-rate monitoring to see which would be most appropriate for Digi-Cycle.
The several technologies that were investigated were the infrared, electrical, also
known as EKG, and wireless monitoring systems.

2.6.1 Heart-Rate Systems and Functions
In order for us to have achieved a heart-rate monitoring detection system we had
to understand how it worked and how we applied it to Digi-Cycle. Many people
today have used heart-rate monitors at least several times in their lives. For
example, when you go to the gym there are hand grips with metal plates, where
the user would place their hands on, and the screen would then show your
approximate average heart-rate. Being that Digi-Cycle closely resembles the
type of configuration seen in stationary bikes, Digi-Cycle has two contact metal
plates on the handle bars. So far, this seemed to be most feasible in that, first, it
is more convenient for the rider since his or her hand will be on the handlebars
anyway, and secondly, because it would be more practical and safer to have it
this way as opposed to having wires attached to your chest or arms which is an
obvious disadvantage. However, research shows that a better signal can be
obtained from the chest which would give a more accurate reading which is a
major reason why other types of systems will be investigated.

There are many systems that require holding their finger on an infrared sensor to
detect the time intervals in which there is a fluctuation of blood flow. However,
the user must stop exercising and hold their finger on the sensor and be very still
while measuring their heart rate. Some systems would require the user to place
their finger in between two infrared sensors that would fit closely around the tip of
the finger. Other variations have a small glass like window that where the user
would place one of their fingers on to softly. A huge misconception most people
have is to press firmly on the device for accurate readings, which is not the case.
They inadvertently cut off a small bit of circulation squeezing the capillaries to
tight which causes false readings. This too must be taken into account when
designing our heart rate system for Digi-Cycle. This type of system, however,
would not be appropriate for Digi-Cycle because, as previously mentioned,
stopping while riding the bike is not very convenient for the rider. For this system
to work properly, the user would actually have to stop pedaling Digi-Cycle for this
type of system to work correctly.

All heart rate monitors detect the heart beat and send an electrical signal with
each beat to the electronic circuitry of the monitor. In designing a heart rate
system, a timing circuit would most likely be used to measure the interval
between each beat. It would then take the average of the time interval and
convert this signal and time interval into a heart rate reading which would be
displayed on the LCD as the number of heart beats per minute. Also, since the
frequencies of the human body are very low, ranging anywhere between 50 – 70
Hz, several op-amps will need to be incorporated into the design in a certain



                       Approved for public release; distribution is unlimited.
                                                50
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


configuration to amplify this very low signal. More about this will be discussed in
the design and implementation of the heart rate sensors with the microprocessor.

The LCD would not display the exact heart rate for each single beat since the
heart is not an electrical unit and is purely an analog signal and the interval
between each consecutive beat will most likely vary. Most heart-rate monitors
take several readings and then take the average of them since the intervals
between each beat varies. Depending on the type of system, it would take the
average during a time period of approximately 5 to 20 seconds and output the
average number of heart beats per minute accordingly. Therefore, the heart rate
output reading displays this average and remains constant until the system is
updated with the next average.

2.6.2 Different Heart-Rate Detection Technologies
As previously discussed, the most significant difference among all of the types of
heart rate monitoring systems is the approach used to detect the pulse or heart
signal. One way to measure heart rate is by detecting the blood flow in the
capillaries of a finger or in the ear lobe with an infrared sensor. Another method
is by an EKG electrical signal in the hand area. Detection of your heart beat in
the chest area with electrodes is used as well. Finally, wireless would be a
possible approach for added convenience. There are several advantages and
disadvantages with each type which needs to be examined for our purposes
before choosing which design approach to use. This investigation of the different
heart monitoring systems will help us to choose which type of system would be
best to design for Digi-Cycle. The most crucial criteria we will be focusing on is
that this system must be able to operate and withstand moderate outdoor
weather conditions because although the Digi-Cycle closely resembles the
operation of a stationary bike, these bikes operate indoors and Digi-Cycle will, of
course, be used outdoors.

2.6.3 Detection by Blood Flow in the Capillaries
One of the types of monitors contains an infrared sensor on a device which could
be like a watch or a little handheld type unit. The user would place their finger on
a glass like window and the infrared sensor detects miniscule changes caused by
the blood that is pulsing in the capillaries with every heart beat that occurs.

The major disadvantage towards using this system is that any slightest change in
motion can cause different fluctuations in the pulses of blood flow. False
readings would occur, which definitely excluded this option for use in the Digi-
Cycle project, since the user will always be moving when riding the bike. It would
be very inconvenient for the cyclist to stop riding the bike and stand completely
still just to check the heart rate. We are looking for an approach that would allow
the user to check the heart rate while riding.



                       Approved for public release; distribution is unlimited.
                                                51
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


Another type of infrared system would have the sensor placed on the ear lobe
with an ear lobe clip. You can find these ear lobe clips on the handle bars of
many exercise bikes, treadmills and stair-master machines in a health fitness
club which is why this type of system was considered for our design. The
advantages to using this system is that first, this system seems better than the
first, since you can clip them to your ears before riding and you are completely
hands free. Secondly, it would be ideal for multiple users since this type of
equipment would be permanently attached to the handlebars.               A major
disadvantage however is that head motion or the changing of the light setting can
cause errors. Another disadvantage is that most people would find the wires
hanging from their ear lobes to the bike quite bothersome and distracting and can
interfere with their riding experience and can significantly reduce safety
conditions for the rider. Any hanging wires would simply be too messy. We want
the rider of the Digi-Cycle to be completely free.

Overall, implementing this type of system for use on Digi-Cycle does not seem
appropriate. The bike needs to allow the rider to be as free as possible as if it
were a normal typical 10 speed bike. This approach would be more suitable for a
health club exercise setting where stationary equipment is used and the user can
easily stop and check their heart rate.

2.6.4 Detection by Electrical Heart EKG Signals with Hand Grips
These types of systems can sense the electrical signal that triggers the muscles
of the heart. These signals are strongest in the chest area, since that is area
where the heart is closest to. However, these systems can detect these
electrical signals in the hand area via two metal contact plates. So far, this
approach seems best. The suggested hand grip style is shown in Figure 2-20.




                Figure 2-20: EKG Hand Grip Style Heart Sensors


                      Approved for public release; distribution is unlimited.
                                               52
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


Typically, heart rate monitors using this type of system have two metal contact
areas in which it is touched or grasped by the user with his or her hands or
fingers. One metal plate could be used for each hand on each side of the handle
bar. A major advantage in using this type of system is that it is very user-friendly
in that it is placed on the handlebar where the hands of the rider are anyway.
This type of system can be easily permanently mounted on the bike which makes
them instantly accessible to multiple users. A disadvantage to this system would
be that the user has to stop their hands and grip the metal contact plates. This,
however, wouldn’t matter because while the user is riding Digi-Cycle, their hands
are still and firmly placed on the handlebars where the heart rate metal contact
will be located. Another disadvantage to this system is that there is a typical
delay of a few seconds while the average of several readings is being calculated.
Again, this wouldn’t matter because the delay is so small and the rider can
continue riding and wait the few seconds will the heart beat is being calculated.
A last disadvantage is that these readings are for periodic checking while
exercising and not for continuous readings. However, this allows the user to
view their heart rate at different times during their workout and they can view how
the heart rate has progressed.

2.6.5 Detection by Electrical EKG Signals in the Chest Area
These types of systems sense the electrical heart signal in the chest area where
it is the strongest. Most systems use a form of belt or vest that wraps around the
chest where the electrodes are located. Then a transmitter, which is usually
attached or built into a chest strap, sends the heart EKG signal to a receiver that
would be mounted on the bike.

One great advantage is that this type of system is the most accurate and reliable
above all others. People could also find this system easier to use since they can
wear the device while riding which in turn would allow more freedom. A huge
disadvantage however, is that this system is also inconvenient in that it actually
has to be put on underneath your clothing. We are looking for an approach that
would give almost absolute freedom to the rider where he or she can just get on
Digi-Cycle and ride. An added flaw is that this system can be interrupted by any
electromagnetic radiation from the generator of the bike and other sources of
interference that can be encountered outdoors.

2.6.6 Wireless Heart-Rate Monitors
Wireless monitors seemed appropriate, but there can be much interference when
outdoors with different types of electromagnetic radiation, especially if we are
going to make use of a generator in this project. According to research, many
have found that wireless units simply do not work within 1 foot of a video screen
or within a close range of an electric motor. Other factors such as coming within
a close proximity of power lines can cause false readings as well. Also, if users
come within a close range of each other false readings will occur. If multiple


                       Approved for public release; distribution is unlimited.
                                                53
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


riders using different Digi-Cycles come within close proximity of each other, that
could cause added interference during the ride.

2.6.7 Accuracy
Most of the heart rate monitors found in the market are reasonably accurate as
long as the selected system is used in the manner in which it was intended. Our
design of a simple heart rate monitoring system will also have to take into
account the accuracy of the systems ability to measure heart rate. The accuracy
of the timing will be discussed in more depth under the design and
implementation section of heart rate monitors.

2.6.8 Reliability
The reliability of the heart rate monitoring system was addressed when designing
the system. For example, when using the hand grip electrical system, grasping
the metal contact points too hard could cause faulty readings. Many people think
that the harder they grasp the heart rate sensors the better reading they will get.
This simply is not true since squeezing too hard causes more strain on the veins
in the finger which cuts off circulation of the blood to the capillaries which would
cause errors in the detection.

2.6.9 Resistance to Water
Water can cause faulty reading in any of the above systems. Factors such as
rain and perspiration could cause problems in detecting heart rates. Although
precipitation raises some concerns, most people simply do not ride their bikes
out in the rain, so rain should not cause much of a concern in that respect.
However, when storing the bike the user should be careful not to leave it outside.
We will most likely have to consider making some type of covering for the heart
rate sensors in the event sudden rain occurs. Perspiration, while riding the Digi-
Cycle, can accumulate around the surface of the metal contact plates. This can
cause faulty readings in that the layer of perspiration between the hands and the
metal plates adds a resistance.

2.7 TEMPERATURE SENSORS
The Digi-Cycle system is required to display the temperature of the surrounding
environment. The use of this information is strictly for the user to see and does
affect any other component within the system. Our temperature domain
environment is any temperature that is naturally reasonable for bicycling, i.e.
from 0o Fahrenheit to +120o Fahrenheit. Since the temperature sensor does not
feed or act on any other component in the system, the accuracy of this
temperature is not considered a crucial matter and therefore can allow for less
stringency in selecting a component. The output voltage of any device could be
in relation to either degrees Celsius or degrees Fahrenheit. For our purposes,
we will need a Fahrenheit temperature to display to the screen, but during
operational computations either one of these will work, and if Celsius is in use it

                       Approved for public release; distribution is unlimited.
                                                54
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


can be easily converted to Fahrenheit in software. We will also consider the
possibility of using devices which are compliant to the European Union’s
Restriction of Hazardous Substances (RoHS) law in case this product is ever
considered for production or distribution to the European Union.

2.7.1 Types of Sensors
While looking into the possible suitable solutions for temperature sensing we find
four types of temperature sensors sufficient for further investigation. These
include the silicon band gap temperature sensor, the thermo coupler, the
thermistor, and the resistance temperature detector.

2.7.1.1 Silicon Bandgap Temperature Sensors
The most widely used type of temperature sensor is the Silicon band gap
temperature sensor. This sensor uses the forward voltage of a temperature
dependant silicon diode to produce a voltage output based on temperature input.
Figure 2-21 shows the typical pin layout for a silicon band gap temp sensor. The
device has an input voltage Vcc (typically +5 V) and has an output voltage which
is linearly dependant upon the temperature Vo.




                Figure 2-21: Typical Silicon Bandgap Temp Sensor


The sillicon bandgap temperature sensors are created such that the way you set
up this type of temperature sensor will vary the range in which it will perform.
Given an input voltage of Vcc (Figure 2-22 and Figure 2-23 show source voltage
Vcc as Vs), the device will report the temperature represented in volts to the MCU
through the Vout pin on the device. The basic setup has a shorter range for
detecting temperatures but has a slightly higher accuracy.




                      Approved for public release; distribution is unlimited.
                                               55
                                                                                       EEL4919-SU07-03 v1.0
                                                                                             06 August 2007




            Figure 2-22: Basic Temperature Sensor Setup (+5 o F to + 300o F)15


The full range setup shown in Figure 2-23 allows for greater range. The typical
full range capability of a silicon band gap temperature sensor is between -50 o
and +300 o Fahrenheit. Using the full range setup you will need to use a resistor
(shown as R1) connected from the negative source voltage to the output voltage.
The resistor will need to be of a specific resistivity. The resistance needed is
shown in Figure 2-23. Along with the setup and the resistance, and the expected
outputs are shown (shown as Vout). This shows that typically, the outputs will be
such that they reflect the temperature. Looking at this you can understand why
the temperature sensor requires the negative voltage for the full range which
includes the negative degrees.




        Figure 2-23: Full Range Temperature Sensor Setup (-50 o F to +300 o F)16


Table 2-7 shows the range of temperatures for several band gap temperature
sensors, as well as the percent error and the price. Also from Table 2-7, we see
that the average cost of a temperature sensor can be as low as $.60 and as high
as $5 per unit. Overall this device is simple, accurate and cheap. The prices
obtained in Table 2-7 were obtained from the online store Jameco, which can be
found at the web address www.jameco.com.




15
     http://www.jameco.com/Jameco/Products/ProdDS/155192.pdf
16
     http://www.jameco.com/Jameco/Products/ProdDS/155192.pdf

                             Approved for public release; distribution is unlimited.
                                                      56
                                                                                          EEL4919-SU07-03 v1.0
                                                                                                06 August 2007


          Table 2-7: Comparison of common silicon band gap temperature sensors
                                                            Max Accuracy
          Model                 Max Range                                                   RoHS?      Cost
                                                                Error
      LM335AZ IC               -55 C - 150 C                    <1 C                         Yes        .81
       LM335Z IC               -55 C - 150 C                    <1 C                         No         .67
       LM34CZ IC               -50 F – 300 F                    < .5 F                       No        4.89
       LM34CZ IC               -50 F – 300 F                    < .5 F                       Yes       4.89
       LM34DZ IC               -50 F – 300 F                    < .5 F                       No        1.99
      LM34DZ IC                -50 F – 300 F                    < .5 F                       Yes       2.25
      LM35CAZ IC               -55 C – 150 C                   < .75 C                       No        5.19
      LM35CAZ IC               -55 C – 150 C                   < .75 C                       Yes       4.14
       LM35CZ IC               -55 C – 150 C                   < .75 C                       No        4.39
       LM35DT IC               -55 C – 150 C                   < .75 C                       No        2.35
       LM35DT IC               -55 C – 150 C                   < .75 C                       Yes       2.55
       LM35DZ IC               -55 C – 150 C                   < .75 C                       No        1.79
       LM35DZ IC               -55 C – 150 C                   < .75 C                       Yes       1.79


2.7.1.2 Thermistor
 A different approach to determining the temperature for our system would be to
implement the use of a thermistor. A thermistor is a type of resistor whose
resistivity is directly dependant upon the temperature of the atmosphere it is
found in. A thermistor’s resistivity is directly related to the atmospheric
temperature it is in by the equation ΔR = kΔT, where ΔR is resistance, ΔT is
temperature and the variable k represents the offset to which the resistance is
found from the temperature17.

In implementing this device we will probably get something close to the silicon
band gap sensor, in that the output voltage is a reading of the temperature in the
area. Thermistors are relatively inexpensive and can average in accuracy
around plus or minus one to two degrees.

In Table 2-8, you see some examples of thermistors and how their prices vary.
In general its safe to say that thermistors are a cheap solution. There are many
different resistances to choose from, most of them having a percent error of ten
percent which can lead to accuracy issues in measuring temperatures. Also, on
average, the compliance with RoHS does not differ greatly in price. The prices
obtained in Table 2-8 were obtained from the online store Jameco, which can be
found at the web address http://www.jameco.com.




17
     http://en.wikipedia.org/wiki/Thermistor

                                Approved for public release; distribution is unlimited.
                                                         57
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


                         Table 2-8: Comparison of common thermistors
                              Thermistor
               Device                 %Error                                      RoHS?             Cost
      THERMISTOR,NTC,K, 1000ohm      +/-10%                                        Yes              $0.59
      THERMISTOR,NTC,K, 1000ohm      +/-10%                                        No               $0.65
      THERMISTOR,NTC,K, 10Kohm       +/-10%                                        Yes              $0.59
      THERMISTOR,NTC,K, 10Kohm       +/-10%                                        No               $0.69
      THERMISTOR,NTC,K, 100Kohm      +/-10%                                        Yes              $0.65
      THERMISTOR,NTC,K, 100Kohm      +/-10%                                        No               $0.59

2.7.1.3 Thermocouple
Another possible device we could use as a temperature sensor is a
thermocouple. Thermocouples make use of the Seebeck effect, also known as
the thermoelectric effect, measuring the amount of voltage created along an
object with a gradient temperature18. In Figure 2-24 you see an example of how
the thermocouples work by using the thermoelectric effect and measuring the
change in temperature among a material when there is a large change in
temperature along the material.




                          Figure 2-24: Example of thermoelectric effect


There are several forms of thermocouples differing in what metals are used, each
form having its own preferred use in industry. However, its uses are often seen to
be in applications requiring a larger range in temperature and not so much in
precision. Thermocouples can be a suitable means for measuring temperatures
over a vast range reaching as high as 1500o Celsius. Although its range is
impressive, it lacks precision, making it not as suitable for applications where
smaller temperature differences need to be acquired with accuracy. For our


18
     http://en.wikipedia.org/wiki/Thermocouple

                               Approved for public release; distribution is unlimited.
                                                        58
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


purposes an exact temperature won’t be crucial to have, but we won’t be
expecting our range to be anything too large.

From Table 2-9 we can see some sample thermocouples and their cost. The
price for thermocouples seems to be somewhat high in comparison to the two
previously mentioned types but still is not too far out of the question. Also note
that the compliance with RoHS appears to cost less on average than the non
compliant ones. If this type is chosen for use, the compliant version would be the
one used. The prices obtained in Table 2-9 were obtained from the online store
Jameco, which can be found at the web address http://www.jameco.com.

                        Table 2-9: Comparison of common thermocouples
                                               Thermocouple
                              Device                                   RoHS?                Cost
                        IC,AD594AQ,14-CDIP                              No                 $12.99
                        IC,AD594AQ,14-CDIP                              Yes                $10.22
                        IC,AD595AQ,14-CDIP                              No                 $13.55
                        IC,AD595AQ,14-CDIP                              Yes                $11.89


2.7.1.4 Resistance Temperature Detector
The last type of temperature sensor left to discuss is the Resistance
thermometer, also known as the Resistance Temperature Detector (RTD) or
Platinum Resistance Thermometers (PRT). This type of temperature sensor
works by using the predictable change in electrical resistance within certain
materials undergoing changes in temperatures to estimate the temperature of its
surroundings. As most can assume from the name, the most commonly used
material for this application is platinum. Resistance thermometers have a greater
stability and accuracy than thermocouples. This is because while thermocouples
use the thermoelectric effect to generate voltage, the resistance thermometer
uses the electrical resistance in a material to adjust the output voltage. This
means that the resistance temperature detector needs less source voltage. The
resistance temperature detectors are said to be slowly replacing the use of
thermocouples in all useful fields19. In Table 2-10 we see some sample RTDs
and their cost. The price for resistance temperature detectors appears to be
extremely high compared to the previous three temperature sensors. Although
they are more accurate and stable than the thermocouples, they seem less likely
to be a candidate due to its high price. The prices in Table 2-10 were obtained
from the online store sisweb which can be found at the web address of
www.sisweb.com.




19
     http://en.wikipedia.org/wiki/Resistance_temperature_detector

                               Approved for public release; distribution is unlimited.
                                                        59
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


     Table 2-10: Comparison of common Platinum Resistance Thermometers
                                  Device                                         Cost
            PTA PRT, ceramic glass coated                                       $39.60
            PTB PRT, ceramic                                                    $39.60
            PTC PRT, ceramic                                                    $53.90
            PTD PRT, ceramic glass coated                                       $66.00
            PTE PRT, ceramic glass coated                                       $40.70
            PTF PRT for Kratos MS80, ceramic glass coated                       $55.00
            PTG PRT, ceramic                                                    $85.00



3.0 COMPONENT SELECTION
This section specifies what components have been chosen for use is Digi-Cycle,
and explains why that component has been chosen over other available
components. A selected component may be specified as a part, method,
implementation, or a technology. The decision to use each component is based
on the research found in section 2.0, and critical requirements for the role which
the component will perform. Some requirements criterion includes the function of
a part, performance, dimensions and weight, attributes, cost, and durability.
Based on these assessments, the group then decided which components should
be used for the Digi-Cycle project.

3.1 MICROCONTROLLER
Although all of the microcontrollers discussed in section 2.1 have reasonably
satisfied the requirements for the Digi-Cycle project, some are better suited for
this application than others. Due to the lack of power in a bloated package, the
FreeScale 68HC11 series MCU has been the most obvious device to disqualify.
In addition, the Atmel AT89C51RC would not be a sound decision either, due to
the lack of integrated ADC.

With features aside, there are several other issues which have driven the
decision for MCU selection. The first minor issue is packaging, as a PDIP would
be preferred over other packages. The decisive issue comes down to overall
cost of development. Due to the fact that the group lacks a sponsor, and is
therefore self funded, it is important to keep project costs to a minimum. A
microcontroller programmer for any MCU is expected to cost an average of $150,
which is an excess expense that cannot be afforded at this point. Therefore, the
two MCUs evaluated from Microchip would be the strongest candidates since the
group already owns a programming board.

With all but two of the MCUs eliminated, the selection criteria must be further
narrowed. Both of the PIC MCUs can be programmed by the P16PRO40 PIC
programmer, and both support C code. However, the PIC18 series MCUs have
better support for the C language than the PIC16 series MCUs, although more
code has been developed and is available for the PIC 16F877A. It is currently

                      Approved for public release; distribution is unlimited.
                                               60
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


intended for the Digi-Cycle project to be programmed in C, thus the PIC 18F452
is the preferred MCU from this category. Additionally, PIC16 and PIC18 series
MCUs have a high portability rate for code between the two families, making it
easy to adapt code written for a PIC16 to a PIC18.

Another advantage that the PIC 18F452 has is that, besides the PIC
programmer, the group also possesses a proto board for this device. This board
has several buttons, a potentiometer, a temperature sensor, LEDs, and an LCD
already interfaced to the MCU, making rapid prototyping of some of Digi-Cycle’s
various subsystem software simple and time efficient. This system has also
been used by some of the group’s members in the past, increasing the familiarity
with the system.

Overall, the PIC 18F452 is the strongest candidate for the Digi-Cycle project,
which is why it has been selected as the MCU to be used in the system. It is one
of the top performers, is sufficiently equipped, easy to code, and cost effective to
develop for. Although the chip has been discontinued from production, the chip
is still for sale from many vendors, and is also still available for sampling through
Microchip. The Digi-Cycle group has obtained several 18F452 microcontrollers
through both sampling, as well as through purchases for previous projects, which
is expected to be enough units to see the group through to the completion of the
Digi-Cycle project.

3.2 RPM SENSORS
There are several important performance specifications to take into consideration
when searching for an RPM sensor. Some of these criteria include rotary speed
range, linearity, precision, and accuracy. Rotary speed and linearity are related
in that their ranges are linked. In rotary speed sensors, the speed is measured in
revolutions per minute. This is very useful for gear and belt speed detection. In
linear speed sensors, the speed is measured in inches per second. The
accuracy is measured as a percent of the full-scale range of the sensor range20.
It is a comparison of the speed sensed and the actual speed. The lower the
percentage is, the more accurate the device is.                Important electrical
specifications to consider when searching for speed sensors include the power
and output requirements. Common outputs include resistance, voltage, current,
frequency, switch output, serial, and parallel20.

Hall Effect sensors detect the presence of magnetic field intensity from a magnet.
The advantage of the Hall Effect sensors is that they are highly durable in rough
terrains. Since they are used for detecting magnetic fields, dirt, dust, perspiration
and oxidation do not pose a considerable threat to its operation. The types of
Hall Effect sensors that were investigated were the variable reluctance with zero



20
     http://sensors-transducers.globalspec.com/learnmore/sensors_transducers_detectors/velocity_sensing/

                               Approved for public release; distribution is unlimited.
                                                        61
                                                                                       EEL4919-SU07-03 v1.0
                                                                                             06 August 2007


cross detection, the single-element Hall Effect sensors with zero cross detection,
and the zero speed differential Hall Effect sensors with offset level detection.
Among those three, the differential hall-effect sensor with offset level detection is
used for applications concerning RPM, speed, and motion. This type of Hall
Effect sensor seemed to be more favorable for our application.

Photo-reflective sensors do not indicate direction and they could be very useful
towards our application in that they provide simple non-contact sensing of shafts
and rotating objects. Photo-reflective sensors are digital and provide a single
digital output pulse in response to an incremental movement of an object.
Objects that are very shiny or that are highly reflective like a mirror, or a polished
metal can provide a challenge to a photo sensor. These objects can reflect just
enough light to give false readings to the sensor. Since a significant amount of
light could be reflected from an object, the receiver may not realize that the laser
beam has been interrupted and the sensor doesn’t properly identify that the
target, the reflective tape, has passed. Some manufacturers have dealt with this
problem by incorporating a polarization filter, which allows only light reflected to a
specially designed reflector to be received, and thus safeguarding against false
reflections from the object21. An added disadvantage to this type of sensor
technology is that since Digi-Cycle will be used primarily outdoors, and this
technology does not seem to be quite suitable for our purposes since the
environment can be very rugged and Digi-Cycle will inevitably collect a
considerable amount of dust and other sorts of contaminations.

Inductive sensors could definitely work well in our application. Unlike Hall Effect
sensors which are used to detect a magnetic field from a magnet, inductive
sensors are primarily used to detect the presence of a metal. They are non-
contact devices that set up a radio frequency field with an oscillator and a coil.
An inductive proximity sensor has an LC oscillating circuit, a signal evaluator,
and a switching amplifier. The coil of this oscillating circuit generates a high-
frequency electromagnetic alternating field. Many fitness equipment machines
utilize this approach. However, attaching a Hall-effect sensor to the frame of the
bike and a magnet to the wheel itself seems to be our desired approach.

In comparing the different types of sensor technologies that would be most
appropriate for our design, the differential Hall Effect sensor with zero cross
detection seems to be the most desirable choice. The major factor towards our
decision is that Hall Effect sensors, as opposed to the Photo-reflective or optic
sensor, is again that it can handle a more severe and rugged environment.
Since optic and photo-reflective sensors are light induced there could be the
possibility of false readings due to sunlight reflecting off the metal frame of the
bike or other types light reflection.



21
     www.cherrycorp.com/cherry/Hall_effect_severe_environment.pdf

                             Approved for public release; distribution is unlimited.
                                                      62
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


3.3 DISPLAY DEVICE
After looking at all the information we collected regarding possible display
devices, we managed to make a decision based upon possible need, ease of
use, and cost. The order in which those items are listed in that list does not
reflect the importance each item plays in determining which device to choose. All
options mentioned in the research will need to be evaluated to make the best
decision.

The first decision we had to make was whether to use an LED or an LCD. In this
comparison we look at the overall possible use each device will have for our
system. Both forms of LED are very cheap to obtain and appear to be relatively
simple to use, providing an ASCII to text translator is created. The first device
we look at is the 7-Segment LED display. This device has the ability to display
any digit zero through nine. This would be sufficient for displaying any data our
system could create. Unfortunately that would force us to make the labels on the
outside of the display. In order to keep that possibility open, we will discard the
possible use of the 7-Segent LED display device.

Now we move on to the dot-matrix LED display. This device has the ability to
display any alphanumeric character whose limits vary with matrix size. This will
also be sufficient in showing any possible data the system creates and has the
possibility to be used as labels. Though using the dot-matrix LED display for
labels as well as displaying the data would require a very large dot-matrix LED
display. The size we would need does not exist as a single device. Even the
larger dot-matrix LED displays are not even big enough to display all the
information we have and their labels with just one device. Multiple devices would
be needed and that would mean that a set of LED devices will need to be set up
adjacent to one another forming a matrix of LED devices in itself. The use of a
system of this caliber would quickly become complicated, and so with many other
devices available that can display large amounts of data with relatively simple
means we will discard the dot-matrix LED display as a possibility for the display
module of our main system. By choosing not to use any form of LED we remove
any possibility for having to create an ASCII to text translator, also reducing the
amount of work needed for the end product.

The LCD in general has the capacity of displaying large amounts of data with a
relatively simple means. Regardless of which communications type or which
display type we choose, the LCD appears to be the best solution for the display
needs of our system. The next thing we will need to consider in order to make a
decision is what communication type will better suit our needs.

The parallel LCD is the first thing we will consider. This LCD type is the cheaper
type of the two and by a substantial amount. To add to the difference in price is
the fact that the parallel LCD device can transmit whole characters at one time.
This means that this device will have the ability to transmit the information to the


                       Approved for public release; distribution is unlimited.
                                                63
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


LCD controller much faster than the other option. However, the speed of the
serial device is measured in bits per second. In most devices this measurement
ranges between twelve hundred and twenty thousand bits per second which is
more than sufficient for our needs. So the increase of speed is not a concern in
the decision making process. The last thing to mention about the parallel LCD is
the pin layout it uses. Using eight data pins raises the required I/O pin count of
the main processing unit. The main processing unit has a limited number of I/O
pins and not knowing how many I/O pins the rest of the system will need leaves
us to assume that we will need to preserve I/O pins. All this being said, we will
add the parallel LCD communication type as a final candidate for our system.

The serial LCD is the next and also the last communications type available to
look at for consideration. This communications type is also the most expensive
out of the two. Using serial communication between the main processing unit
and the LCD controller allows us to shorten the number of I/O pins required to
display the needed information. This should lighten the need of I/O pins on the
main processing unit by a substantial amount.                 The use of a serial
communications type requires the team to familiarize itself with the use of
transmission frequencies between two devices. This has the possibility of
becoming difficult although is not predicted to be so. Furthermore, the serial
communications type has the possibility of using controller side logic assistance
such as the “Backpack” which can possibly add ease of use in the development.
The serial communications LCD display appears to be the best choice of the two
in that it has all the abilities the other choice has but requires less I/O pins and is
fast enough to operate effectively for our needs. We will add the serial LCD
communication type as a final candidate for our system as well.

The next decision to be made in choosing the best LCD display for our system is
choosing between using text inputs or graphical inputs. This decision is really
quite trivial and truly depends on the proposed display setup the team wishes to
implement. For most cases, the textual input LCD would be sufficient in getting
the data and the labels displayed properly to the end user. Choosing to
implement the graphical LCD display over the textual LCD display would allow for
the displaying charts such as a heart rate log or a terrain difficulty log. This
information could be useful to the end user but its implementation has not yet
been discussed. Knowing that the possibility of some day needing the plots
exists, it is best to choose to implement the LCD that allows it. Using a graphical
LCD has the possibility of being more complicated to learn and develop with than
the textual LCD, but the possibility for the greater end-user interface is worth the
trouble.

One of the requirements developed for this system is the ability to use it at night.
This requires the use of several lights to be present on the dash of the console or
the use of backlights in the LCDs. Given that the difference in cost to have a
backlit LCD is minimal, that the change in ease of use will hardly be noticeable,
and that a requirement to use such a device is present leaves us to conclude that

                       Approved for public release; distribution is unlimited.
                                                64
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


a backlight will be used on the LCD. This will ensure that the end-user will have
full use of any and all of the system’s features in a late night ride.

Lastly, we need to answer the question of whether to use a color LCD display or
a standard black and white LCD display. The difference in price between color
and black and white is substantial enough to make a profound impact in our
budget, ranging up to a hundred dollars more than its black and white
counterpart. The change in difficulty in using a color LCD as opposed to a black
and white LCD also increases not so much in logic but in detail needed to make
the objects displayed appealing to the eye. This is also a very trivial decision in
that it does not directly affect the end-user’s ability to perform any of the system’s
functionality. Being that it does not add any functionality to the system and the
price difference is substantial, it would be unwise to choose to use this
technology. This being said, we will exclude the possibility of using a color LCD
and instead uses a black and white LCD display device for our system.

Given that all the specifications of the device to be used have been defined in
this section, we are able to now look for a device which fits the description.
Using the online store Jameco, we located a Matrix Orbital graphical serial LCD,
also available in parallel. Both of these devices allow for a maximum of forty by
eight lines of graphics text at a maximum font of five by seven points. Both
devices have on-board logic interface that has the ability to control backlighting.
The on-bard interface also has auto line wrapping, auto scroll, and has the ability
to graph bar plots, control contrast ratios, display large digits or show multiple
displays. The pixel layout for this device is two hundred and forty by sixty four
pixels. The serial LCD has the option to read input serially between twelve
hundred bits per second up to nineteen thousand two hundred bits per second
configurable by a jumper. The required current for the backlighting is a hundred
and sixty milliamps, and the power requirements for the display device are five
volts DC, at thirty one milliamps. The dimensions of this visible display are five
and two tenths inches long by one and a half inches wide and the dimensions of
the module are seven and one tenths inches long by two and six tenths inches
wide by seven tenths inches tall and the overall weight of this device is nine
tenths of a pound. In making final choice between the two devices will come
down to funding. We as a group have concluded that the serial LCD that would
have been considered is out of our budget so we will make do with its parallel
counterpart. This should prove to be a sufficiently capable device in providing for
our needs.

3.4 ACTUATORS
Given the long list of possible actuator solutions presented in section 2.2, it has
been determined that the best results can be achieved using a standard DC
Motor solution with a feedback control system. Although they can be slightly
more difficult to control when compared to other actuator solutions, standard DC
motors are common, inexpensive, and often produce more torque than their

                       Approved for public release; distribution is unlimited.
                                                65
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


more highly tuned counterparts. Despite the lack of integrated control methods,
using a standard DC motor allows greater flexibility in the system design, as the
gearing and feedback systems can be individually selected to suit the application
instead of using a pre-made package.

3.4.1 Feedback Control
The addition of a feedback control circuit or device will essentially allow the DC
motor to behave similarly to a servo motor. A sensor will report back to the MCU
with either analog or digital readings which will correlate to actuator positions or
states. With this information, the MCU can then determine when to stop the
motor, and possibly even maintain the motor’s position should the derailleur
become displaced by any sudden bumps or jerks. Another advantage is that the
actuator would be self calibrating/aligning. If the motor “skips” for any reason,
the actuator will not turn off prematurely and leave the bicycle stuck in between
gears. Feedback control allows the motor to behave like a servo motor, but with
the freedom to hand select the parts used in the setup to ensure that the actuator
used is the optimal configuration for the task.

A potentiometer has been selected over other methods due to simplicity of
design and a greater level of reliability. This method has been selected over
other possible solutions such as opto-couplers, inductive feedback, and micro
switches.

Although simple to implement in a digital system, micro switches would increase
complication of mechanical design since they would need to be mounted in tight
tolerances at each possible position the derailleur would be expected to stop at.
In addition, there is the issue longevity. Some type of spring would be required
to trip the switch in order for the derailleur to have the possibility of pressing a
switch, yet have the potential to continue in motion past that point.

Another possible method for feedback control of DC motors would be through the
use of opto-couplers. The MCU would know that the motor has reached the
correct position when either a beam of light or IR has been detected by a
receiver, or when a beam has been broken, and a connection has been lost.
This method would alleviate some of the mechanical design, as does not need
physical contact. However, this method would also be sensitive to light and/or
heat, and is also susceptible to obstruction by dust, all of which the system will
be exposed to.

One additional solution would be to use a form of inductive device, such as a Hall
Effect sensor, to detect a change in density or presence of metallic or magnetic
bodies. The simplest and most effective method in this category would be to use
a Hall Effect sensor to track the position of a series of holes drilled in a piece of
mechanical linkage. Although this method has its obvious advantages over other
inductive methods, the devices required would be more costly than solutions
from previous stated solutions. In addition, the sensors required would have a

                       Approved for public release; distribution is unlimited.
                                                66
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


greater physical size than devices such as micro switches or potentiometers, and
would take more research to determine the correct response characteristics for
the various states the device will be expected to report on.

This leaves the potentiometer as the final device considered. Potentiometers are
commonplace, easily obtained, and low cost devices which can be physically
compact, and offer a wide range of operating values ideal for an application such
as Digi-Cycle. A potentiometer can be linked to the motor’s output through a
simple gearing system, and would spin a fixed and easily calculated amount per
revolution of the motor. The MCU would simply monitor the GPIO pin connected
to the potentiometer, and when the analog input value reaches a pre-determined
level, the MCU would cut power to the DC motor, and optionally lock the motor’s
position if so equipped.

3.4.2 Actuator Implementation
In order to ensure that enough torque can be produced by the motor, the motor
must be implemented by connecting directly to the derailleur. This may be
accomplished by first eliminating the shifter cable and return spring to reduce the
demands on the motor, as the addition of a motor will eliminate the need for
these devices in the first place. The rotation of the motor’s output shaft will be
harnessed by Digi-Cycle to move the bicycle’s derailleur through the use of worm
and pinion gears. A worm gear most closely resembles a screw, and when
attached to the motor’s output shaft, can convert a rotating force into a linear
force. An added advantage of this setup is that, like any gearing system, it can
increase the amount of torque output by the motor in exchange for less motion
on its work per revolution. Worm gears further simplify the addition of a
potentiometer to be use for feedback control, requiring only an additional pinion
gear to be placed on the potentiometer. Worm gears can be made from a wide
range of materials ranging from steel and brass to PVC, Nylon, and other
polymer plastics. Although longevity will be a factor with any plastic gear in such
an application, a Nylon worm gear would be ideal since they are common,
inexpensive, and have less friction reducing the need for lubricants. The fact that
nylon gears are more fragile than their metallic counterparts is also
advantageous. If the system is put under severe strain, something is likely to
break. In the case of a metallic gear, all of the strain is transferred to the pinion
gears, derailleur, and motor, and the motor is likely to burn out since it would
have the most “give”, which would be somewhat costly to replace. If a nylon gear
is used, the inexpensive nylon gear would be the most likely to break, saving the
rest of the system.

3.5 POWER SUPPLY
A power system can be assembled in many different ways. There are many
concerns when selecting a power supply for Digi Cycle. High current at short
intervals, stable output power, manufacturing costs, and external dimensions are
many factors to consider when designing a power supply.

                       Approved for public release; distribution is unlimited.
                                                67
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


One important factor to consider when selecting a power supply for this project is
the current. The current must be able rise at a fast pace for a small amount of
time. This feature is needed to operate the step motors, which shift the gears
from one state to the next on the bike. A stable output power is another
important characteristic when searching for a power supply. Steady output
power allows bike to operate efficiently. The out power must be able to provide
the bike the steady power throughout an entire bike ride. The cost is another
consideration when selecting the components in the power supply. Digi-Cycle
may want to promote this item later in time, and manufacturing cost would come
into effect. The last consideration is the dimensions in size of the components on
the power supply. The bike must be kept in an upright position when in operation;
therefore the components on the bike must be small in mass and light in weight.

3.5.1 Assortment of Power Supply
After researching the key factors of the power supply, there are several types of
power supplies considered for this project. All power supplies have a primary
source (main source of power) this is the source that runs power to the entire
circuit. This power needs to be able to spread throughout the entire circuit
continuously, therefore the source power generated must be greater then the
power in take of the entire circuit. However, if the source power is significantly
higher than the power intake, extra components are needed to use the power
that was generated, given that the energy created has to be consumed. If the
source power does not have enough energy to run the entire circuit continuously,
a secondary power supply may be used to help operate the circuit. The supply
may be connected to the components that need the additional power, or can be
connected in series/parallel to the primary source (which creates the additional
power).

3.5.2 Primary Source Battery
Digi-Cycle has the option of selecting a power supply with a battery as the only
and primary source in the circuit. The battery will connect to each component in
the circuit, using resistors and Zener diodes to regulate the voltage and current
entering each component. Furthermore, for safety there will be a Zener diode
along with a fuse placed between the microcontroller and the battery, to stop
current and voltage back up. To power all the components in the circuit the
battery has to generate a voltage around 12 Volts and a current around 1 amp.
There are many different battery types to select from when choosing a battery for
the system. The three main types the Digi-Cycle is considering is: lead acid,
NiMH, and Li-Ion.

The first type being considered for the power supply is the lead acid battery. This
battery can create large amount of power in a short amount of time. This is
suitable for the step motors, since they need abundant power for gear shifting.
This battery type also has a large capacity, which will allow the bike to be in
operation for long periods of time. Another advantage of selecting this battery

                      Approved for public release; distribution is unlimited.
                                               68
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


type for the power supply is it has low manufacturing cost and can be purchased
at a variety of retailers. The major disadvantage about this battery type is the
size and weight of the battery. An average lead acid battery weight range is
between 5 and 10 lbs, and the dimensions are too large for the bike. The battery
would have to have a rack mount on the bike so the bike will be able to balance
when operating.

The next battery type considered for the power supply is the NiMH. One
advantage of selecting this battery type is it has a high capacity level; this feature
will allow the bicycle to operate for longer periods. The battery type is low in
cost, and easily accessible. The last advantage is the battery has a large
tolerance level to deal with the bicycles outside surrounding. A disadvantage
when selecting the NiMH battery type is the self discharge rate is high. This is
due the energy used by the oxygen cycle at high states of charge. The
contribution to self discharge from the oxygen cycle is around 70% state of
charge.

The last battery type being considered for the power supply is the Li-Ion. There
are many advantages of using this battery type in the power supply. Lithium is
lightweight and is a highly reactive element which means a lot of energy (the
amount of energy produced) can be stored in its ionic bonds. Therefore, the
energy density is very high for lithium ion batteries. The battery can store 150
watt-hours of electricity in 1 kilogram of battery. Furthermore, the high cell
voltage is 3.6 volts which allows battery packs to be designed with just one cell.
A battery that creates a lot of energy and is light weight is plus for the bicycle.
The bike will be balanced and able to operate for long periods. Another
advantage is the battery packs are often smart; they can be programmed to
control settings, and to display information. This would be helpful, if the user got
a sign when the battery is almost discharged. Other advantages are low self
discharge and no memory effect. The discharge on this battery type is only
about 5 percent per month. Other batteries lose around 20 percent charge per
month. Also, the battery does not have to be completely discharged before
recharging due to the memory effect. One disadvantage of using this battery in
the power circuit is that it has to have a charger built just for the battery. The
circuit inside the battery pack is the cause for the individual charger. Another
disadvantage is the voltage is not constant it varies within 2 volts. If the battery
type is used as a primary source this could be a problem, since some of the
components only take a maximum of 2 volts. The price is of this battery type is
another concern. The price a Li-Ion battery is 3 times more then the price of
other types of batteries.

3.5.3 Primary Source Battery and Alternator Secondary Source
The second way to create the power circuit is to use the battery as the primary
source and use an alternator as the secondary source to charge up the battery.
The purpose of the alternator is to charge the battery. To obtain this action, the


                       Approved for public release; distribution is unlimited.
                                                69
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


alternator will need to create a larger voltage than the battery. The battery will
power all the components that need to be powered, and the alternator already
has a converter built inside) will be connected to a regulator which will then be
connected to the battery. The regulator will let the generator know when the
battery is completely charged.

There are many advantages of using an alternator as a secondary source in the
power system. The first advantage of using an alternator as a source is that the
voltage can be accurately controlled with a solid state regulator. Since, a lot of
the components in the power system operate on low power; the voltage must be
stable and synchronized. A bike will operate at low to medium speed therefore;
another advantage of the alternator is its output current is produced at low
revolutions per minute. Next, an alternator can produce charging current to other
sources at low revolutions per minute.

There are a couple of disadvantages of having an alternator as a source in the
power circuit. One disadvantage is additional parts may be needed to change
the output power of the alternator from AC to DC. Another disadvantage is the
ability to locate a small size and light weight alternator to fit on the bicycle.

3.5.4 Primary Source Battery and Generator Secondary Source
The third option in selecting a power supply is have the battery as a primary
source and a generator as a secondary source. The battery will be connected to
all components that need power and the generator will be connected to a
regulator which connects to the battery. The generators purpose is to charge the
battery. There are a couple advantages of choosing a generator as a power
source. The first advantage is that the voltage and current can be controlled and
regulated. The second advantage is that a generator can produce high current
and high voltage. The third is the current is a true DC source.

3.5.5 Chosen Circuit Type
The power supply chosen is a battery as a primary source, and a generator as
the secondary source, shown in Figure 3-1. The purpose of the generator is to
charge the battery. The battery will connect to each component in the circuit,
using resistors and Zener diodes to regulate the voltage and current entering
each component. Furthermore, for safety there will be a Zener diode along with
a fuse placed between the microcontroller and the battery, to stop current and
voltage back up. There will be two 6 volt generators (in series) connected to the
battery. A regulator will be placed in between the generator and battery to let
generator know when the battery is completely charged. The power supply was
chosen because of the battery needs an additional source to operate the bike for
long periods of time. The additional secondary source chosen was the
generator. This source was chosen for a variety of reasons: steady state power,
size and weight of the generator. The generator is approximately 4 inches in
length and 2 inches in diameter, and the weight is around 3lbs.

                      Approved for public release; distribution is unlimited.
                                               70
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007



                                      Power
                                     Regulator


                                     +    -      +

            DC
                                                                                Fuse
                                                                                       Microcontroller

                                                                                         Actuator 1

                                                                                         Actuator 2

                                     C1                  C2                             RPM Sensor
                                 +                   +        Batt
DC                                                                                     Speed Sensor
                                 -                   -


                                                                                       Temp Sensor

                                                                                        H.R. Sensor

                                                                                          Display




                              Figure 3-1: Power Supply


In summary, the power supply chosen will have a battery as the primary source
and generator as a secondary source. The NiMH battery will be connected to all
components that need power and the generator will be connected to a regulator,
which connects to the battery.

3.6 HEART RATE MONITOR
In choosing the appropriate type of system for our design we had to take into
account the typical situations and environments that the rider will encounter while
using Digi-Cycle. The heart rate sensor of choice must not be sensitive to
perspiration. Rain will be an issue since it could happen unexpectedly. The user
must also have as much freedom as possible as if the rider were using a regular
bicycle. The device must be user-friendly were it will not be uncomfortable to use
and must be conveniently accessible. All these criteria influenced our decision in
our design approach.

3.6.1 Infrared Sensor Approach
We found that infrared types of systems can be greatly affected by several
disturbances. Infrared heart sensors are very vulnerable to any movements
since they measure fluctuations in the blood capillaries. For the ear lobe type of
system any head movements can cause faulty readings. The rider of Digi-Cycle
will be looking around as he or she rides. This system would not allow the user

                      Approved for public release; distribution is unlimited.
                                               71
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


to be free to move the head so this option is not likely to be chosen for our
project. With the infrared sensor used at the tip of the finger, any slight motion
also causes faulty readings. With this system, the user would have to actually
stop and use the device in order for it to work properly since motion would cause
erroneous readings. This system would simply not be acceptable since it is not
convenient for the rider to stop and measure their heart rate. This would be
allowable for fitness equipment applications but not for Digi-Cycle.

3.6.2 EKG Chest Area Approach
This approach seemed like a good idea in that this option provides the most
reliable and accurate readings due to a vest or belt with electrodes detecting the
heart beat by the chest area where it is the strongest. However, we felt that this
would not be comfortable for the rider and perspiration, while exercising, would
affect the results especially since people perspire mostly around the torso and
chest area.

3.6.3 EKG Hand Grip Approach
Incorporating a hand grip type approach sounded optimal in that two metal
contact plates would be placed on the handle bars. The user’s hands will grip
the handle bars while riding anyway which seems like the perfect approach. The
EKG signal is not as strong in the hands as it is in the chest area, but circuit
conditioning can be use to take care of this. It would be very convenient for the
user to interact with this approach since the rider is already holding on to the
handlebars while riding. This would require less movement for the rider to detect
their hear rate and this style is very user friendly.

3.6.4 Wireless Heart Rate Monitors
In studying wireless heart rate sensors there seemed to be many disadvantages
in that there can be several types of interferences due to electromagnetic
radiation. For example, this can come from outdoor power lines or from multiple
riders nearby. Although there were many disadvantages, the advantages seem
to outweigh the bad. Chest heart rate sensors have a transmitter that sends the
data to a receiver found on a watch, for example. This would eliminate the need
for wires which would definitely be convenient. However, wearing a chest vest is
not desirable in our design. We chose not to use this approach to lower the
burden of learning and to concentrate more on the automatic gear shifting which
is the more challenging part of our project.

3.6.5 Conclusion
The system that was chosen for Digi-Cycle was the electrical EKG handgrip
method. This was the preferred choice in that it is very convenient to detect the
heart rate via two metal contact plates which will detect the EKG signal. Unlike,
calculating the heart rate via blood pulse flow in the veins, EKG signals are
voltage potentials that are created by the pumping of the heart. These metal

                      Approved for public release; distribution is unlimited.
                                               72
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


contact plates will be placed around the handle bars of the bicycle. This heart
beat signal will then have to be amplified and filtered, which will then go to a
timing circuit for time interval calculations and will go through an ADC to the
microcontroller.

3.7 TEMPERATURE SENSOR
After looking at all the information we collected regarding possible temperature
sensing devices, we managed to make a decision based upon need, accuracy
and cost. The order in which those items are listed in that list does not reflect the
importance each item plays in determining which device to use. All options
mentioned in the research will need to be evaluated to make the best decision.

The first case we will look at will be the easiest to decide upon. The Resistance
Temperature Detectors are a very accurate and stable way of measuring
temperature. Their use is becoming very widespread and it is slowly replacing
the use of thermocouples. This device fits all our needs and has all the potential
to be the perfect device. Its only downfall is its cost. The device in comparison
to the cheapest alternatives is at most 144 times as expensive. This might be a
reasonable price for systems having a critical need for accuracy, but for our
system, the temperature system is non-crucial and our need for accuracy is not
as high. This device will not be acceptable as a possible solution for our
temperature sensing needs because of its price.

The next case we can look at would be the Resistance Temperature Detector’s
competitor, the thermocouple. This device can do wonders in that it has such a
very vast range of temperatures that it can detect. Its price is relatively high
compared to the cheaper temperature sensors but its price is not totally
unacceptable, it can still be considered reasonable for our purposes. The only
downfall to this device is that its accuracy is lacking. In order to justify the
purchase of a more expensive device, you would expect the device to perform
better for our needs. In this case, where the thermocouple performs better is in
range which is not what we need, and where it lacks is in accuracy which is what
we need. So it is safe to say that thermocouples will not be acceptable as a
possible solution for our temperature sensing needs because of its lack of
accuracy.

The next case we can look at would be the thermistors. Thermistors have a
decent accuracy and a good price. Their range is acceptable and this device
appears to be a suitable solution for our needs. Thermistors will require a bit of
work to implement as they will only act as resistors. The work will not prove to be
difficult, as the microcontroller can control an input for the device and read in and
understand the output of the device. There does not appear to be any
complaints against this device that would prove it to be not good enough except
for the usefulness of another device. This device in itself would suffice for our
needs, but it does have a +/- 10% error associated with it which can prove to be


                       Approved for public release; distribution is unlimited.
                                                73
                                                                                       EEL4919-SU07-03 v1.0
                                                                                             06 August 2007


an accuracy issue. Although not a big issue, it still might vary the correctness by
up to +/- 3-5 degrees depending. This in comparison to the next case to be
discussed shows it is not up to par. And because of this lack of accuracy in
comparison to silicon band gap temperature sensors we will choose not to use
this device as our solution for our temperature sensing needs.

The last case we can look at for giving us a temperature sensing would be the
band gap temperature sensors. These devices are cheap and reliable,
averaging less than a single dollar in USD and have estimated errors averaging
less than a single degree. This device when researched further appears to be
the solution to several other systems with similar needs. The silicon band gap
temperature sensor will always take in the same source voltage and always be
grounded. Its output voltage will be read in by the microcontroller and interpreted
to read the temperature. This device can give us the temperature in Fahrenheit
so the conversion will not be necessary. This is the type of device we will want to
implement in our design.

Now that we know what type of device we want to implement we need to
determine which exact device we will use. The device we will use for sensing the
temperature of the rider’s environment will be the LM34DZ IC device. We will
choose to implement the version of this device which is RoHS compliant. This
device costs only $2.25 and has a max accuracy error of less than a half a
degree. The LM34DZ is calibrated directly in degrees Fahrenheit so there won’t
be a need to convert. The scale factor for this device from one degree to the
next is +10 mV. This device is valid for a full range between -50° Fahrenheit to
+300° Fahrenheit. The voltage it can range between is +5 Volts and +30 Volts.
The LM34DZ does not require any sort of calibration or trimming in order for it to
provide its +/- .5° F accuracy22.

4.0 EXPLICIT DESIGN SUMMARY
4.1 SYSTEM DIAGRAM
4.1.1 System Hardware Overview
Figure 4-1 illustrates the system hardware architecture, as well as the
relationships and interactions between subsystems. All subsystems are linked in
hardware through the main logic Integrated Circuit (IC), which is expected to be a
PIC 18 series microcontroller from Microchip Corporation.




22
     http://www.jameco.com/Jameco/Products/ProdDS/155192.pdf

                             Approved for public release; distribution is unlimited.
                                                      74
                                                                                              EEL4919-SU07-03 v1.0
                                                                                                    06 August 2007



                                        Motor 1                                 Motor 2



                                             Motor Control                             Motor Control
                      Motor Position                           Motor Position


                Voltage
 Speed Sensor

                      Velocity                                                                    Voltage
                                                             MCU
                                                                                                            Power Supply
                                            Specifics: PIC 18 Series Microcontroller

                Voltage

  RPM Sensor

                          RPM
                                                    User
                                                                   Temperature            Heart Rate
                                                  Requests
                          Display
                                  Voltage            Voltage               Voltage
                           Data


                                                         Temperature             Heart Rate
                                 User Interface
                                                           Sensor                 Monitor



                                Figure 4-1: System Hardware Overview


4.1.2 Power Supply & UI Subsystems
The UI hardware will consist of two to five multi-purpose buttons and an LCD.
The Power Manager subsystem will include a generator to provide power to run
the system. The power generated will be run through a large capacitor or small
rechargeable battery to store a charge for brief periods of time should the user
stop pedaling for a brief period of time. From here, power is to be routed through
a simple power supply circuit, consisting mainly of a few capacitors and a power
regulator to ensure that the digital components will not receive damaging power
spikes. Figure 4-2 depicts simplified hardware layouts for both the UI and the
Power Manager subsystems.




                                 Approved for public release; distribution is unlimited.
                                                          75
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007




                                      Menu System/Software

                                                MCU
                                      Specifics: PIC 18 Series
                                          Microcontroller




                                                                   User
                            Display                              Requests
                             Data



                                  LCD                       Buttons



                                Figure 4-2: UI Hardware




                  5V Reg                  Battery                      12V Reg




                  Digital
                 System &                 Motors                       Generator
                 Sensors


                   Figure 4-3: Power Supply Hardware System


4.1.3 Shifting Subsystem
The Shifting subsystem, as seen in Figure 4-4, will accept input from the RPM
and ground speed sensors, as well as user input. These inputs will then be used
to decide if it is necessary to shift. Once a shift condition is encountered, the
Microcontroller will send a signal to one or both actuators to shift to the
appropriate gear.




                       Approved for public release; distribution is unlimited.
                                                76
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


                                          User Interface Buttons


                                                        User Input
                       Velocity                                             Position
        Speed Sensor
                                                                                        Actuator1
                                    The microcontroller determines the
                                                                            Control
                                   state in which the actuators are to be
                                    in based upon the 3 related inputs      Position
                         RPM
        RPM Sensor                                                                      Actuator2
                                                                            Control

                            Figure 4-4: Shifting Subsystem


4.1.4 UI Subsystem
The UI subsystem shown in Figure 4-5 will display data received by the various
sensors to the LCD, as well as interact with the user through the input buttons.



                                          User Interface Buttons


                                                        User Input
                       Velocity
        Speed Sensor

                                     The microcontroller analyzes the
                                     inputs and sends the processed                    LCD Display
                                        information to the display
                         RPM
        RPM Sensor


                                         Temp                      Heart
                                                                   Rate

                                  Temperature
                                                       Heart Rate Sensor
                                    Sensor

                                  Figure 4-5: UI Subsystem


4.2 Display Device
In creating an explicit design for the display device we will need to focus on how
the display device integrates with the system. This section will discuss how the
display device will integrate into the system with the microcontroller in hardware
and pin layout. It will also discuss the display logic that will be used to control
what the display is showing to the user.


                       Approved for public release; distribution is unlimited.
                                                77
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


4.2.1 Microcontroller to Display Hardware Interface
Connecting the display to the microcontroller should relatively simple. The exact
setup depends entirely on the number of pins available in each port. Figure 4-6
shows the correct pin connection between the display and the microcontroller
assuming there are a sufficient number of pins in port A to control the display and
send the data.


                                          Microcontroller
                                                            Port A




                       Writer Enabled                       Data I/O Pins 0-
                                                                   7
                                              Display




                     Figure 4-6: Display to MCU Pin Layout


In the case where each port does not have sufficient pins available, Figure 4-7
shows how the setup would need to be handled. This setup requires a second
port to be controlling either just the write enabled pin or possibly even the write
enabled pin and a couple data pins as well, depending on how many pins are
available in each port. Either way, this shouldn’t prove to be an issue.


                                          Microcontroller
                                                 Port B        Port A




                       Writer Enabled                       Data I/O Pins 0-
                                                                   7
                                              Display




                Figure 4-7: Display to MCU Alternate Pin Layout


On both diagrams, the setup is very similar. The eight data pins and the write
enabled control pin are connected directly from the microcontroller to the display.
Any issue with splitting the data between ports will need to be solved on the
software side if and when they arise.


                      Approved for public release; distribution is unlimited.
                                               78
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


4.2.1.1 Microcontroller to Display Output Logic
The logic for controlling the display from the microcontroller looks to be pretty
simple. Figure 4-8 shows the algorithm logic flow for how the microcontroller will
handle sending data to the display.



                                        Initialize GPIO Port




                                   Specify Data Direction for Port




                                      Set Write Enabled Low




                                Send 8-bit Data to the TRIS Register




                                     Toggle Write-Enabled Pin




                                          Done Sending
                                             Data?



                                                Yes


                                                End




     Figure 4-8: Algorithm Flow Chart for Microcontroller to Display Control


The algorithm begins by initializing the data port to be used. It then specifies the
direction that the port will be handling data, for our case it will be output as the
display will only be receiving data and not transmitting any. After the port has
been initialized, set the write enabled low, this will tell the display not to expect
any data transfer at the moment. Then, after the write enabled is set low, the
microcontroller is to write the data to be sent to the TRIS register for the port
used by the display. Once the data is on the post, the microcontroller will need to
toggle the write enabled pin high, then low quickly to allow the data to be sent.
The speed at which it toggles is not important, however, the quicker it is toggled,
the sooner the microcontroller can load in the next set of data.

                       Approved for public release; distribution is unlimited.
                                                79
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


Figure 4-9 shows small assembly scrip for initializing the port to be used on the
microcontroller.     This snippet of code will most likely be reused in
implementation, when we begin writing the software for the microcontroller. The
code shows how to initialize the port by clearing output data latches in one of two
methods. It also shows how to configure the analog to digital converter for digital
inputs, as well as configuring the comparators for digital input.

                       CLRF PORTA   ; Initialize PORTA by
                                    ; clearing output
                                    ; data latches
                       CLRF LATA     ; Alternate method
                                    ; to clear output
                                    ; data latches
                       MOVLW 07h    ; Configure A/D
                       MOVWF ADCON1 ; for digital inputs
                       MOVWF 07h    ; Configure comparators
                       MOVWF CMCON ; for digital input
                       MOVLW 0CFh    ; Value used to
                                    ; initialize data
                                    ; direction
                       MOVWF TRISA   ; Set RA<3:0> as inputs
                                     ; RA<5:4> as outputs
                               Obtained from PIC18F4520 Datasheet

               Figure 4-9: Assembly template for initializing port A


The only matter left to discuss is controlling the position of the text being
displayed. The display listens for an 8-bit command instruction before it receives
text. The command lets the display know the location where the text will be
displayed and the length of the text. Figure 4-10 shows the logic flow for this
process. While the system is running, once it determines what the position is
and the length it expects, it will read in that many 8-bit characters and place them
sequentially until it reaches the end of the display. At this point if the word
wrapping is set to on, on the display it will wrap around, otherwise the text will be
truncated to fit cutting off the text that doesn’t fit on the screen.




                       Approved for public release; distribution is unlimited.
                                                80
                                                                                    EEL4919-SU07-03 v1.0
                                                                                          06 August 2007


                                           Ready to Send to Display




                                             Send Command Byte




                                             Send Character Byte




                     No
                                                  Done with                          No
                                                    Word



                                                     Yes



                                                Done with All
                                                 Commands



                                                     Yes


                                                    End



   Figure 4-10: Logic Flow Chart on Controlling Position of Text on the Display


4.3 USER INTERFACE
In creating an explicit design for the user interface we discuss how the interface
buttons integrate onto the microcontroller in hardware and pin layout. We also
discuss how the menu system controls what is seen on the display as well as
how the system knows how to shift gears. It also discusses the display logic that
is used to control what the display is showing to the user.

4.3.1 Hardware Integration
We begin with discussing how we wired up the user interface components. The
user interface is composed of 6 buttons and an LCD display. Figure 4-11 is an
expansion of Figure 4-7, where we now add the buttons. Figure 4-11 shows how
the I/O pins on the microcontroller connects to all the required components of the
user interface. This setup is very simple and didn’t prove to be too difficult a task
to integrate.




                          Approved for public release; distribution is unlimited.
                                                   81
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007



         Button1

         Button2                            Multiplexer
                                                                             Microcontroller

         Button3
                                             OR Gate
         Button4

         Button5
                                   Writer Enabled                                      Data I/O Pins 0-
                                                                                              7
                                                                   Display
         Button6

   Figure 4-11: Hardware Connection Layout of I/O Pins for the User Interface


4.3.2 User Interface Device Layout
The next matter to discuss is the layout the user interface implements. The user
interface is only composed of 7 items, the display and the 6 buttons. We try to
implement a simple but effective solution without limiting or reducing our
capabilities. Figure 4-12 shows a proposed user-end interface. What you see in
Figure 4-12 is how the user sees the interface and how they interact with it.

                                                     LCD Display
                                                       Console
                    Menu Control                                                        Menu Control
                   Button Labels 1-3                                                   Button Labels 4-6


                                                                                                           Menu Control
  Menu Control                                                                                              Buttons 4-6
   Buttons 1-3
                     B1           Label 1                                    Label 4           B4



                     B2           Label 2        Data is Displayed Here      Label 5           B5



                     B3           Label 3                                    Label 6           B6




                        Figure 4-12: End-User Interface and Control


The buttons were placed on the two sides, left and right, of the display. The way
the buttons are set up allows the user to have two possible ways to interact with
the device. The first way to interact with the device is to place both palms on the

                              Approved for public release; distribution is unlimited.
                                                       82
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


device, one on the left and one on the right much like using a hand-held video
game. This method is very comfortable on the hands and has a good feel to it.
This method however is only recommended when stopped. This method of
interfacing with the user interface is not recommended while in motion as it
leaves the user without any hands to steer the bicycle. The next possibility would
be to only use one hand at a time while in motion and switch between the two to
press the buttons as needed, or use one hand to press all the button as needed
while leaving the other hand on the steering of the bicycle at all times. This
method might not feel as comfortable as the first but it is still not an
uncomfortable position. Overall, the user interface is designed for use while
stationary and is not recommended or designed for use while in motion for safety
reasons.

4.3.3 Menu Navigation Layout
The last thing we will discuss is how we set up the menu system such that the
user can navigate through the options with ease. The user interface menu
navigation system keeps to a simple pattern for ease of understanding. Each
stage has 7 sub-stages with the exception of the lowest stage which implements
an action. The 7 sub-stages represent the 6 buttons and the display. These
sub-stages also show what the labels are for each, in the case of the display; it
shows what is seen on the display. If a button is pressed, it branches into the
next sub-menu if there is one. If it is the lowest state then no action is taken that
would either affect the gear shifting of the system, control trips or timers, or
control what is shown on the screen.

The menu system begins with the main menu. This menu is what the user would
see the most throughout the product’s use. The main menu shows labels for all
6 buttons but number 2, at this state button two has no functionality. The main
menu’s display shows the current speed, the user’s current heart rate, the current
temperature in Fahrenheit, as well as what gear the system is in.

The first button on the main menu shows trips and opens the trips sub-menu if
pressed. The trips sub-menu controls 3 distance counters labeled 1, 2 and 3.
These counters are initiated to 0 and are initially defaulted to not keep track with
the exception of the first trip, the “Trip 1”. “Trip 1” begins measuring distance
traveled the moment the cyclist turns on the system. The other two trips begin
counting when told to do so by the user. Starting, stopping and resetting these
trips are controlled in the trips sub-menu. Button 1 thru 3 select which trip is
chosen and the currently chosen trip is shown as active trip on the display for this
sub-menu. Button 4 starts the trip if stopped, and button 5 stops the trip if
currently on, and resets the trip if currently stopped. Button 6 in this sub-menu
returns you to the main menu. At all times in the trip sub-menu all trips are
shown, a special mark is located next to the trip which is selected at the time. By
default, the second trip is selected when entering this menu.



                       Approved for public release; distribution is unlimited.
                                                83
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


The third button on the main menu shows timers and opens the timers sub-menu
if pressed. The timers sub-menu controls 3 time counters labeled 1, 2 and 3.
These counters are initiated to 0 and are initially defaulted to not count with the
exception of the first timer, “Timer 1”. “Timer 1” begins counting time the moment
the cyclist turns on the system. The other two timers begin counting when told to
do so by the user. Starting, stopping and resetting these timers is controlled in
the timers sub-menu. Button 1 thru 3 select which timer is chosen and the
currently chosen timer is shown as active timer on the display for this sub-menu.
Button 4 starts the timer if stopped, and button 5 stops the timer if currently
going, and resets the timer if currently stopped. Button 6 in this sub-menu
returns you to the main menu. At all times in the timers sub-menu all timers are
shown, a special mark is located next to the timer which is selected at the time.
By default, the second timer is selected when entering this menu.

The fourth button on the main menu shows Gears and opens the Gears sub-
menu if pressed. The gears sub-menu shows the current state for controlling the
gears in the display and has 4 active buttons. Button 1 for the gears sub-menu
toggles the automatic gear shifting on and off. If automatic is set to on, then
none of the other buttons other than button 6 is displayed or responded to.
However, if automatic is set to off, buttons 4 and 5 display the labels increase
gear and decrease gear correspondingly. When changing the gear in manual
mode, the gear that was last in automatic mode is the gear you begin with, in the
manual mode. Likewise if you’re in manual mode, and you go into automatic
mode, the automatic mode kicks on and begin processing with the current gear it
is in instead of gear the default gear that it uses when the system is first powered
on.

The fifth button on the main menu shows speed and opens the speed sub-menu
if pressed. The speed sub-menu has no sub-menu buttons. Once in the speed
sub-menu the only active button is the back button which returns you to the main
menu. The purpose of this sub-menu is to show more information to the display
than would be possible in the main menu. The speed sub-menu shows to the
display the instantaneous speed which is the average over a 3 second interval.
This number is also shown on the main menu. Aside from the instantaneous
speed, we also display an average speed for both a time interval of 30 seconds
as well as a 5 minute time interval to the display.

The sixth and last button on the main menu shows RPM and opens the RPM
sub-menu if pressed. The RPM sub-menu also has no sub-menu buttons. Once
in the RPM sub-menu the only active button is the back button which returns you
to the main menu. The purpose of this sub-menu is again to show more
information to the display than would be possible in the main menu. The RPM
sub-menu shows to the display the instantaneous RPM which is an average over
3 seconds. This sub-menu also shows an average RPM over 30 seconds to the
sub-menu. Neither of these two numbers are shown on the main menu’s display.


                       Approved for public release; distribution is unlimited.
                                                84
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


Figure 4-13 shows how the menu navigation is implemented. The logic
implemented in the suggested menu system shown in Figure 4-13 is designed for
maximum simplicity without losing any additional features. The user interfaces
with 6 buttons which have labels describing what their use is at all stages of the
display.

The menu system was created so that the user could interact with some useful
features while cycling with ease. This was done by making the features which is
most likely to be used while cycling accessible with only the right hand. The
features “Gears”, “Speed”, and “RPM”, have been determined to be the most
likely to be used while in motion and have all been placed on the right hand side
of the console. In these sub-menus the only button which is needed would be
button 6 which returns to the main menu with the exception of the “Gears”
function which needs button 4 and 5 to control the gear. Again for the “Gears”
sub-menu, the most used buttons were placed on the right to make for easier use
with one hand. Unfortunately we did not have enough buttons on the right to be
able to keep all the necessary buttons on the right, so the on/off toggle for the
automatic gear shifting was placed on the left since it was determined to be used
less than the gear changing while in motion.




                      Approved for public release; distribution is unlimited.
                                               85
                                                                                      EEL4919-SU07-03 v1.0
                                                                                            06 August 2007


Main Menu

                                 Button 1 Shows Select 1
                                 Button 2 Shows Select 2
             Button 1
            Shows Trips          Button 3 Shows Select 3
                                 Button 4 Shows Reset
                                 Button 5 Shows Start
                                 Button 6 Shows Back

                                 Display Shows Selected Trip Info



                                 Button 1 Shows Select 1
                                 Button 2 Shows Select 2
              Button 3
            Shows Timers         Button 3 Shows Select 3
                                 Button 4 Shows Reset Selected
                                 Button 5 Shows Start Selected
                                 Button 6 Shows Back
                                 Display Shows Selected Timmer
                                 Info


                                 Button 1 Shows Automatic On/Off
                                 Button 2 Shows Nothing
              Button 4
            Shows Gears          Button 3 Shows Nothing
                                 Button 4 Shows Increase Gear
                                 Button 5 Shows Decrease Gear
                                 Button 6 Shows Back
                                 Display Shows Automatic State and
                                 Current Gear

                                 Button 1 Shows Nothing
                                 Button 2 Shows Nothing
              Button 5
            Shows Speed          Button 3 Shows Nothing
                                 Button 4 Shows Nothing
                                 Button 5 Shows Nothing
                                 Button 6 Shows Back
                                 Display Shows Instant and Average
                                 Speeds

                                  Button 1 Shows Nothing
                                  Button 2 Shows Nothing
             Button 6
            Shows RPM             Button 3 Shows Nothing
                                  Button 4 Shows Nothing
                                  Button 5 Shows Nothing
                                  Button 6 Shows Back
                                  Display Shows Instant and Average
                                  RPM




                           Figure 4-13: User Interface Menu System




                            Approved for public release; distribution is unlimited.
                                                     86
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


4.4 RPM SENSORS
We chose the digital Hall Effect sensor with zero cross detection because it is
most commonly used towards RPM and speed applications. We used two Hall
Effect sensors where, as a simple arrangement, one was placed on the frame of
the bike by the front wheel and the other was placed on the frame by the rear
wheel. We decided to dedicate each of these sensors to a specific task. The
Hall Effect sensor in the front wheel will be involved with distance traveled and
the other will be involved with the speed at which the user is traveling. The zero
speed Hall Effect sensor incorporates two linear Hall generators whose outputs
are subtracted from each other to provide a differential signal that eliminates the
DC bias offset effects. A differential output signal is created when the target
passes by the two elements23. The Hall Effect sensors output a digital square
wave pulse that is proportional to the distance traveled. Multiple magnets can
be used to provide a higher degree of accuracy for measuring the distance that is
traveled. Since the Hall Effect sensor we are using is digital, it will go straight to
the PIC18F452 microcontroller without the need of analog to digital conversion.

The mathematics involving the RPM sensors are the calculations of the velocity,
calories that are burned and the distance that is traveled. For the calculation of
the velocity at which the user is traveling, the digital Hall Effect sensor was
placed near the central point of the front wheel. A magnet would be placed on
the wheel itself and rotates staying in its current position as the user rides and
the wheel is spinning. The magnet comes passing by within a close proximity of
the Hall Effect sensor. In calculating the velocity the circumference of the Digi-
Cycle wheel will need to be measured. To calculate the average velocity the
PIC18F452 will have to be programmed to count the number of times the Hall
Effect sensor comes within a close proximity of the magnet. The microcontroller
should then determine the time interval between each generated pulse then,
simply dividing the circumference of the wheel by the pulse time interval. A
simple velocity equation is shown in Equation 4-1.             The units for the
circumference of the wheel should be inches. The pulse time interval should be
in milliseconds. Proper conversion to miles per hour will be displayed as this is
user friendly. The distance traveled could easily be calculated by simply adding
the circumference every time the hall-effect sensor comes within a close
proximity of the magnet.



                               Velocity  (Circumfer        se
                                                   ence)/(pul time interval)
                          Equation 4-1: Calculating velocity from RPM




23
     http://www.sensorsmag.com/sensors/article/articleDetail.jsp?id=327274

                               Approved for public release; distribution is unlimited.
                                                        87
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


Energy is the measure of the effort in lifting a load. It is also proportional to its
mass m. The characteristics, of this energy, are described in Equation 4-2.



                                                          mv 2
                                    Energy  mgh 
                                                           2

               Equation 4-2: Calories burned from Energy Equation


The reason why we make use of the equation of energy is because calories are a
form of energy. The energy of food is measured in calories which is equal to
4180 joule. The number of calories that the user has burned off depends on the
weight of the user. Almost all commercial fitness equipment found in health club
settings has a default setting of 150 lbs. The user interface should allow the user
to enter his or her weight in pounds. The PIC18F452 microcontroller should then
convert this weight into mass with the units in kilograms. There is 1kg /2.2lbs.
The calories burned will be characterized by the kinetic energy equation that was
described above in Equation 4-2. The factor “mgh” will not be used as height will
not be considered necessary in this calculation. Therefore, since calories are
representative of energy the resulting equation is shown in Equation 4-3.
Calculating calories burned was an option that we chose not to implement in the
project due to time constraints since it was a secondary goal.

                                             weight * 2.2
                                              velocity2
                                  Calories 
                                                  2

                     Equation 4-3: Adjusted Calorie Equation
The Hall Effect sensor also played an integral role in the electromechanical
automatic gear shifting system. This provided the rider with reliable, repeatable
and accurate means for automatically shifting the bicycle from one gear to
another without intervention from the rider. Digi-cycle has a manual and
autonomous option. The autonomous gear shifting option operated in that
depending on the average RPM’s a shift in gears would occur. The Hall Effect
sensor indicated to the microcontroller an increase or decrease in pedal and
wheel RPM speed. The motors and potentiometers then responded accordingly.
Two hall-effect sensors were used in our design. One was located by the pedals
and the other was located by the rear wheel. The one that was positioned by the
pedals were used for calculating RPM’s. The other hall-effect sensor that was
placed by the rear wheel was used for the calculation of the velocity. Figure 4.1
illustrates the RPM sensor assembly. Figure 4.2 illustrates the rear wheel speed
sensor assembly.


                       Approved for public release; distribution is unlimited.
                                                88
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007




                        Figure 4-1: RPM Sensor Assembly




                  Figure 4-2: Rear wheel speed sensor assembly

4.5 ACTUATORS
Due to the nature of the application, the actuators used are expressed in terms of
two separate design aspect. The first major design aspect is the electrical
implementation, which will discuss how the actuators will integrate into the
system’s circuitry, including interfacing to the MCU through both hardware and

                      Approved for public release; distribution is unlimited.
                                               89
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


software. The second major design aspect to be discussed is the mechanical or
physical implementation of the actuators, covering how the motors will physically
attach to the bicycle and derailleur.

4.5.1 Electrical Implementation
There are a few possible ways to control a DC motor in a circuit. From a
minimalistc model, a DC motor operates when a positive DC voltage is applied to
one terminal, while the other terminal is grounded. In order to control the motor,
some switching is required. Although the GPIO ports on the MCU can perform
switching functions, the motor will likely draw more current than any pin on the
MCU will be equipped to handle. Enter the transistor. MOSFET transistors can
be connected to a GPIO pin on the MCU to control the path from a positive DC
voltage source to the motor, or from the motor to ground. Although this provides
control over the motor, only two motor states are available for use; forward on
and off. Digi-Cycle requires that any actuator used be able to function in two
directions, rendering this configuration useless.

In order to control a DC motor under bi-directional circumstances, four transistors
are required. This control configuration is commonly known as an H-Bridge.
Two transistors are activated for each direction to ensure that one motor terminal
receives a positive DC voltage and the other receives ground. The two
remaining transistors are deactivated to ensure that there is no short circuit to
ground. To switch directions, all that is required is to deactivate the active
transistors and then power the inactive pair. This configuration would require
four GPIO pins from the MCU per motor to function correctly, but this number can
be reduced to two pin by connecting the gates of each pair of complementing
transistors together. This can be reduced even down to one pin by bridging
these leads together with an inverter, though the motor will lose its “off” state in
this configuration.

The major drawback to the use of transistors is the physical space required by
this hardware, totaling eight transistors and eight diodes (used to protect against
short circuits and reverse currents caused by abrupt changes in motor output). A
smaller and simpler, yet almost equally cost effective solution can be found in DC
motor control ICs, particularly a an L293 H-Bridge such as the SN754410 made
by Texas Instruments. This device comes in a 16 pin PDIP package, and
requires two input pins and one enable pin per motor for a total of two motors.
Since each input for a motor should be opposed for normal operation, an inverter
may be used to reduce the six pins down to four. This will allow for both forward
and reverse motion of each motor, and still allow the motor to be deactivated
through the use of the enable pins ENA1 and ENA2. The chip requires a
connection to the circuit’s voltage supply through pin Vcc in order to operate. The
motors are powered from the pin V (pin 8), which may be different from Vcc and
can range from 4.5V to 36V. Although a currently a 5V motor is planned for use,
it may be necessary to use motors of up to 12V if a smaller motor lacks enough


                       Approved for public release; distribution is unlimited.
                                                90
                                                                                                       EEL4919-SU07-03 v1.0
                                                                                                             06 August 2007


torque to move the derailleur. A schematic for this configuration may be seen in
Figure 4-14.

                                                               VCC

                        0
         1                           40                               1                            16
             MCLR    Vcc       RB7                                        ENA1               Vcc
         2                           39                               2                            15
             AN0               RB6                                        IN1                IN4
         3         PIC18F452         38                                          SN754410
                                                                      3                            14
             AN1               RB5                                        OUT1              OUT4
         4                           37                               4                            13
             AN2               RB4                                        GND               GND
         5                           36                               5                            12
             AN3               RB3                                        GND               GND
         6                           35                               6                            11
             RA4               RB2                                        OUT2              OUT3
         7                           34                               7                            10
             RA5               RB1                                        IN2                IN3
         8                           33                               8                            9
             RE0               RB0                                        V                 ENA4




                                                                                              VCC



                                      Motor 1                                   POT1               POT2
                                                                                                                  Motor 2



                                Figure 4-14: Actuator Circuit Schematic


In a situation where a particular model motor has a long stop or spin down time,
the H-bridge can assist braking the motor. This method requires the two
inverters to be removed from the circuit, and each motor input assigned to its
own GPIO pin on the MCU. With this setup, driving both motor inputs low and
the motor enable high would bridge both terminals of the motor to ground. The
current induced by the spinning motor would then be re-circulated, so to speak,
to the opposite terminal, thus placing a load on the motor and slowing it faster
than a passive spin down. This setup has the added advantage of locking the
motor in a position. If the motor is forced to move out of place by an accidental
physical force exerted on it, the same induced current that slows the motor
during the assisted spin down would now make the motor more resistant to
change in motion, requiring a greater force to cause motion. This locking
method, however, also increases the power consumption of the system to
maintain the locked state, although this effect would be relatively minor.

The position of each motor is monitored during shifts through the use of a
potentiometer. The potentiometers are connected to the motors through gearing
such that one revolution of the motor will be directly represented by a fixed
change in resistance. Potentiometers are available in a wide variety of value
ranges. A 5kΩ potentiometer is used for each motor, as this simplifies


                                     Approved for public release; distribution is unlimited.
                                                              91
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


calculations, provides a wide enough resistance range between each derailleur
position, and they are commonly used and easy to obtain.

The output from each potentiometer is connected to an ADC capable pin on the
MCU. Each potentiometer is placed along a path from Vcc to Ground. This
further simplifies circuitry and calculations because Vcc can be used as the
reference voltage. When the motor turns, so does the potentiometer. This alters
the potentiometer’s resistance, thereby changing the voltage output to the MCU
(voltage division). This value then is converted by the ADC from an analog value
to a digital binary number, which is then used to calculate the position of the
motor.

4.5.2 Software Implementation
The gear positions are “found” through testing rather than through calculations
and the values are hard-coded and stored as variables in the program to
eliminate complication. The tests are performed on an MS/A capable system by
slowly incrementing the motor until the tester observes that the bicycle is properly
in gear. The program then displays the current value so that the tester can
record it for later use. A total of seven values are recorded, two for the front
derailleur, and five for the rear. At this point, the data is evaluated for patterns in
distance between gears. For each derailleur, a ΔX is found such that the
required derailleur position can be calculated, as demonstrated in Equation 4-4.



                        DesiredGear *X  Required Position

                      Equation 4-4: Calculating Motor Position


The control process for the motors is relatively simple to implement. Although
performance can be enhanced by constantly polling the potentiometers to make
sure the derailleur stays in position, doing such requires too much CPU time, and
the motors are not expected to slip any significant amount. Therefore, the
process begins with a request to shift to a particular gear, represented by an
expected binary potentiometer value. The program checks if the motor is already
in position, and start the motor if not. Each motor has its own subroutine similar
to what has been outlined here. In order to shift to a desired gear (1 – 10 on the
bicycle being used for the prototype), both motor’s subroutines are executed,
since the gear ration is determined by the combination of gears being used
between each derailleur. The process diagram for the motor control subroutine
can be seen in Figure 4-15.




                       Approved for public release; distribution is unlimited.
                                                92
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


                                    Input
                                   Desired
                                    Gear




                                Desired gear <            Motor Direction =
                                                   No
                                current gear?                 Reverse




                                     Yes

                              Motor Direction =
                                  Forward




                                  Is motor in                  Is motor
                                                   No
                                   position?                    active?




                                                                 No


                                     Yes                    Activate Motor




                                 Stop Motor



             Figure 4-15: Motor Control Subroutine Process Diagram


A main shifting subroutine executes each of the two motor control functions. It
receives an increment or decrement gear request, and then increments or
decrement the current gear value. With this new gear number, the forward
motor’s subroutine is executed with a value of 1 or 2 being passed into the
function. The rear motor’s subroutine is sent a value ranging from 1 to 5. Each
of these numbers are calculated given the incremented or decremented input
value. This new value is used to calculate the position that motor should shift to
simply by multiplying by the ΔX for that motor. The process diagram for the gear
increment subroutine can be seen in Figure 4-16.




                      Approved for public release; distribution is unlimited.
                                               93
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


               Increment
                  Gear
               Command



           Perform Math Ops.

                 Gear++;
                                             Execute Rear Motor           Execute Forward Motor
       LowGearPos=(Gear%5)*ΔX;
                                                 Subroutine                    Subroutine
     HighGearPos=(1+(Gear-1)/5)*ΔX;
           If (!LowGearPos)                                                                        Return
           {LowGearPos=5;}




                                           RearMotor(LowGearPos)         FwdMotor(HighGearPos)




               Figure 4-16: Gear Increment Subroutine Process Diagram


The aforementioned subroutines strictly control actuator behavior once a shift
condition has been deemed appropriate. Additional subroutines must be created
to control shift points and shifting behavior. Such subroutines use the real time
data collected from the RPM and speed sensors in combination with short term
trends in this data to determine if a gear shift is necessary, and if so, what gear is
appropriate for the given conditions. It is not until this point that the actuator
subroutines are executed. Optionally, the user may select a manual shift
override mode, under which the current gear is incremented or decremented at
the discretion of the operator. This condition also requires the execution of the
actuator control subroutines.

4.5.3 Mechanical Implementation
Mounting the motors to the bicycle and connecting them to the derailleurs is no
small task due to the amount of parts that must be modified or fabricated.
Although all construction and fabrication is able to be performed using simple
hand or power tools (to include drills, a Dremel, and other common tools), this
stage is still be somewhat tedious and requires some trial and error. This section
outlines the parts required, and how they are obtained or manufactured.

Nylon worm and pinion gears are purchased to use on the motors and
potentiometers respectively. The gear ratio between these is based upon the
overall length of the worm gear such that the potentiometer runs through its full
range of resistance for a full range of motion experienced by the derailleur. It is
because of this reason that the required gear ratio is determined at the time of
fabrication. The pinion gear and potentiometer are to be mounted as close as
possible to the end of the worm gear nearest the motor to reduce the possibility

                               Approved for public release; distribution is unlimited.
                                                        94
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


of the potentiometer being knocked from position, as well as to prevent the
potentiometer from limiting the range of motion of the derailleur. For this
application, a geared motor kit, Tamiya 72004, has been selected. It includes a
small, low power DC motor, and a worm gear box capable of reduction ratios of
336:1 and 216:1. Additionally, an output shaft for the system is constructed out
of a ¼”x 20 threaded rod. With the addition of position feedback sensing, the
system essentially becomes a linear actuator.

The two most significant parts that need to be fabricated are the motor mounts
and the derailleur connector. The motor mounts are relatively simple to
construct, and are to be either steel bands tightened around the motor and
bicycle frame, “L” brackets secured to the motors and bolted through the
bicycle’s frame.       Constructing the derailleur connectors is slightly more
challenging. The derailleurs do not move entirely freely. They are pinned in
place, and “swing” from side to side in two dimensions instead of simply sliding
along a single axis. This eliminates the possibility of securing a threaded fitting
directly to the derailleur, as the worm gear would stress and possibly break under
the 2-dimensional motion. One solution is to pin a rod or lever to the top of the
derailleur, and allow the threaded fitting to slide along that lever. The diagram in
Figure 4-17 depicts a simplified “rear view” version of the worm and pinion setup
planned to be used.




              Figure 4-17: Connecting the Actuator to the Derailleur



                       Approved for public release; distribution is unlimited.
                                                95
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


4.6 POWER SUPPLY
The design chosen for the power system is a circuit with a primary source with a
NiMH battery and a secondary source with two 6V Dynamo generators in series.
This setup is designed to produce 12V to the circuit, as the motors are expected
to draw 12V. The two generators will produce a combined 500mA. The
generators are placed in the design to keep the primary power source of NiMH
batteries with a charge.

The power supply circuit produces peak currents of 1A, 5V at the microcontroller,
temp sensor, and RPMS, and 2A, 12V at motors, with a 10 cell NiMH battery
pack of 12V, 2500mAh used to store a charge for the entire system. This should
adequately supply the circuit for a reasonable period of time, as the maximum
expected current load on the system is anticipated to be around 2.1A. This
number may not be as high in normal operation because the motors will not be
running constantly, prolonging the battery life even further.

The battery itself is used frequently in robotics applications, and is well suited for
applications such as these. It consists of 10 NiMH AA cells connected in series
to produce the desired 12VDC, as each cell is 1.2V on its own. The battery pack
is to be mounted to the bicycle’s frame just under the seat in an attempt to
protect it from any unexpected precipitation. The pack is not expected to weigh
more than approximately 3 lbs, and with it mounted near the bike’s center of
gravity, balance should not be an issue.

In order to charge the batteries, a charging circuit will be necessary to safeguard
the battery pack against spikes. A diode rectifier will be placed inline with the
generators to ensure that the rest of the circuit will not be affected by any
accidental reverse current.

The circuit is designed to divide the voltage into four separate sources. The
positive side of the battery will be connected to voltage regulators which will
create three different voltage sources. (5v,5v,10v). Then the 10 volt voltage
regulator will connect to a power converter which will form a negative 10 voltage
supply.

One of the 5 volt sources will provide power to the motors; the other 5 volts will
provide power to the microcontroller, RPM sensors, and temperature sensor.
The 10 volt will supply voltage to the voltage regulator which will then provide a
negative ten volts to the heart rate sensor and the contrast to the display.




                       Approved for public release; distribution is unlimited.
                                                96
                                                                                        EEL4919-SU07-03 v1.0
                                                                                              06 August 2007




                                     Figure 4-18: Power Circuit


4.7 HEART RATE MONITOR
In designing the heart rate monitoring portion of the Digi-Cycle project, we had to
understand how to translate the heart beat into a clean DC signal that would then
pass to the microcontroller for calculations and user interfacing. There are
several steps towards the design of this system for it to function properly. The
detection of the heart beat was the first step in the process. The heart beat was
detected by two hand grip metal conducting contact plates as shown previously
in Figure 2-20. This hand grip will detect the small electrical signals which are
carried along the surface of a person’s skin each time the heart contracts. “The
human heart can be considered as a large muscle whose beating is simply a
muscular contraction. Therefore, the contraction of the human heart causes a
potential to be developed. The measurement of the potential produced by the
cardiac muscle is called electro cardiology24. The analog signal then passes
through an instrumentation amplifier. This amplifier is also involved with filtering
out common-mode noise between the two input signals.

Noise is something that was critically looked at since it is developed during the
contraction of the heart which is why the implementation of a filter needed to be
considered. Noise comes from the body itself and from the surrounding


24
     http://www.e-dsp.com/how-to-build-your-own-heart-monitoring-device-a-simple-ecg/

                              Approved for public release; distribution is unlimited.
                                                       97
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


environment. The EKG signals that come from the human body are very small
which is why we needed to incorporate an instrumentation amplifier and an op-
amp in our design for the Digi-Cycle. The analog signal could then pass to an
A/D converter for sampling of the signal. A comparator instead of the ADC on
the microcontroller was used since the EKG signal could then be converted into a
digital pulse and the signal could then go to an interrupt pin the MCU. Now, that
the signal is converted into a clean DC signal, the microcontroller can then
perform the necessary calculations and send useful readable information to the
LCD. The heart rate was displayed as the number of heart beats per minute.
This is able to be viewed while riding the Digi-Cycle and having the palms of the
hands of the user firmly, but not tight, placed around the metal conducting plates.

These steps of the design will be discussed and explicitly explained in more
detail in the following sections. Figure 4-19 is a block diagram of the step-by-
step design of the heart rate sensor system. There are many design approaches
that were discovered in our research. Almost all of the design approaches
investigated involved these steps with slight variances in filter design and
component selections.



                                           Hand Grips




                                    Instrumentation Amplifier




                                               Filter




                                          Amplification




                                           Comparator




                                         Microcontroller




                                               LCD


               Figure 4-19: Block diagram of heart rate processing




                      Approved for public release; distribution is unlimited.
                                               98
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


4.7.1 Detection by Hand Grip
Every time the heart beats it is a muscular contraction. The contraction of the
heart creates a small voltage potential. It is this potential that will be conducted
through the metal hand grip plates. This signal is also called an EKG signal
which is the acronym for the word Electrocardiogram25. An electrocardiogram is
produced by measuring the electric potential between different areas of the body.
The specific areas specifically towards our design would be the two hands that
are on the handle bars. This signal is a mean electrical vector or a depolarization
wave front that moves toward a positive electrode which creates a positive
deflection25.

Noise is also transmitted to the sensor in various ways. Noise can be produced
from:

       a. The contraction of the heart

       b. Muscular contractions from other areas of the body

       c. The outside environment

       d. Not properly grasping the metal plates

       e. Perspiration

Noise was something that can cause major errors in the calculation and detection
of the actual pure heart signal. The EKG signal then pass to an instrumentation
amplifier.

To better understand the process the EKG signal must go through before the
user can view his or hers heart rate, an understanding of the characteristics of
the actual EKG signal must be investigated.

This signal is generated by a series of biological and electrochemical
mechanisms. The electrical conduction in the heart is achieved by certain areas
of the heart. First you have the SA node, which is called the sino-atrial node. It
is the impulse generating tissue located in the right atrium of the heart26. This
section is also referred to as the pacemaker. Next, you have the myocardium,
which is, in general, the heart muscle. Then you have the AV node, which is the
atrio-ventricular node. It is an area of specialized tissue that is between the atria
and the ventricles of the heart, which conducts the normal electrical impulse from
the atria to the ventricles26. The electrical conduction of the heart is achieved




25
     http://en.wikipedia.org/wiki/Heart_rate
26
     http://en.wikipedia.org/wiki/Electrical_conduction_system_of_the_heart

                               Approved for public release; distribution is unlimited.
                                                        99
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


when the SA node generates some type of impulse and propagates to the heart
muscle or the myocardium.

The EKG electrical activity is generated when the SA node spontaneously
generates an impulse. This impulse propagates through the left and right atria.
This then travels to the heart muscle for contraction. The step in the process of
the production of the signal, shown in Error! Reference source not
found.Figure 4-20, is representative of the P wave portion of the signal. The AV
node causes a delay which produces the PR interval which is the region in Error!
Reference source not found.Figure 4-20 where the P wave just first begins and
where the R wave just first begins. The R wave is also known as the QRS
complex. This delay is necessary for proper contraction. The spread of electrical
activity through the ventricular myocardium produces the QRS complex on the
EKG27. Then finally, the T wave region of the EKG signal represents the
repolarization of the ventricles. This brief overview of the electrical conduction of
the heart was simply to explain the waveform of the EKG signal which is
necessary for understanding the analog and digital signal processing that must
be done to calculate and display the heart rate of the user. This signal is faint by
the hands. Usually, electrical signals from the body are very small ranging
anywhere from 0.5mV to 5mV. This signal will be conducted through the metal
contact plates. This signal will then pass to a differential amplifier for further
conditioning of the signal.

4.7.2 Differential Amplifier
A differential amplifier is an electronic device that amplifies the difference
between two inputs. The two inputs, in our project, was one lead from each
metal conduction plate from the handlebars. Usually, differential amplifiers are
used as the precursor for op-amp circuitry. Differential amplifiers are also good
when systems implement some type of negative feedback. Negative feedback is
type of feedback in which the system responds in an opposite direction to
perturbation28. It is a process of feeding back to the input a part of a systems
output, so as to reverse the direction of change of the output. This tends to keep
the output from changing, so it is stabilizing and attempts to maintain constant
conditions28. A schematic of a differential or instrumentation amplifier is shown in
Figure 4-20. The voltage output of the differential amplifier is characterized by
Equation 4-5. The common mode rejection ratio is characterized by Equation 4-6.




27
     http://en.wikipedia.org/wiki/Electrical_conduction_system_of_the_heart
28
     http://en.wikipedia.org/wiki/Negative_feedback

                               Approved for public release; distribution is unlimited.
                                                       100
                                                                                       EEL4919-SU07-03 v1.0
                                                                                             06 August 2007




                   Figure 4-20: Typical Differential Amplifier Schematic28




                    Equation 4-5: Voltage output for differential amplifier




                Equation 4-6: Common mode rejection ration characteristics


Since, differential amplifier chips are designed to amplify the difference between
two input signals they are desirable for our design. They can amplify a small
difference between two signal levels and ignore any common level shared
between them. This can be quite useful when the signal has traveled some
distance and may have some added interference29. This is suitable since the
EKG signal has to travel all the way from the heart to the hands. If the signal
travels over one of a pair of leads, the difference in the potential between the
leads can be taken to be the actual signal. Differential amplifier chips or


29
     http://semiconductors.globalspec.com/LearnMore/Semiconductors/Analog_Linear_Devices/

                             Approved for public release; distribution is unlimited.
                                                     101
                                                                                          EEL4919-SU07-03 v1.0
                                                                                                06 August 2007


differential amps can also reject any voltages which are common to both leads as
noise can be caused by interferences on both of the leads29. Specifications for
differential amplifier chips include -3 dB bandwidth, gain, minimum gain, supply
voltage, supply current, offset voltage, slew rate, and harmonic distortion.
Features for differential amplifier chips include number of leads such as 8, 20, or
28 leads, standard packaging, and power-down features. As part of an
integrated circuit chip a differential amplifier can be manufactured with standard
packaging designs such as mini small outline package29.

Since the EKG signals are very small and have very low frequencies by nature
we might want to have a gain of about 5 to 10 so as to prevent the saturation of
the op-amps by the low frequencies. The two handgrip contact plates will be
coupled to the differential amplifier. The EKG signal passes through the
instrumentation amplifier for signal conditioning for amplification and to reject
common-mode noise.

4.7.3 Filtering and Further Amplification
The EKG signal then pass through a series of band-pass filters. According to
most approaches that were researched, a band-pass filter allowing 5 to 20 Hz is
desirable. A band-pass filter is a device that passes frequencies within a certain
range and attenuates frequencies that are outside of that frequency range. An
ideal filter has a passband that is completely flat. The transition out of the
passband would be instantaneous in frequency which of course in real world
applications this is never the case. In practice, no bandpass filter is ideal. The
filter however, does not attenuate all of the frequencies that are just outside the
desired frequency range completely. There is a region just outside the passband
where not all frequencies are rejected. This is known as the filter roll-off, and it is
usually expressed in dB of attenuation either in octave or decade of frequency30.
Generally, the design of a filter requires to make the roll-off as slim and narrow
as possible which will therefore allow the filter to perform as much as possible to
the intended design. However, as the roll-off is made narrower, the passband is
no longer flat in nature and begins to have a ripple effect30. Bandpass filters, in
essence, are simply a lowpass and highpass filter coupled together. There are
also active bandpass filters that incorporate op-amps into it. This bandpass filter
will allow frequency ranges from 5 to 20 Hz to remove high frequencies from the
analog signal and to prevent any aliasing in the signal. The low frequency corner
of the passband would also eliminate and DC components and any low
frequencies coming from the baseline of the EKG signal. Further amplification of
the EKG signal was done by an operational amplifier in a cascade configuration
with a desirable gain in the range of 500 to 1000.




30
     http://en.wikipedia.org/wiki/Bandpass_filter

                                Approved for public release; distribution is unlimited.
                                                        102
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007


4.7.4 Comparator, Microcontroller and LCD Interfacing
The conditioned EKG signal then passes through to the comparator and then to
the interrupt pin on the PIC18F452 for microcontroller calculations. It is the QRS
wave that is commonly used to measure the heart rate. An analog to digital
converter is built in to the architecture of the microcontroller we are using. In
most applications, the analog signal is converted into an eight bit digital sample
at a sampling rate of 180 Hz. According to research, 180 Hz is chosen since it is
a multiple of 60 Hz which is typical for an EKG signal.

4.7.4.1 Analog to Digital Converters
An ADC is a device that converts an analog input signal into a discrete digital
signal as the output. Factors such as resolution, response type, sampling rate,
and aliasing are to be considered. The ADC should be able to operate in a 3 volt
supply. The digital data stream from the ADC is the input to the microcontroller
for further digital signal processing.

Resolution of the A/D converter is important because it indicates the number of
discrete values over a range of different voltage values. The resolution of an
ADC is proportional to the overall range of voltage measurements which is then
divided by the amount of discrete values31. This is the characterized by Equation
4-7 shown below.




                               Equation 4-7: Equation for resolution


Q is the resolution in volts, EFSR is the full scale voltage range and M is the
resolutions in bits31. The resolution of the ADC is limited to the signal-to-noise
ratio. If there is a significant amount of noise in the EKG signal it will not be able
to resolve the effective number of bits32. The ADC will produce discrete values
but incorrectly because of the unfiltered noise. This is why a differential amplifier
and a bandpass filter were suggested in our design. The signal to noise ration
should be in the vicinity of 6 dB for every bit of resolution32.

The analog signal is a continuous function with respect to time and it will be
necessary to convert this into a flow of discrete digital values for microcontroller
processes. The rate at which each new digital value is sampled from the analog
signal is called the sampling rate. The rate of new values is called the sampling


31
     Electronic Circuit Analysis and Design, 2nd edition, Donald A. Neamen
32
     http://en.wikipedia.org/wiki/Analog-to-digital_converter

                               Approved for public release; distribution is unlimited.
                                                       103
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


rate or sampling frequency of the converter32. A continuously varying band
limited signal can be sampled, meaning measured and stored and then the
original signal can be exactly reproduced from the discrete-time values by an
interpolation formula32.

Since a practical ADC does not instantaneously convert the signal, the input
value must be contained as a constant during the time that the ADC performs the
conversion. This is what is known as the conversion time. An input circuit called
a sample and hold is to perform this task. In most cases by using a capacitor to
store the analog voltage at the input, and using an electronic switch or gate to
disconnect the capacitor from the input32.         Many ADCs built in to the
microcontroller integrate this process already. If the input signal is changing
significantly faster than the sampling rate then erroneous signals called aliases
will be produced31. The frequency of the aliased signal is the difference between
the signal frequency and the sampling rate32. To avoid aliasing, the input to an
ADC must be lowpass filtered or bandpass filtered to remove any frequencies
that are above half of the sampling rate. A sampling rate of 180 Hz is used in
most heart rate monitoring systems since it is a multiple of the 60 Hz. A typical
EKG signal has 60 Hz of common noise. Using the ADC was an option but the
implementation of a comparator was easier to implement especially since the
ADC ports on the pic18f452 were all used up. Figures 4.23 and 4.24 illustrate
the Analog EKG signal and digital output, respectively.




                          Figure 4-22 Analog EKG signal




                      Approved for public release; distribution is unlimited.
                                              104
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007




                   Figure 4-23 Digital Output after comparator


4.7.4.2 Microcontroller and Display Interfacing
The microcontroller will be coupled to various user interface peripherals such as
the display and several buttons. Code will be written to count the peaks, which in
this case would be the QRS peaks that have been sampled. It should count,
after the average has been taken, the peaks that exceed a threshold over some
predetermined interval and should calculate the heart rate from the count by
dividing the count of QRS peaks by the number of seconds in the interval and
then multiplying by 60 to obtain heart beats per minute. A threshold detection
process would be performed where the threshold amplitude is compared the
amplitudes of the peaks of the data coming from the ADC. The threshold level
should be chosen such that only the sampled QRS wave of the EKG signal will
be able to exceed this threshold value.

4.7.5 Heart Rate Monitor Schematic and Overall Design
An overall suggested design for the heart rate monitoring portion of the Digi-
Cycle project is shown in Figure 4-. The EKG signal will be conducted through
the hand grips which will then pass through to the differential amplifier for
amplification and common-mode noise. The signal will then pass to an active
bandpass filter consisting of an active lowpass filter and highpass filter. These
filters are necessary for filtering out high frequencies above 20 to 25 Hz and for
rejecting any baseline DC components. They are also important for preventing
aliasing. Isolation is important when trying to obtain the true EKG signal.
Another approach would be to use just a lowpass filter which could be sufficient
enough to reject the high frequencies since all we really need to do is simply
count the QRS wave of the EKG signal. However, we will try this approach first
since the DC components are still a factor during the signal processing. The

                      Approved for public release; distribution is unlimited.
                                              105
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


signal will then pass through several op-amps for more amplification. The actual
resistor and capacitor values are yet still to be determined as we begin to
construct the circuit. The signal will then pass to the ADC where it will be
sampled and used for calculation and display of the heart rate in beats per
minute. This approach is what was used, but there are also many other
approaches towards the design of heart rate sensors. The interconnections
between the components illustrate how they interact. The hand grips are
coupled to the AD620AN instrumentation amplifier. A gain of about 500 was
achieved by the 76 ohm resistor on the AD620. The output at pin 6 of the AD620
is then coupled to two low-pass filters and a high-pass filter. The filters are then
coupled to the LM358 dual operational amplifier for even further amplification.
The EKG signal shown in figure 4-22 is at the pin 1 stage of the operational
amplifier. The digital output in figure 4-23 is located at the pin 1 stage of the
LM393 comparator.




          Figure 4-24: Schematic of overall heart rate monitoring design


4.8 TEMPERATURE SENSOR
In creating an explicit design for the temperature sensor device we will need to
focus on how the sensor device integrates with the system. This section will
discuss how the temperature sensing device will integrate into the system with
the microcontroller in hardware and pin layout.

                       Approved for public release; distribution is unlimited.
                                               106
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


4.8.1 Microcontroller to Display Hardware Interface
Connecting the temperature sensor to the microcontroller should relatively
simple. The suggested setup for connecting the two devices is shown in Figure
4-21, which shows the correct pin connection between the temperature sensor
and the microcontroller. The temperature sensor should get a positive 5 volts
from a steady DC power supply and have a solid ground. The only other pin
which will need to be connected will be the data pin which will connect directly to
the analog to digital converter on the microcontroller.




                                           Microcontroller
                                                                 Port w/ A/D
                                                                 Converter

                                           Temp. Sensor Analog Output

                               DC
                                          Temperature
                                            Sensor



               Figure 4-21: Temperature Sensor to MCU Interface


4.8.2 Interpreting Temperature Sensor Outputs
The temperature sensor is a very simple device. If it is given a power source and
a ground, it will return a voltage through the data pin which reflects the
temperature of its environment measured in Fahrenheit. The data pin going to
the analog to digital converter will have a voltage measured in millivolts which
when divided by 10, will return the current environment’s temperature. This
value updates at a very fast rate and will likely only be sampled by the
microcontroller at a much slower rate to save on processing power.

5.0 SYSTEM INTEGRATION AND TESTING
Testing for this system is not just on the final product but progresses throughout
the development. By testing every component during its development throughout
the entire process, there are fewer questions whether the individual components
are working properly. Once all the modules of the system have been developed
and are tested to be working properly, we test the system every time a new
component is integrated. The plans for testing all these phases are laid out in
detail below.




                      Approved for public release; distribution is unlimited.
                                              107
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


5.1 TESTING INDIVIDUAL MODULES
We tested the individual modules of the system first. These are the first and most
simplistic tests. This proves that the modules work on their own and in later
issues will remove any doubt in their integrity

5.1.1 Microcontroller
The microcontroller is the first module tested. This device is crucial as it is the
main logic unit controlling the rest of the system. The inputs and outputs as well
as the analog to digital converters must be tested for accuracy.

5.1.1.1 I/O Ports and Computation Accuracy
The inputs and outputs are the first things tested in testing the microcontroller.
This is done by writing a script that reads in an input from a port and performs a
calculation on it, then have it send the data to another port on the microcontroller
where it is sent as output. The output is compared with the input to verify its
correctness. Table 5-1 shows the suggested input values for testing and what
computations should be done on the input values. It also shows what the
expected outputs are that should be used for comparison. Once we verify the
inputs and outputs are correct we move on the analog to digital converters.



       Table 5-1: Input/Output and Calculation Performance Test Sequence
  Input Value      Decimal Value          Computation           Expected Output         Decimal Value
   00101010             42                   None                  00101010                  42
   00101010             42                  + itself               01010100                  84
   00101010             42                  - Itself               00000000                   0
   00101010             42                     *2                  01010100                  84
   00101010             42                     /2                  00010101                  21
   11001100             204                  None                  11001100                  204
   11001100             204                   + 51                 11111111                  255
   11001100             204                   - 51                 10011001                  153
   11001100             204                  * 1.25                11111111                  255
   11001100             204                  / 1.25                10100011                  163



5.1.1.2 A/D Converter Accuracy
The next thing that needs to test for accuracy is the analog to digital converters.
This can be done by giving the pins an input voltage with a specific frequency
and having an output generated to mimic the AC pulses. The generated output
is sent to a port to be sent triggering an on/off pulse. This value can be observed
by wiring it to a light source or hooking it up to a voltage meter of any sort and
counting the pulses per minute to verify it is as expected. This test should only

                       Approved for public release; distribution is unlimited.
                                               108
                                                                                  EEL4919-SU07-03 v1.0
                                                                                        06 August 2007


be done in very low frequencies if counting the output pulses by human
observation. If testing with faster counting frequencies by a computer would be
the preferred method.




         Table 5-2: Analog to Digital Converter Performance Test Sequence
                                                                                    Observed Output
 Input Voltage    Input Frequency        Expected Output Voltage
                                                                                       Frequency
    +12 V              .1 Hz                           +5 V                               .1 Hz
    +12 V               1 Hz                           +5 V                                1 Hz
    +12 V               3 Hz                           +5 V                                3 Hz
     +6 V              .1 Hz                           +5 V                               .1 Hz
     +6 V               1 Hz                           +5 V                                1 Hz
     +6 V               3 Hz                           +5 V                                3 Hz
    .25 V              .1 Hz                           +5 V                               .1 Hz
    .25 V               1 Hz                           +5 V                                1 Hz
    .25 V               3 Hz                           +5 V                                3 Hz



5.1.2 Actuators
After the microcontroller has been tested for correctness, the actuators are the
next more important module in the system. The actuators are tested for control
and accuracy. This is needed to assure that the gear shifting is done correctly.

5.1.2.1 Control
Once the actuators are finished being developed, the control is the first thing to
test. In order to test the control of the actuators we begin by hardwiring them to a
power supply from which we control its inputs and verify that they are responding
correctly. This should be done for both actuators.

5.1.2.2 Accuracy
Once we verify that the actuators are responding correctly to the voltage being
given, we connect the device to the microcontroller. This is done to verify that
the microcontroller is controlling the actuators correctly. The microcontroller is
set to send an enable and a direction command to each actuator. With these
signals present, the motors will move until a feedback value from their position
sensing potentiometers matches the expected value for the desired gear. The
actuators move accordingly and we test the accuracy of its position in
comparison with where the gear should sit in order shift gears. Table 5-3 shows
the test sequence that is performed when testing the accuracy of the associated


                        Approved for public release; distribution is unlimited.
                                                109
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


voltage in the microcontroller with the actual position of the actuators in respects
to the gear positions. This is done for both actuators.



   Table 5-3: Microcontroller Voltage to Actual Actuator Position Test Sequence
                  Microcontroller’s expected
                                                               Actuator Position
                      feedback Voltage
                      Voltage for Gear 1                              Gear 1
                      Voltage for Gear 2                              Gear 2
                      Voltage for Gear 3                              Gear 3
                      Voltage for Gear 4                              Gear 4
                      Voltage for Gear 5                              Gear 5



5.1.3 Display
In order to assure that the user is seeing what the system intends the user to
see, we need to verify that the communications between the microcontroller and
the display are working together correctly. In order to verify that the display is set
up and working correctly we need to send a series of text messages to the
screen at certain locations to verify that it does indeed work. In testing the
possible combinations of characters we use the character and position test
sequence shown in Table 5-4. This test sequence contains multiple positions to
test positioning, multiple lengths in words, multiple starting positions of words,
and inclusion of words with characters and numbers, and the inclusion of the
space character in the word.



                          Table 5-4: Display Test Sequence
                         Character(s)                               Possition
                             “A”                                      1,1
                             “B”                                      2,2
                             “c”                                      1,3
                             “d”                                      2,4
                        “TestWord1”                                   3,1
                        “Test Word2”                                  4,2



5.1.4 RPM/Velocity Sensors
The RPM and Velocity sensor outputs need to be verified as well before they can
be integrated into the system. This module is tested by pedaling the bicycle on
an elevated stand so that it may remain stationary for the test. The rpm and


                       Approved for public release; distribution is unlimited.
                                               110
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


velocity sensors is wired to any voltage meter, and used to measure the number
of spikes per minute. This does not have any test sequence but the test require
that various speeds are tested to assure the sensors still work under those
conditions.

5.1.5 User Interface
The button set which control the menus the user will see needs to be tested.
This is a simple test to verify that the buttons are responding to being pressed.
This is tested by connecting the buttons to the microcontroller and having the
microcontroller send signals to another port to high representing the button is
being pressed. The output pin of the microcontroller is wired to a light source to
verify when the button is being pressed. No test sequences are needed for this
case, all buttons should be pressed to verify that they work.

5.1.6 Temperature Sensors
The temperature sensor output needs to be verified as well before it can be
integrated into the system. The temperature system is very simple, it is supplied
a voltage and a ground, and it returns a voltage in milivolts that when divided by
10 mill volts, returns the temperature in Fahrenheit. Testing this module proves
to be fairly simplistic. The test sequence described in Table 5-5 covers the
average applied usage of this object. In order to obtain these temperatures, a
control environment is maintained. An indoors closed area with heating or cooling
devices are as accurate thermometers prove to be sufficient enough for
maintaining a controlled environment for testing these temperatures. The outputs
read from any standard volt measuring device.

                  Table 5-5: Temperature Sensor Test Sequence
                  Temperature in degrees
                                                          Expected Voltage in mV
                       Fahrenheit
                           70                                          700
                           75                                          750
                           80                                          800
                           40                                          400
                          110                                          110



5.1.7 Heart Rate Sensors
The heart rate sensor output needs to be verified as well before it is integrated
into the system. This can be achieved by using several people as test subjects
and measuring their heart rates by hand then using the sensors to generate the
pulsating blips which represent the heart rate. After counting the blips per
minute, they should match those computed by hand. To achieve maximum
accuracy, heart rates are taken for both the hand calculation and the sensor


                      Approved for public release; distribution is unlimited.
                                              111
                                                                                    EEL4919-SU07-03 v1.0
                                                                                          06 August 2007


calculation is done at the heart’s resting state to assure that the measurements
don’t change over the time in which it takes to calculate them.

5.1.8 Charging Circuit
The charging circuit needs to be tested to assure that is working properly and
does not provide any potential risk to the system. This testing must be verified
before integrating it into the main system as it could damage any of the other
components. Testing the charging circuit needs to be done with multi-meters
and the power source. A constant speed providing a constant charge in the
charging circuit is tested over a prolonged period to verify that it does not have
any charging issues that may arise over a prolonged period of cycling. The next
case to test would be the case where the speed of the bicycle spikes several
times. This is tested to assure than any unsteady jolts in speed do not provide
any unstable circumstances in which any damage could be done to the system.

5.2 INTEGRATING THE SYSTEM
After all the modules are tested individually the next step in testing is to assure
that the modules work well together. This is done by testing the individual
modules while integrating them into the system. This phase in the testing begins
with the microcontroller and the actuators already integrated from the actuator’s
individual module testing and built upon as we progress.

5.2.1     Actuators and Display Integration
We begin with the integration tests by taking the microcontroller and the actuator
system created for the actuator individual module test previously performed and
integrates the display module. Once the wiring has been taking care of, we set
the microcontroller to move the actuators over a set gap in time and as it
changes the current gear position we display the position to the display. Table
5-6 shows the test sequence that is used to verify this integration step. Setting
the appropriate gear in the microcontroller, the actuators should respond
accordingly and the display show what step is in place at that moment. The time
delay between these should be no less than 30 seconds between gear changes
at first to assure that the actuators are set and displays are accurate before the
microcontroller moves on to the next gear.

        Table 5-6: Microcontroller/Actuator/Display Integration Test Sequence
        Microcontroller sets to gear       Actuator Set to Position of                Display Shows
                    1                                Gear 1                                 1
                    2                                Gear 2                                 2
                    3                                Gear 3                                 3
                    4                                Gear 4                                 4
                    5                                Gear 5                                 5




                          Approved for public release; distribution is unlimited.
                                                  112
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


5.2.2   Temperature Sensor Integration
We proceed with the integration tests by taking the current system involving the
microcontroller, the actuator system, and the display module and integrating the
RPM/Temperature sensors. We need to verify that the software to analyze the
time between spikes is interpreted into RPM and velocity correctly. The next
phase of this test needs to have the sensors wired to the analog to digital
converter so that it may interpret the pulses. The microcontroller takes in the
RPM/Velocity sensor readings and interprets those over time as distance over
time using the circumference of the wheel, and the RPM rate by counting pulses
per unit time. These calculated values are output to the display to facilitate in
analyzing the outputs. Once the outputs of the RPM sensors have been verified
to be correct by comparing them against an external device measuring the same
data, we can proceed to verify that the previous integrations did not get damaged
by this latest integration. We repeat the test sequence shown in Table 5-5 to
verify that the display is showing the correct temperatures. Then we repeat the
test sequence shown in Table 5-6 to verify that adding the temperature sensors
did not cause any problems with the previous system setup.

5.2.3   Temperature Sensor Integration
We proceed with the integration tests by taking the current system involving the
microcontroller, the actuator system, the display module, and the RPM/Velocity
sensors and integrating the temperature sensors. The temperature sensors are
wired to one of the microcontroller’s analog to digital converters so that it may
understand the voltage coming in. Once the wiring has been taking care of, we w
set the microcontroller to display the temperature to the display as well as any
other data that was previously being displayed. We repeat the test sequence
shown in Table 5-5 to verify that the display is showing the correct temperatures.
Then we repeat the test sequence shown in Table 5-6 to verify that adding the
temperature sensors did not cause any problems with the previous system setup.

5.2.4   Heart Rate Sensor Integration
We proceed with the integration tests by taking the current system involving the
microcontroller, the actuator system, the display, RPM/Velocity sensors, and the
temperature sensor and integrating the heart rate sensors. The heart rate
sensors are wired to another of the microcontroller’s analog to digital converters
so that it may also understand the voltage waves coming in from the sensors.
Once the wiring has been taking care of, we set the microcontroller to display the
heart rate to the display as well as any other data that was previously being
displayed. We repeat the tests performed section 5.1.7 to verify that the heart
rate data is being displayed correctly, and then we repeat the sequence shown in
Table 5-5 to verify that the display is showing the correct temperatures. After the
temperature testing, we repeat the test sequence shown in Table 5-6 to verify
that adding the temperature sensors did not cause any problems with the current
system setup.


                      Approved for public release; distribution is unlimited.
                                              113
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


5.2.5    User Interface Integration
After all the individual modules are integrated and are working properly, we
integrate the menu system for the user interface as well as the button system
which control the menu system. In testing this we need to verify that the user is
able to navigate through the menu system with ease maintaining its user
friendliness. This section will not have a test sequence laid out, but is tested by
going in to every sub-menu and verifying that the values displayed are correct
and that any values modified are being modified correctly. The initial portion of
this test should deal only with materials involving the menu. Once the menu is
proven to be working correctly we need to test the previously integrated system
to assure that the integration of the user interface did not damage any of the
previously integrated systems. Repeating the test sequence in section 5.1.7 as
well as the test sequences in Table 5-5 and Table 5-6 is performed to finalize
the testing of the user interface.

5.2.6    Charging Circuit Integration
Once the main logic modules are completely integrated we integrate the charging
circuit. We remain cautious of the power system by implementing a fuse on the
line between the power source and the microcontroller. Once the charging circuit
is integrated, all the subcomponents need to be tested again to verify that
integration of the charging circuit did not damage any other portion of the system.
After the re-testing of all the individual components is completed, if there have
been no issues with the power system, we repeat the charging circuit tests
performed in section 5.1.8. Once this has been tested for correctness we are
able to begin full integration system tests.

5.3 TESTING THE FULLY INTEGRATED SYSTEM
Testing of the fully integrated system requires that we verify that the gear shifting
algorithms are performing at the right times according to the inputs received from
the RPM sensor and the Velocity Sensor. It will also require that all modules be
performing correctly and are displayed correctly. We need to vary the RPM,
Velocity and the patterns for those two to obtain all the possible combinations of
situations that could arise. Table 5-7 shows all the possible combinations that the
rider might encounter along with each combination’s expected gear change. This
table is purely speculation and might require altering once in development. The
main objective it to try and predict what situation the rider is in, in order to adjust
the ride for maximum comfort. In essence, the RPM will be the biggest factor in
this decision, however the velocity will factor in with deciding what is going on
with the environment.



              Table 5-7: RPM/Velocity/Pattern to Gear Test Sequence
RPM        Velocity     RPM Pattern            Velocity Pattern                  Expected Gear Change

                       Approved for public release; distribution is unlimited.
                                               114
                                                                              EEL4919-SU07-03 v1.0
                                                                                    06 August 2007


 RPM     Velocity   RPM Pattern             Velocity Pattern                   Expected Gear Change
 Slow     Slow       No Change                No Change                       No Change or Shift Down
 Slow     Slow       No Change                  Vel Inc                       No Change or Shift Down
 Slow     Slow       No Change                  Vel Dec                       No Change or Shift Down
 Slow     Slow        RPM Inc                 No Change                             No Change
 Slow     Slow        RPM Inc                   Vel Inc                             No Change
 Slow     Slow        RPM Inc                   Vel Dec                       No Change or Shift Down
 Slow     Slow        RPM Dec                 No Change                       No Change or Shift Down
 Slow     Slow        RPM Dec                   Vel Inc                       No Change or Shift Down
 Slow     Slow        RPM Dec                   Vel Dec                       No Change or Shift Down
 Slow    Medium      No Change                No Change                             No Change
 Slow    Medium      No Change                  Vel Inc                             No Change
 Slow    Medium      No Change                  Vel Dec                             No Change
 Slow    Medium       RPM Inc                 No Change                             No Change
 Slow    Medium       RPM Inc                   Vel Inc                        No Change or Shift Up
 Slow    Medium       RPM Inc                   Vel Dec                       No Change or Shift Down
 Slow    Medium       RPM Dec                 No Change                             No Change
 Slow    Medium       RPM Dec                   Vel Inc                             No Change
 Slow    Medium       RPM Dec                   Vel Dec                       No Change or Shift Down
 Slow     Fast       No Change                No Change                             No Change
 Slow     Fast       No Change                  Vel Inc                             No Change
 Slow     Fast       No Change                  Vel Dec                             No Change
 Slow     Fast        RPM Inc                 No Change                             No Change
 Slow     Fast        RPM Inc                   Vel Inc                        No Change or Shift Up
 Slow     Fast        RPM Inc                   Vel Dec                       No Change or Shift Down
 Slow     Fast        RPM Dec                 No Change                             No Change
 Slow     Fast        RPM Dec                   Vel Inc                             No Change
 Slow     Fast        RPM Dec                   Vel Dec                       No Change or Shift Down
Medium    Slow       No Change                No Change                             No Change
Medium    Slow       No Change                  Vel Inc                             No Change
Medium    Slow       No Change                  Vel Dec                             No Change
Medium    Slow        RPM Inc                 No Change                             No Change
Medium    Slow        RPM Inc                   Vel Inc                        No Change or Shift Up
Medium    Slow        RPM Inc                   Vel Dec                       No Change or Shift Down
Medium    Slow        RPM Dec                 No Change                             No Change
Medium    Slow        RPM Dec                   Vel Inc                             No Change
Medium    Slow        RPM Dec                   Vel Dec                       No Change or Shift Down
Medium   Medium      No Change                No Change                             No Change
Medium   Medium      No Change                  Vel Inc                             No Change
Medium   Medium      No Change                  Vel Dec                             No Change
Medium   Medium       RPM Inc                 No Change                             No Change
Medium   Medium       RPM Inc                   Vel Inc                        No Change or Shift Up
Medium   Medium       RPM Inc                   Vel Dec                       No Change or Shift Down
Medium   Medium       RPM Dec                 No Change                             No Change
Medium   Medium       RPM Dec                   Vel Inc                             No Change

                    Approved for public release; distribution is unlimited.
                                            115
                                                                                EEL4919-SU07-03 v1.0
                                                                                      06 August 2007


 RPM      Velocity    RPM Pattern             Velocity Pattern                   Expected Gear Change
Medium    Medium        RPM Dec                   Vel Dec                       No Change or Shift Down
Medium     Fast        No Change                No Change                             No Change
Medium     Fast        No Change                  Vel Inc                             No Change
Medium     Fast        No Change                  Vel Dec                             No Change
Medium     Fast         RPM Inc                 No Change                             No Change
Medium     Fast         RPM Inc                   Vel Inc                        No Change or Shift Up
Medium     Fast         RPM Inc                   Vel Dec                       No Change or Shift Down
Medium     Fast         RPM Dec                 No Change                             No Change
Medium     Fast         RPM Dec                   Vel Inc                             No Change
Medium     Fast         RPM Dec                   Vel Dec                       No Change or Shift Down
 Fast      Slow        No Change                No Change                        No Change or Shift Up
 Fast      Slow        No Change                  Vel Inc                        No Change or Shift Up
 Fast      Slow        No Change                  Vel Dec                        No Change or Shift Up
 Fast      Slow         RPM Inc                 No Change                        No Change or Shift Up
 Fast      Slow         RPM Inc                   Vel Inc                        No Change or Shift Up
 Fast      Slow         RPM Inc                   Vel Dec                        No Change or Shift Up
 Fast      Slow         RPM Dec                 No Change                             No Change
 Fast      Slow         RPM Dec                   Vel Inc                             No Change
 Fast      Slow         RPM Dec                   Vel Dec                             No Change
 Fast     Medium       No Change                No Change                             No Change
 Fast     Medium       No Change                  Vel Inc                             No Change
 Fast     Medium       No Change                  Vel Dec                             No Change
 Fast     Medium        RPM Inc                 No Change                        No Change or Shift Up
 Fast     Medium        RPM Inc                   Vel Inc                        No Change or Shift Up
 Fast     Medium        RPM Inc                   Vel Dec                        No Change or Shift Up
 Fast     Medium        RPM Dec                 No Change                             No Change
 Fast     Medium        RPM Dec                   Vel Inc                             No Change
 Fast     Medium        RPM Dec                   Vel Dec                             No Change
 Fast      Fast        No Change                No Change                        No Change or Shift Up
 Fast      Fast        No Change                  Vel Inc                        No Change or Shift Up
 Fast      Fast        No Change                  Vel Dec                        No Change or Shift Up
 Fast      Fast         RPM Inc                 No Change                        No Change or Shift Up
 Fast      Fast         RPM Inc                   Vel Inc                        No Change or Shift Up
 Fast      Fast         RPM Inc                   Vel Dec                        No Change or Shift Up
 Fast      Fast         RPM Dec                 No Change                             No Change
 Fast      Fast         RPM Dec                   Vel Inc                             No Change
 Fast      Fast         RPM Dec                   Vel Dec                             No Change



5.4 FINAL SYSTEM TEST
At this point, all modules have been integrated and tested and all performance
should be working as it is supposed to. In this test stage the final prototype is
field tested and should include a full spectrum sample of all the sub-cases tested

                      Approved for public release; distribution is unlimited.
                                              116
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


previously. The temperature should not be maintained in a closed environment.
It is safe to say at this point it is accurate and does not need any further testing.



                       Table 5-8: Final System Test Sequence
            Pace                          Incline                                  Velocity MPH
         Stay Slow                         None                                        5-15
         Stay Slow                      Heavy Uphill                                    <5
         Stay Slow                     Heavy Downhill                                  >15
     Slow to Medium                        None                                        5-15
     Slow to Medium                     Heavy Uphill                                    <5
     Slow to Medium                    Heavy Downhill                                  >15
       Stay Medium                         None                                        5-15
       Stay Medium                      Heavy Uphill                                    <5
       Stay Medium                     Heavy Downhill                                  >15
     Medium to Slow                        None                                        5-15
     Medium to Slow                     Heavy Uphill                                    <5
     Medium to Slow                    Heavy Downhill                                  >15
        Slow to Fast                       None                                        5-15
        Slow to Fast                    Heavy Uphill                                    <5
        Slow to Fast                   Heavy Downhill                                  >15
          Stay Fast                        None                                        5-15
          Stay Fast                     Heavy Uphill                                    <5
          Stay Fast                    Heavy Downhill                                  >15
        Fast to Slow                       None                                        5-15
        Fast to Slow                    Heavy Uphill                                    <5
        Fast to Slow                   Heavy Downhill                                  >15



6.0 ADMINISTRATIVE CONTENT
The administrative aspects of the Digi-Cycle’s engineering team are Personal,
Facilities and Equipment, suppliers, Budget and Finance, and the Milestone
Chart and project schedule. All of these topics are important, as careful planning
and evaluation in these areas can help to streamline the development process,
and all have a critical role in assuring the project’s success. Each of these topics
is detailed further in their corresponding sub-sections found in this section.

6.1 PERSONNEL
The engineering team consists of two computer and two electrical engineering
students. All students have an education background to guide them through the
project. Students also have other trades that can contribute to this project.



                       Approved for public release; distribution is unlimited.
                                               117
                                                                                  EEL4919-SU07-03 v1.0
                                                                                        06 August 2007


Some mechanical contributes are basic knowledge of tools from working on cars
and bicycles. Also, understanding the details on how stationary bicycles operate
and the knowledge of the components on it are attributes to the project. Some of
the computer related features that students can bring to the project is the
capability to program microcontrollers and microprocessors, and the capability of
programming in several high level languages.

 Each person in the group is assigned a section of the Digi-Cycle to research.
They are responsible for the section assigned for the entire project, including
responsibly of making sure the part operates accurately on the bike.

6.2 EQUIPMENT & FACILITIES
The equipment used on during the development of Digi-Cycle includes basic
hand tools, a soldiering iron, multimeter, function generators, and an
oscilloscope. Basic hand tools may include but are not limited to screwdrivers,
hammers, wrenches, etc. These tools are used to bond the components and the
bicycle together. A soldering iron is a device for applying heat to melt solder for
soldering two metal parts together. The iron will be used to solder components
and circuits to PCB boards. A multimeter is an electronic measuring instrument
that combines several functions in one unit. These functions can read the
voltage, current and the resistance on each component. On the Digi – Cycle, the
multimeter verifies the voltage and current to make sure the levels are what they
need to be. An oscilloscope is a piece of equipment that allows signals to be
viewed, usually as a two dimensional graph. In the project the device is used for
troubleshooting and to detect if the sensors are working properly. Other common
power tools became necessary during the fabrication stage. These tools include
cordless power drills and a Dremel.

Facilities used during the development, fabrication, and testing of a Digi-Cycle
prototype will include UCF, UCF robotics lab, as well as personal residences.
Fabrication of mechanical components are planned to occur at a group member’s
residence, as both space and tool availability should be sufficient to support the
creation and assembly of the bicycle’s necessary mechanical systems. Some
additional component fabrication may occur at the UCF robotics lab should the
task require more complex tools such as a drill press or lathe.. Additional
facilities for electronic circuit design, test, and fabrication will include several UCF
labs such as the Senior Design Lab.

6.3 VENDORS & ACQUISITION
The equipment and supplies were purchased from a variety of vendors. The
primary supplier is Skycraft Parts and Surplus. Skycraft is a local surplus
electronic supplier that has bargain prices, and hard to find items. Other
electronic suppliers will include Digi- Key, Allied, Jameco, Radio Shack, and
Mouser. Several PIC 18F452 microcontrollers have been obtained through
Microchip’s sampling program.

                        Approved for public release; distribution is unlimited.
                                                118
                                                                                     EEL4919-SU07-03 v1.0
                                                                                           06 August 2007


6.4 BUDGET
The Digi-Cycle project is a simple, low cost system. Component parts for
prototyping and a final system build are the only major monetary cost associated
with the development of the Digi-Cycle project. Several parts are expected to be
obtained at no cost through personal donations, or through evaluation samples
from the part supplier, but have still been assigned a non-zero dollar amount in
order to disclose a maximum possible build cost for the project.



                               Table 6-1: Digi-Cycle Part Cost
                                                                       Est. Unit
                            Item                           Qty.                         Total Cost
                                                                        Cost
          Microcontroller                                    1                $0.00          $0.00
          Hall Effect Sensors                                3               $12.00         $36.00
          Heart Rate Sensor Plates                           2                $0.00          $0.00
          Temperature Sensor                                 1               $10.00         $10.00
          Stepper or Servo Motors/Solenoids                  2               $15.00         $30.00
          Rechargeable Battery                               1               $15.00         $15.00
          Generator/Alternator                               2               $15.00         $30.00
          LCD                                                1               $30.00         $30.00
          Bike                                               1               $60.00         $60.00
          Misc. Passive electronics components               1              $200.00        $200.00
          Solder, PC Board, Project box, wires               1               $30.00         $30.00
          Tools                                              1               $20.00         $20.00
                                                                             Total:        461.00



NOTE: This estimated budget does not take into account items that may need to be purchased
for evaluation during the development process, and represents a possible cost of a nearly perfect
build scenario.

6.5 FINANCING
No prospective sponsors have been identified for the Digi-Cycle project. As a
direct result of this, along with a relatively low projected budget, Digi-Cycle is
funded by the participating group members. In order to further reduce costs,
many of the parts necessary were donated, salvaged, or obtained free of charge
through vendor evaluation programs.

6.6 MILESTONE CHART
Digi-Cycle developed and produced over a series of three main phases or
milestones. The first, Milestone A (MS/A), ended with a working prototype of the
Data Delivery and Power Management subsystems, as well as a highly simplified
UI. This prototype is used to test these subsystems, locate flaws, and collect
data needed to determine correct shift points for Digi-Cycle. The second

                           Approved for public release; distribution is unlimited.
                                                   119
                                                                                  EEL4919-SU07-03 v1.0
                                                                                        06 August 2007


milestone is Milestone B (MS/B). MS/Bl terminated upon the completion of a
second working prototype to include all features from MS/A, along with the
addition of manual shifting abilities, and a vastly improved UI. The final
milestone completed when all features have been incorporated into Digi-Cycle,
tested thoroughly, and a working product has been prepared for delivery. This
milestoneis known as Full Operational Capability (FOC). Table 6-2 outlines the
duration of each of the three milestones, and describes any steps that are to be
completed within that duration.


               Table 6-2: Program Mission and Milestone Schedule
                                                                                                   Capability
Mission   Deadline         Title                                 Description
                                                                                                    Phase
                                          Layout and subject matter of the final document
                                          needs to be decided and documented. Each
                                          subject needs to be assigned to a group member.
                      Document            This member then will be responsible for the text
   A      1/25/2007   Decisions           in that subject.
                                          This drawing shall show the finished product in
                                          Autocad2007. (Note:) To do this drawing the
                      Assembly            group must decide what features will be used on
   B      2/2/2007    Drawing             the bike.
                                          This drawing is a detailed drawing of the
                      Bike                assembly. (Note:) Standard parts (No part
   C      2/8/2007    Schematic           number) will be used in the drawing.
                      Other               These drawing consist of integrated assemblies
                      Assembly &          (sub division) within the main assembly the Dig-
                      Schematic           Cycle. (Note:) Standard parts (No part number)
   D      2/15/2007   Drawings            will be used in the drawing.
                                          Mfg parts need to be determined by collecting              MS/A
                                          data and listing advantages and disadvantages
                                          of each part. This information can be obtained
                      Collect Mfg         from data sheets. The part can then be ordered
   E      2/22/2007   Parts               or purchased.
                      Pseudo code
                      and Detail          Explanations in pseudo code need to be
   F      3/1/2007    Explanations        described in detail for each programmable part.
                                          A document describing the step by step process
                      Design              it takes to develop the final product (Digi –
   G      3/8/2007    Document            Cycle).
                      Integrated
                      Detail              A document describing the how the assemblies
   H      3/15/2007   Document            and parts are integrated within each other.
                                          This manual will explain how the user can
                                          operate the bike. The manual will include
                                          software features as well as safety and
    I     3/22/2007   Bike Manual         maintenance features




                        Approved for public release; distribution is unlimited.
                                                120
                                                                                  EEL4919-SU07-03 v1.0
                                                                                        06 August 2007


                                                                                                   Capability
Mission   Deadline         Title                                 Description
                                                                                                    Phase
                      Revise All
                      Assemblies &        Revise all schematics & assembly drawings with
   J      3/27/2007   Schematics          manufacture part numbers.
                                          This document shall include a Manufacture part
                      Manufacture         number, a detailed description of the part, and
   K      4/1/2007    Parts List          location of the part on bike.
                                          Topics in the discussed in Mission A should be
                      Completed           recorded into the final document. The document
   L      4/15/2007   Document            should then be proofread
                      Select              Select three professors that will enjoy listing to a
   M      4/23/2007   Professors          senior design project.
                      Create
                      Preliminary         Build the first prototype to acquire data for shift
   N      5/1/2007    Prototype           points, and output software
                      Data                Collect data from prototype for shift points and
   O      5/7/2007    Collecting          output software
                      Programmable
   P      5/15/2007   Parts               Program the parts that contain software                    MS/B
                      Second
   Q      5/25/2007   Prototype           Create a second prototype and add all systems
   R      6/1/2007    Test Prototype      Test second prototype
   S      6/7/2007    Final Product       Build final product
                      Test Final
   T      6/14/2007   Product             Test the final product of the Digi- Cycle
                                                                                                     FOC
                      Revise              Revise schematics & Assemblies and other
   U      6/20/2007   Documents           documents.
   V      6/25/2007   Presentation        Create a presentation of the design of Digi- Cycle




7.0 CONCLUSIONS
7.1 RESEARCH SUMMARY
7.1.1 Microcontroller
The microcontroller selected for this application is the PIC18F452. This device
was selected in an effort to reduce project costs and learning curves. The group
already possesses all required development hardware and software for this chip,
and has previous experience developing for this device. In addition, the 18
series of PIC microcontrollers are ideal for developing in the C language, which
greatly simplifies the software engineering process. Another benefit of the
18F452 is that it has a sufficient number of GPIO pins for any possible
combination of devices that it is required to interface to, and a rich feature set
which will simplify development and reduce the need for additional hardware.




                        Approved for public release; distribution is unlimited.
                                                121
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


7.1.2 Display
In the display research, we considered the possibility of using LEDs as well as
LCDs as the display for the system. In the LED comparison we checked the
applicability and usefulness of the seven segment LED and the dot-matrix LED
but neither of those had the capability of displaying enough information without
having an overly expensive price tag. In the LCD comparison, we compared the
parallel and the serial LCDs as well as the use of graphics LCDs. In this
comparison we concluded that we choose most likely choose a serial graphics
LCD because of its usefulness, ease of use and applicability if funding was
available, however, suitable funds were not found, and we were forced to choose
a cheaper alternative so we chose a text based black and white parallel LCD.

7.1.3 Heart Rate Sensor
A heart rate monitoring system was incorporated into the overall design of the
Digi-Cycle. This module will be responsible for the monitoring of the users heart
rate by detecting the electrical signal (EKG) or pulse flow rate of the blood in the
capillaries of the body. The EKG signal of the heart is sinusoidal like in nature
and is emitted by the contraction of the heart. However, the signal is very small,
so further electronics design will be needed. Several technologies will be
investigated such as infrared and blood flow detection from the capillaries.
Wireless was looked into as well as an added convenience.

7.1.4 Temperature Sensor
In the temperature sensor research, we considered the possibility of using silicon
band gap temperature sensors, thermistors, thermocouples, and Resistance
Temperature Detectors (RTDs). After looking into all of these devices and
weighing their advantages over their disadvantages and we came to the
conclusion that the resistance temperature sensors and the thermocouples are
too cost ineffective for our purposes. We also concluded that it would be simpler
to use the silicon band gap temperature sensors, and because of that we chose
to implement the silicon band gap temperature sensors.

7.1.5 RPM/Velocity Sensors
Digi-Cycle need a type of RPM sensor that will allow the microcontroller to
calculate and output to the LCD the speed and distance at which Digi-Cycle is
traveling. This sensor is also involved with the automatic gear shifting that will be
implemented on the bike. A digital RPM sensor would be preferable in that no
analog to digital conversion would be necessary and it can be applied directly to
the microcontroller although some microcontrollers already have an ADC built in.
The sensor must be able to withstand outside weather conditions. Important
factors such as its sensitivity to oil, dirt, humidity, dust, vibrations, perspiration
and oxidation must also be taken into account as this would be the typical
environment of Digi-Cycle. The RPM sensor selected for the application is the
Hall Effect sensor.

                       Approved for public release; distribution is unlimited.
                                               122
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


7.1.6 Actuators
It has been determined that a DC motor mechanically coupled to the derailleur by
lever arms or gears, and connected to an electromechanical feedback device (a
potentiometer) would be the best solution for the project. DC motors can deliver
a reasonably high level of torque for a low cost, but are slightly more difficult to
control. To compensate for this, a potentiometer is added to determine the
position that the motor is in. This has the added advantage of ensuring that the
actuator is not deactivated until it reaches the desired position, which regular
servo and stepper motors cannot deliver.

7.1.7 Power Supply
The power supply has two sources a primary and a secondary. The primary
source is a 12V NiMH battery and the secondary source is 2 Dynamo 6V
generators. The battery is the main source for all the components that need to be
powered. The generators power and charge the battery. Additional parts are
added to the circuit to help supply and direct the current and voltage amount to
the correct path. The additional components are voltage regulator, voltage
convertor, a fuse, capacitors and resistors.

 The voltage leaving the battery is divided into different voltages. Voltage
regulators produce the voltage sources for two 5 volt and a 10 volt source. A
negative voltage source is produced from a voltage convertor chip. Resistors in
capacitors will be placed through out the circuit to deliver the and even out the
correct flow of current.

7.2 PROJECT SUMMARY
In summary, the Digi-Cycle project presents several challenges which must be
met for the system to succeed. Perhaps two of the biggest problems presented
are developing functioning RPM sensor and actuator systems, as the both
require significant mechanical design in addition to electrical and software
design, which will be a bit of a trial for a group lacking a mechanical engineer.
With this aside, creating a power supply which can keep up with the demands of
the system for extended periods of time, as well as a user interface that is
powerful yet easy to operate effectively while in motion offer many ambitious
marks to be met here as well.

The Digi-Cycle project produced a system capable of shifting gears on a multi-
speed bicycle automatically and electronically. This is the fundamental principle
driving the Digi-Cycle project, and therefore its ultimate objective. The addition of
devices such as a temperature sensor and heart rate monitors are for inclusion in
the project, but are only secondary objectives. Thus, development of these
systems will continue until completion, or until such a time when they begin to
interfere with the progression of the primary objective.



                       Approved for public release; distribution is unlimited.
                                               123
                                                                                 EEL4919-SU07-03 v1.0
                                                                                       06 August 2007


To achieve these current objectives, Digi-Cycle uses a series of sensors linked to
a microcontroller to adjudicate a shift condition. The microcontroller will then
send a signal to the actuator to shift to the appropriate gear. The user has a vast
amount of control over several conditions, especially where it pertains to data
being collected and displayed. The user will interact with the system through
menus on an LCD whose options will correspond with a series of buttons. The
entire system draws its power through a regulated supply from rechargeable
batteries and a generator to assure system endurance.

Digi-Cycle is highly cost effective to develop due to the fact that the group lacks
sponsorship, and must fund the entire budget from private sources. This will
dictate that all parts, materials, tools, and software required to develop and build
Digi-Cycle are as economical as possible. In addition, the entire system is
developed, assembled, and tested to a reasonable level of maturity within an
abbreviated (summer) semester. Therefore, in addition to all parts needing to be
cost effective, no uncommon or extravagant or uncommon parts can be used, as
procuring these parts could present serious setbacks in time.

Digi- Cycle is a challenging project, but with realistic goals. Both the schedule
and budget set forth and complete, the project is a success.




                       Approved for public release; distribution is unlimited.
                                               124
                                                                                                                       EEL4919-SU07-03 v1.0
                                                                                                                             06 August 2007


Appendix A - SYSTEM REQUIREMENTS

Requirement                                                                                                             Capability   Verification
                                               Requirement                                              Subsystem
  Number                                                                                                                 Phase        Method
Req001        Digi-Cycle must automatically shift gears on a bicycle.                                  Shifting           FOC             A

Req002        Digi-Cycle must measure pedal RPMs ranging from 0 to +250 RPM (+- 2%)                    Shifting           MS/A            T
Req003        Digi-Cycle must measure/calculate ground speed from 0 to 50 MPH (+- 2%)                  Shifting           MS/A            T
              Digi-Cycle must interface electromechanically to the existing bicycle gear
Req004        system                                                                                   Shifting           MS/B            I

Req005        Digi-Cycle must detect when the bike is coasting and respond accordingly                 Shifting           FOC             T
Req006        Digi-Cycle must detect when the bike is stopped and respond accordingly                  Shifting           FOC             T
Req007        Digi-Cycle must detect increased pedal speed and respond accordingly                     Shifting           FOC             T
Req008        Digi-Cycle must detect decreased pedal speed and respond accordingly                     Shifting           FOC             T
Req009        Digi-Cycle must detect and respond to change in ground speed                             Shifting           FOC             A
Req010        Digi-Cycle must include a manual electronic shift option                                 Shifting           MS/B            I
Req011        Digi-Cycle must include an LCD                                                           Data Delivery      MS/A            I
              Digi-Cycle must output ground speed with a refresh rate of no greater than 1
Req012        second                                                                                   Data Delivery      MS/A            T
              Digi-Cycle must output pedal RPMs with a refresh rate of no greater than 1
Req013        second                                                                                   Data Delivery      MS/A            T
              Digi-Cycle must measure/output heart rate with a refresh rate of no greater
Req014        than 1 second                                                                            Data Delivery      MS/B            T
Req015        Digi-Cycle must output distance traveled                                                 Data Delivery      MS/B            T
Req016        Digi-Cycle must measure/output ambient temperature                                       Data Delivery      MS/B            T

Req017        Digi-Cycle must display a configurable timer with a refresh rate of 1 second             Data Delivery      MS/B            T



                                             Approved for public release; distribution is unlimited.
                                                                     A-1
                                                                                                                        EEL4919-SU07-03 v1.0
                                                                                                                              06 August 2007


Requirement                                                                                                              Capability   Verification
                                               Requirement                                              Subsystem
  Number                                                                                                                  Phase        Method
Req018        Digi-Cycle must display current gear                                                     Data Delivery       MS/A            T
Req019        Digi-Cycle must display estimated calories burned                                        Data Delivery       MS/B            T
Req020        Digi-Cycle must display average speed, RPMs, heart rate                                  Data Delivery       MS/B            T
Req021        Digi-Cycle must display Max speed, RPMs, heart rate                                      Data Delivery       MS/B            T
Req022        Digi-Cycle must have a user friendly UI                                                  User Interface      MS/B            A
Req023        Digi-Cycle must include multi-function buttons                                           User Interface      MS/A            I
Req024        Digi-Cycle must include a menu series                                                    User Interface      MS/B            I
Req025        Digi-Cycle must have configuration options                                               User Interface      MS/B            I
                                                                                                       Power
Req026        Digi-Cycle must run on low power                                                         Manager             MS/A            A
                                                                                                       Power
Req027        Digi-Cycle must run on a rechargeable battery                                            Manager             MS/A            I

                                                                                                       Power
Req028        Digi-Cycle must include an alternator or generator to recharge the battery               Manager             MS/A            I
                                                                                                       Power
Req029        Digi-Cycle must have a tool-less adjustment procedure                                    Manager             MS/B            A




                                             Approved for public release; distribution is unlimited.
                                                                     A-2
                                                                            EEL4919-SU07-03 v1.0
                                                                                  06 August 2007


Appendix B - ACRONYMS, ABBREVIATIONS, & UNITS
A        Amperes
AC       Alternating Current
ADC      Analog to Digital Conversion
Ah       Amp-Hours
ASCII    American Standard Code for Information Interchange
BOR      Brown-Out Reset
CMOS     Complimentary Metal Oxide Semiconductor
COTS     commercial-off-the-shelf
CPU      Central Processing Unit
DC       Direct Current
EKG      ElectroCardiogram
FOC      Full Operational Capability
GPIO     General Purpose Input/Output
I/O      Input/Output
in-lbs   Inch-Pounds
IR       Infrared
KPP      Key Performance Parameter
LC       Indictive-Capacitive
LED      Light Emitting Diode
Li-Ion   Lithium Ion
LQFP     Low-Profile Quad Flat Package
mA       milliamperes
MCU      Microcontroller Unit
MOSFET   Metal Oxide Semiconductor Field Effect Transistor
MPH      Miles per Hour
ms       milliseconds
MS/A     Milestone A
MS/B     Milestone B
mV       millivolts
NiMH     Nickel Metal Hydride
oz-in    Ounce-Inches
PDIP     Plastic Dual-In-Line Package
PRT      Platinum Resistance Thermometers
PVC      Polyvinyl Chloride
RAM      Random Access Memory
RC       Radio Controlled
RISC     Reduced Instruction Set Computer
RoHS     Reduction of Hazardous Substances
RPG      Rotary Pulse Generator
RTD      Resistance Temperature Detection
UCF      University of Central Florida
UI       User Interface
V        Volts
WDT      Watchdog Timer
                  Approved for public release; distribution is unlimited.
                                          B-1
                                                                                         EEL4919-SU07-03 v1.0
                                                                                               06 August 2007



Appendix C - INDEX OF REFERENCES

From: Roberto Reyes <rrey81@gmail.com>
Date: Mar 25, 2007 9:54 PM
Subject: Re: permission
To: lou Law <lou@gmw.com>

Thank you very much!


On 3/25/07, lou Law <lou@gmw.com> wrote:
Please go ahead and use the pictures
Lou

Lou Law

Senior Sales Manager, Magnetic Sensors

GMW Associates



Phone: 509-328-4326 (Direct)   Main Office: 650-802-8292

Fax:   509-325-3106 (Direct)

E-mail: _lou@gmw.com_

WEB:    _www.gmw.com_




Roberto Reyes wrote:
> To whom it may concern,
>
> I am a student at the university of central flordia. My group members
> and I
> are working on project involving hall-effect sensors. We wanted to
> know if
> we could use a copy of the pictures that are on your website, in our
> document? We are only going to use the picture to show in our document
> several types of hall-effect sensors we could use for our project. it is
> only for educational purposes. Thank you for your time.
>
> Best Regards,
>
> Roberto Reyes
>




                               Approved for public release; distribution is unlimited.
                                                       C-1
                                                                                           EEL4919-SU07-03 v1.0
                                                                                                 06 August 2007


From: Roberto Reyes <rrey81@gmail.com>
Date: Apr 18, 2007 8:41 PM
Subject: Request to use pictures
To: webmaster@oscientific.com

To whom it may concern:

I am a student at the university of central florida. I am in a senior design group doing a project. We wanted to
know if we could use some of the pictures that are on ur website for our paper. it is simply for design purposes.
Thank you for your time.

Regards,

Roberto Reyes



From: Roberto Reyes <rrey81@gmail.com>
Date: Mar 8, 2007 8:31 PM
Subject: Schematic -- e-dsp contact form
To: rrey81@gmail.com


Hi Refik,

I am from central florida in United States in Orlando. I am studying to be
an electrical engineer and am doing a project on a bike that has to detect
a heart rate and display to a small lcd screen. I am contacting you
because I wanted to know if I could use a copy of your schematic for the
heart rate monitoring system in my Senior design report? Your information
has helped me alot. I hope I havent bothered you with this.

Thanks, Roberto




From: jennifer clifford <sunnmoonstarzs@gmail.com>
Date: Apr 18, 2007 11:16 PM
Subject: permission to use pictures &emails
To: info@bumm.de
Cc: "John T. Baker" <johntster@gmail.com>

To whom it may concern;



 I am an engineering student at University of Central Florida. This semester I am designing a
senior design project. The project is developing a bicycle that will shift gears electronically. In
the design class we are required to write a 120 page paper about the project. May I have
permission to use diagrams and pictures in your website in my paper?

Thanks for your help,
                                 Approved for public release; distribution is unlimited.
                                                         C-2
                                                                                       EEL4919-SU07-03 v1.0
                                                                                             06 August 2007


Jennifer Clifford



From: jennifer clifford <sunnmoonstarzs@gmail.com>
Date: Apr 18, 2007 4:07 PM
Subject: permission to use diagrams & pictures
To: media@howstuffworks.com

To whom it may concern;



 I am an engineering student at University of Central Florida. This semester I am designing a
senior design project. The project is developing a bicycle that will shift gears electronically. In
the design class we are required to write a 120 page paper about the project. May I have
permission to use diagrams and pictures in your website in my paper?

Thanks for your help,

Jennifer Clifford



From: jennifer clifford <sunnmoonstarzs@gmail.com>
Date: Apr 18, 2007 11:38 PM
Subject: Re: Permission to Use Pictures & Diagrams
To: richard@tpub.com
Cc: "John T. Baker" <johntster@gmail.com>



On 4/18/07, jennifer clifford <sunnmoonstarzs@gmail.com> wrote:

To whom it may concern;



 I am an engineering student at University of Central Florida. This semester I am designing a
senior design project. The project is developing a bicycle that will shift gears electronically. In
the design class we are required to write a 120 page paper about the project. May I have
permission to use diagrams and pictures in your website in my paper?

Thanks for your help,

Jennifer Clifford
                             Approved for public release; distribution is unlimited.
                                                     C-3

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:22
posted:7/30/2011
language:English
pages:142