High Level Design Document
December 8, 2022
SmartCycle
Liz Callahan, Jimmy Duke, Alex Kaup, Shaggy “Joe” Lubetski, and John Sexton
Fall 2022 High Level Design Document
Table of Contents
1. Introduction
2. Problem Statement and Proposed Solution
3. System Requirements
4. System Block Diagram
4.1. Overall System
4.2. Sensors-Board Subsystem Requirements
4.3. Heart Rate Monitor Subsystem Requirements
4.4. LCD Display Subsystem Requirements
4.5. App Interface Requirements
4.6. Future Enhancement Requirements
5. High Level Design Decisions
5.1. General Decisions
5.2. Sensors-Board Subsystem Decisions
5.3. Heart Rate Monitor Subsystem Decisions
5.4. LCD Display Subsystem Decisions
5.5. App Interface Decisions
6. Major Component Costs
7. Conclusions
R. M. Schafer 1 EE Senior Design
Fall 2022 High Level Design Document
1. Introduction
Liz Callahan, Jimmy Duke, Alex Kaup, Shaggy “Joe” Lubetski, and John Sexton
Team 7: SmartCycle
2. Problem Statement and Proposed Solution
Stationary exercise bicycles are one of the greatest modern luxuries of our
time. The user gets some healthy and productive cardiovascular exercise rather
easily, and, in smarter systems, can view several personal health and mobility
statistics while remaining in the comfort of their own home. However, with
current technology, these two benefits come as a package deal, and some
people would rather enjoy the info presented by stationary bicycles while
enjoying the great outdoors. Smart watches can provide an outdoor user these
benefits, but they also tend to be rather expensive and require an LTE
connection to track the user’s location and speed. Speaking of expensive,
stationary exercise bicycles are usually a non-worthwhile investment for those of
low/average income: high-quality exercise bikes such as Peloton and SoulCycle
range in price from $1,500 to $2,500, and average/lower quality bikes are less
likely to provide as much useful data [1,2]. Finally, not everyone has room for a
stationary exercise bike in their house as they can take up quite a bit of space.
Our project, the SmartCycle, seeks to resolve all of these issues: it would
provide the user with heart rate, calorie, distance, and velocity data while
enjoying the benefits of biking outside, and it would provide a cheaper and more
easily storable alternative to a stationary bicycle. Essentially, this device would
serve as a modification to an existing outdoor bicycle, saving even more money
for those who want to own both because of the different benefits. Using a central
board, a collection of sensors, and an LCD screen, this system should be able to
convert mechanical movement into useful electrical signals. It would also use
bluetooth capabilities to connect to an application on the user’s smartphone,
providing easy data storage and a more user-friendly interface. Overall, this
system would effectively serve any cyclist, casual or otherwise, who wishes to
get the most out of their commute and/or cardio-exercise routine.
R. M. Schafer 2 EE Senior Design
Fall 2022 High Level Design Document
3. System Requirements
3.1. General Requirements
3.1.1. The system shall integrate with a general use bicycle without interfering
with normal function
3.1.2. The system shall not introduce any additional hazards to the cyclist
3.1.3. The installation shall require no advanced tools
3.1.4. The installation time shall be under 20 minutes
3.1.5. The weight of the system shall not exceed 2.25kg so as to not unbalance
the bicycle’s weight distribution
3.1.6. The board shall be encased in a 3D printed box that connects to the LCD
panel on the handlebars
3.1.7. The wiring and sensors shall be encased in insulated material
3.2. Hardware Requirements
3.2.1. The system shall measure data on bike speed to within 0.2 mph
3.2.2. The system shall measure data on pedal speed to within 0.1 rps
3.2.3. The system shall measure data on bike incline to within 5 degrees
3.2.4. The system shall measure heart rate of the user to within 10 bpm
3.2.5. The system shall contain an LCD display
3.2.6. The system shall contain sufficient buttons to be able to fully control the
LCD display
3.2.7. The LCD panel shall be sufficiently large to display:
A. Total distance traveled
B. Average speed
C. Heart Rate
D. Time Elapsed
E. Calories Burned
F. Previous Mile Split
G. Device Battery Level
3.3. Software Requirements
3.3.1. The microprocessor shall regularly command measurement updates from
hardware
3.3.2. The microprocessor shall save off sufficient data to calculate:
A. Total distance traveled
B. Average speed
C. Heart Rate
D. Time Elapsed
E. Calories Burned
F. Previous Mile Split
3.3.3. The microprocessor shall be able to connect via bluetooth to a single
cellular phone to push data to it (within a range of 10m)
3.4. Environmental Factors
3.4.1. The system shall operate unimpeded in temperatures from 32°F to 100°F
3.4.2. The system shall operate in rainy weather
3.5. Power Requirements
3.5.1. The device shall be powered using a 2Ah, 3.7 LiPo rechargeable battery
R. M. Schafer 3 EE Senior Design
Fall 2022 High Level Design Document
3.5.2. The device shall be powered continuously for at minimum 8 hours
3.5.3. The device shall be able to be turned off when not in use
3.5.4. The device shall be able to be charged via a USB C charger
4. System Block Diagram
4.1. Overall System:
4.2. Sensors-Board Subsystem Requirements:
In order to accurately display the heart rate, distance, and velocity data,
the system will need several sensors connected to its central board which will
then process the signals sent from the sensors and display the necessary data
on the also-connected LCD screen. For the different datasets, we have chosen
different types of sensors believed to be optimal for each.
To measure the distance traveled as well as instantaneous speed, we will
attach a Hall effect sensor to the part of the frame near the front wheel, and on
one of the spokes on the front wheel we will attach a magnet. When the
magnet passes the sensor, it will induce a current, and based on this current
spike we can determine both the rpm of the wheel (and thus the speed with an
input of wheel radius) and the distance traveled as the system will also contain
a timer that starts at the beginning of a ride. Similarly, a second Hall effect
sensor will be attached to the metal crossbar connecting the front and back
wheels, in close proximity to the pedal. The corresponding magnet will be
placed on the pedal to determine how fast the pedals are turning. This will aid
R. M. Schafer 4 EE Senior Design
Fall 2022 High Level Design Document
in data collection for calories burned. A gyroscope would also be attached to
this subsystem to measure tilt which will help determine rider effort and thereby
the number of calories burned.
4.3. Heart Rate Monitor Subsystem Requirements:
To measure the rider’s heart rate, we will need to create a small board with
a variety of components, most notably an infrared emitter that will measure
blood flow in the palm. This will create another electrical signal to send to the
board. The display will be set to update at least every couple of seconds.
4.4. LCD Display Subsystem Requirements:
All of these signals’ data will be displayed on an LCD screen attached to
the handlebars, also connected to the central board. The screen will also have
a button panel in its interface that can be used to change between the different
screen layouts.
4.5. App Interface Requirements:
The app will read in data from the gyroscope and Hall effect sensors to
create a set of workout data from the activity. This data will include heart rate
measurements, total distance traveled, gear, incline, calories burned, and mile
split times. This data can then be processed to the iPhone health app via
bluetooth.
4.6. Future Enhancement Requirements:
A number of features could be added to this device using software. For
example, the device could be able to classify workout intensity or give more
specific data/statistics on workout performance. The feature of choosing
workout intensity or workout specifications could be added, which would
involve more analysis on how data from the heart rate monitor, gyroscope, Hall
effect sensors, and gear shift works in conjunction to determine intensity of the
workout.
Another obvious feature that could be added would be to add a physical
gear shifter and another sensor to determine what gear the bike is in, and to
automatically change the bike gear depending on how difficult the terrain is.
5. High Level Design Decisions
5.1. General Decisions
For controls and communication, we are planning to use an ESP 32 for its
Bluetooth capabilities (it has the capability to connect to at least one device), its
ability to interface through I2C to our two Hall effect sensors, gyroscope, and
heart rate sensor, and our familiarity with it.
R. M. Schafer 5 EE Senior Design
Fall 2022 High Level Design Document
For power, we are planning to use the Adafruit 2.7Ah 3.7 V
lithium-polymer rechargeable battery because it meets the system
requirements for amp hours, battery type, and recharging ability [3]. This
battery has also been selected for its lower price, and the Seeed Technology
LiPo Rider Plus USB C Interface has been selected to allow for recharging to
occur [4].
5.2. Sensors-Board Subsystem Decisions
A gyroscope will be used to measure tilt in order to help calculate calories
burned. This option has over 90,000 in stock. The gyroscope can also use I2C or
SPI comms [5].
We will need another sensor to detect the distance the bike has traveled.
Our idea for this is to use a Hall effect sensor. We will attach a magnet to one of
the spokes on the front wheel, and put the sensor attached to the frame on the
front wheel, and the magnetic field spike when the magnet is next to the sensor
can give us an rpm of the wheel, which using the circumference of the wheel can
be converted into distance [6]. This will allow us to collect and then send distance
and speed data to the LCD through the microcontroller. We are planning to use
I2C communication to gather data from our Hall effect sensors.
5.3. Heart Rate Monitor Subsystem Decisions
To make the heart rate monitor, we are planning to create a small board
loosely using the instruction guide from Jameco [7]. This would be attached to
the handlebars to measure heart rate in the palm. We are planning to use I2C
communication to gather data from this heart rate monitor.
The list of items we would need for this is as follows:
- LM324N quad
channel op amp
- 2N3904 general
purpose NPN
transistor
- 1 𝜇F capacitor
- .1𝜇F capacitor
- 470kΩ resistor
- 68kΩ resistor
- 39kΩ resistor
- 8.2kΩ resistor
- 1kΩ resistor
- 1.8kΩ resistor
- 220Ω resistor
- 880nm, 5mm infrared
emitter LED
- 5mm phototransistor
5.4. LCD Display Subsystem Decisions
The LCD panel will sit on the handlebars of the bike and be able to display
exercise information for the user in real-time. This serves as the immediate user
interface to the bike rider during exercise. The Pervasive Displays LCD panel has
dimensions of 81mm x 47mm, which should allow for plenty of display area to
R. M. Schafer 6 EE Senior Design
Fall 2022 High Level Design Document
show the required data. This option also has 61 currently in stock and can ship
immediately, which also factored into choosing this part [8].
5.5. App Interface Decisions
We plan to implement bluetooth via the chip already built into the board.
The app will have a menu where you can select pages with different statistics
the rider has built up over the course of their ride (average heart rate, average
speed, total distance, ride time, those same statistics saved from the last
couple of rides). The app will be designed using Unity Engine.
6. Open Questions
Our current idea is to upload the workout data set from our device into the
health app on iPhones or an equivalent health app. This process is something
we are currently unsure of how to do, and will need to do further research before
deciding if it is a feasible feature of our device.
Another issue that may come up with our design is building the heart rate
sensor. We have a tutorial on how to build a small board that we are hoping will
work, but we are unsure given our current knowledge on the topic if we can get it
to work and function properly on our device.
In order to track speed and distance of the ride, we plan to employ two
Hall effect sensors that we can use to read data. Using these sensors will
require more research, and well some trial and error once we put the device
together to make sure they function accurately.
In order to have accurate health data, we intend to include a measure of
calories burned. On many current fitness apps and devices, this data point tends
to be fairly inaccurate, often overestimating calories burned. Next semester, we
will have to do more research to develop a formula for computing calories
burned using the data we collect, including speed, distance, and pedal gear,
along with data inputted by the user such as height, weight, age, and gender. As
we refine our calorie formula, we may need to add additional user inputs or data
measurements to achieve an accurate result.
R. M. Schafer 7 EE Senior Design
Fall 2022 High Level Design Document
7. Major Component Costs
Our project does not have any significant costs above $20, besides the
board cost. This leaves us a significant amount of wiggle room in case
components don’t work. At the South Bend Bike Garage, if you volunteer six
hours you are eligible to obtain a free bike. We plan to do this, which helps
significantly lower our costs.
Component
Cost
Gyroscope (1)
$4.67
Hall Effect Sensor (2)
$2.14
Heart Rate Sensor (1)
$3.00
LCD Panel (1)
$17.85
Battery (1)
$12.50
USB C Interface (1)
$4.90
Bike (1)
$0
Board (1)
$50
Total
$98.06
8. Conclusions
References
[1] Peloton Bike. Dick's Sporting Goods.
[2] Peloton Bike+. Dick's Sporting Goods.
[3] Adafruit LiPo Battery. Digikey.
[4] Speed Technology USB C Interface. Digikey.
[5] Gyroscope. Digikey.
[6] Hall Effect Sensor. Digikey.
[7] Heart Rate Sensor Tutorial. Jameco.
[8] LCD Panel. Digikey.
R. M. Schafer 8 EE Senior Design